Codebase list libsdl2-net / fresh-snapshots/main
New upstream snapshot. Debian Janitor 1 year, 3 months ago
251 changed file(s) with 129102 addition(s) and 143 deletion(s). Raw diff Collapse all Expand all
0 projectfullname = SDL_net
1 projectshortname = SDL_net
2 incsubdir =
3 wikisubdir = SDL_net
4 apiprefixregex = SDLNet_
5 mainincludefname = SDL_net.h
6 versionfname = SDL_net.h
7 versionmajorregex = \A\#define\s+SDL_NET_MAJOR_VERSION\s+(\d+)\Z
8 versionminorregex = \A\#define\s+SDL_NET_MINOR_VERSION\s+(\d+)\Z
9 versionpatchregex = \A\#define\s+SDL_NET_PATCHLEVEL\s+(\d+)\Z
10 selectheaderregex = \ASDL_net\.h\Z
11 projecturl = https://libsdl.org/projects/SDL_net
12 wikiurl = https://wiki.libsdl.org/SDL_net
13 bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
14 warn_about_missing = 1
15 wikipreamble = (This function is part of SDL_net, a separate library from SDL.)
33
44 # See release_checklist.md
55 set(MAJOR_VERSION 2)
6 set(MINOR_VERSION 2)
6 set(MINOR_VERSION 3)
77 set(MICRO_VERSION 0)
88 set(SDL_REQUIRED_VERSION 2.0.4)
9
10 set(DYLIB_COMPATIBILITY_VERSION "1")
119
1210 include(PrivateSdlFunctions)
1311 sdl_calculate_derived_version_variables()
3432 else()
3533 find_package(SDL2test)
3634 endif()
35
36 set(SDLNET_PKGCONFIG_PRIVATE_LIBS)
3737
3838 # Set defaults preventing destination file conflicts
3939 set(SDL2NET_DEBUG_POSTFIX "d"
9494 endif()
9595 target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS)
9696 target_link_libraries(SDL2_net PRIVATE ws2_32 iphlpapi)
97 list(APPEND SDLNET_PKGCONFIG_PRIVATE_LIBS -lws2_32 -liphlpapi)
9798 if(SDL2NET_BUILD_SHARED_LIBS)
9899 target_sources(SDL2_net PRIVATE version.rc)
99100 endif()
177178 )
178179
179180 if(WIN32 AND NOT MINGW)
180 set(PKG_PREFIX "cmake")
181 else()
182 set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2_net")
183 endif()
181 set(SDLNET_INSTALL_CMAKEDIR_DEFAULT "cmake")
182 else()
183 set(SDLNET_INSTALL_CMAKEDIR_DEFAULT "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2_net")
184 endif()
185 set(SDLNET_INSTALL_CMAKEDIR "${SDLNET_INSTALL_CMAKEDIR_DEFAULT}" CACHE STRING "Location where to install SDL2_netConfig.cmake")
184186
185187 configure_package_config_file(SDL2_netConfig.cmake.in SDL2_netConfig.cmake
186 INSTALL_DESTINATION "${PKG_PREFIX}"
188 INSTALL_DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
187189 )
188190 write_basic_package_version_file("${PROJECT_BINARY_DIR}/SDL2_netConfigVersion.cmake"
189191 VERSION ${FULL_VERSION}
193195 FILES
194196 "${CMAKE_CURRENT_BINARY_DIR}/SDL2_netConfig.cmake"
195197 "${CMAKE_CURRENT_BINARY_DIR}/SDL2_netConfigVersion.cmake"
196 DESTINATION "${PKG_PREFIX}"
198 DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
197199 COMPONENT devel
198200 )
199201 install(EXPORT SDL2NetExports
200202 FILE SDL2_net-${sdl2_net_install_name_infix}-targets.cmake
201203 NAMESPACE SDL2_net::
202 DESTINATION "${PKG_PREFIX}"
204 DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
203205 COMPONENT devel
204206 )
205207
206208 if(SDL2NET_BUILD_SHARED_LIBS)
207 # Only create a .pc file for a shared SDL2_net
208 set(prefix "${CMAKE_INSTALL_PREFIX}")
209 set(exec_prefix "\${prefix}")
210 set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
211 set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
212 set(PACKAGE "${PROJECT_NAME}")
213 set(VERSION "${FULL_VERSION}")
214 set(SDL_VERSION "${SDL_REQUIRED_VERSION}")
215 string(JOIN " " PC_REQUIRES ${PC_REQUIRES})
216 string(JOIN " " PC_LIBS ${PC_LIBS})
217 configure_file("${PROJECT_SOURCE_DIR}/SDL2_net.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc.intermediate" @ONLY)
218 file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net-$<CONFIG>.pc" INPUT "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc.intermediate")
219
220 set(PC_DESTDIR)
221 if(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
222 # FreeBSD uses ${PREFIX}/libdata/pkgconfig
223 set(PC_DESTDIR "libdata/pkgconfig")
224 else()
225 set(PC_DESTDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
226 endif()
227 # Only install a SDL2_net.pc file in Release mode
228 install(CODE "
229 if(CMAKE_INSTALL_CONFIG_NAME MATCHES \"Release\")
230 # FIXME: use file(COPY_FILE) if minimum CMake version >= 3.21
231 execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy_if_different
232 \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net-$<CONFIG>.pc\"
233 \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc\")
234 file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${PC_DESTDIR}\"
235 TYPE FILE
236 FILES \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc\")
237 endif()" COMPONENT devel)
238 endif()
209 set(ENABLE_SHARED_TRUE "")
210 set(ENABLE_SHARED_FALSE "#")
211 set(ENABLE_STATIC_TRUE "#")
212 set(ENABLE_STATIC_FALSE "")
213 else()
214 set(ENABLE_SHARED_TRUE "#")
215 set(ENABLE_SHARED_FALSE "")
216 set(ENABLE_STATIC_TRUE "")
217 set(ENABLE_STATIC_FALSE "#")
218 endif()
219
220 set(prefix "${CMAKE_INSTALL_PREFIX}")
221 set(exec_prefix "\${prefix}")
222 set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
223 set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
224 set(PACKAGE "${PROJECT_NAME}")
225 set(VERSION "${FULL_VERSION}")
226 set(SDL_VERSION "${SDL_REQUIRED_VERSION}")
227 string(JOIN " " PC_REQUIRES ${PC_REQUIRES})
228 string(JOIN " " PC_LIBS ${PC_LIBS})
229 string(JOIN " " INETLIB ${SDLNET_PKGCONFIG_PRIVATE_LIBS})
230 configure_file("${PROJECT_SOURCE_DIR}/SDL2_net.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc.intermediate" @ONLY)
231 file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net-$<CONFIG>.pc" INPUT "${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc.intermediate")
232
233 set(PC_DESTDIR)
234 if(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
235 # FreeBSD uses ${PREFIX}/libdata/pkgconfig
236 set(PC_DESTDIR "libdata/pkgconfig")
237 else()
238 set(PC_DESTDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
239 endif()
240 # Always install SDL2_net.pc: libraries might be different between config modes
241 install(CODE "
242 # FIXME: use file(COPY_FILE) if minimum CMake version >= 3.21
243 execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy_if_different
244 \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net-$<CONFIG>.pc\"
245 \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc\")
246 file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${PC_DESTDIR}\"
247 TYPE FILE
248 FILES \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_net.pc\")" COMPONENT devel)
239249
240250 if(SDL2NET_BUILD_SHARED_LIBS AND (APPLE OR (UNIX AND NOT ANDROID)))
241251 install(
0 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
0 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
11
22 This software is provided 'as-is', without any express or implied
33 warranty. In no event will the authors be held liable for any damages
2020 CMakeLists.txt \
2121 LICENSE.txt \
2222 Makefile.os2 \
23 Makefile.psp \
2324 README.txt \
2425 SDL2_net.spec \
2526 SDL2_netConfig.cmake.in \
423423 CMakeLists.txt \
424424 LICENSE.txt \
425425 Makefile.os2 \
426 Makefile.psp \
426427 README.txt \
427428 SDL2_net.spec \
428429 SDL2_netConfig.cmake.in \
55
66 LIBNAME = SDL2net
77 MAJOR_VERSION = 2
8 MINOR_VERSION = 2
8 MINOR_VERSION = 3
99 MICRO_VERSION = 0
1010 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
1111
0 TARGET_LIB = libSDL2_net.a
1 OBJS= SDLnet.o \
2 SDLnetselect.o \
3 SDLnetTCP.o \
4 SDLnetUDP.o \
5
6 INCDIR = .
7 CFLAGS = -g -O2 -G0 -Wall -D__PSP__ $(shell $(PSPBIN)/sdl2-config --cflags)
8 CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
9 ASFLAGS = $(CFLAGS)
10
11 PSPBIN = $(shell psp-config -d)/bin
12
13 LDFLAGS=-L$(shell psp-config --pspsdk-path)/lib
14 LIBS=-lc -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser
15
16 install: $(TARGET_LIB)
17 cp $(TARGET_LIB) $(shell psp-config --psp-prefix)/lib
18 cp SDL_net.h $(shell psp-config --psp-prefix)/include
19
20 PSPSDK=$(shell psp-config --pspsdk-path)
21 include $(PSPSDK)/lib/build.mak
0 # Versioning
1
2 ## Since 2.1.0
3
4 `SDL_net` follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
5 and older versions of the Linux kernel:
6
7 * The major version (first part) increases when backwards compatibility
8 is broken, which will happen infrequently.
9
10 * If the minor version (second part) is divisible by 2
11 (for example 2.2.x, 2.4.x), this indicates a version that
12 is believed to be stable and suitable for production use.
13
14 * In stable releases, the patchlevel or micro version (third part)
15 indicates bugfix releases. Bugfix releases should not add or
16 remove ABI, so the ".0" release (for example 2.2.0) should be
17 forwards-compatible with all the bugfix releases from the
18 same cycle (for example 2.2.1).
19
20 * The minor version increases when new API or ABI is added, or when
21 other significant changes are made. Newer minor versions are
22 backwards-compatible, but not fully forwards-compatible.
23 For example, programs built against `SDL_net` 2.2.x should work fine
24 with 2.4.x, but programs built against 2.4.x will not necessarily
25 work with 2.2.x.
26
27 * If the minor version (second part) is not divisible by 2
28 (for example 2.1.x, 2.3.x), this indicates a development prerelease
29 that is not suitable for stable software distributions.
30 Use with caution.
31
32 * The patchlevel or micro version (third part) increases with
33 each prerelease.
34
35 * Each prerelease might add new API and/or ABI.
36
37 * Prereleases are backwards-compatible with older stable branches.
38 For example, 2.3.x will be backwards-compatible with 2.2.x.
39
40 * Prereleases are not guaranteed to be backwards-compatible with
41 each other. For example, new API or ABI added in 2.1.1
42 might be removed or changed in 2.1.2.
43 If this would be a problem for you, please do not use prereleases.
44
45 * Only upgrade to a prerelease if you can guarantee that you will
46 promptly upgrade to the stable release that follows it.
47 For example, do not upgrade to 2.1.x unless you will be able to
48 upgrade to 2.2.0 when it becomes available.
49
50 * Software distributions that have a freeze policy (in particular Linux
51 distributions with a release cycle, such as Debian and Fedora)
52 should usually only package stable releases, and not prereleases.
53
54 ## Before 2.1.0
55
56 Older versions of `SDL_net` used the patchlevel (micro version,
57 third part) for feature releases, and did not distinguish between feature
58 and bugfix releases.
+0
-62
SDL2_net.spec less more
0 %define name SDL2_net
1 %define version 2.2.0
2 %define release 1
3
4 Summary: SDL portable network library
5 Name: %{name}
6 Version: %{version}
7 Release: %{release}
8 Source0: %{name}-%{version}.tar.gz
9 URL: http://www.libsdl.org/projects/SDL_net/
10 License: LGPL
11 Group: System Environment/Libraries
12 BuildRoot: /var/tmp/%{name}-buildroot
13 Prefix: %{_prefix}
14
15 %description
16 This is a portable network library for use with SDL.
17
18 %package devel
19 Summary: Libraries and includes to develop SDL networked applications.
20 Group: Development/Libraries
21 Requires: %{name}
22
23 %description devel
24 This is a portable network library for use with SDL.
25
26 This is the libraries and include files you can use to develop SDL networked applications.
27
28 %prep
29 rm -rf ${RPM_BUILD_ROOT}
30
31 %setup -q
32
33 %build
34 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-gui
35 make
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 make install prefix=$RPM_BUILD_ROOT/%{prefix}
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %files
45 %defattr(-,root,root)
46 %doc README.txt CHANGES.txt LICENSE.txt
47 %{prefix}/lib/lib*.so.*
48
49 %files devel
50 %defattr(-,root,root)
51 %{prefix}/lib/lib*.a
52 %{prefix}/lib/lib*.la
53 %{prefix}/lib/lib*.so
54 %{prefix}/include/*/
55 %{prefix}/lib/pkgconfig/*.pc
56
57 %changelog
58 * Sat Feb 3 2001 Paul S Jenner <psj@firstlinux.net>
59 - First spec file based on SDL spec file
60
61 # end of file
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33 Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
44
55 This software is provided 'as-is', without any express or implied
5454 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
5555 */
5656 #define SDL_NET_MAJOR_VERSION 2
57 #define SDL_NET_MINOR_VERSION 2
57 #define SDL_NET_MINOR_VERSION 3
5858 #define SDL_NET_PATCHLEVEL 0
5959
6060 /* This macro can be used to fill a version structure with the compile-time
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33 Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
44
55 This software is provided 'as-is', without any express or implied
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
00 /*
11 SDL_net: An example cross-platform network library for use with SDL
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
4040 #include <ws2tcpip.h>
4141 #include <iphlpapi.h>
4242 #else /* UNIX */
43 #ifdef __OS2__
43 #if defined(__OS2__) || defined(__PSP__)
4444 #include <sys/param.h>
4545 #endif
4646 #include <sys/types.h>
5757 #endif
5858 #include <netinet/tcp.h>
5959 #include <sys/socket.h>
60 #ifndef __PSP__
6061 #include <net/if.h>
62 #endif
6163 #include <netdb.h>
6264 #endif /* WIN32 */
65
66 #ifdef __PSP__
67 #include <sys/select.h> /* for FD_SET, etc */
68 #endif
6369
6470 #ifdef __OS2__
6571 typedef int socklen_t;
0 <?xml version="1.0" encoding="UTF-8"?>
1 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2 <plist version="1.0">
3 <dict>
4 <key>CFBundleDevelopmentRegion</key>
5 <string>English</string>
6 <key>CFBundleExecutable</key>
7 <string>SDL2_net</string>
8 <key>CFBundleIdentifier</key>
9 <string>org.libsdl.SDL2-net</string>
10 <key>CFBundleInfoDictionaryVersion</key>
11 <string>6.0</string>
12 <key>CFBundleName</key>
13 <string>SDL2_net</string>
14 <key>CFBundlePackageType</key>
15 <string>FMWK</string>
16 <key>CFBundleShortVersionString</key>
17 <string>2.3.0</string>
18 <key>CFBundleVersion</key>
19 <string>2.3.0</string>
20 </dict>
21 </plist>
0 // !$*UTF8*$!
1 {
2 archiveVersion = 1;
3 classes = {
4 };
5 objectVersion = 46;
6 objects = {
7
8 /* Begin PBXBuildFile section */
9 7F1CA4C62854D7A400FE6C2E /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = 7F1CA4C12854D77600FE6C2E /* CMake */; };
10 BE48FF5807AFA9A800BB41DA /* SDL_net.h in Headers */ = {isa = PBXBuildFile; fileRef = 1014BAEA010A4B677F000001 /* SDL_net.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 BE48FF5C07AFA9A800BB41DA /* SDLnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 1014BAEB010A4B677F000001 /* SDLnet.c */; };
12 BE48FF5D07AFA9A800BB41DA /* SDLnetselect.c in Sources */ = {isa = PBXBuildFile; fileRef = 1014BAEC010A4B677F000001 /* SDLnetselect.c */; };
13 BE48FF5E07AFA9A800BB41DA /* SDLnetTCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 1014BAED010A4B677F000001 /* SDLnetTCP.c */; };
14 BE48FF5F07AFA9A800BB41DA /* SDLnetUDP.c in Sources */ = {isa = PBXBuildFile; fileRef = 1014BAEE010A4B677F000001 /* SDLnetUDP.c */; };
15 BE48FF6707AFA9A800BB41DA /* SDLnetsys.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E06A2830119C8317F000001 /* SDLnetsys.h */; };
16 BE48FF6907AFA9A800BB41DA /* SDLnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E06A2810119C8317F000001 /* SDLnet.c */; };
17 BE48FF6A07AFA9A800BB41DA /* SDLnetselect.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E06A2820119C8317F000001 /* SDLnetselect.c */; };
18 BE48FF6B07AFA9A800BB41DA /* SDLnetTCP.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E06A2840119C8317F000001 /* SDLnetTCP.c */; };
19 BE48FF6C07AFA9A800BB41DA /* SDLnetUDP.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E06A2850119C8317F000001 /* SDLnetUDP.c */; };
20 BE48FF8307AFAA6F00BB41DA /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE48FF8207AFAA6F00BB41DA /* SDL2.framework */; };
21 /* End PBXBuildFile section */
22
23 /* Begin PBXContainerItemProxy section */
24 BE48FF7A07AFA9A900BB41DA /* PBXContainerItemProxy */ = {
25 isa = PBXContainerItemProxy;
26 containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
27 proxyType = 1;
28 remoteGlobalIDString = BE48FF5607AFA9A800BB41DA;
29 remoteInfo = Framework;
30 };
31 /* End PBXContainerItemProxy section */
32
33 /* Begin PBXFileReference section */
34 0E06A2810119C8317F000001 /* SDLnet.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnet.c; path = ../SDLnet.c; sourceTree = SOURCE_ROOT; };
35 0E06A2820119C8317F000001 /* SDLnetselect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetselect.c; path = ../SDLnetselect.c; sourceTree = SOURCE_ROOT; };
36 0E06A2830119C8317F000001 /* SDLnetsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDLnetsys.h; path = ../SDLnetsys.h; sourceTree = SOURCE_ROOT; };
37 0E06A2840119C8317F000001 /* SDLnetTCP.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetTCP.c; path = ../SDLnetTCP.c; sourceTree = SOURCE_ROOT; };
38 0E06A2850119C8317F000001 /* SDLnetUDP.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetUDP.c; path = ../SDLnetUDP.c; sourceTree = SOURCE_ROOT; };
39 1014BAEA010A4B677F000001 /* SDL_net.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_net.h; path = ../SDL_net.h; sourceTree = SOURCE_ROOT; };
40 1014BAEB010A4B677F000001 /* SDLnet.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnet.c; path = ../SDLnet.c; sourceTree = SOURCE_ROOT; };
41 1014BAEC010A4B677F000001 /* SDLnetselect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetselect.c; path = ../SDLnetselect.c; sourceTree = SOURCE_ROOT; };
42 1014BAED010A4B677F000001 /* SDLnetTCP.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetTCP.c; path = ../SDLnetTCP.c; sourceTree = SOURCE_ROOT; };
43 1014BAEE010A4B677F000001 /* SDLnetUDP.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDLnetUDP.c; path = ../SDLnetUDP.c; sourceTree = SOURCE_ROOT; };
44 7F1CA4C12854D77600FE6C2E /* CMake */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CMake; sourceTree = "<group>"; };
45 BE48FF6307AFA9A800BB41DA /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
46 BE48FF6407AFA9A800BB41DA /* SDL2_net.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2_net.framework; sourceTree = BUILT_PRODUCTS_DIR; };
47 BE48FF6F07AFA9A900BB41DA /* libSDL2_net.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2_net.a; sourceTree = BUILT_PRODUCTS_DIR; };
48 BE48FF7307AFA9A900BB41DA /* Create DMG */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Create DMG"; sourceTree = BUILT_PRODUCTS_DIR; };
49 BE48FF8207AFAA6F00BB41DA /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = "<absolute>"; };
50 F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; };
51 F59C710400D5CB5801000001 /* Welcome.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Welcome.txt; sourceTree = "<group>"; };
52 F59C710600D5CB5801000001 /* SDL_net.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL_net.info; sourceTree = "<group>"; };
53 /* End PBXFileReference section */
54
55 /* Begin PBXFrameworksBuildPhase section */
56 BE48FF6007AFA9A800BB41DA /* Frameworks */ = {
57 isa = PBXFrameworksBuildPhase;
58 buildActionMask = 2147483647;
59 files = (
60 BE48FF8307AFAA6F00BB41DA /* SDL2.framework in Frameworks */,
61 );
62 runOnlyForDeploymentPostprocessing = 0;
63 };
64 BE48FF6D07AFA9A800BB41DA /* Frameworks */ = {
65 isa = PBXFrameworksBuildPhase;
66 buildActionMask = 2147483647;
67 files = (
68 );
69 runOnlyForDeploymentPostprocessing = 0;
70 };
71 /* End PBXFrameworksBuildPhase section */
72
73 /* Begin PBXGroup section */
74 0153844A006D81B07F000001 /* Public Headers */ = {
75 isa = PBXGroup;
76 children = (
77 1014BAEA010A4B677F000001 /* SDL_net.h */,
78 );
79 name = "Public Headers";
80 sourceTree = "<group>";
81 };
82 034768DDFF38A45A11DB9C8B /* Products */ = {
83 isa = PBXGroup;
84 children = (
85 089C1665FE841158C02AAC07 /* Resources */,
86 BE48FF6407AFA9A800BB41DA /* SDL2_net.framework */,
87 BE48FF6F07AFA9A900BB41DA /* libSDL2_net.a */,
88 BE48FF7307AFA9A900BB41DA /* Create DMG */,
89 );
90 name = Products;
91 sourceTree = "<group>";
92 };
93 0867D691FE84028FC02AAC07 /* SDL_netFramework */ = {
94 isa = PBXGroup;
95 children = (
96 F59C70FC00D5CB5801000001 /* pkg-support */,
97 0153844A006D81B07F000001 /* Public Headers */,
98 08FB77ACFE841707C02AAC07 /* Library Source */,
99 BE48FF8007AFAA4100BB41DA /* Frameworks */,
100 034768DDFF38A45A11DB9C8B /* Products */,
101 BE48FF6307AFA9A800BB41DA /* Info-Framework.plist */,
102 );
103 name = SDL_netFramework;
104 sourceTree = "<group>";
105 };
106 089C1665FE841158C02AAC07 /* Resources */ = {
107 isa = PBXGroup;
108 children = (
109 );
110 name = Resources;
111 sourceTree = "<group>";
112 };
113 08FB77ACFE841707C02AAC07 /* Library Source */ = {
114 isa = PBXGroup;
115 children = (
116 0E06A2830119C8317F000001 /* SDLnetsys.h */,
117 1014BAEB010A4B677F000001 /* SDLnet.c */,
118 1014BAEC010A4B677F000001 /* SDLnetselect.c */,
119 1014BAED010A4B677F000001 /* SDLnetTCP.c */,
120 1014BAEE010A4B677F000001 /* SDLnetUDP.c */,
121 0E06A2810119C8317F000001 /* SDLnet.c */,
122 0E06A2820119C8317F000001 /* SDLnetselect.c */,
123 0E06A2840119C8317F000001 /* SDLnetTCP.c */,
124 0E06A2850119C8317F000001 /* SDLnetUDP.c */,
125 );
126 name = "Library Source";
127 sourceTree = "<group>";
128 };
129 BE48FF8007AFAA4100BB41DA /* Frameworks */ = {
130 isa = PBXGroup;
131 children = (
132 BE48FF8107AFAA4A00BB41DA /* Linked Frameworks */,
133 );
134 name = Frameworks;
135 sourceTree = "<group>";
136 };
137 BE48FF8107AFAA4A00BB41DA /* Linked Frameworks */ = {
138 isa = PBXGroup;
139 children = (
140 BE48FF8207AFAA6F00BB41DA /* SDL2.framework */,
141 );
142 name = "Linked Frameworks";
143 sourceTree = "<group>";
144 };
145 F59C70FC00D5CB5801000001 /* pkg-support */ = {
146 isa = PBXGroup;
147 children = (
148 F59C710100D5CB5801000001 /* resources */,
149 F59C710600D5CB5801000001 /* SDL_net.info */,
150 );
151 path = "pkg-support";
152 sourceTree = SOURCE_ROOT;
153 };
154 F59C710100D5CB5801000001 /* resources */ = {
155 isa = PBXGroup;
156 children = (
157 7F1CA4C12854D77600FE6C2E /* CMake */,
158 F59C710300D5CB5801000001 /* ReadMe.txt */,
159 F59C710400D5CB5801000001 /* Welcome.txt */,
160 );
161 path = resources;
162 sourceTree = "<group>";
163 };
164 /* End PBXGroup section */
165
166 /* Begin PBXHeadersBuildPhase section */
167 BE48FF5707AFA9A800BB41DA /* Headers */ = {
168 isa = PBXHeadersBuildPhase;
169 buildActionMask = 2147483647;
170 files = (
171 BE48FF5807AFA9A800BB41DA /* SDL_net.h in Headers */,
172 );
173 runOnlyForDeploymentPostprocessing = 0;
174 };
175 BE48FF6607AFA9A800BB41DA /* Headers */ = {
176 isa = PBXHeadersBuildPhase;
177 buildActionMask = 2147483647;
178 files = (
179 BE48FF6707AFA9A800BB41DA /* SDLnetsys.h in Headers */,
180 );
181 runOnlyForDeploymentPostprocessing = 0;
182 };
183 /* End PBXHeadersBuildPhase section */
184
185 /* Begin PBXNativeTarget section */
186 BE48FF5607AFA9A800BB41DA /* Framework */ = {
187 isa = PBXNativeTarget;
188 buildConfigurationList = 00F071FD0992C7C800D99510 /* Build configuration list for PBXNativeTarget "Framework" */;
189 buildPhases = (
190 BE48FF5707AFA9A800BB41DA /* Headers */,
191 BE48FF5A07AFA9A800BB41DA /* Resources */,
192 BE48FF5B07AFA9A800BB41DA /* Sources */,
193 BE48FF6007AFA9A800BB41DA /* Frameworks */,
194 BE48FF6107AFA9A800BB41DA /* Rez */,
195 AAF0666114D4748600475C7D /* Convert SDL includes to SDL Framework includes */,
196 );
197 buildRules = (
198 );
199 comments = "Installed into ~/Library/Frameworks/SDL_net.framework\n\nAdd -framework SDL_net to your linker flags\nAdd ~/Library/Frameworks/SDL_net.framework/Headers to your header search path\nAdd ~/Library/Frameworks to your library search path";
200 dependencies = (
201 );
202 name = Framework;
203 productInstallPath = "@executable_path/../Frameworks";
204 productName = SDL_net;
205 productReference = BE48FF6407AFA9A800BB41DA /* SDL2_net.framework */;
206 productType = "com.apple.product-type.framework";
207 };
208 BE48FF6507AFA9A800BB41DA /* Static Library */ = {
209 isa = PBXNativeTarget;
210 buildConfigurationList = 00F072010992C7C800D99510 /* Build configuration list for PBXNativeTarget "Static Library" */;
211 buildPhases = (
212 BE48FF6607AFA9A800BB41DA /* Headers */,
213 BE48FF6807AFA9A800BB41DA /* Sources */,
214 BE48FF6D07AFA9A800BB41DA /* Frameworks */,
215 BE48FF6E07AFA9A800BB41DA /* Rez */,
216 );
217 buildRules = (
218 );
219 dependencies = (
220 );
221 name = "Static Library";
222 productInstallPath = /usr/local/lib;
223 productName = "Static Library";
224 productReference = BE48FF6F07AFA9A900BB41DA /* libSDL2_net.a */;
225 productType = "com.apple.product-type.library.static";
226 };
227 BE48FF7007AFA9A900BB41DA /* Create DMG */ = {
228 isa = PBXNativeTarget;
229 buildConfigurationList = 00F072050992C7C800D99510 /* Build configuration list for PBXNativeTarget "Create DMG" */;
230 buildPhases = (
231 BE48FF7207AFA9A900BB41DA /* ShellScript */,
232 );
233 buildRules = (
234 );
235 dependencies = (
236 BE48FF7B07AFA9A900BB41DA /* PBXTargetDependency */,
237 );
238 name = "Create DMG";
239 productInstallPath = /usr/local/bin;
240 productName = "Standard Package";
241 productReference = BE48FF7307AFA9A900BB41DA /* Create DMG */;
242 productType = "com.apple.product-type.tool";
243 };
244 /* End PBXNativeTarget section */
245
246 /* Begin PBXProject section */
247 0867D690FE84028FC02AAC07 /* Project object */ = {
248 isa = PBXProject;
249 attributes = {
250 LastUpgradeCheck = 0630;
251 };
252 buildConfigurationList = 00F072090992C7C800D99510 /* Build configuration list for PBXProject "SDL_net" */;
253 compatibilityVersion = "Xcode 3.2";
254 developmentRegion = English;
255 hasScannedForEncodings = 1;
256 knownRegions = (
257 English,
258 en,
259 );
260 mainGroup = 0867D691FE84028FC02AAC07 /* SDL_netFramework */;
261 productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
262 projectDirPath = "";
263 projectRoot = "";
264 targets = (
265 BE48FF5607AFA9A800BB41DA /* Framework */,
266 BE48FF6507AFA9A800BB41DA /* Static Library */,
267 BE48FF7007AFA9A900BB41DA /* Create DMG */,
268 );
269 };
270 /* End PBXProject section */
271
272 /* Begin PBXResourcesBuildPhase section */
273 BE48FF5A07AFA9A800BB41DA /* Resources */ = {
274 isa = PBXResourcesBuildPhase;
275 buildActionMask = 2147483647;
276 files = (
277 7F1CA4C62854D7A400FE6C2E /* CMake in Resources */,
278 );
279 runOnlyForDeploymentPostprocessing = 0;
280 };
281 /* End PBXResourcesBuildPhase section */
282
283 /* Begin PBXRezBuildPhase section */
284 BE48FF6107AFA9A800BB41DA /* Rez */ = {
285 isa = PBXRezBuildPhase;
286 buildActionMask = 2147483647;
287 files = (
288 );
289 runOnlyForDeploymentPostprocessing = 0;
290 };
291 BE48FF6E07AFA9A800BB41DA /* Rez */ = {
292 isa = PBXRezBuildPhase;
293 buildActionMask = 2147483647;
294 files = (
295 );
296 runOnlyForDeploymentPostprocessing = 0;
297 };
298 /* End PBXRezBuildPhase section */
299
300 /* Begin PBXShellScriptBuildPhase section */
301 AAF0666114D4748600475C7D /* Convert SDL includes to SDL Framework includes */ = {
302 isa = PBXShellScriptBuildPhase;
303 buildActionMask = 2147483647;
304 files = (
305 );
306 inputPaths = (
307 );
308 name = "Convert SDL includes to SDL Framework includes";
309 outputPaths = (
310 );
311 runOnlyForDeploymentPostprocessing = 0;
312 shellPath = /bin/sh;
313 shellScript = "cd $SYMROOT/$CONFIGURATION/$PUBLIC_HEADERS_FOLDER_PATH\nHEADER=SDL_net.h\nsed 's,#include \"\\(.*\\)\",#include <SDL2/\\1>,' <$HEADER >$HEADER.new\nmv $HEADER.new $HEADER";
314 };
315 BE48FF7207AFA9A900BB41DA /* ShellScript */ = {
316 isa = PBXShellScriptBuildPhase;
317 buildActionMask = 2147483647;
318 files = (
319 );
320 runOnlyForDeploymentPostprocessing = 0;
321 shellPath = /bin/sh;
322 shellScript = "PRODUCT_NAME=SDL2_net\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" --preserve-metadata\\=identifier,entitlements,flags --generate-entitlement-der $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
323 };
324 /* End PBXShellScriptBuildPhase section */
325
326 /* Begin PBXSourcesBuildPhase section */
327 BE48FF5B07AFA9A800BB41DA /* Sources */ = {
328 isa = PBXSourcesBuildPhase;
329 buildActionMask = 2147483647;
330 files = (
331 BE48FF5C07AFA9A800BB41DA /* SDLnet.c in Sources */,
332 BE48FF5D07AFA9A800BB41DA /* SDLnetselect.c in Sources */,
333 BE48FF5E07AFA9A800BB41DA /* SDLnetTCP.c in Sources */,
334 BE48FF5F07AFA9A800BB41DA /* SDLnetUDP.c in Sources */,
335 );
336 runOnlyForDeploymentPostprocessing = 0;
337 };
338 BE48FF6807AFA9A800BB41DA /* Sources */ = {
339 isa = PBXSourcesBuildPhase;
340 buildActionMask = 2147483647;
341 files = (
342 BE48FF6907AFA9A800BB41DA /* SDLnet.c in Sources */,
343 BE48FF6A07AFA9A800BB41DA /* SDLnetselect.c in Sources */,
344 BE48FF6B07AFA9A800BB41DA /* SDLnetTCP.c in Sources */,
345 BE48FF6C07AFA9A800BB41DA /* SDLnetUDP.c in Sources */,
346 );
347 runOnlyForDeploymentPostprocessing = 0;
348 };
349 /* End PBXSourcesBuildPhase section */
350
351 /* Begin PBXTargetDependency section */
352 BE48FF7B07AFA9A900BB41DA /* PBXTargetDependency */ = {
353 isa = PBXTargetDependency;
354 target = BE48FF5607AFA9A800BB41DA /* Framework */;
355 targetProxy = BE48FF7A07AFA9A900BB41DA /* PBXContainerItemProxy */;
356 };
357 /* End PBXTargetDependency section */
358
359 /* Begin XCBuildConfiguration section */
360 00F071FE0992C7C800D99510 /* Debug */ = {
361 isa = XCBuildConfiguration;
362 buildSettings = {
363 };
364 name = Debug;
365 };
366 00F071FF0992C7C800D99510 /* Release */ = {
367 isa = XCBuildConfiguration;
368 buildSettings = {
369 };
370 name = Release;
371 };
372 00F072020992C7C800D99510 /* Debug */ = {
373 isa = XCBuildConfiguration;
374 buildSettings = {
375 };
376 name = Debug;
377 };
378 00F072030992C7C800D99510 /* Release */ = {
379 isa = XCBuildConfiguration;
380 buildSettings = {
381 };
382 name = Release;
383 };
384 00F072060992C7C800D99510 /* Debug */ = {
385 isa = XCBuildConfiguration;
386 buildSettings = {
387 GCC_DYNAMIC_NO_PIC = NO;
388 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
389 GCC_OPTIMIZATION_LEVEL = 0;
390 OTHER_CFLAGS = "";
391 OTHER_LDFLAGS = "";
392 OTHER_REZFLAGS = "";
393 PRODUCT_NAME = "Create DMG";
394 REZ_EXECUTABLE = YES;
395 SECTORDER_FLAGS = "";
396 WARNING_CFLAGS = (
397 "-Wmost",
398 "-Wno-four-char-constants",
399 "-Wno-unknown-pragmas",
400 );
401 ZERO_LINK = YES;
402 };
403 name = Debug;
404 };
405 00F072070992C7C800D99510 /* Release */ = {
406 isa = XCBuildConfiguration;
407 buildSettings = {
408 OTHER_CFLAGS = "";
409 OTHER_LDFLAGS = "";
410 OTHER_REZFLAGS = "";
411 PRODUCT_NAME = "Create DMG";
412 REZ_EXECUTABLE = YES;
413 SECTORDER_FLAGS = "";
414 WARNING_CFLAGS = (
415 "-Wmost",
416 "-Wno-four-char-constants",
417 "-Wno-unknown-pragmas",
418 );
419 ZERO_LINK = NO;
420 };
421 name = Release;
422 };
423 00F0720A0992C7C800D99510 /* Debug */ = {
424 isa = XCBuildConfiguration;
425 buildSettings = {
426 ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
427 COPY_PHASE_STRIP = NO;
428 DYLIB_COMPATIBILITY_VERSION = 301.0.0;
429 DYLIB_CURRENT_VERSION = 301.0.0;
430 DYLIB_INSTALL_NAME_BASE = "@rpath";
431 ENABLE_TESTABILITY = YES;
432 FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/$(PLATFORM)\"";
433 GCC_OPTIMIZATION_LEVEL = 0;
434 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
435 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/$(PLATFORM)/SDL2.framework/Headers\"";
436 INFOPLIST_FILE = "Info-Framework.plist";
437 IPHONEOS_DEPLOYMENT_TARGET = 9.0;
438 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
439 MACOSX_DEPLOYMENT_TARGET = 10.9;
440 ONLY_ACTIVE_ARCH = YES;
441 PLATFORM = "";
442 "PLATFORM[sdk=appletvos*]" = tvOS;
443 "PLATFORM[sdk=iphoneos*]" = iOS;
444 "PLATFORM[sdk=macosx*]" = macOS;
445 PRODUCT_BUNDLE_IDENTIFIER = "org.libsdl.SDL2-net";
446 PRODUCT_NAME = SDL2_net;
447 SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
448 SUPPORTS_MACCATALYST = YES;
449 TVOS_DEPLOYMENT_TARGET = 9.0;
450 };
451 name = Debug;
452 };
453 00F0720B0992C7C800D99510 /* Release */ = {
454 isa = XCBuildConfiguration;
455 buildSettings = {
456 ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
457 DEPLOYMENT_POSTPROCESSING = YES;
458 DYLIB_COMPATIBILITY_VERSION = 301.0.0;
459 DYLIB_CURRENT_VERSION = 301.0.0;
460 DYLIB_INSTALL_NAME_BASE = "@rpath";
461 FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/$(PLATFORM)\"";
462 GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
463 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
464 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/$(PLATFORM)/SDL2.framework/Headers\"";
465 INFOPLIST_FILE = "Info-Framework.plist";
466 IPHONEOS_DEPLOYMENT_TARGET = 9.0;
467 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
468 MACOSX_DEPLOYMENT_TARGET = 10.9;
469 PLATFORM = "";
470 "PLATFORM[sdk=appletvos*]" = tvOS;
471 "PLATFORM[sdk=iphoneos*]" = iOS;
472 "PLATFORM[sdk=macosx*]" = macOS;
473 PRODUCT_BUNDLE_IDENTIFIER = "org.libsdl.SDL2-net";
474 PRODUCT_NAME = SDL2_net;
475 SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
476 SUPPORTS_MACCATALYST = YES;
477 TVOS_DEPLOYMENT_TARGET = 9.0;
478 };
479 name = Release;
480 };
481 /* End XCBuildConfiguration section */
482
483 /* Begin XCConfigurationList section */
484 00F071FD0992C7C800D99510 /* Build configuration list for PBXNativeTarget "Framework" */ = {
485 isa = XCConfigurationList;
486 buildConfigurations = (
487 00F071FE0992C7C800D99510 /* Debug */,
488 00F071FF0992C7C800D99510 /* Release */,
489 );
490 defaultConfigurationIsVisible = 0;
491 defaultConfigurationName = Debug;
492 };
493 00F072010992C7C800D99510 /* Build configuration list for PBXNativeTarget "Static Library" */ = {
494 isa = XCConfigurationList;
495 buildConfigurations = (
496 00F072020992C7C800D99510 /* Debug */,
497 00F072030992C7C800D99510 /* Release */,
498 );
499 defaultConfigurationIsVisible = 0;
500 defaultConfigurationName = Debug;
501 };
502 00F072050992C7C800D99510 /* Build configuration list for PBXNativeTarget "Create DMG" */ = {
503 isa = XCConfigurationList;
504 buildConfigurations = (
505 00F072060992C7C800D99510 /* Debug */,
506 00F072070992C7C800D99510 /* Release */,
507 );
508 defaultConfigurationIsVisible = 0;
509 defaultConfigurationName = Debug;
510 };
511 00F072090992C7C800D99510 /* Build configuration list for PBXProject "SDL_net" */ = {
512 isa = XCConfigurationList;
513 buildConfigurations = (
514 00F0720A0992C7C800D99510 /* Debug */,
515 00F0720B0992C7C800D99510 /* Release */,
516 );
517 defaultConfigurationIsVisible = 0;
518 defaultConfigurationName = Debug;
519 };
520 /* End XCConfigurationList section */
521 };
522 rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
523 }
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL.h
23 *
24 * Main include header for the SDL library
25 */
26
27
28 #ifndef SDL_h_
29 #define SDL_h_
30
31 #include <SDL2/SDL_main.h>
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_assert.h>
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_audio.h>
36 #include <SDL2/SDL_clipboard.h>
37 #include <SDL2/SDL_cpuinfo.h>
38 #include <SDL2/SDL_endian.h>
39 #include <SDL2/SDL_error.h>
40 #include <SDL2/SDL_events.h>
41 #include <SDL2/SDL_filesystem.h>
42 #include <SDL2/SDL_gamecontroller.h>
43 #include <SDL2/SDL_haptic.h>
44 #include <SDL2/SDL_hidapi.h>
45 #include <SDL2/SDL_hints.h>
46 #include <SDL2/SDL_joystick.h>
47 #include <SDL2/SDL_loadso.h>
48 #include <SDL2/SDL_log.h>
49 #include <SDL2/SDL_messagebox.h>
50 #include <SDL2/SDL_metal.h>
51 #include <SDL2/SDL_mutex.h>
52 #include <SDL2/SDL_power.h>
53 #include <SDL2/SDL_render.h>
54 #include <SDL2/SDL_rwops.h>
55 #include <SDL2/SDL_sensor.h>
56 #include <SDL2/SDL_shape.h>
57 #include <SDL2/SDL_system.h>
58 #include <SDL2/SDL_thread.h>
59 #include <SDL2/SDL_timer.h>
60 #include <SDL2/SDL_version.h>
61 #include <SDL2/SDL_video.h>
62 #include <SDL2/SDL_locale.h>
63 #include <SDL2/SDL_misc.h>
64
65 #include <SDL2/begin_code.h>
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /* As of version 0.5, SDL is loaded dynamically into the application */
72
73 /**
74 * \name SDL_INIT_*
75 *
76 * These are the flags which may be passed to SDL_Init(). You should
77 * specify the subsystems which you will be using in your application.
78 */
79 /* @{ */
80 #define SDL_INIT_TIMER 0x00000001u
81 #define SDL_INIT_AUDIO 0x00000010u
82 #define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
83 #define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
84 #define SDL_INIT_HAPTIC 0x00001000u
85 #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
86 #define SDL_INIT_EVENTS 0x00004000u
87 #define SDL_INIT_SENSOR 0x00008000u
88 #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
89 #define SDL_INIT_EVERYTHING ( \
90 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
91 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
92 )
93 /* @} */
94
95 /**
96 * Initialize the SDL library.
97 *
98 * SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
99 * two may be used interchangeably. Though for readability of your code
100 * SDL_InitSubSystem() might be preferred.
101 *
102 * The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
103 * subsystems are initialized by default. Message boxes
104 * (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
105 * video subsystem, in hopes of being useful in showing an error dialog when
106 * SDL_Init fails. You must specifically initialize other subsystems if you
107 * use them in your application.
108 *
109 * Logging (such as SDL_Log) works without initialization, too.
110 *
111 * `flags` may be any of the following OR'd together:
112 *
113 * - `SDL_INIT_TIMER`: timer subsystem
114 * - `SDL_INIT_AUDIO`: audio subsystem
115 * - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
116 * subsystem
117 * - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
118 * events subsystem
119 * - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
120 * - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
121 * initializes the joystick subsystem
122 * - `SDL_INIT_EVENTS`: events subsystem
123 * - `SDL_INIT_EVERYTHING`: all of the above subsystems
124 * - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
125 *
126 * Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
127 * for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
128 * call SDL_Quit() to force shutdown). If a subsystem is already loaded then
129 * this call will increase the ref-count and return.
130 *
131 * \param flags subsystem initialization flags
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_InitSubSystem
138 * \sa SDL_Quit
139 * \sa SDL_SetMainReady
140 * \sa SDL_WasInit
141 */
142 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
143
144 /**
145 * Compatibility function to initialize the SDL library.
146 *
147 * In SDL2, this function and SDL_Init() are interchangeable.
148 *
149 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
150 * \returns 0 on success or a negative error code on failure; call
151 * SDL_GetError() for more information.
152 *
153 * \since This function is available since SDL 2.0.0.
154 *
155 * \sa SDL_Init
156 * \sa SDL_Quit
157 * \sa SDL_QuitSubSystem
158 */
159 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
160
161 /**
162 * Shut down specific SDL subsystems.
163 *
164 * If you start a subsystem using a call to that subsystem's init function
165 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
166 * SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
167 * that subsystem's quit function (SDL_VideoQuit()) directly instead. But
168 * generally, you should not be using those functions directly anyhow; use
169 * SDL_Init() instead.
170 *
171 * You still need to call SDL_Quit() even if you close all open subsystems
172 * with SDL_QuitSubSystem().
173 *
174 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
175 *
176 * \since This function is available since SDL 2.0.0.
177 *
178 * \sa SDL_InitSubSystem
179 * \sa SDL_Quit
180 */
181 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
182
183 /**
184 * Get a mask of the specified subsystems which are currently initialized.
185 *
186 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
187 * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
188 * returns the initialization status of the specified subsystems.
189 *
190 * The return value does not include SDL_INIT_NOPARACHUTE.
191 *
192 * \since This function is available since SDL 2.0.0.
193 *
194 * \sa SDL_Init
195 * \sa SDL_InitSubSystem
196 */
197 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
198
199 /**
200 * Clean up all initialized subsystems.
201 *
202 * You should call this function even if you have already shutdown each
203 * initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
204 * function even in the case of errors in initialization.
205 *
206 * If you start a subsystem using a call to that subsystem's init function
207 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
208 * then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
209 * it down before calling SDL_Quit(). But generally, you should not be using
210 * those functions directly anyhow; use SDL_Init() instead.
211 *
212 * You can use this function with atexit() to ensure that it is run when your
213 * application is shutdown, but it is not wise to do this from a library or
214 * other dynamically loaded code.
215 *
216 * \since This function is available since SDL 2.0.0.
217 *
218 * \sa SDL_Init
219 * \sa SDL_QuitSubSystem
220 */
221 extern DECLSPEC void SDLCALL SDL_Quit(void);
222
223 /* Ends C function definitions when using C++ */
224 #ifdef __cplusplus
225 }
226 #endif
227 #include <SDL2/close_code.h>
228
229 #endif /* SDL_h_ */
230
231 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_assert_h_
22 #define SDL_assert_h_
23
24 #include <SDL2/SDL_config.h>
25
26 #include <SDL2/begin_code.h>
27 /* Set up for C function definitions, even when using C++ */
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #ifndef SDL_ASSERT_LEVEL
33 #ifdef SDL_DEFAULT_ASSERT_LEVEL
34 #define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
35 #elif defined(_DEBUG) || defined(DEBUG) || \
36 (defined(__GNUC__) && !defined(__OPTIMIZE__))
37 #define SDL_ASSERT_LEVEL 2
38 #else
39 #define SDL_ASSERT_LEVEL 1
40 #endif
41 #endif /* SDL_ASSERT_LEVEL */
42
43 /*
44 These are macros and not first class functions so that the debugger breaks
45 on the assertion line and not in some random guts of SDL, and so each
46 assert can have unique static variables associated with it.
47 */
48
49 #if defined(_MSC_VER)
50 /* Don't include intrin.h here because it contains C++ code */
51 extern void __cdecl __debugbreak(void);
52 #define SDL_TriggerBreakpoint() __debugbreak()
53 #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
54 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
55 #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
56 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
57 #elif defined(__APPLE__) && defined(__arm__)
58 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
59 #elif defined(__386__) && defined(__WATCOMC__)
60 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
61 #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
62 #include <signal.h>
63 #define SDL_TriggerBreakpoint() raise(SIGTRAP)
64 #else
65 /* How do we trigger breakpoints on this platform? */
66 #define SDL_TriggerBreakpoint()
67 #endif
68
69 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
70 # define SDL_FUNCTION __func__
71 #elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
72 # define SDL_FUNCTION __FUNCTION__
73 #else
74 # define SDL_FUNCTION "???"
75 #endif
76 #define SDL_FILE __FILE__
77 #define SDL_LINE __LINE__
78
79 /*
80 sizeof (x) makes the compiler still parse the expression even without
81 assertions enabled, so the code is always checked at compile time, but
82 doesn't actually generate code for it, so there are no side effects or
83 expensive checks at run time, just the constant size of what x WOULD be,
84 which presumably gets optimized out as unused.
85 This also solves the problem of...
86
87 int somevalue = blah();
88 SDL_assert(somevalue == 1);
89
90 ...which would cause compiles to complain that somevalue is unused if we
91 disable assertions.
92 */
93
94 /* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
95 this condition isn't constant. And looks like an owl's face! */
96 #ifdef _MSC_VER /* stupid /W4 warnings. */
97 #define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
98 #else
99 #define SDL_NULL_WHILE_LOOP_CONDITION (0)
100 #endif
101
102 #define SDL_disabled_assert(condition) \
103 do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
104
105 typedef enum
106 {
107 SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
108 SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
109 SDL_ASSERTION_ABORT, /**< Terminate the program. */
110 SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
111 SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
112 } SDL_AssertState;
113
114 typedef struct SDL_AssertData
115 {
116 int always_ignore;
117 unsigned int trigger_count;
118 const char *condition;
119 const char *filename;
120 int linenum;
121 const char *function;
122 const struct SDL_AssertData *next;
123 } SDL_AssertData;
124
125 #if (SDL_ASSERT_LEVEL > 0)
126
127 /* Never call this directly. Use the SDL_assert* macros. */
128 extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
129 const char *,
130 const char *, int)
131 #if defined(__clang__)
132 #if __has_feature(attribute_analyzer_noreturn)
133 /* this tells Clang's static analysis that we're a custom assert function,
134 and that the analyzer should assume the condition was always true past this
135 SDL_assert test. */
136 __attribute__((analyzer_noreturn))
137 #endif
138 #endif
139 ;
140
141 /* the do {} while(0) avoids dangling else problems:
142 if (x) SDL_assert(y); else blah();
143 ... without the do/while, the "else" could attach to this macro's "if".
144 We try to handle just the minimum we need here in a macro...the loop,
145 the static vars, and break points. The heavy lifting is handled in
146 SDL_ReportAssertion(), in SDL_assert.c.
147 */
148 #define SDL_enabled_assert(condition) \
149 do { \
150 while ( !(condition) ) { \
151 static struct SDL_AssertData sdl_assert_data = { \
152 0, 0, #condition, 0, 0, 0, 0 \
153 }; \
154 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
155 if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
156 continue; /* go again. */ \
157 } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
158 SDL_TriggerBreakpoint(); \
159 } \
160 break; /* not retrying. */ \
161 } \
162 } while (SDL_NULL_WHILE_LOOP_CONDITION)
163
164 #endif /* enabled assertions support code */
165
166 /* Enable various levels of assertions. */
167 #if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
168 # define SDL_assert(condition) SDL_disabled_assert(condition)
169 # define SDL_assert_release(condition) SDL_disabled_assert(condition)
170 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
171 #elif SDL_ASSERT_LEVEL == 1 /* release settings. */
172 # define SDL_assert(condition) SDL_disabled_assert(condition)
173 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
174 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
175 #elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
176 # define SDL_assert(condition) SDL_enabled_assert(condition)
177 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
178 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
179 #elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
180 # define SDL_assert(condition) SDL_enabled_assert(condition)
181 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
182 # define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
183 #else
184 # error Unknown assertion level.
185 #endif
186
187 /* this assertion is never disabled at any level. */
188 #define SDL_assert_always(condition) SDL_enabled_assert(condition)
189
190
191 /**
192 * A callback that fires when an SDL assertion fails.
193 *
194 * \param data a pointer to the SDL_AssertData structure corresponding to the
195 * current assertion
196 * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
197 * \returns an SDL_AssertState value indicating how to handle the failure.
198 */
199 typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
200 const SDL_AssertData* data, void* userdata);
201
202 /**
203 * Set an application-defined assertion handler.
204 *
205 * This function allows an application to show its own assertion UI and/or
206 * force the response to an assertion failure. If the application doesn't
207 * provide this, SDL will try to do the right thing, popping up a
208 * system-specific GUI dialog, and probably minimizing any fullscreen windows.
209 *
210 * This callback may fire from any thread, but it runs wrapped in a mutex, so
211 * it will only fire from one thread at a time.
212 *
213 * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
214 *
215 * \param handler the SDL_AssertionHandler function to call when an assertion
216 * fails or NULL for the default handler
217 * \param userdata a pointer that is passed to `handler`
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_GetAssertionHandler
222 */
223 extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
224 SDL_AssertionHandler handler,
225 void *userdata);
226
227 /**
228 * Get the default assertion handler.
229 *
230 * This returns the function pointer that is called by default when an
231 * assertion is triggered. This is an internal function provided by SDL, that
232 * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
233 * provide a different function.
234 *
235 * \returns the default SDL_AssertionHandler that is called when an assert
236 * triggers.
237 *
238 * \since This function is available since SDL 2.0.2.
239 *
240 * \sa SDL_GetAssertionHandler
241 */
242 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
243
244 /**
245 * Get the current assertion handler.
246 *
247 * This returns the function pointer that is called when an assertion is
248 * triggered. This is either the value last passed to
249 * SDL_SetAssertionHandler(), or if no application-specified function is set,
250 * is equivalent to calling SDL_GetDefaultAssertionHandler().
251 *
252 * The parameter `puserdata` is a pointer to a void*, which will store the
253 * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
254 * will always be NULL for the default handler. If you don't care about this
255 * data, it is safe to pass a NULL pointer to this function to ignore it.
256 *
257 * \param puserdata pointer which is filled with the "userdata" pointer that
258 * was passed to SDL_SetAssertionHandler()
259 * \returns the SDL_AssertionHandler that is called when an assert triggers.
260 *
261 * \since This function is available since SDL 2.0.2.
262 *
263 * \sa SDL_SetAssertionHandler
264 */
265 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
266
267 /**
268 * Get a list of all assertion failures.
269 *
270 * This function gets all assertions triggered since the last call to
271 * SDL_ResetAssertionReport(), or the start of the program.
272 *
273 * The proper way to examine this data looks something like this:
274 *
275 * ```c
276 * const SDL_AssertData *item = SDL_GetAssertionReport();
277 * while (item) {
278 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
279 * item->condition, item->function, item->filename,
280 * item->linenum, item->trigger_count,
281 * item->always_ignore ? "yes" : "no");
282 * item = item->next;
283 * }
284 * ```
285 *
286 * \returns a list of all failed assertions or NULL if the list is empty. This
287 * memory should not be modified or freed by the application.
288 *
289 * \since This function is available since SDL 2.0.0.
290 *
291 * \sa SDL_ResetAssertionReport
292 */
293 extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
294
295 /**
296 * Clear the list of all assertion failures.
297 *
298 * This function will clear the list of all assertions triggered up to that
299 * point. Immediately following this call, SDL_GetAssertionReport will return
300 * no items. In addition, any previously-triggered assertions will be reset to
301 * a trigger_count of zero, and their always_ignore state will be false.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetAssertionReport
306 */
307 extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
308
309
310 /* these had wrong naming conventions until 2.0.4. Please update your app! */
311 #define SDL_assert_state SDL_AssertState
312 #define SDL_assert_data SDL_AssertData
313
314
315 /* Ends C function definitions when using C++ */
316 #ifdef __cplusplus
317 }
318 #endif
319 #include <SDL2/close_code.h>
320
321 #endif /* SDL_assert_h_ */
322
323 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_atomic.h
23 *
24 * Atomic operations.
25 *
26 * IMPORTANT:
27 * If you are not an expert in concurrent lockless programming, you should
28 * only be using the atomic lock and reference counting functions in this
29 * file. In all other cases you should be protecting your data structures
30 * with full mutexes.
31 *
32 * The list of "safe" functions to use are:
33 * SDL_AtomicLock()
34 * SDL_AtomicUnlock()
35 * SDL_AtomicIncRef()
36 * SDL_AtomicDecRef()
37 *
38 * Seriously, here be dragons!
39 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 *
41 * You can find out a little more about lockless programming and the
42 * subtle issues that can arise here:
43 * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
44 *
45 * There's also lots of good information here:
46 * http://www.1024cores.net/home/lock-free-algorithms
47 * http://preshing.com/
48 *
49 * These operations may or may not actually be implemented using
50 * processor specific atomic operations. When possible they are
51 * implemented as true processor specific atomic operations. When that
52 * is not possible the are implemented using locks that *do* use the
53 * available atomic operations.
54 *
55 * All of the atomic operations that modify memory are full memory barriers.
56 */
57
58 #ifndef SDL_atomic_h_
59 #define SDL_atomic_h_
60
61 #include <SDL2/SDL_stdinc.h>
62 #include <SDL2/SDL_platform.h>
63
64 #include <SDL2/begin_code.h>
65
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /**
72 * \name SDL AtomicLock
73 *
74 * The atomic locks are efficient spinlocks using CPU instructions,
75 * but are vulnerable to starvation and can spin forever if a thread
76 * holding a lock has been terminated. For this reason you should
77 * minimize the code executed inside an atomic lock and never do
78 * expensive things like API or system calls while holding them.
79 *
80 * The atomic locks are not safe to lock recursively.
81 *
82 * Porting Note:
83 * The spin lock functions and type are required and can not be
84 * emulated because they are used in the atomic emulation code.
85 */
86 /* @{ */
87
88 typedef int SDL_SpinLock;
89
90 /**
91 * Try to lock a spin lock by setting it to a non-zero value.
92 *
93 * ***Please note that spinlocks are dangerous if you don't know what you're
94 * doing. Please be careful using any sort of spinlock!***
95 *
96 * \param lock a pointer to a lock variable
97 * \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
98 * held.
99 *
100 * \since This function is available since SDL 2.0.0.
101 *
102 * \sa SDL_AtomicLock
103 * \sa SDL_AtomicUnlock
104 */
105 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
106
107 /**
108 * Lock a spin lock by setting it to a non-zero value.
109 *
110 * ***Please note that spinlocks are dangerous if you don't know what you're
111 * doing. Please be careful using any sort of spinlock!***
112 *
113 * \param lock a pointer to a lock variable
114 *
115 * \since This function is available since SDL 2.0.0.
116 *
117 * \sa SDL_AtomicTryLock
118 * \sa SDL_AtomicUnlock
119 */
120 extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
121
122 /**
123 * Unlock a spin lock by setting it to 0.
124 *
125 * Always returns immediately.
126 *
127 * ***Please note that spinlocks are dangerous if you don't know what you're
128 * doing. Please be careful using any sort of spinlock!***
129 *
130 * \param lock a pointer to a lock variable
131 *
132 * \since This function is available since SDL 2.0.0.
133 *
134 * \sa SDL_AtomicLock
135 * \sa SDL_AtomicTryLock
136 */
137 extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
138
139 /* @} *//* SDL AtomicLock */
140
141
142 /**
143 * The compiler barrier prevents the compiler from reordering
144 * reads and writes to globally visible variables across the call.
145 */
146 #if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
147 void _ReadWriteBarrier(void);
148 #pragma intrinsic(_ReadWriteBarrier)
149 #define SDL_CompilerBarrier() _ReadWriteBarrier()
150 #elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
151 /* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
152 #define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
153 #elif defined(__WATCOMC__)
154 extern __inline void SDL_CompilerBarrier(void);
155 #pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
156 #else
157 #define SDL_CompilerBarrier() \
158 { SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
159 #endif
160
161 /**
162 * Memory barriers are designed to prevent reads and writes from being
163 * reordered by the compiler and being seen out of order on multi-core CPUs.
164 *
165 * A typical pattern would be for thread A to write some data and a flag, and
166 * for thread B to read the flag and get the data. In this case you would
167 * insert a release barrier between writing the data and the flag,
168 * guaranteeing that the data write completes no later than the flag is
169 * written, and you would insert an acquire barrier between reading the flag
170 * and reading the data, to ensure that all the reads associated with the flag
171 * have completed.
172 *
173 * In this pattern you should always see a release barrier paired with an
174 * acquire barrier and you should gate the data reads/writes with a single
175 * flag variable.
176 *
177 * For more information on these semantics, take a look at the blog post:
178 * http://preshing.com/20120913/acquire-and-release-semantics
179 *
180 * \since This function is available since SDL 2.0.6.
181 */
182 extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
183 extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
184
185 #if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
186 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
187 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
188 #elif defined(__GNUC__) && defined(__aarch64__)
189 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
190 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
191 #elif defined(__GNUC__) && defined(__arm__)
192 #if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
193 /* Information from:
194 https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
195
196 The Linux kernel provides a helper function which provides the right code for a memory barrier,
197 hard-coded at address 0xffff0fa0
198 */
199 typedef void (*SDL_KernelMemoryBarrierFunc)();
200 #define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
201 #define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
202 #elif 0 /* defined(__QNXNTO__) */
203 #include <sys/cpuinline.h>
204
205 #define SDL_MemoryBarrierRelease() __cpu_membarrier()
206 #define SDL_MemoryBarrierAcquire() __cpu_membarrier()
207 #else
208 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
209 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
210 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
211 #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
212 #ifdef __thumb__
213 /* The mcr instruction isn't available in thumb mode, use real functions */
214 #define SDL_MEMORY_BARRIER_USES_FUNCTION
215 #define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
216 #define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
217 #else
218 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
219 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
220 #endif /* __thumb__ */
221 #else
222 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
223 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
224 #endif /* __LINUX__ || __ANDROID__ */
225 #endif /* __GNUC__ && __arm__ */
226 #else
227 #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
228 /* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
229 #include <mbarrier.h>
230 #define SDL_MemoryBarrierRelease() __machine_rel_barrier()
231 #define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
232 #else
233 /* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
234 #define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
235 #define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
236 #endif
237 #endif
238
239 /**
240 * \brief A type representing an atomic integer value. It is a struct
241 * so people don't accidentally use numeric operations on it.
242 */
243 typedef struct { int value; } SDL_atomic_t;
244
245 /**
246 * Set an atomic variable to a new value if it is currently an old value.
247 *
248 * ***Note: If you don't know what this function is for, you shouldn't use
249 * it!***
250 *
251 * \param a a pointer to an SDL_atomic_t variable to be modified
252 * \param oldval the old value
253 * \param newval the new value
254 * \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
255 *
256 * \since This function is available since SDL 2.0.0.
257 *
258 * \sa SDL_AtomicCASPtr
259 * \sa SDL_AtomicGet
260 * \sa SDL_AtomicSet
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
263
264 /**
265 * Set an atomic variable to a value.
266 *
267 * This function also acts as a full memory barrier.
268 *
269 * ***Note: If you don't know what this function is for, you shouldn't use
270 * it!***
271 *
272 * \param a a pointer to an SDL_atomic_t variable to be modified
273 * \param v the desired value
274 * \returns the previous value of the atomic variable.
275 *
276 * \since This function is available since SDL 2.0.2.
277 *
278 * \sa SDL_AtomicGet
279 */
280 extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
281
282 /**
283 * Get the value of an atomic variable.
284 *
285 * ***Note: If you don't know what this function is for, you shouldn't use
286 * it!***
287 *
288 * \param a a pointer to an SDL_atomic_t variable
289 * \returns the current value of an atomic variable.
290 *
291 * \since This function is available since SDL 2.0.2.
292 *
293 * \sa SDL_AtomicSet
294 */
295 extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
296
297 /**
298 * Add to an atomic variable.
299 *
300 * This function also acts as a full memory barrier.
301 *
302 * ***Note: If you don't know what this function is for, you shouldn't use
303 * it!***
304 *
305 * \param a a pointer to an SDL_atomic_t variable to be modified
306 * \param v the desired value to add
307 * \returns the previous value of the atomic variable.
308 *
309 * \since This function is available since SDL 2.0.2.
310 *
311 * \sa SDL_AtomicDecRef
312 * \sa SDL_AtomicIncRef
313 */
314 extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
315
316 /**
317 * \brief Increment an atomic variable used as a reference count.
318 */
319 #ifndef SDL_AtomicIncRef
320 #define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
321 #endif
322
323 /**
324 * \brief Decrement an atomic variable used as a reference count.
325 *
326 * \return SDL_TRUE if the variable reached zero after decrementing,
327 * SDL_FALSE otherwise
328 */
329 #ifndef SDL_AtomicDecRef
330 #define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
331 #endif
332
333 /**
334 * Set a pointer to a new value if it is currently an old value.
335 *
336 * ***Note: If you don't know what this function is for, you shouldn't use
337 * it!***
338 *
339 * \param a a pointer to a pointer
340 * \param oldval the old pointer value
341 * \param newval the new pointer value
342 * \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
343 *
344 * \since This function is available since SDL 2.0.0.
345 *
346 * \sa SDL_AtomicCAS
347 * \sa SDL_AtomicGetPtr
348 * \sa SDL_AtomicSetPtr
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
351
352 /**
353 * Set a pointer to a value atomically.
354 *
355 * ***Note: If you don't know what this function is for, you shouldn't use
356 * it!***
357 *
358 * \param a a pointer to a pointer
359 * \param v the desired pointer value
360 * \returns the previous value of the pointer.
361 *
362 * \since This function is available since SDL 2.0.2.
363 *
364 * \sa SDL_AtomicCASPtr
365 * \sa SDL_AtomicGetPtr
366 */
367 extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
368
369 /**
370 * Get the value of a pointer atomically.
371 *
372 * ***Note: If you don't know what this function is for, you shouldn't use
373 * it!***
374 *
375 * \param a a pointer to a pointer
376 * \returns the current value of a pointer.
377 *
378 * \since This function is available since SDL 2.0.2.
379 *
380 * \sa SDL_AtomicCASPtr
381 * \sa SDL_AtomicSetPtr
382 */
383 extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
384
385 /* Ends C function definitions when using C++ */
386 #ifdef __cplusplus
387 }
388 #endif
389
390 #include <SDL2/close_code.h>
391
392 #endif /* SDL_atomic_h_ */
393
394 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /* !!! FIXME: several functions in here need Doxygen comments. */
22
23 /**
24 * \file SDL_audio.h
25 *
26 * Access to the raw audio mixing buffer for the SDL library.
27 */
28
29 #ifndef SDL_audio_h_
30 #define SDL_audio_h_
31
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_error.h>
34 #include <SDL2/SDL_endian.h>
35 #include <SDL2/SDL_mutex.h>
36 #include <SDL2/SDL_thread.h>
37 #include <SDL2/SDL_rwops.h>
38
39 #include <SDL2/begin_code.h>
40 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 /**
46 * \brief Audio format flags.
47 *
48 * These are what the 16 bits in SDL_AudioFormat currently mean...
49 * (Unspecified bits are always zero).
50 *
51 * \verbatim
52 ++-----------------------sample is signed if set
53 ||
54 || ++-----------sample is bigendian if set
55 || ||
56 || || ++---sample is float if set
57 || || ||
58 || || || +---sample bit size---+
59 || || || | |
60 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
61 \endverbatim
62 *
63 * There are macros in SDL 2.0 and later to query these bits.
64 */
65 typedef Uint16 SDL_AudioFormat;
66
67 /**
68 * \name Audio flags
69 */
70 /* @{ */
71
72 #define SDL_AUDIO_MASK_BITSIZE (0xFF)
73 #define SDL_AUDIO_MASK_DATATYPE (1<<8)
74 #define SDL_AUDIO_MASK_ENDIAN (1<<12)
75 #define SDL_AUDIO_MASK_SIGNED (1<<15)
76 #define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
77 #define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
78 #define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
79 #define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
80 #define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
81 #define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
82 #define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
83
84 /**
85 * \name Audio format flags
86 *
87 * Defaults to LSB byte order.
88 */
89 /* @{ */
90 #define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
91 #define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
92 #define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */
93 #define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
94 #define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */
95 #define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
96 #define AUDIO_U16 AUDIO_U16LSB
97 #define AUDIO_S16 AUDIO_S16LSB
98 /* @} */
99
100 /**
101 * \name int32 support
102 */
103 /* @{ */
104 #define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
105 #define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
106 #define AUDIO_S32 AUDIO_S32LSB
107 /* @} */
108
109 /**
110 * \name float32 support
111 */
112 /* @{ */
113 #define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
114 #define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
115 #define AUDIO_F32 AUDIO_F32LSB
116 /* @} */
117
118 /**
119 * \name Native audio byte ordering
120 */
121 /* @{ */
122 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
123 #define AUDIO_U16SYS AUDIO_U16LSB
124 #define AUDIO_S16SYS AUDIO_S16LSB
125 #define AUDIO_S32SYS AUDIO_S32LSB
126 #define AUDIO_F32SYS AUDIO_F32LSB
127 #else
128 #define AUDIO_U16SYS AUDIO_U16MSB
129 #define AUDIO_S16SYS AUDIO_S16MSB
130 #define AUDIO_S32SYS AUDIO_S32MSB
131 #define AUDIO_F32SYS AUDIO_F32MSB
132 #endif
133 /* @} */
134
135 /**
136 * \name Allow change flags
137 *
138 * Which audio format changes are allowed when opening a device.
139 */
140 /* @{ */
141 #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
142 #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
143 #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
144 #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
145 #define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
146 /* @} */
147
148 /* @} *//* Audio flags */
149
150 /**
151 * This function is called when the audio device needs more data.
152 *
153 * \param userdata An application-specific parameter saved in
154 * the SDL_AudioSpec structure
155 * \param stream A pointer to the audio data buffer.
156 * \param len The length of that buffer in bytes.
157 *
158 * Once the callback returns, the buffer will no longer be valid.
159 * Stereo samples are stored in a LRLRLR ordering.
160 *
161 * You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
162 * you like. Just open your audio device with a NULL callback.
163 */
164 typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
165 int len);
166
167 /**
168 * The calculated values in this structure are calculated by SDL_OpenAudio().
169 *
170 * For multi-channel audio, the default SDL channel mapping is:
171 * 2: FL FR (stereo)
172 * 3: FL FR LFE (2.1 surround)
173 * 4: FL FR BL BR (quad)
174 * 5: FL FR FC BL BR (quad + center)
175 * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
176 * 7: FL FR FC LFE BC SL SR (6.1 surround)
177 * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
178 */
179 typedef struct SDL_AudioSpec
180 {
181 int freq; /**< DSP frequency -- samples per second */
182 SDL_AudioFormat format; /**< Audio data format */
183 Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
184 Uint8 silence; /**< Audio buffer silence value (calculated) */
185 Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
186 Uint16 padding; /**< Necessary for some compile environments */
187 Uint32 size; /**< Audio buffer size in bytes (calculated) */
188 SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
189 void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */
190 } SDL_AudioSpec;
191
192
193 struct SDL_AudioCVT;
194 typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
195 SDL_AudioFormat format);
196
197 /**
198 * \brief Upper limit of filters in SDL_AudioCVT
199 *
200 * The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
201 * currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
202 * one of which is the terminating NULL pointer.
203 */
204 #define SDL_AUDIOCVT_MAX_FILTERS 9
205
206 /**
207 * \struct SDL_AudioCVT
208 * \brief A structure to hold a set of audio conversion filters and buffers.
209 *
210 * Note that various parts of the conversion pipeline can take advantage
211 * of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
212 * you to pass it aligned data, but can possibly run much faster if you
213 * set both its (buf) field to a pointer that is aligned to 16 bytes, and its
214 * (len) field to something that's a multiple of 16, if possible.
215 */
216 #if defined(__GNUC__) && !defined(__CHERI_PURE_CAPABILITY__)
217 /* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
218 pad it out to 88 bytes to guarantee ABI compatibility between compilers.
219 This is not a concern on CHERI architectures, where pointers must be stored
220 at aligned locations otherwise they will become invalid, and thus structs
221 containing pointers cannot be packed without giving a warning or error.
222 vvv
223 The next time we rev the ABI, make sure to size the ints and add padding.
224 */
225 #define SDL_AUDIOCVT_PACKED __attribute__((packed))
226 #else
227 #define SDL_AUDIOCVT_PACKED
228 #endif
229 /* */
230 typedef struct SDL_AudioCVT
231 {
232 int needed; /**< Set to 1 if conversion possible */
233 SDL_AudioFormat src_format; /**< Source audio format */
234 SDL_AudioFormat dst_format; /**< Target audio format */
235 double rate_incr; /**< Rate conversion increment */
236 Uint8 *buf; /**< Buffer to hold entire audio data */
237 int len; /**< Length of original audio buffer */
238 int len_cvt; /**< Length of converted audio buffer */
239 int len_mult; /**< buffer must be len*len_mult big */
240 double len_ratio; /**< Given len, final size is len*len_ratio */
241 SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */
242 int filter_index; /**< Current audio conversion function */
243 } SDL_AUDIOCVT_PACKED SDL_AudioCVT;
244
245
246 /* Function prototypes */
247
248 /**
249 * \name Driver discovery functions
250 *
251 * These functions return the list of built in audio drivers, in the
252 * order that they are normally initialized by default.
253 */
254 /* @{ */
255
256 /**
257 * Use this function to get the number of built-in audio drivers.
258 *
259 * This function returns a hardcoded number. This never returns a negative
260 * value; if there are no drivers compiled into this build of SDL, this
261 * function returns zero. The presence of a driver in this list does not mean
262 * it will function, it just means SDL is capable of interacting with that
263 * interface. For example, a build of SDL might have esound support, but if
264 * there's no esound server available, SDL's esound driver would fail if used.
265 *
266 * By default, SDL tries all drivers, in its preferred order, until one is
267 * found to be usable.
268 *
269 * \returns the number of built-in audio drivers.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_GetAudioDriver
274 */
275 extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
276
277 /**
278 * Use this function to get the name of a built in audio driver.
279 *
280 * The list of audio drivers is given in the order that they are normally
281 * initialized by default; the drivers that seem more reasonable to choose
282 * first (as far as the SDL developers believe) are earlier in the list.
283 *
284 * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
285 * "coreaudio" or "xaudio2". These never have Unicode characters, and are not
286 * meant to be proper names.
287 *
288 * \param index the index of the audio driver; the value ranges from 0 to
289 * SDL_GetNumAudioDrivers() - 1
290 * \returns the name of the audio driver at the requested index, or NULL if an
291 * invalid index was specified.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_GetNumAudioDrivers
296 */
297 extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
298 /* @} */
299
300 /**
301 * \name Initialization and cleanup
302 *
303 * \internal These functions are used internally, and should not be used unless
304 * you have a specific need to specify the audio driver you want to
305 * use. You should normally use SDL_Init() or SDL_InitSubSystem().
306 */
307 /* @{ */
308
309 /**
310 * Use this function to initialize a particular audio driver.
311 *
312 * This function is used internally, and should not be used unless you have a
313 * specific need to designate the audio driver you want to use. You should
314 * normally use SDL_Init() or SDL_InitSubSystem().
315 *
316 * \param driver_name the name of the desired audio driver
317 * \returns 0 on success or a negative error code on failure; call
318 * SDL_GetError() for more information.
319 *
320 * \since This function is available since SDL 2.0.0.
321 *
322 * \sa SDL_AudioQuit
323 */
324 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
325
326 /**
327 * Use this function to shut down audio if you initialized it with
328 * SDL_AudioInit().
329 *
330 * This function is used internally, and should not be used unless you have a
331 * specific need to specify the audio driver you want to use. You should
332 * normally use SDL_Quit() or SDL_QuitSubSystem().
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_AudioInit
337 */
338 extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
339 /* @} */
340
341 /**
342 * Get the name of the current audio driver.
343 *
344 * The returned string points to internal static memory and thus never becomes
345 * invalid, even if you quit the audio subsystem and initialize a new driver
346 * (although such a case would return a different static string from another
347 * call to this function, of course). As such, you should not modify or free
348 * the returned string.
349 *
350 * \returns the name of the current audio driver or NULL if no driver has been
351 * initialized.
352 *
353 * \since This function is available since SDL 2.0.0.
354 *
355 * \sa SDL_AudioInit
356 */
357 extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
358
359 /**
360 * This function is a legacy means of opening the audio device.
361 *
362 * This function remains for compatibility with SDL 1.2, but also because it's
363 * slightly easier to use than the new functions in SDL 2.0. The new, more
364 * powerful, and preferred way to do this is SDL_OpenAudioDevice().
365 *
366 * This function is roughly equivalent to:
367 *
368 * ```c
369 * SDL_OpenAudioDevice(NULL, 0, desired, obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
370 * ```
371 *
372 * With two notable exceptions:
373 *
374 * - If `obtained` is NULL, we use `desired` (and allow no changes), which
375 * means desired will be modified to have the correct values for silence,
376 * etc, and SDL will convert any differences between your app's specific
377 * request and the hardware behind the scenes.
378 * - The return value is always success or failure, and not a device ID, which
379 * means you can only have one device open at a time with this function.
380 *
381 * \param desired an SDL_AudioSpec structure representing the desired output
382 * format. Please refer to the SDL_OpenAudioDevice
383 * documentation for details on how to prepare this structure.
384 * \param obtained an SDL_AudioSpec structure filled in with the actual
385 * parameters, or NULL.
386 * \returns 0 if successful, placing the actual hardware parameters in the
387 * structure pointed to by `obtained`.
388 *
389 * If `obtained` is NULL, the audio data passed to the callback
390 * function will be guaranteed to be in the requested format, and
391 * will be automatically converted to the actual hardware audio
392 * format if necessary. If `obtained` is NULL, `desired` will have
393 * fields modified.
394 *
395 * This function returns a negative error code on failure to open the
396 * audio device or failure to set up the audio thread; call
397 * SDL_GetError() for more information.
398 *
399 * \since This function is available since SDL 2.0.0.
400 *
401 * \sa SDL_CloseAudio
402 * \sa SDL_LockAudio
403 * \sa SDL_PauseAudio
404 * \sa SDL_UnlockAudio
405 */
406 extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
407 SDL_AudioSpec * obtained);
408
409 /**
410 * SDL Audio Device IDs.
411 *
412 * A successful call to SDL_OpenAudio() is always device id 1, and legacy
413 * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
414 * always returns devices >= 2 on success. The legacy calls are good both
415 * for backwards compatibility and when you don't care about multiple,
416 * specific, or capture devices.
417 */
418 typedef Uint32 SDL_AudioDeviceID;
419
420 /**
421 * Get the number of built-in audio devices.
422 *
423 * This function is only valid after successfully initializing the audio
424 * subsystem.
425 *
426 * Note that audio capture support is not implemented as of SDL 2.0.4, so the
427 * `iscapture` parameter is for future expansion and should always be zero for
428 * now.
429 *
430 * This function will return -1 if an explicit list of devices can't be
431 * determined. Returning -1 is not an error. For example, if SDL is set up to
432 * talk to a remote audio server, it can't list every one available on the
433 * Internet, but it will still allow a specific host to be specified in
434 * SDL_OpenAudioDevice().
435 *
436 * In many common cases, when this function returns a value <= 0, it can still
437 * successfully open the default device (NULL for first argument of
438 * SDL_OpenAudioDevice()).
439 *
440 * This function may trigger a complete redetect of available hardware. It
441 * should not be called for each iteration of a loop, but rather once at the
442 * start of a loop:
443 *
444 * ```c
445 * // Don't do this:
446 * for (int i = 0; i < SDL_GetNumAudioDevices(0); i++)
447 *
448 * // do this instead:
449 * const int count = SDL_GetNumAudioDevices(0);
450 * for (int i = 0; i < count; ++i) { do_something_here(); }
451 * ```
452 *
453 * \param iscapture zero to request playback devices, non-zero to request
454 * recording devices
455 * \returns the number of available devices exposed by the current driver or
456 * -1 if an explicit list of devices can't be determined. A return
457 * value of -1 does not necessarily mean an error condition.
458 *
459 * \since This function is available since SDL 2.0.0.
460 *
461 * \sa SDL_GetAudioDeviceName
462 * \sa SDL_OpenAudioDevice
463 */
464 extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
465
466 /**
467 * Get the human-readable name of a specific audio device.
468 *
469 * This function is only valid after successfully initializing the audio
470 * subsystem. The values returned by this function reflect the latest call to
471 * SDL_GetNumAudioDevices(); re-call that function to redetect available
472 * hardware.
473 *
474 * The string returned by this function is UTF-8 encoded, read-only, and
475 * managed internally. You are not to free it. If you need to keep the string
476 * for any length of time, you should make your own copy of it, as it will be
477 * invalid next time any of several other SDL functions are called.
478 *
479 * \param index the index of the audio device; valid values range from 0 to
480 * SDL_GetNumAudioDevices() - 1
481 * \param iscapture non-zero to query the list of recording devices, zero to
482 * query the list of output devices.
483 * \returns the name of the audio device at the requested index, or NULL on
484 * error.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetNumAudioDevices
489 */
490 extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
491 int iscapture);
492
493 /**
494 * Get the preferred audio format of a specific audio device.
495 *
496 * This function is only valid after a successfully initializing the audio
497 * subsystem. The values returned by this function reflect the latest call to
498 * SDL_GetNumAudioDevices(); re-call that function to redetect available
499 * hardware.
500 *
501 * `spec` will be filled with the sample rate, sample format, and channel
502 * count.
503 *
504 * \param index the index of the audio device; valid values range from 0 to
505 * SDL_GetNumAudioDevices() - 1
506 * \param iscapture non-zero to query the list of recording devices, zero to
507 * query the list of output devices.
508 * \param spec The SDL_AudioSpec to be initialized by this function.
509 * \returns 0 on success, nonzero on error
510 *
511 * \since This function is available since SDL 2.0.16.
512 *
513 * \sa SDL_GetNumAudioDevices
514 */
515 extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
516 int iscapture,
517 SDL_AudioSpec *spec);
518
519
520 /**
521 * Open a specific audio device.
522 *
523 * SDL_OpenAudio(), unlike this function, always acts on device ID 1. As such,
524 * this function will never return a 1 so as not to conflict with the legacy
525 * function.
526 *
527 * Please note that SDL 2.0 before 2.0.5 did not support recording; as such,
528 * this function would fail if `iscapture` was not zero. Starting with SDL
529 * 2.0.5, recording is implemented and this value can be non-zero.
530 *
531 * Passing in a `device` name of NULL requests the most reasonable default
532 * (and is equivalent to what SDL_OpenAudio() does to choose a device). The
533 * `device` name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
534 * some drivers allow arbitrary and driver-specific strings, such as a
535 * hostname/IP address for a remote audio server, or a filename in the
536 * diskaudio driver.
537 *
538 * An opened audio device starts out paused, and should be enabled for playing
539 * by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
540 * callback function to be called. Since the audio driver may modify the
541 * requested size of the audio buffer, you should allocate any local mixing
542 * buffers after you open the audio device.
543 *
544 * The audio callback runs in a separate thread in most cases; you can prevent
545 * race conditions between your callback and other threads without fully
546 * pausing playback with SDL_LockAudioDevice(). For more information about the
547 * callback, see SDL_AudioSpec.
548 *
549 * Managing the audio spec via 'desired' and 'obtained':
550 *
551 * When filling in the desired audio spec structure:
552 *
553 * - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
554 * - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
555 * - `desired->samples` is the desired size of the audio buffer, in _sample
556 * frames_ (with stereo output, two samples--left and right--would make a
557 * single sample frame). This number should be a power of two, and may be
558 * adjusted by the audio driver to a value more suitable for the hardware.
559 * Good values seem to range between 512 and 8096 inclusive, depending on
560 * the application and CPU speed. Smaller values reduce latency, but can
561 * lead to underflow if the application is doing heavy processing and cannot
562 * fill the audio buffer in time. Note that the number of sample frames is
563 * directly related to time by the following formula: `ms =
564 * (sampleframes*1000)/freq`
565 * - `desired->size` is the size in _bytes_ of the audio buffer, and is
566 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
567 * - `desired->silence` is the value used to set the buffer to silence, and is
568 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
569 * - `desired->callback` should be set to a function that will be called when
570 * the audio device is ready for more data. It is passed a pointer to the
571 * audio buffer, and the length in bytes of the audio buffer. This function
572 * usually runs in a separate thread, and so you should protect data
573 * structures that it accesses by calling SDL_LockAudioDevice() and
574 * SDL_UnlockAudioDevice() in your code. Alternately, you may pass a NULL
575 * pointer here, and call SDL_QueueAudio() with some frequency, to queue
576 * more audio samples to be played (or for capture devices, call
577 * SDL_DequeueAudio() with some frequency, to obtain audio samples).
578 * - `desired->userdata` is passed as the first parameter to your callback
579 * function. If you passed a NULL callback, this value is ignored.
580 *
581 * `allowed_changes` can have the following flags OR'd together:
582 *
583 * - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
584 * - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
585 * - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
586 * - `SDL_AUDIO_ALLOW_ANY_CHANGE`
587 *
588 * These flags specify how SDL should behave when a device cannot offer a
589 * specific feature. If the application requests a feature that the hardware
590 * doesn't offer, SDL will always try to get the closest equivalent.
591 *
592 * For example, if you ask for float32 audio format, but the sound card only
593 * supports int16, SDL will set the hardware to int16. If you had set
594 * SDL_AUDIO_ALLOW_FORMAT_CHANGE, SDL will change the format in the `obtained`
595 * structure. If that flag was *not* set, SDL will prepare to convert your
596 * callback's float32 audio to int16 before feeding it to the hardware and
597 * will keep the originally requested format in the `obtained` structure.
598 *
599 * The resulting audio specs, varying depending on hardware and on what
600 * changes were allowed, will then be written back to `obtained`.
601 *
602 * If your application can only handle one specific data format, pass a zero
603 * for `allowed_changes` and let SDL transparently handle any differences.
604 *
605 * \param device a UTF-8 string reported by SDL_GetAudioDeviceName() or a
606 * driver-specific name as appropriate. NULL requests the most
607 * reasonable default device.
608 * \param iscapture non-zero to specify a device should be opened for
609 * recording, not playback
610 * \param desired an SDL_AudioSpec structure representing the desired output
611 * format; see SDL_OpenAudio() for more information
612 * \param obtained an SDL_AudioSpec structure filled in with the actual output
613 * format; see SDL_OpenAudio() for more information
614 * \param allowed_changes 0, or one or more flags OR'd together
615 * \returns a valid device ID that is > 0 on success or 0 on failure; call
616 * SDL_GetError() for more information.
617 *
618 * For compatibility with SDL 1.2, this will never return 1, since
619 * SDL reserves that ID for the legacy SDL_OpenAudio() function.
620 *
621 * \since This function is available since SDL 2.0.0.
622 *
623 * \sa SDL_CloseAudioDevice
624 * \sa SDL_GetAudioDeviceName
625 * \sa SDL_LockAudioDevice
626 * \sa SDL_OpenAudio
627 * \sa SDL_PauseAudioDevice
628 * \sa SDL_UnlockAudioDevice
629 */
630 extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(
631 const char *device,
632 int iscapture,
633 const SDL_AudioSpec *desired,
634 SDL_AudioSpec *obtained,
635 int allowed_changes);
636
637
638
639 /**
640 * \name Audio state
641 *
642 * Get the current audio state.
643 */
644 /* @{ */
645 typedef enum
646 {
647 SDL_AUDIO_STOPPED = 0,
648 SDL_AUDIO_PLAYING,
649 SDL_AUDIO_PAUSED
650 } SDL_AudioStatus;
651
652 /**
653 * This function is a legacy means of querying the audio device.
654 *
655 * New programs might want to use SDL_GetAudioDeviceStatus() instead. This
656 * function is equivalent to calling...
657 *
658 * ```c
659 * SDL_GetAudioDeviceStatus(1);
660 * ```
661 *
662 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
663 *
664 * \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio().
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_GetAudioDeviceStatus
669 */
670 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
671
672 /**
673 * Use this function to get the current audio state of an audio device.
674 *
675 * \param dev the ID of an audio device previously opened with
676 * SDL_OpenAudioDevice()
677 * \returns the SDL_AudioStatus of the specified audio device.
678 *
679 * \since This function is available since SDL 2.0.0.
680 *
681 * \sa SDL_PauseAudioDevice
682 */
683 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
684 /* @} *//* Audio State */
685
686 /**
687 * \name Pause audio functions
688 *
689 * These functions pause and unpause the audio callback processing.
690 * They should be called with a parameter of 0 after opening the audio
691 * device to start playing sound. This is so you can safely initialize
692 * data for your callback function after opening the audio device.
693 * Silence will be written to the audio device during the pause.
694 */
695 /* @{ */
696
697 /**
698 * This function is a legacy means of pausing the audio device.
699 *
700 * New programs might want to use SDL_PauseAudioDevice() instead. This
701 * function is equivalent to calling...
702 *
703 * ```c
704 * SDL_PauseAudioDevice(1, pause_on);
705 * ```
706 *
707 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
708 *
709 * \param pause_on non-zero to pause, 0 to unpause
710 *
711 * \since This function is available since SDL 2.0.0.
712 *
713 * \sa SDL_GetAudioStatus
714 * \sa SDL_PauseAudioDevice
715 */
716 extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
717
718 /**
719 * Use this function to pause and unpause audio playback on a specified
720 * device.
721 *
722 * This function pauses and unpauses the audio callback processing for a given
723 * device. Newly-opened audio devices start in the paused state, so you must
724 * call this function with **pause_on**=0 after opening the specified audio
725 * device to start playing sound. This allows you to safely initialize data
726 * for your callback function after opening the audio device. Silence will be
727 * written to the audio device while paused, and the audio callback is
728 * guaranteed to not be called. Pausing one device does not prevent other
729 * unpaused devices from running their callbacks.
730 *
731 * Pausing state does not stack; even if you pause a device several times, a
732 * single unpause will start the device playing again, and vice versa. This is
733 * different from how SDL_LockAudioDevice() works.
734 *
735 * If you just need to protect a few variables from race conditions vs your
736 * callback, you shouldn't pause the audio device, as it will lead to dropouts
737 * in the audio playback. Instead, you should use SDL_LockAudioDevice().
738 *
739 * \param dev a device opened by SDL_OpenAudioDevice()
740 * \param pause_on non-zero to pause, 0 to unpause
741 *
742 * \since This function is available since SDL 2.0.0.
743 *
744 * \sa SDL_LockAudioDevice
745 */
746 extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
747 int pause_on);
748 /* @} *//* Pause audio functions */
749
750 /**
751 * Load the audio data of a WAVE file into memory.
752 *
753 * Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to
754 * be valid pointers. The entire data portion of the file is then loaded into
755 * memory and decoded if necessary.
756 *
757 * If `freesrc` is non-zero, the data source gets automatically closed and
758 * freed before the function returns.
759 *
760 * Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
761 * 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
762 * A-law and mu-law (8 bits). Other formats are currently unsupported and
763 * cause an error.
764 *
765 * If this function succeeds, the pointer returned by it is equal to `spec`
766 * and the pointer to the audio data allocated by the function is written to
767 * `audio_buf` and its length in bytes to `audio_len`. The SDL_AudioSpec
768 * members `freq`, `channels`, and `format` are set to the values of the audio
769 * data in the buffer. The `samples` member is set to a sane default and all
770 * others are set to zero.
771 *
772 * It's necessary to use SDL_FreeWAV() to free the audio data returned in
773 * `audio_buf` when it is no longer used.
774 *
775 * Because of the underspecification of the .WAV format, there are many
776 * problematic files in the wild that cause issues with strict decoders. To
777 * provide compatibility with these files, this decoder is lenient in regards
778 * to the truncation of the file, the fact chunk, and the size of the RIFF
779 * chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,
780 * `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to
781 * tune the behavior of the loading process.
782 *
783 * Any file that is invalid (due to truncation, corruption, or wrong values in
784 * the headers), too big, or unsupported causes an error. Additionally, any
785 * critical I/O error from the data source will terminate the loading process
786 * with an error. The function returns NULL on error and in all cases (with
787 * the exception of `src` being NULL), an appropriate error message will be
788 * set.
789 *
790 * It is required that the data source supports seeking.
791 *
792 * Example:
793 *
794 * ```c
795 * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
796 * ```
797 *
798 * Note that the SDL_LoadWAV macro does this same thing for you, but in a less
799 * messy way:
800 *
801 * ```c
802 * SDL_LoadWAV("sample.wav", &spec, &buf, &len);
803 * ```
804 *
805 * \param src The data source for the WAVE data
806 * \param freesrc If non-zero, SDL will _always_ free the data source
807 * \param spec An SDL_AudioSpec that will be filled in with the wave file's
808 * format details
809 * \param audio_buf A pointer filled with the audio data, allocated by the
810 * function.
811 * \param audio_len A pointer filled with the length of the audio data buffer
812 * in bytes
813 * \returns This function, if successfully called, returns `spec`, which will
814 * be filled with the audio data format of the wave source data.
815 * `audio_buf` will be filled with a pointer to an allocated buffer
816 * containing the audio data, and `audio_len` is filled with the
817 * length of that audio buffer in bytes.
818 *
819 * This function returns NULL if the .WAV file cannot be opened, uses
820 * an unknown data format, or is corrupt; call SDL_GetError() for
821 * more information.
822 *
823 * When the application is done with the data returned in
824 * `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
825 *
826 * \since This function is available since SDL 2.0.0.
827 *
828 * \sa SDL_FreeWAV
829 * \sa SDL_LoadWAV
830 */
831 extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
832 int freesrc,
833 SDL_AudioSpec * spec,
834 Uint8 ** audio_buf,
835 Uint32 * audio_len);
836
837 /**
838 * Loads a WAV from a file.
839 * Compatibility convenience function.
840 */
841 #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
842 SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
843
844 /**
845 * Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
846 *
847 * After a WAVE file has been opened with SDL_LoadWAV() or SDL_LoadWAV_RW()
848 * its data can eventually be freed with SDL_FreeWAV(). It is safe to call
849 * this function with a NULL pointer.
850 *
851 * \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
852 * SDL_LoadWAV_RW()
853 *
854 * \since This function is available since SDL 2.0.0.
855 *
856 * \sa SDL_LoadWAV
857 * \sa SDL_LoadWAV_RW
858 */
859 extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
860
861 /**
862 * Initialize an SDL_AudioCVT structure for conversion.
863 *
864 * Before an SDL_AudioCVT structure can be used to convert audio data it must
865 * be initialized with source and destination information.
866 *
867 * This function will zero out every field of the SDL_AudioCVT, so it must be
868 * called before the application fills in the final buffer information.
869 *
870 * Once this function has returned successfully, and reported that a
871 * conversion is necessary, the application fills in the rest of the fields in
872 * SDL_AudioCVT, now that it knows how large a buffer it needs to allocate,
873 * and then can call SDL_ConvertAudio() to complete the conversion.
874 *
875 * \param cvt an SDL_AudioCVT structure filled in with audio conversion
876 * information
877 * \param src_format the source format of the audio data; for more info see
878 * SDL_AudioFormat
879 * \param src_channels the number of channels in the source
880 * \param src_rate the frequency (sample-frames-per-second) of the source
881 * \param dst_format the destination format of the audio data; for more info
882 * see SDL_AudioFormat
883 * \param dst_channels the number of channels in the destination
884 * \param dst_rate the frequency (sample-frames-per-second) of the destination
885 * \returns 1 if the audio filter is prepared, 0 if no conversion is needed,
886 * or a negative error code on failure; call SDL_GetError() for more
887 * information.
888 *
889 * \since This function is available since SDL 2.0.0.
890 *
891 * \sa SDL_ConvertAudio
892 */
893 extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
894 SDL_AudioFormat src_format,
895 Uint8 src_channels,
896 int src_rate,
897 SDL_AudioFormat dst_format,
898 Uint8 dst_channels,
899 int dst_rate);
900
901 /**
902 * Convert audio data to a desired audio format.
903 *
904 * This function does the actual audio data conversion, after the application
905 * has called SDL_BuildAudioCVT() to prepare the conversion information and
906 * then filled in the buffer details.
907 *
908 * Once the application has initialized the `cvt` structure using
909 * SDL_BuildAudioCVT(), allocated an audio buffer and filled it with audio
910 * data in the source format, this function will convert the buffer, in-place,
911 * to the desired format.
912 *
913 * The data conversion may go through several passes; any given pass may
914 * possibly temporarily increase the size of the data. For example, SDL might
915 * expand 16-bit data to 32 bits before resampling to a lower frequency,
916 * shrinking the data size after having grown it briefly. Since the supplied
917 * buffer will be both the source and destination, converting as necessary
918 * in-place, the application must allocate a buffer that will fully contain
919 * the data during its largest conversion pass. After SDL_BuildAudioCVT()
920 * returns, the application should set the `cvt->len` field to the size, in
921 * bytes, of the source data, and allocate a buffer that is `cvt->len *
922 * cvt->len_mult` bytes long for the `buf` field.
923 *
924 * The source data should be copied into this buffer before the call to
925 * SDL_ConvertAudio(). Upon successful return, this buffer will contain the
926 * converted audio, and `cvt->len_cvt` will be the size of the converted data,
927 * in bytes. Any bytes in the buffer past `cvt->len_cvt` are undefined once
928 * this function returns.
929 *
930 * \param cvt an SDL_AudioCVT structure that was previously set up by
931 * SDL_BuildAudioCVT().
932 * \returns 0 if the conversion was completed successfully or a negative error
933 * code on failure; call SDL_GetError() for more information.
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_BuildAudioCVT
938 */
939 extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
940
941 /* SDL_AudioStream is a new audio conversion interface.
942 The benefits vs SDL_AudioCVT:
943 - it can handle resampling data in chunks without generating
944 artifacts, when it doesn't have the complete buffer available.
945 - it can handle incoming data in any variable size.
946 - You push data as you have it, and pull it when you need it
947 */
948 /* this is opaque to the outside world. */
949 struct _SDL_AudioStream;
950 typedef struct _SDL_AudioStream SDL_AudioStream;
951
952 /**
953 * Create a new audio stream.
954 *
955 * \param src_format The format of the source audio
956 * \param src_channels The number of channels of the source audio
957 * \param src_rate The sampling rate of the source audio
958 * \param dst_format The format of the desired audio output
959 * \param dst_channels The number of channels of the desired audio output
960 * \param dst_rate The sampling rate of the desired audio output
961 * \returns 0 on success, or -1 on error.
962 *
963 * \since This function is available since SDL 2.0.7.
964 *
965 * \sa SDL_AudioStreamPut
966 * \sa SDL_AudioStreamGet
967 * \sa SDL_AudioStreamAvailable
968 * \sa SDL_AudioStreamFlush
969 * \sa SDL_AudioStreamClear
970 * \sa SDL_FreeAudioStream
971 */
972 extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
973 const Uint8 src_channels,
974 const int src_rate,
975 const SDL_AudioFormat dst_format,
976 const Uint8 dst_channels,
977 const int dst_rate);
978
979 /**
980 * Add data to be converted/resampled to the stream.
981 *
982 * \param stream The stream the audio data is being added to
983 * \param buf A pointer to the audio data to add
984 * \param len The number of bytes to write to the stream
985 * \returns 0 on success, or -1 on error.
986 *
987 * \since This function is available since SDL 2.0.7.
988 *
989 * \sa SDL_NewAudioStream
990 * \sa SDL_AudioStreamGet
991 * \sa SDL_AudioStreamAvailable
992 * \sa SDL_AudioStreamFlush
993 * \sa SDL_AudioStreamClear
994 * \sa SDL_FreeAudioStream
995 */
996 extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
997
998 /**
999 * Get converted/resampled data from the stream
1000 *
1001 * \param stream The stream the audio is being requested from
1002 * \param buf A buffer to fill with audio data
1003 * \param len The maximum number of bytes to fill
1004 * \returns the number of bytes read from the stream, or -1 on error
1005 *
1006 * \since This function is available since SDL 2.0.7.
1007 *
1008 * \sa SDL_NewAudioStream
1009 * \sa SDL_AudioStreamPut
1010 * \sa SDL_AudioStreamAvailable
1011 * \sa SDL_AudioStreamFlush
1012 * \sa SDL_AudioStreamClear
1013 * \sa SDL_FreeAudioStream
1014 */
1015 extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
1016
1017 /**
1018 * Get the number of converted/resampled bytes available.
1019 *
1020 * The stream may be buffering data behind the scenes until it has enough to
1021 * resample correctly, so this number might be lower than what you expect, or
1022 * even be zero. Add more data or flush the stream if you need the data now.
1023 *
1024 * \since This function is available since SDL 2.0.7.
1025 *
1026 * \sa SDL_NewAudioStream
1027 * \sa SDL_AudioStreamPut
1028 * \sa SDL_AudioStreamGet
1029 * \sa SDL_AudioStreamFlush
1030 * \sa SDL_AudioStreamClear
1031 * \sa SDL_FreeAudioStream
1032 */
1033 extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
1034
1035 /**
1036 * Tell the stream that you're done sending data, and anything being buffered
1037 * should be converted/resampled and made available immediately.
1038 *
1039 * It is legal to add more data to a stream after flushing, but there will be
1040 * audio gaps in the output. Generally this is intended to signal the end of
1041 * input, so the complete output becomes available.
1042 *
1043 * \since This function is available since SDL 2.0.7.
1044 *
1045 * \sa SDL_NewAudioStream
1046 * \sa SDL_AudioStreamPut
1047 * \sa SDL_AudioStreamGet
1048 * \sa SDL_AudioStreamAvailable
1049 * \sa SDL_AudioStreamClear
1050 * \sa SDL_FreeAudioStream
1051 */
1052 extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
1053
1054 /**
1055 * Clear any pending data in the stream without converting it
1056 *
1057 * \since This function is available since SDL 2.0.7.
1058 *
1059 * \sa SDL_NewAudioStream
1060 * \sa SDL_AudioStreamPut
1061 * \sa SDL_AudioStreamGet
1062 * \sa SDL_AudioStreamAvailable
1063 * \sa SDL_AudioStreamFlush
1064 * \sa SDL_FreeAudioStream
1065 */
1066 extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
1067
1068 /**
1069 * Free an audio stream
1070 *
1071 * \since This function is available since SDL 2.0.7.
1072 *
1073 * \sa SDL_NewAudioStream
1074 * \sa SDL_AudioStreamPut
1075 * \sa SDL_AudioStreamGet
1076 * \sa SDL_AudioStreamAvailable
1077 * \sa SDL_AudioStreamFlush
1078 * \sa SDL_AudioStreamClear
1079 */
1080 extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
1081
1082 #define SDL_MIX_MAXVOLUME 128
1083
1084 /**
1085 * This function is a legacy means of mixing audio.
1086 *
1087 * This function is equivalent to calling...
1088 *
1089 * ```c
1090 * SDL_MixAudioFormat(dst, src, format, len, volume);
1091 * ```
1092 *
1093 * ...where `format` is the obtained format of the audio device from the
1094 * legacy SDL_OpenAudio() function.
1095 *
1096 * \param dst the destination for the mixed audio
1097 * \param src the source audio buffer to be mixed
1098 * \param len the length of the audio buffer in bytes
1099 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1100 * for full audio volume
1101 *
1102 * \since This function is available since SDL 2.0.0.
1103 *
1104 * \sa SDL_MixAudioFormat
1105 */
1106 extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
1107 Uint32 len, int volume);
1108
1109 /**
1110 * Mix audio data in a specified format.
1111 *
1112 * This takes an audio buffer `src` of `len` bytes of `format` data and mixes
1113 * it into `dst`, performing addition, volume adjustment, and overflow
1114 * clipping. The buffer pointed to by `dst` must also be `len` bytes of
1115 * `format` data.
1116 *
1117 * This is provided for convenience -- you can mix your own audio data.
1118 *
1119 * Do not use this function for mixing together more than two streams of
1120 * sample data. The output from repeated application of this function may be
1121 * distorted by clipping, because there is no accumulator with greater range
1122 * than the input (not to mention this being an inefficient way of doing it).
1123 *
1124 * It is a common misconception that this function is required to write audio
1125 * data to an output stream in an audio callback. While you can do that,
1126 * SDL_MixAudioFormat() is really only needed when you're mixing a single
1127 * audio stream with a volume adjustment.
1128 *
1129 * \param dst the destination for the mixed audio
1130 * \param src the source audio buffer to be mixed
1131 * \param format the SDL_AudioFormat structure representing the desired audio
1132 * format
1133 * \param len the length of the audio buffer in bytes
1134 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1135 * for full audio volume
1136 *
1137 * \since This function is available since SDL 2.0.0.
1138 */
1139 extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
1140 const Uint8 * src,
1141 SDL_AudioFormat format,
1142 Uint32 len, int volume);
1143
1144 /**
1145 * Queue more audio on non-callback devices.
1146 *
1147 * If you are looking to retrieve queued audio from a non-callback capture
1148 * device, you want SDL_DequeueAudio() instead. SDL_QueueAudio() will return
1149 * -1 to signify an error if you use it with capture devices.
1150 *
1151 * SDL offers two ways to feed audio to the device: you can either supply a
1152 * callback that SDL triggers with some frequency to obtain more audio (pull
1153 * method), or you can supply no callback, and then SDL will expect you to
1154 * supply data at regular intervals (push method) with this function.
1155 *
1156 * There are no limits on the amount of data you can queue, short of
1157 * exhaustion of address space. Queued data will drain to the device as
1158 * necessary without further intervention from you. If the device needs audio
1159 * but there is not enough queued, it will play silence to make up the
1160 * difference. This means you will have skips in your audio playback if you
1161 * aren't routinely queueing sufficient data.
1162 *
1163 * This function copies the supplied data, so you are safe to free it when the
1164 * function returns. This function is thread-safe, but queueing to the same
1165 * device from two threads at once does not promise which buffer will be
1166 * queued first.
1167 *
1168 * You may not queue audio on a device that is using an application-supplied
1169 * callback; doing so returns an error. You have to use the audio callback or
1170 * queue audio with this function, but not both.
1171 *
1172 * You should not call SDL_LockAudio() on the device before queueing; SDL
1173 * handles locking internally for this function.
1174 *
1175 * Note that SDL2 does not support planar audio. You will need to resample
1176 * from planar audio formats into a non-planar one (see SDL_AudioFormat)
1177 * before queuing audio.
1178 *
1179 * \param dev the device ID to which we will queue audio
1180 * \param data the data to queue to the device for later playback
1181 * \param len the number of bytes (not samples!) to which `data` points
1182 * \returns 0 on success or a negative error code on failure; call
1183 * SDL_GetError() for more information.
1184 *
1185 * \since This function is available since SDL 2.0.4.
1186 *
1187 * \sa SDL_ClearQueuedAudio
1188 * \sa SDL_GetQueuedAudioSize
1189 */
1190 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
1191
1192 /**
1193 * Dequeue more audio on non-callback devices.
1194 *
1195 * If you are looking to queue audio for output on a non-callback playback
1196 * device, you want SDL_QueueAudio() instead. SDL_DequeueAudio() will always
1197 * return 0 if you use it with playback devices.
1198 *
1199 * SDL offers two ways to retrieve audio from a capture device: you can either
1200 * supply a callback that SDL triggers with some frequency as the device
1201 * records more audio data, (push method), or you can supply no callback, and
1202 * then SDL will expect you to retrieve data at regular intervals (pull
1203 * method) with this function.
1204 *
1205 * There are no limits on the amount of data you can queue, short of
1206 * exhaustion of address space. Data from the device will keep queuing as
1207 * necessary without further intervention from you. This means you will
1208 * eventually run out of memory if you aren't routinely dequeueing data.
1209 *
1210 * Capture devices will not queue data when paused; if you are expecting to
1211 * not need captured audio for some length of time, use SDL_PauseAudioDevice()
1212 * to stop the capture device from queueing more data. This can be useful
1213 * during, say, level loading times. When unpaused, capture devices will start
1214 * queueing data from that point, having flushed any capturable data available
1215 * while paused.
1216 *
1217 * This function is thread-safe, but dequeueing from the same device from two
1218 * threads at once does not promise which thread will dequeue data first.
1219 *
1220 * You may not dequeue audio from a device that is using an
1221 * application-supplied callback; doing so returns an error. You have to use
1222 * the audio callback, or dequeue audio with this function, but not both.
1223 *
1224 * You should not call SDL_LockAudio() on the device before dequeueing; SDL
1225 * handles locking internally for this function.
1226 *
1227 * \param dev the device ID from which we will dequeue audio
1228 * \param data a pointer into where audio data should be copied
1229 * \param len the number of bytes (not samples!) to which (data) points
1230 * \returns the number of bytes dequeued, which could be less than requested;
1231 * call SDL_GetError() for more information.
1232 *
1233 * \since This function is available since SDL 2.0.5.
1234 *
1235 * \sa SDL_ClearQueuedAudio
1236 * \sa SDL_GetQueuedAudioSize
1237 */
1238 extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
1239
1240 /**
1241 * Get the number of bytes of still-queued audio.
1242 *
1243 * For playback devices: this is the number of bytes that have been queued for
1244 * playback with SDL_QueueAudio(), but have not yet been sent to the hardware.
1245 *
1246 * Once we've sent it to the hardware, this function can not decide the exact
1247 * byte boundary of what has been played. It's possible that we just gave the
1248 * hardware several kilobytes right before you called this function, but it
1249 * hasn't played any of it yet, or maybe half of it, etc.
1250 *
1251 * For capture devices, this is the number of bytes that have been captured by
1252 * the device and are waiting for you to dequeue. This number may grow at any
1253 * time, so this only informs of the lower-bound of available data.
1254 *
1255 * You may not queue or dequeue audio on a device that is using an
1256 * application-supplied callback; calling this function on such a device
1257 * always returns 0. You have to use the audio callback or queue audio, but
1258 * not both.
1259 *
1260 * You should not call SDL_LockAudio() on the device before querying; SDL
1261 * handles locking internally for this function.
1262 *
1263 * \param dev the device ID of which we will query queued audio size
1264 * \returns the number of bytes (not samples!) of queued audio.
1265 *
1266 * \since This function is available since SDL 2.0.4.
1267 *
1268 * \sa SDL_ClearQueuedAudio
1269 * \sa SDL_QueueAudio
1270 * \sa SDL_DequeueAudio
1271 */
1272 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
1273
1274 /**
1275 * Drop any queued audio data waiting to be sent to the hardware.
1276 *
1277 * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
1278 * output devices, the hardware will start playing silence if more audio isn't
1279 * queued. For capture devices, the hardware will start filling the empty
1280 * queue with new data if the capture device isn't paused.
1281 *
1282 * This will not prevent playback of queued audio that's already been sent to
1283 * the hardware, as we can not undo that, so expect there to be some fraction
1284 * of a second of audio that might still be heard. This can be useful if you
1285 * want to, say, drop any pending music or any unprocessed microphone input
1286 * during a level change in your game.
1287 *
1288 * You may not queue or dequeue audio on a device that is using an
1289 * application-supplied callback; calling this function on such a device
1290 * always returns 0. You have to use the audio callback or queue audio, but
1291 * not both.
1292 *
1293 * You should not call SDL_LockAudio() on the device before clearing the
1294 * queue; SDL handles locking internally for this function.
1295 *
1296 * This function always succeeds and thus returns void.
1297 *
1298 * \param dev the device ID of which to clear the audio queue
1299 *
1300 * \since This function is available since SDL 2.0.4.
1301 *
1302 * \sa SDL_GetQueuedAudioSize
1303 * \sa SDL_QueueAudio
1304 * \sa SDL_DequeueAudio
1305 */
1306 extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
1307
1308
1309 /**
1310 * \name Audio lock functions
1311 *
1312 * The lock manipulated by these functions protects the callback function.
1313 * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
1314 * the callback function is not running. Do not call these from the callback
1315 * function or you will cause deadlock.
1316 */
1317 /* @{ */
1318
1319 /**
1320 * This function is a legacy means of locking the audio device.
1321 *
1322 * New programs might want to use SDL_LockAudioDevice() instead. This function
1323 * is equivalent to calling...
1324 *
1325 * ```c
1326 * SDL_LockAudioDevice(1);
1327 * ```
1328 *
1329 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1330 *
1331 * \since This function is available since SDL 2.0.0.
1332 *
1333 * \sa SDL_LockAudioDevice
1334 * \sa SDL_UnlockAudio
1335 * \sa SDL_UnlockAudioDevice
1336 */
1337 extern DECLSPEC void SDLCALL SDL_LockAudio(void);
1338
1339 /**
1340 * Use this function to lock out the audio callback function for a specified
1341 * device.
1342 *
1343 * The lock manipulated by these functions protects the audio callback
1344 * function specified in SDL_OpenAudioDevice(). During a
1345 * SDL_LockAudioDevice()/SDL_UnlockAudioDevice() pair, you can be guaranteed
1346 * that the callback function for that device is not running, even if the
1347 * device is not paused. While a device is locked, any other unpaused,
1348 * unlocked devices may still run their callbacks.
1349 *
1350 * Calling this function from inside your audio callback is unnecessary. SDL
1351 * obtains this lock before calling your function, and releases it when the
1352 * function returns.
1353 *
1354 * You should not hold the lock longer than absolutely necessary. If you hold
1355 * it too long, you'll experience dropouts in your audio playback. Ideally,
1356 * your application locks the device, sets a few variables and unlocks again.
1357 * Do not do heavy work while holding the lock for a device.
1358 *
1359 * It is safe to lock the audio device multiple times, as long as you unlock
1360 * it an equivalent number of times. The callback will not run until the
1361 * device has been unlocked completely in this way. If your application fails
1362 * to unlock the device appropriately, your callback will never run, you might
1363 * hear repeating bursts of audio, and SDL_CloseAudioDevice() will probably
1364 * deadlock.
1365 *
1366 * Internally, the audio device lock is a mutex; if you lock from two threads
1367 * at once, not only will you block the audio callback, you'll block the other
1368 * thread.
1369 *
1370 * \param dev the ID of the device to be locked
1371 *
1372 * \since This function is available since SDL 2.0.0.
1373 *
1374 * \sa SDL_UnlockAudioDevice
1375 */
1376 extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
1377
1378 /**
1379 * This function is a legacy means of unlocking the audio device.
1380 *
1381 * New programs might want to use SDL_UnlockAudioDevice() instead. This
1382 * function is equivalent to calling...
1383 *
1384 * ```c
1385 * SDL_UnlockAudioDevice(1);
1386 * ```
1387 *
1388 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1389 *
1390 * \since This function is available since SDL 2.0.0.
1391 *
1392 * \sa SDL_LockAudio
1393 * \sa SDL_UnlockAudioDevice
1394 */
1395 extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
1396
1397 /**
1398 * Use this function to unlock the audio callback function for a specified
1399 * device.
1400 *
1401 * This function should be paired with a previous SDL_LockAudioDevice() call.
1402 *
1403 * \param dev the ID of the device to be unlocked
1404 *
1405 * \since This function is available since SDL 2.0.0.
1406 *
1407 * \sa SDL_LockAudioDevice
1408 */
1409 extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
1410 /* @} *//* Audio lock functions */
1411
1412 /**
1413 * This function is a legacy means of closing the audio device.
1414 *
1415 * This function is equivalent to calling...
1416 *
1417 * ```c
1418 * SDL_CloseAudioDevice(1);
1419 * ```
1420 *
1421 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1422 *
1423 * \since This function is available since SDL 2.0.0.
1424 *
1425 * \sa SDL_OpenAudio
1426 */
1427 extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
1428
1429 /**
1430 * Use this function to shut down audio processing and close the audio device.
1431 *
1432 * The application should close open audio devices once they are no longer
1433 * needed. Calling this function will wait until the device's audio callback
1434 * is not running, release the audio hardware and then clean up internal
1435 * state. No further audio will play from this device once this function
1436 * returns.
1437 *
1438 * This function may block briefly while pending audio data is played by the
1439 * hardware, so that applications don't drop the last buffer of data they
1440 * supplied.
1441 *
1442 * The device ID is invalid as soon as the device is closed, and is eligible
1443 * for reuse in a new SDL_OpenAudioDevice() call immediately.
1444 *
1445 * \param dev an audio device previously opened with SDL_OpenAudioDevice()
1446 *
1447 * \since This function is available since SDL 2.0.0.
1448 *
1449 * \sa SDL_OpenAudioDevice
1450 */
1451 extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
1452
1453 /* Ends C function definitions when using C++ */
1454 #ifdef __cplusplus
1455 }
1456 #endif
1457 #include <SDL2/close_code.h>
1458
1459 #endif /* SDL_audio_h_ */
1460
1461 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_bits.h
23 *
24 * Functions for fiddling with bits and bitmasks.
25 */
26
27 #ifndef SDL_bits_h_
28 #define SDL_bits_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \file SDL_bits.h
40 */
41
42 /**
43 * Get the index of the most significant bit. Result is undefined when called
44 * with 0. This operation can also be stated as "count leading zeroes" and
45 * "log base 2".
46 *
47 * \return the index of the most significant bit, or -1 if the value is 0.
48 */
49 #if defined(__WATCOMC__) && defined(__386__)
50 extern __inline int _SDL_bsr_watcom(Uint32);
51 #pragma aux _SDL_bsr_watcom = \
52 "bsr eax, eax" \
53 parm [eax] nomemory \
54 value [eax] \
55 modify exact [eax] nomemory;
56 #endif
57
58 SDL_FORCE_INLINE int
59 SDL_MostSignificantBitIndex32(Uint32 x)
60 {
61 #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
62 /* Count Leading Zeroes builtin in GCC.
63 * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
64 */
65 if (x == 0) {
66 return -1;
67 }
68 return 31 - __builtin_clz(x);
69 #elif defined(__WATCOMC__) && defined(__386__)
70 if (x == 0) {
71 return -1;
72 }
73 return _SDL_bsr_watcom(x);
74 #elif defined(_MSC_VER)
75 unsigned long index;
76 if (_BitScanReverse(&index, x)) {
77 return index;
78 }
79 return -1;
80 #else
81 /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
82 * <seander@cs.stanford.edu>, released in the public domain.
83 * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
84 */
85 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
86 const int S[] = {1, 2, 4, 8, 16};
87
88 int msbIndex = 0;
89 int i;
90
91 if (x == 0) {
92 return -1;
93 }
94
95 for (i = 4; i >= 0; i--)
96 {
97 if (x & b[i])
98 {
99 x >>= S[i];
100 msbIndex |= S[i];
101 }
102 }
103
104 return msbIndex;
105 #endif
106 }
107
108 SDL_FORCE_INLINE SDL_bool
109 SDL_HasExactlyOneBitSet32(Uint32 x)
110 {
111 if (x && !(x & (x - 1))) {
112 return SDL_TRUE;
113 }
114 return SDL_FALSE;
115 }
116
117 /* Ends C function definitions when using C++ */
118 #ifdef __cplusplus
119 }
120 #endif
121 #include <SDL2/close_code.h>
122
123 #endif /* SDL_bits_h_ */
124
125 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_blendmode.h
23 *
24 * Header file declaring the SDL_BlendMode enumeration
25 */
26
27 #ifndef SDL_blendmode_h_
28 #define SDL_blendmode_h_
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /**
37 * \brief The blend mode used in SDL_RenderCopy() and drawing operations.
38 */
39 typedef enum
40 {
41 SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
42 dstRGBA = srcRGBA */
43 SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
44 dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
45 dstA = srcA + (dstA * (1-srcA)) */
46 SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
47 dstRGB = (srcRGB * srcA) + dstRGB
48 dstA = dstA */
49 SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
50 dstRGB = srcRGB * dstRGB
51 dstA = dstA */
52 SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
53 dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
54 dstA = (srcA * dstA) + (dstA * (1-srcA)) */
55 SDL_BLENDMODE_INVALID = 0x7FFFFFFF
56
57 /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
58
59 } SDL_BlendMode;
60
61 /**
62 * \brief The blend operation used when combining source and destination pixel components
63 */
64 typedef enum
65 {
66 SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
67 SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
68 SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
69 SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
70 SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
71 } SDL_BlendOperation;
72
73 /**
74 * \brief The normalized factor used to multiply pixel components
75 */
76 typedef enum
77 {
78 SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
79 SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
80 SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
81 SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
82 SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
83 SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
84 SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
85 SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
86 SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
87 SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
88 } SDL_BlendFactor;
89
90 /**
91 * Compose a custom blend mode for renderers.
92 *
93 * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
94 * the SDL_BlendMode returned by this function if the renderer supports it.
95 *
96 * A blend mode controls how the pixels from a drawing operation (source) get
97 * combined with the pixels from the render target (destination). First, the
98 * components of the source and destination pixels get multiplied with their
99 * blend factors. Then, the blend operation takes the two products and
100 * calculates the result that will get stored in the render target.
101 *
102 * Expressed in pseudocode, it would look like this:
103 *
104 * ```c
105 * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
106 * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
107 * ```
108 *
109 * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
110 * dst)` can return one of the following:
111 *
112 * - `src + dst`
113 * - `src - dst`
114 * - `dst - src`
115 * - `min(src, dst)`
116 * - `max(src, dst)`
117 *
118 * The red, green, and blue components are always multiplied with the first,
119 * second, and third components of the SDL_BlendFactor, respectively. The
120 * fourth component is not used.
121 *
122 * The alpha component is always multiplied with the fourth component of the
123 * SDL_BlendFactor. The other components are not used in the alpha
124 * calculation.
125 *
126 * Support for these blend modes varies for each renderer. To check if a
127 * specific SDL_BlendMode is supported, create a renderer and pass it to
128 * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
129 * return with an error if the blend mode is not supported.
130 *
131 * This list describes the support of custom blend modes for each renderer in
132 * SDL 2.0.6. All renderers support the four blend modes listed in the
133 * SDL_BlendMode enumeration.
134 *
135 * - **direct3d**: Supports all operations with all factors. However, some
136 * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
137 * `SDL_BLENDOPERATION_MAXIMUM`.
138 * - **direct3d11**: Same as Direct3D 9.
139 * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
140 * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
141 * 2.0.6.
142 * - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
143 * factors. Color and alpha factors need to be the same. OpenGL ES 1
144 * implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
145 * and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
146 * operations being different from each other. May support color and alpha
147 * factors being different from each other.
148 * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
149 * `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
150 * operations with all factors.
151 * - **psp**: No custom blend mode support.
152 * - **software**: No custom blend mode support.
153 *
154 * Some renderers do not provide an alpha component for the default render
155 * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
156 * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
157 * case.
158 *
159 * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
160 * blue components of the source pixels
161 * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
162 * blue components of the destination pixels
163 * \param colorOperation the SDL_BlendOperation used to combine the red,
164 * green, and blue components of the source and
165 * destination pixels
166 * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
167 * the source pixels
168 * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
169 * the destination pixels
170 * \param alphaOperation the SDL_BlendOperation used to combine the alpha
171 * component of the source and destination pixels
172 * \returns an SDL_BlendMode that represents the chosen factors and
173 * operations.
174 *
175 * \since This function is available since SDL 2.0.6.
176 *
177 * \sa SDL_SetRenderDrawBlendMode
178 * \sa SDL_GetRenderDrawBlendMode
179 * \sa SDL_SetTextureBlendMode
180 * \sa SDL_GetTextureBlendMode
181 */
182 extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
183 SDL_BlendFactor dstColorFactor,
184 SDL_BlendOperation colorOperation,
185 SDL_BlendFactor srcAlphaFactor,
186 SDL_BlendFactor dstAlphaFactor,
187 SDL_BlendOperation alphaOperation);
188
189 /* Ends C function definitions when using C++ */
190 #ifdef __cplusplus
191 }
192 #endif
193 #include <SDL2/close_code.h>
194
195 #endif /* SDL_blendmode_h_ */
196
197 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_clipboard.h
23 *
24 * Include file for SDL clipboard handling
25 */
26
27 #ifndef SDL_clipboard_h_
28 #define SDL_clipboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Function prototypes */
39
40 /**
41 * Put UTF-8 text into the clipboard.
42 *
43 * \param text the text to store in the clipboard
44 * \returns 0 on success or a negative error code on failure; call
45 * SDL_GetError() for more information.
46 *
47 * \since This function is available since SDL 2.0.0.
48 *
49 * \sa SDL_GetClipboardText
50 * \sa SDL_HasClipboardText
51 */
52 extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
53
54 /**
55 * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
56 *
57 * This functions returns empty string if there was not enough memory left for
58 * a copy of the clipboard's content.
59 *
60 * \returns the clipboard text on success or an empty string on failure; call
61 * SDL_GetError() for more information. Caller must call SDL_free()
62 * on the returned pointer when done with it (even if there was an
63 * error).
64 *
65 * \since This function is available since SDL 2.0.0.
66 *
67 * \sa SDL_HasClipboardText
68 * \sa SDL_SetClipboardText
69 */
70 extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
71
72 /**
73 * Query whether the clipboard exists and contains a non-empty text string.
74 *
75 * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_GetClipboardText
80 * \sa SDL_SetClipboardText
81 */
82 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
83
84
85 /* Ends C function definitions when using C++ */
86 #ifdef __cplusplus
87 }
88 #endif
89 #include <SDL2/close_code.h>
90
91 #endif /* SDL_clipboard_h_ */
92
93 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_h_
22 #define SDL_config_h_
23
24 #include <SDL2/SDL_platform.h>
25
26 /**
27 * \file SDL_config.h
28 */
29
30 /* Add any platform that doesn't build using the configure system. */
31 #if defined(__WIN32__)
32 #include <SDL2/SDL_config_windows.h>
33 #elif defined(__WINRT__)
34 #include <SDL2/SDL_config_winrt.h>
35 #elif defined(__MACOSX__)
36 #include <SDL2/SDL_config_macosx.h>
37 #elif defined(__IPHONEOS__)
38 #include <SDL2/SDL_config_iphoneos.h>
39 #elif defined(__ANDROID__)
40 #include <SDL2/SDL_config_android.h>
41 #elif defined(__OS2__)
42 #include <SDL2/SDL_config_os2.h>
43 #elif defined(__EMSCRIPTEN__)
44 #include <SDL2/SDL_config_emscripten.h>
45 #else
46 /* This is a minimal configuration just to get SDL running on new platforms. */
47 #include <SDL2/SDL_config_minimal.h>
48 #endif /* platform config */
49
50 #ifdef USING_GENERATED_CONFIG_H
51 #error Wrong SDL_config.h, check your include path?
52 #endif
53
54 #endif /* SDL_config_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_iphoneos_h_
22 #define SDL_config_iphoneos_h_
23 #define SDL_config_h_
24
25 #include <SDL2/SDL_platform.h>
26
27 #ifdef __LP64__
28 #define SIZEOF_VOIDP 8
29 #else
30 #define SIZEOF_VOIDP 4
31 #endif
32
33 #define HAVE_GCC_ATOMICS 1
34
35 #define STDC_HEADERS 1
36 #define HAVE_ALLOCA_H 1
37 #define HAVE_CTYPE_H 1
38 #define HAVE_INTTYPES_H 1
39 #define HAVE_LIMITS_H 1
40 #define HAVE_MATH_H 1
41 #define HAVE_SIGNAL_H 1
42 #define HAVE_STDINT_H 1
43 #define HAVE_STDIO_H 1
44 #define HAVE_STRING_H 1
45 #define HAVE_SYS_TYPES_H 1
46 /* The libunwind functions are only available on x86 */
47 /* #undef HAVE_LIBUNWIND_H */
48
49 /* C library functions */
50 #define HAVE_DLOPEN 1
51 #define HAVE_MALLOC 1
52 #define HAVE_CALLOC 1
53 #define HAVE_REALLOC 1
54 #define HAVE_FREE 1
55 #define HAVE_ALLOCA 1
56 #define HAVE_GETENV 1
57 #define HAVE_SETENV 1
58 #define HAVE_PUTENV 1
59 #define HAVE_SETENV 1
60 #define HAVE_UNSETENV 1
61 #define HAVE_QSORT 1
62 #define HAVE_ABS 1
63 #define HAVE_BCOPY 1
64 #define HAVE_MEMSET 1
65 #define HAVE_MEMCPY 1
66 #define HAVE_MEMMOVE 1
67 #define HAVE_MEMCMP 1
68 #define HAVE_STRLEN 1
69 #define HAVE_STRLCPY 1
70 #define HAVE_STRLCAT 1
71 #define HAVE_STRCHR 1
72 #define HAVE_STRRCHR 1
73 #define HAVE_STRSTR 1
74 #define HAVE_STRTOK_R 1
75 #define HAVE_STRTOL 1
76 #define HAVE_STRTOUL 1
77 #define HAVE_STRTOLL 1
78 #define HAVE_STRTOULL 1
79 #define HAVE_STRTOD 1
80 #define HAVE_ATOI 1
81 #define HAVE_ATOF 1
82 #define HAVE_STRCMP 1
83 #define HAVE_STRNCMP 1
84 #define HAVE_STRCASECMP 1
85 #define HAVE_STRNCASECMP 1
86 #define HAVE_VSSCANF 1
87 #define HAVE_VSNPRINTF 1
88 #define HAVE_M_PI 1
89 #define HAVE_ACOS 1
90 #define HAVE_ACOSF 1
91 #define HAVE_ASIN 1
92 #define HAVE_ASINF 1
93 #define HAVE_ATAN 1
94 #define HAVE_ATANF 1
95 #define HAVE_ATAN2 1
96 #define HAVE_ATAN2F 1
97 #define HAVE_CEIL 1
98 #define HAVE_CEILF 1
99 #define HAVE_COPYSIGN 1
100 #define HAVE_COPYSIGNF 1
101 #define HAVE_COS 1
102 #define HAVE_COSF 1
103 #define HAVE_EXP 1
104 #define HAVE_EXPF 1
105 #define HAVE_FABS 1
106 #define HAVE_FABSF 1
107 #define HAVE_FLOOR 1
108 #define HAVE_FLOORF 1
109 #define HAVE_FMOD 1
110 #define HAVE_FMODF 1
111 #define HAVE_LOG 1
112 #define HAVE_LOGF 1
113 #define HAVE_LOG10 1
114 #define HAVE_LOG10F 1
115 #define HAVE_LROUND 1
116 #define HAVE_LROUNDF 1
117 #define HAVE_POW 1
118 #define HAVE_POWF 1
119 #define HAVE_ROUND 1
120 #define HAVE_ROUNDF 1
121 #define HAVE_SCALBN 1
122 #define HAVE_SCALBNF 1
123 #define HAVE_SIN 1
124 #define HAVE_SINF 1
125 #define HAVE_SQRT 1
126 #define HAVE_SQRTF 1
127 #define HAVE_TAN 1
128 #define HAVE_TANF 1
129 #define HAVE_TRUNC 1
130 #define HAVE_TRUNCF 1
131 #define HAVE_SIGACTION 1
132 #define HAVE_SETJMP 1
133 #define HAVE_NANOSLEEP 1
134 #define HAVE_SYSCONF 1
135 #define HAVE_SYSCTLBYNAME 1
136 #define HAVE_O_CLOEXEC 1
137
138 /* enable iPhone version of Core Audio driver */
139 #define SDL_AUDIO_DRIVER_COREAUDIO 1
140 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
141 #define SDL_AUDIO_DRIVER_DUMMY 1
142
143 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
144 #define SDL_HAPTIC_DUMMY 1
145
146 /* Enable joystick support */
147 /* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
148 /*#define SDL_JOYSTICK_HIDAPI 1*/
149 #define SDL_JOYSTICK_MFI 1
150 #define SDL_JOYSTICK_VIRTUAL 1
151
152 #ifdef __TVOS__
153 #define SDL_SENSOR_DUMMY 1
154 #else
155 /* Enable the CoreMotion sensor driver */
156 #define SDL_SENSOR_COREMOTION 1
157 #endif
158
159 /* Enable Unix style SO loading */
160 #define SDL_LOADSO_DLOPEN 1
161
162 /* Enable various threading systems */
163 #define SDL_THREAD_PTHREAD 1
164 #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
165
166 /* Enable various timer systems */
167 #define SDL_TIMER_UNIX 1
168
169 /* Supported video drivers */
170 #define SDL_VIDEO_DRIVER_UIKIT 1
171 #define SDL_VIDEO_DRIVER_DUMMY 1
172
173 /* Enable OpenGL ES */
174 #if !TARGET_OS_MACCATALYST
175 #define SDL_VIDEO_OPENGL_ES2 1
176 #define SDL_VIDEO_OPENGL_ES 1
177 #define SDL_VIDEO_RENDER_OGL_ES 1
178 #define SDL_VIDEO_RENDER_OGL_ES2 1
179 #endif
180
181 /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
182 Also supported in simulator from iOS 13.0 and tvOS 13.0
183 */
184 #if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
185 #define SDL_PLATFORM_SUPPORTS_METAL 1
186 #else
187 #define SDL_PLATFORM_SUPPORTS_METAL 0
188 #endif
189
190 #if SDL_PLATFORM_SUPPORTS_METAL
191 #define SDL_VIDEO_RENDER_METAL 1
192 #endif
193
194 #if SDL_PLATFORM_SUPPORTS_METAL
195 #define SDL_VIDEO_VULKAN 1
196 #endif
197
198 #if SDL_PLATFORM_SUPPORTS_METAL
199 #define SDL_VIDEO_METAL 1
200 #endif
201
202 /* Enable system power support */
203 #define SDL_POWER_UIKIT 1
204
205 /* enable iPhone keyboard support */
206 #define SDL_IPHONE_KEYBOARD 1
207
208 /* enable iOS extended launch screen */
209 #define SDL_IPHONE_LAUNCHSCREEN 1
210
211 /* enable filesystem support */
212 #define SDL_FILESYSTEM_COCOA 1
213
214 #endif /* SDL_config_iphoneos_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_cpuinfo.h
23 *
24 * CPU feature detection for SDL.
25 */
26
27 #ifndef SDL_cpuinfo_h_
28 #define SDL_cpuinfo_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /* Need to do this here because intrin.h has C++ code in it */
33 /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
34 #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
35 #ifdef __clang__
36 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
37 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
38
39 #ifndef __PRFCHWINTRIN_H
40 #define __PRFCHWINTRIN_H
41
42 static __inline__ void __attribute__((__always_inline__, __nodebug__))
43 _m_prefetch(void *__P)
44 {
45 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
46 }
47
48 #endif /* __PRFCHWINTRIN_H */
49 #endif /* __clang__ */
50 #include <intrin.h>
51 #ifndef _WIN64
52 #ifndef __MMX__
53 #define __MMX__
54 #endif
55 #ifndef __3dNOW__
56 #define __3dNOW__
57 #endif
58 #endif
59 #ifndef __SSE__
60 #define __SSE__
61 #endif
62 #ifndef __SSE2__
63 #define __SSE2__
64 #endif
65 #ifndef __SSE3__
66 #define __SSE3__
67 #endif
68 #elif defined(__MINGW64_VERSION_MAJOR)
69 #include <intrin.h>
70 #if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
71 # include <arm_neon.h>
72 #endif
73 #else
74 /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
75 #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
76 #include <altivec.h>
77 #endif
78 #if !defined(SDL_DISABLE_ARM_NEON_H)
79 # if defined(__ARM_NEON)
80 # include <arm_neon.h>
81 # elif defined(__WINDOWS__) || defined(__WINRT__)
82 /* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
83 # if defined(_M_ARM)
84 # include <armintr.h>
85 # include <arm_neon.h>
86 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
87 # endif
88 # if defined (_M_ARM64)
89 # include <arm64intr.h>
90 # include <arm64_neon.h>
91 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
92 # endif
93 # endif
94 #endif
95 #endif /* compiler version */
96
97 #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
98 #include <mm3dnow.h>
99 #endif
100 #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
101 #include <immintrin.h>
102 #else
103 #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
104 #include <mmintrin.h>
105 #endif
106 #if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
107 #include <xmmintrin.h>
108 #endif
109 #if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
110 #include <emmintrin.h>
111 #endif
112 #if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
113 #include <pmmintrin.h>
114 #endif
115 #endif /* HAVE_IMMINTRIN_H */
116
117 #include <SDL2/begin_code.h>
118 /* Set up for C function definitions, even when using C++ */
119 #ifdef __cplusplus
120 extern "C" {
121 #endif
122
123 /* This is a guess for the cacheline size used for padding.
124 * Most x86 processors have a 64 byte cache line.
125 * The 64-bit PowerPC processors have a 128 byte cache line.
126 * We'll use the larger value to be generally safe.
127 */
128 #define SDL_CACHELINE_SIZE 128
129
130 /**
131 * Get the number of CPU cores available.
132 *
133 * \returns the total number of logical CPU cores. On CPUs that include
134 * technologies such as hyperthreading, the number of logical cores
135 * may be more than the number of physical cores.
136 *
137 * \since This function is available since SDL 2.0.0.
138 */
139 extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
140
141 /**
142 * Determine the L1 cache line size of the CPU.
143 *
144 * This is useful for determining multi-threaded structure padding or SIMD
145 * prefetch sizes.
146 *
147 * \returns the L1 cache line size of the CPU, in bytes.
148 *
149 * \since This function is available since SDL 2.0.0.
150 */
151 extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
152
153 /**
154 * Determine whether the CPU has the RDTSC instruction.
155 *
156 * This always returns false on CPUs that aren't using Intel instruction sets.
157 *
158 * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
159 *
160 * \since This function is available since SDL 2.0.0.
161 *
162 * \sa SDL_Has3DNow
163 * \sa SDL_HasAltiVec
164 * \sa SDL_HasAVX
165 * \sa SDL_HasAVX2
166 * \sa SDL_HasMMX
167 * \sa SDL_HasSSE
168 * \sa SDL_HasSSE2
169 * \sa SDL_HasSSE3
170 * \sa SDL_HasSSE41
171 * \sa SDL_HasSSE42
172 */
173 extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
174
175 /**
176 * Determine whether the CPU has AltiVec features.
177 *
178 * This always returns false on CPUs that aren't using PowerPC instruction
179 * sets.
180 *
181 * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
182 *
183 * \since This function is available since SDL 2.0.0.
184 *
185 * \sa SDL_Has3DNow
186 * \sa SDL_HasAVX
187 * \sa SDL_HasAVX2
188 * \sa SDL_HasMMX
189 * \sa SDL_HasRDTSC
190 * \sa SDL_HasSSE
191 * \sa SDL_HasSSE2
192 * \sa SDL_HasSSE3
193 * \sa SDL_HasSSE41
194 * \sa SDL_HasSSE42
195 */
196 extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
197
198 /**
199 * Determine whether the CPU has MMX features.
200 *
201 * This always returns false on CPUs that aren't using Intel instruction sets.
202 *
203 * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
204 *
205 * \since This function is available since SDL 2.0.0.
206 *
207 * \sa SDL_Has3DNow
208 * \sa SDL_HasAltiVec
209 * \sa SDL_HasAVX
210 * \sa SDL_HasAVX2
211 * \sa SDL_HasRDTSC
212 * \sa SDL_HasSSE
213 * \sa SDL_HasSSE2
214 * \sa SDL_HasSSE3
215 * \sa SDL_HasSSE41
216 * \sa SDL_HasSSE42
217 */
218 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
219
220 /**
221 * Determine whether the CPU has 3DNow! features.
222 *
223 * This always returns false on CPUs that aren't using AMD instruction sets.
224 *
225 * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
226 *
227 * \since This function is available since SDL 2.0.0.
228 *
229 * \sa SDL_HasAltiVec
230 * \sa SDL_HasAVX
231 * \sa SDL_HasAVX2
232 * \sa SDL_HasMMX
233 * \sa SDL_HasRDTSC
234 * \sa SDL_HasSSE
235 * \sa SDL_HasSSE2
236 * \sa SDL_HasSSE3
237 * \sa SDL_HasSSE41
238 * \sa SDL_HasSSE42
239 */
240 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
241
242 /**
243 * Determine whether the CPU has SSE features.
244 *
245 * This always returns false on CPUs that aren't using Intel instruction sets.
246 *
247 * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
248 *
249 * \since This function is available since SDL 2.0.0.
250 *
251 * \sa SDL_Has3DNow
252 * \sa SDL_HasAltiVec
253 * \sa SDL_HasAVX
254 * \sa SDL_HasAVX2
255 * \sa SDL_HasMMX
256 * \sa SDL_HasRDTSC
257 * \sa SDL_HasSSE2
258 * \sa SDL_HasSSE3
259 * \sa SDL_HasSSE41
260 * \sa SDL_HasSSE42
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
263
264 /**
265 * Determine whether the CPU has SSE2 features.
266 *
267 * This always returns false on CPUs that aren't using Intel instruction sets.
268 *
269 * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_Has3DNow
274 * \sa SDL_HasAltiVec
275 * \sa SDL_HasAVX
276 * \sa SDL_HasAVX2
277 * \sa SDL_HasMMX
278 * \sa SDL_HasRDTSC
279 * \sa SDL_HasSSE
280 * \sa SDL_HasSSE3
281 * \sa SDL_HasSSE41
282 * \sa SDL_HasSSE42
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
285
286 /**
287 * Determine whether the CPU has SSE3 features.
288 *
289 * This always returns false on CPUs that aren't using Intel instruction sets.
290 *
291 * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_Has3DNow
296 * \sa SDL_HasAltiVec
297 * \sa SDL_HasAVX
298 * \sa SDL_HasAVX2
299 * \sa SDL_HasMMX
300 * \sa SDL_HasRDTSC
301 * \sa SDL_HasSSE
302 * \sa SDL_HasSSE2
303 * \sa SDL_HasSSE41
304 * \sa SDL_HasSSE42
305 */
306 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
307
308 /**
309 * Determine whether the CPU has SSE4.1 features.
310 *
311 * This always returns false on CPUs that aren't using Intel instruction sets.
312 *
313 * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
314 *
315 * \since This function is available since SDL 2.0.0.
316 *
317 * \sa SDL_Has3DNow
318 * \sa SDL_HasAltiVec
319 * \sa SDL_HasAVX
320 * \sa SDL_HasAVX2
321 * \sa SDL_HasMMX
322 * \sa SDL_HasRDTSC
323 * \sa SDL_HasSSE
324 * \sa SDL_HasSSE2
325 * \sa SDL_HasSSE3
326 * \sa SDL_HasSSE42
327 */
328 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
329
330 /**
331 * Determine whether the CPU has SSE4.2 features.
332 *
333 * This always returns false on CPUs that aren't using Intel instruction sets.
334 *
335 * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_Has3DNow
340 * \sa SDL_HasAltiVec
341 * \sa SDL_HasAVX
342 * \sa SDL_HasAVX2
343 * \sa SDL_HasMMX
344 * \sa SDL_HasRDTSC
345 * \sa SDL_HasSSE
346 * \sa SDL_HasSSE2
347 * \sa SDL_HasSSE3
348 * \sa SDL_HasSSE41
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
351
352 /**
353 * Determine whether the CPU has AVX features.
354 *
355 * This always returns false on CPUs that aren't using Intel instruction sets.
356 *
357 * \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
358 *
359 * \since This function is available since SDL 2.0.2.
360 *
361 * \sa SDL_Has3DNow
362 * \sa SDL_HasAltiVec
363 * \sa SDL_HasAVX2
364 * \sa SDL_HasMMX
365 * \sa SDL_HasRDTSC
366 * \sa SDL_HasSSE
367 * \sa SDL_HasSSE2
368 * \sa SDL_HasSSE3
369 * \sa SDL_HasSSE41
370 * \sa SDL_HasSSE42
371 */
372 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
373
374 /**
375 * Determine whether the CPU has AVX2 features.
376 *
377 * This always returns false on CPUs that aren't using Intel instruction sets.
378 *
379 * \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
380 *
381 * \since This function is available since SDL 2.0.4.
382 *
383 * \sa SDL_Has3DNow
384 * \sa SDL_HasAltiVec
385 * \sa SDL_HasAVX
386 * \sa SDL_HasMMX
387 * \sa SDL_HasRDTSC
388 * \sa SDL_HasSSE
389 * \sa SDL_HasSSE2
390 * \sa SDL_HasSSE3
391 * \sa SDL_HasSSE41
392 * \sa SDL_HasSSE42
393 */
394 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
395
396 /**
397 * Determine whether the CPU has AVX-512F (foundation) features.
398 *
399 * This always returns false on CPUs that aren't using Intel instruction sets.
400 *
401 * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
402 *
403 * \since This function is available since SDL 2.0.9.
404 *
405 * \sa SDL_HasAVX
406 */
407 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
408
409 /**
410 * Determine whether the CPU has ARM SIMD (ARMv6) features.
411 *
412 * This is different from ARM NEON, which is a different instruction set.
413 *
414 * This always returns false on CPUs that aren't using ARM instruction sets.
415 *
416 * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
417 *
418 * \since This function is available since SDL 2.0.12.
419 *
420 * \sa SDL_HasNEON
421 */
422 extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
423
424 /**
425 * Determine whether the CPU has NEON (ARM SIMD) features.
426 *
427 * This always returns false on CPUs that aren't using ARM instruction sets.
428 *
429 * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
434
435 /**
436 * Get the amount of RAM configured in the system.
437 *
438 * \returns the amount of RAM configured in the system in MB.
439 *
440 * \since This function is available since SDL 2.0.1.
441 */
442 extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
443
444 /**
445 * Report the alignment this system needs for SIMD allocations.
446 *
447 * This will return the minimum number of bytes to which a pointer must be
448 * aligned to be compatible with SIMD instructions on the current machine. For
449 * example, if the machine supports SSE only, it will return 16, but if it
450 * supports AVX-512F, it'll return 64 (etc). This only reports values for
451 * instruction sets SDL knows about, so if your SDL build doesn't have
452 * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
453 * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
454 * Plan accordingly.
455 *
456 * \returns the alignment in bytes needed for available, known SIMD
457 * instructions.
458 *
459 * \since This function is available since SDL 2.0.10.
460 */
461 extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
462
463 /**
464 * Allocate memory in a SIMD-friendly way.
465 *
466 * This will allocate a block of memory that is suitable for use with SIMD
467 * instructions. Specifically, it will be properly aligned and padded for the
468 * system's supported vector instructions.
469 *
470 * The memory returned will be padded such that it is safe to read or write an
471 * incomplete vector at the end of the memory block. This can be useful so you
472 * don't have to drop back to a scalar fallback at the end of your SIMD
473 * processing loop to deal with the final elements without overflowing the
474 * allocated buffer.
475 *
476 * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
477 * delete[], etc.
478 *
479 * Note that SDL will only deal with SIMD instruction sets it is aware of; for
480 * example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
481 * AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
482 * 64. To be clear: if you can't decide to use an instruction set with an
483 * SDL_Has*() function, don't use that instruction set with memory allocated
484 * through here.
485 *
486 * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
487 * out of memory, but you are not allowed to dereference it (because you only
488 * own zero bytes of that buffer).
489 *
490 * \param len The length, in bytes, of the block to allocate. The actual
491 * allocated block might be larger due to padding, etc.
492 * \returns a pointer to the newly-allocated block, NULL if out of memory.
493 *
494 * \since This function is available since SDL 2.0.10.
495 *
496 * \sa SDL_SIMDAlignment
497 * \sa SDL_SIMDRealloc
498 * \sa SDL_SIMDFree
499 */
500 extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
501
502 /**
503 * Reallocate memory obtained from SDL_SIMDAlloc
504 *
505 * It is not valid to use this function on a pointer from anything but
506 * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
507 * SDL_malloc, memalign, new[], etc.
508 *
509 * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
510 * accepts NULL, at which point this function is the same as
511 * calling SDL_SIMDAlloc with a NULL pointer.
512 * \param len The length, in bytes, of the block to allocated. The actual
513 * allocated block might be larger due to padding, etc. Passing 0
514 * will return a non-NULL pointer, assuming the system isn't out of
515 * memory.
516 * \returns a pointer to the newly-reallocated block, NULL if out of memory.
517 *
518 * \since This function is available since SDL 2.0.14.
519 *
520 * \sa SDL_SIMDAlignment
521 * \sa SDL_SIMDAlloc
522 * \sa SDL_SIMDFree
523 */
524 extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
525
526 /**
527 * Deallocate memory obtained from SDL_SIMDAlloc
528 *
529 * It is not valid to use this function on a pointer from anything but
530 * SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
531 * malloc, realloc, SDL_malloc, memalign, new[], etc.
532 *
533 * However, SDL_SIMDFree(NULL) is a legal no-op.
534 *
535 * The memory pointed to by `ptr` is no longer valid for access upon return,
536 * and may be returned to the system or reused by a future allocation. The
537 * pointer passed to this function is no longer safe to dereference once this
538 * function returns, and should be discarded.
539 *
540 * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
541 * deallocate. NULL is a legal no-op.
542 *
543 * \since This function is available since SDL 2.0.10.
544 *
545 * \sa SDL_SIMDAlloc
546 * \sa SDL_SIMDRealloc
547 */
548 extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
549
550 /* Ends C function definitions when using C++ */
551 #ifdef __cplusplus
552 }
553 #endif
554 #include <SDL2/close_code.h>
555
556 #endif /* SDL_cpuinfo_h_ */
557
558 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_endian.h
23 *
24 * Functions for reading and writing endian-specific values
25 */
26
27 #ifndef SDL_endian_h_
28 #define SDL_endian_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
33 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
34 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
35 #ifdef __clang__
36 #ifndef __PRFCHWINTRIN_H
37 #define __PRFCHWINTRIN_H
38 static __inline__ void __attribute__((__always_inline__, __nodebug__))
39 _m_prefetch(void *__P)
40 {
41 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
42 }
43 #endif /* __PRFCHWINTRIN_H */
44 #endif /* __clang__ */
45
46 #include <intrin.h>
47 #endif
48
49 /**
50 * \name The two types of endianness
51 */
52 /* @{ */
53 #define SDL_LIL_ENDIAN 1234
54 #define SDL_BIG_ENDIAN 4321
55 /* @} */
56
57 #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
58 #ifdef __linux__
59 #include <endian.h>
60 #define SDL_BYTEORDER __BYTE_ORDER
61 #elif defined(__OpenBSD__)
62 #include <endian.h>
63 #define SDL_BYTEORDER BYTE_ORDER
64 #elif defined(__FreeBSD__) || defined(__NetBSD__)
65 #include <sys/endian.h>
66 #define SDL_BYTEORDER BYTE_ORDER
67 /* predefs from newer gcc and clang versions: */
68 #elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
69 #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
70 #define SDL_BYTEORDER SDL_LIL_ENDIAN
71 #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
72 #define SDL_BYTEORDER SDL_BIG_ENDIAN
73 #else
74 #error Unsupported endianness
75 #endif /**/
76 #else
77 #if defined(__hppa__) || \
78 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
79 (defined(__MIPS__) && defined(__MIPSEB__)) || \
80 defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
81 defined(__sparc__)
82 #define SDL_BYTEORDER SDL_BIG_ENDIAN
83 #else
84 #define SDL_BYTEORDER SDL_LIL_ENDIAN
85 #endif
86 #endif /* __linux__ */
87 #endif /* !SDL_BYTEORDER */
88
89
90 #include <SDL2/begin_code.h>
91 /* Set up for C function definitions, even when using C++ */
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95
96 /**
97 * \file SDL_endian.h
98 */
99
100 /* various modern compilers may have builtin swap */
101 #if defined(__GNUC__) || defined(__clang__)
102 # define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
103 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
104 # define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
105 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
106 # define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
107 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
108
109 /* this one is broken */
110 # define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
111 #else
112 # define HAS_BUILTIN_BSWAP16 0
113 # define HAS_BUILTIN_BSWAP32 0
114 # define HAS_BUILTIN_BSWAP64 0
115 # define HAS_BROKEN_BSWAP 0
116 #endif
117
118 #if HAS_BUILTIN_BSWAP16
119 #define SDL_Swap16(x) __builtin_bswap16(x)
120 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
121 #pragma intrinsic(_byteswap_ushort)
122 #define SDL_Swap16(x) _byteswap_ushort(x)
123 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
124 SDL_FORCE_INLINE Uint16
125 SDL_Swap16(Uint16 x)
126 {
127 __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
128 return x;
129 }
130 #elif defined(__x86_64__)
131 SDL_FORCE_INLINE Uint16
132 SDL_Swap16(Uint16 x)
133 {
134 __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
135 return x;
136 }
137 #elif (defined(__powerpc__) || defined(__ppc__))
138 SDL_FORCE_INLINE Uint16
139 SDL_Swap16(Uint16 x)
140 {
141 int result;
142
143 __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
144 return (Uint16)result;
145 }
146 #elif (defined(__m68k__) && !defined(__mcoldfire__))
147 SDL_FORCE_INLINE Uint16
148 SDL_Swap16(Uint16 x)
149 {
150 __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
151 return x;
152 }
153 #elif defined(__WATCOMC__) && defined(__386__)
154 extern __inline Uint16 SDL_Swap16(Uint16);
155 #pragma aux SDL_Swap16 = \
156 "xchg al, ah" \
157 parm [ax] \
158 modify [ax];
159 #else
160 SDL_FORCE_INLINE Uint16
161 SDL_Swap16(Uint16 x)
162 {
163 return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
164 }
165 #endif
166
167 #if HAS_BUILTIN_BSWAP32
168 #define SDL_Swap32(x) __builtin_bswap32(x)
169 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
170 #pragma intrinsic(_byteswap_ulong)
171 #define SDL_Swap32(x) _byteswap_ulong(x)
172 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
173 SDL_FORCE_INLINE Uint32
174 SDL_Swap32(Uint32 x)
175 {
176 __asm__("bswap %0": "=r"(x):"0"(x));
177 return x;
178 }
179 #elif defined(__x86_64__)
180 SDL_FORCE_INLINE Uint32
181 SDL_Swap32(Uint32 x)
182 {
183 __asm__("bswapl %0": "=r"(x):"0"(x));
184 return x;
185 }
186 #elif (defined(__powerpc__) || defined(__ppc__))
187 SDL_FORCE_INLINE Uint32
188 SDL_Swap32(Uint32 x)
189 {
190 Uint32 result;
191
192 __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
193 __asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
194 __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
195 return result;
196 }
197 #elif (defined(__m68k__) && !defined(__mcoldfire__))
198 SDL_FORCE_INLINE Uint32
199 SDL_Swap32(Uint32 x)
200 {
201 __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
202 return x;
203 }
204 #elif defined(__WATCOMC__) && defined(__386__)
205 extern __inline Uint32 SDL_Swap32(Uint32);
206 #pragma aux SDL_Swap32 = \
207 "bswap eax" \
208 parm [eax] \
209 modify [eax];
210 #else
211 SDL_FORCE_INLINE Uint32
212 SDL_Swap32(Uint32 x)
213 {
214 return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
215 ((x >> 8) & 0x0000FF00) | (x >> 24)));
216 }
217 #endif
218
219 #if HAS_BUILTIN_BSWAP64
220 #define SDL_Swap64(x) __builtin_bswap64(x)
221 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
222 #pragma intrinsic(_byteswap_uint64)
223 #define SDL_Swap64(x) _byteswap_uint64(x)
224 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
225 SDL_FORCE_INLINE Uint64
226 SDL_Swap64(Uint64 x)
227 {
228 union {
229 struct {
230 Uint32 a, b;
231 } s;
232 Uint64 u;
233 } v;
234 v.u = x;
235 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
236 : "=r"(v.s.a), "=r"(v.s.b)
237 : "0" (v.s.a), "1"(v.s.b));
238 return v.u;
239 }
240 #elif defined(__x86_64__)
241 SDL_FORCE_INLINE Uint64
242 SDL_Swap64(Uint64 x)
243 {
244 __asm__("bswapq %0": "=r"(x):"0"(x));
245 return x;
246 }
247 #elif defined(__WATCOMC__) && defined(__386__)
248 extern __inline Uint64 SDL_Swap64(Uint64);
249 #pragma aux SDL_Swap64 = \
250 "bswap eax" \
251 "bswap edx" \
252 "xchg eax,edx" \
253 parm [eax edx] \
254 modify [eax edx];
255 #else
256 SDL_FORCE_INLINE Uint64
257 SDL_Swap64(Uint64 x)
258 {
259 Uint32 hi, lo;
260
261 /* Separate into high and low 32-bit values and swap them */
262 lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
263 x >>= 32;
264 hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
265 x = SDL_Swap32(lo);
266 x <<= 32;
267 x |= SDL_Swap32(hi);
268 return (x);
269 }
270 #endif
271
272
273 SDL_FORCE_INLINE float
274 SDL_SwapFloat(float x)
275 {
276 union {
277 float f;
278 Uint32 ui32;
279 } swapper;
280 swapper.f = x;
281 swapper.ui32 = SDL_Swap32(swapper.ui32);
282 return swapper.f;
283 }
284
285 /* remove extra macros */
286 #undef HAS_BROKEN_BSWAP
287 #undef HAS_BUILTIN_BSWAP16
288 #undef HAS_BUILTIN_BSWAP32
289 #undef HAS_BUILTIN_BSWAP64
290
291 /**
292 * \name Swap to native
293 * Byteswap item from the specified endianness to the native endianness.
294 */
295 /* @{ */
296 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
297 #define SDL_SwapLE16(X) (X)
298 #define SDL_SwapLE32(X) (X)
299 #define SDL_SwapLE64(X) (X)
300 #define SDL_SwapFloatLE(X) (X)
301 #define SDL_SwapBE16(X) SDL_Swap16(X)
302 #define SDL_SwapBE32(X) SDL_Swap32(X)
303 #define SDL_SwapBE64(X) SDL_Swap64(X)
304 #define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
305 #else
306 #define SDL_SwapLE16(X) SDL_Swap16(X)
307 #define SDL_SwapLE32(X) SDL_Swap32(X)
308 #define SDL_SwapLE64(X) SDL_Swap64(X)
309 #define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
310 #define SDL_SwapBE16(X) (X)
311 #define SDL_SwapBE32(X) (X)
312 #define SDL_SwapBE64(X) (X)
313 #define SDL_SwapFloatBE(X) (X)
314 #endif
315 /* @} *//* Swap to native */
316
317 /* Ends C function definitions when using C++ */
318 #ifdef __cplusplus
319 }
320 #endif
321 #include <SDL2/close_code.h>
322
323 #endif /* SDL_endian_h_ */
324
325 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_error.h
23 *
24 * Simple error message routines for SDL.
25 */
26
27 #ifndef SDL_error_h_
28 #define SDL_error_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Public functions */
39
40
41 /**
42 * Set the SDL error message for the current thread.
43 *
44 * Calling this function will replace any previous error message that was set.
45 *
46 * This function always returns -1, since SDL frequently uses -1 to signify an
47 * failing result, leading to this idiom:
48 *
49 * ```c
50 * if (error_code) {
51 * return SDL_SetError("This operation has failed: %d", error_code);
52 * }
53 * ```
54 *
55 * \param fmt a printf()-style message format string
56 * \param ... additional parameters matching % tokens in the `fmt` string, if
57 * any
58 * \returns always -1.
59 *
60 * \since This function is available since SDL 2.0.0.
61 *
62 * \sa SDL_ClearError
63 * \sa SDL_GetError
64 */
65 extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
66
67 /**
68 * Retrieve a message about the last error that occurred on the current
69 * thread.
70 *
71 * It is possible for multiple errors to occur before calling SDL_GetError().
72 * Only the last error is returned.
73 *
74 * The message is only applicable when an SDL function has signaled an error.
75 * You must check the return values of SDL function calls to determine when to
76 * appropriately call SDL_GetError(). You should *not* use the results of
77 * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
78 * an error string even when reporting success.
79 *
80 * SDL will *not* clear the error string for successful API calls. You *must*
81 * check return values for failure cases before you can assume the error
82 * string applies.
83 *
84 * Error strings are set per-thread, so an error set in a different thread
85 * will not interfere with the current thread's operation.
86 *
87 * The returned string is internally allocated and must not be freed by the
88 * application.
89 *
90 * \returns a message with information about the specific error that occurred,
91 * or an empty string if there hasn't been an error message set since
92 * the last call to SDL_ClearError(). The message is only applicable
93 * when an SDL function has signaled an error. You must check the
94 * return values of SDL function calls to determine when to
95 * appropriately call SDL_GetError().
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_ClearError
100 * \sa SDL_SetError
101 */
102 extern DECLSPEC const char *SDLCALL SDL_GetError(void);
103
104 /**
105 * Get the last error message that was set for the current thread.
106 *
107 * This allows the caller to copy the error string into a provided buffer, but
108 * otherwise operates exactly the same as SDL_GetError().
109 *
110 * \param errstr A buffer to fill with the last error message that was set for
111 * the current thread
112 * \param maxlen The size of the buffer pointed to by the errstr parameter
113 * \returns the pointer passed in as the `errstr` parameter.
114 *
115 * \since This function is available since SDL 2.0.14.
116 *
117 * \sa SDL_GetError
118 */
119 extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
120
121 /**
122 * Clear any previous error message for this thread.
123 *
124 * \since This function is available since SDL 2.0.0.
125 *
126 * \sa SDL_GetError
127 * \sa SDL_SetError
128 */
129 extern DECLSPEC void SDLCALL SDL_ClearError(void);
130
131 /**
132 * \name Internal error functions
133 *
134 * \internal
135 * Private error reporting function - used internally.
136 */
137 /* @{ */
138 #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
139 #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
140 #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
141 typedef enum
142 {
143 SDL_ENOMEM,
144 SDL_EFREAD,
145 SDL_EFWRITE,
146 SDL_EFSEEK,
147 SDL_UNSUPPORTED,
148 SDL_LASTERROR
149 } SDL_errorcode;
150 /* SDL_Error() unconditionally returns -1. */
151 extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
152 /* @} *//* Internal error functions */
153
154 /* Ends C function definitions when using C++ */
155 #ifdef __cplusplus
156 }
157 #endif
158 #include <SDL2/close_code.h>
159
160 #endif /* SDL_error_h_ */
161
162 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_events.h
23 *
24 * Include file for SDL event handling.
25 */
26
27 #ifndef SDL_events_h_
28 #define SDL_events_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_keyboard.h>
34 #include <SDL2/SDL_mouse.h>
35 #include <SDL2/SDL_joystick.h>
36 #include <SDL2/SDL_gamecontroller.h>
37 #include <SDL2/SDL_quit.h>
38 #include <SDL2/SDL_gesture.h>
39 #include <SDL2/SDL_touch.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 /* General keyboard/mouse state definitions */
48 #define SDL_RELEASED 0
49 #define SDL_PRESSED 1
50
51 /**
52 * The types of events that can be delivered.
53 */
54 typedef enum
55 {
56 SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
57
58 /* Application events */
59 SDL_QUIT = 0x100, /**< User-requested quit */
60
61 /* These application events have special meaning on iOS, see README-ios.md for details */
62 SDL_APP_TERMINATING, /**< The application is being terminated by the OS
63 Called on iOS in applicationWillTerminate()
64 Called on Android in onDestroy()
65 */
66 SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible.
67 Called on iOS in applicationDidReceiveMemoryWarning()
68 Called on Android in onLowMemory()
69 */
70 SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
71 Called on iOS in applicationWillResignActive()
72 Called on Android in onPause()
73 */
74 SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
75 Called on iOS in applicationDidEnterBackground()
76 Called on Android in onPause()
77 */
78 SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
79 Called on iOS in applicationWillEnterForeground()
80 Called on Android in onResume()
81 */
82 SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
83 Called on iOS in applicationDidBecomeActive()
84 Called on Android in onResume()
85 */
86
87 SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
88
89 /* Display events */
90 SDL_DISPLAYEVENT = 0x150, /**< Display state change */
91
92 /* Window events */
93 SDL_WINDOWEVENT = 0x200, /**< Window state change */
94 SDL_SYSWMEVENT, /**< System specific event */
95
96 /* Keyboard events */
97 SDL_KEYDOWN = 0x300, /**< Key pressed */
98 SDL_KEYUP, /**< Key released */
99 SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
100 SDL_TEXTINPUT, /**< Keyboard text input */
101 SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
102 input language or keyboard layout change.
103 */
104 SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
105
106 /* Mouse events */
107 SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
108 SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
109 SDL_MOUSEBUTTONUP, /**< Mouse button released */
110 SDL_MOUSEWHEEL, /**< Mouse wheel motion */
111
112 /* Joystick events */
113 SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */
114 SDL_JOYBALLMOTION, /**< Joystick trackball motion */
115 SDL_JOYHATMOTION, /**< Joystick hat position change */
116 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
117 SDL_JOYBUTTONUP, /**< Joystick button released */
118 SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
119 SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
120
121 /* Game controller events */
122 SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
123 SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */
124 SDL_CONTROLLERBUTTONUP, /**< Game controller button released */
125 SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
126 SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
127 SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
128 SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
129 SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
130 SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
131 SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
132
133 /* Touch events */
134 SDL_FINGERDOWN = 0x700,
135 SDL_FINGERUP,
136 SDL_FINGERMOTION,
137
138 /* Gesture events */
139 SDL_DOLLARGESTURE = 0x800,
140 SDL_DOLLARRECORD,
141 SDL_MULTIGESTURE,
142
143 /* Clipboard events */
144 SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
145
146 /* Drag and drop events */
147 SDL_DROPFILE = 0x1000, /**< The system requests a file open */
148 SDL_DROPTEXT, /**< text/plain drag-and-drop event */
149 SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
150 SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
151
152 /* Audio hotplug events */
153 SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
154 SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
155
156 /* Sensor events */
157 SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
158
159 /* Render events */
160 SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
161 SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
162
163 /* Internal events */
164 SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
165
166 /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
167 * and should be allocated with SDL_RegisterEvents()
168 */
169 SDL_USEREVENT = 0x8000,
170
171 /**
172 * This last event is only for bounding internal arrays
173 */
174 SDL_LASTEVENT = 0xFFFF
175 } SDL_EventType;
176
177 /**
178 * \brief Fields shared by every event
179 */
180 typedef struct SDL_CommonEvent
181 {
182 Uint32 type;
183 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
184 } SDL_CommonEvent;
185
186 /**
187 * \brief Display state change event data (event.display.*)
188 */
189 typedef struct SDL_DisplayEvent
190 {
191 Uint32 type; /**< ::SDL_DISPLAYEVENT */
192 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
193 Uint32 display; /**< The associated display index */
194 Uint8 event; /**< ::SDL_DisplayEventID */
195 Uint8 padding1;
196 Uint8 padding2;
197 Uint8 padding3;
198 Sint32 data1; /**< event dependent data */
199 } SDL_DisplayEvent;
200
201 /**
202 * \brief Window state change event data (event.window.*)
203 */
204 typedef struct SDL_WindowEvent
205 {
206 Uint32 type; /**< ::SDL_WINDOWEVENT */
207 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
208 Uint32 windowID; /**< The associated window */
209 Uint8 event; /**< ::SDL_WindowEventID */
210 Uint8 padding1;
211 Uint8 padding2;
212 Uint8 padding3;
213 Sint32 data1; /**< event dependent data */
214 Sint32 data2; /**< event dependent data */
215 } SDL_WindowEvent;
216
217 /**
218 * \brief Keyboard button event structure (event.key.*)
219 */
220 typedef struct SDL_KeyboardEvent
221 {
222 Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
223 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
224 Uint32 windowID; /**< The window with keyboard focus, if any */
225 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
226 Uint8 repeat; /**< Non-zero if this is a key repeat */
227 Uint8 padding2;
228 Uint8 padding3;
229 SDL_Keysym keysym; /**< The key that was pressed or released */
230 } SDL_KeyboardEvent;
231
232 #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
233 /**
234 * \brief Keyboard text editing event structure (event.edit.*)
235 */
236 typedef struct SDL_TextEditingEvent
237 {
238 Uint32 type; /**< ::SDL_TEXTEDITING */
239 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
240 Uint32 windowID; /**< The window with keyboard focus, if any */
241 char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
242 Sint32 start; /**< The start cursor of selected editing text */
243 Sint32 length; /**< The length of selected editing text */
244 } SDL_TextEditingEvent;
245
246 /**
247 * \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
248 * truncated if stored in the text buffer SDL_TextEditingEvent
249 */
250 typedef struct SDL_TextEditingExtEvent
251 {
252 Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
253 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
254 Uint32 windowID; /**< The window with keyboard focus, if any */
255 char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
256 Sint32 start; /**< The start cursor of selected editing text */
257 Sint32 length; /**< The length of selected editing text */
258 } SDL_TextEditingExtEvent;
259
260 #define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
261 /**
262 * \brief Keyboard text input event structure (event.text.*)
263 */
264 typedef struct SDL_TextInputEvent
265 {
266 Uint32 type; /**< ::SDL_TEXTINPUT */
267 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
268 Uint32 windowID; /**< The window with keyboard focus, if any */
269 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
270 } SDL_TextInputEvent;
271
272 /**
273 * \brief Mouse motion event structure (event.motion.*)
274 */
275 typedef struct SDL_MouseMotionEvent
276 {
277 Uint32 type; /**< ::SDL_MOUSEMOTION */
278 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
279 Uint32 windowID; /**< The window with mouse focus, if any */
280 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
281 Uint32 state; /**< The current button state */
282 Sint32 x; /**< X coordinate, relative to window */
283 Sint32 y; /**< Y coordinate, relative to window */
284 Sint32 xrel; /**< The relative motion in the X direction */
285 Sint32 yrel; /**< The relative motion in the Y direction */
286 } SDL_MouseMotionEvent;
287
288 /**
289 * \brief Mouse button event structure (event.button.*)
290 */
291 typedef struct SDL_MouseButtonEvent
292 {
293 Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
294 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
295 Uint32 windowID; /**< The window with mouse focus, if any */
296 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
297 Uint8 button; /**< The mouse button index */
298 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
299 Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
300 Uint8 padding1;
301 Sint32 x; /**< X coordinate, relative to window */
302 Sint32 y; /**< Y coordinate, relative to window */
303 } SDL_MouseButtonEvent;
304
305 /**
306 * \brief Mouse wheel event structure (event.wheel.*)
307 */
308 typedef struct SDL_MouseWheelEvent
309 {
310 Uint32 type; /**< ::SDL_MOUSEWHEEL */
311 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
312 Uint32 windowID; /**< The window with mouse focus, if any */
313 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
314 Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
315 Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
316 Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
317 float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
318 float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
319 } SDL_MouseWheelEvent;
320
321 /**
322 * \brief Joystick axis motion event structure (event.jaxis.*)
323 */
324 typedef struct SDL_JoyAxisEvent
325 {
326 Uint32 type; /**< ::SDL_JOYAXISMOTION */
327 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
328 SDL_JoystickID which; /**< The joystick instance id */
329 Uint8 axis; /**< The joystick axis index */
330 Uint8 padding1;
331 Uint8 padding2;
332 Uint8 padding3;
333 Sint16 value; /**< The axis value (range: -32768 to 32767) */
334 Uint16 padding4;
335 } SDL_JoyAxisEvent;
336
337 /**
338 * \brief Joystick trackball motion event structure (event.jball.*)
339 */
340 typedef struct SDL_JoyBallEvent
341 {
342 Uint32 type; /**< ::SDL_JOYBALLMOTION */
343 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
344 SDL_JoystickID which; /**< The joystick instance id */
345 Uint8 ball; /**< The joystick trackball index */
346 Uint8 padding1;
347 Uint8 padding2;
348 Uint8 padding3;
349 Sint16 xrel; /**< The relative motion in the X direction */
350 Sint16 yrel; /**< The relative motion in the Y direction */
351 } SDL_JoyBallEvent;
352
353 /**
354 * \brief Joystick hat position change event structure (event.jhat.*)
355 */
356 typedef struct SDL_JoyHatEvent
357 {
358 Uint32 type; /**< ::SDL_JOYHATMOTION */
359 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
360 SDL_JoystickID which; /**< The joystick instance id */
361 Uint8 hat; /**< The joystick hat index */
362 Uint8 value; /**< The hat position value.
363 * \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
364 * \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
365 * \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
366 *
367 * Note that zero means the POV is centered.
368 */
369 Uint8 padding1;
370 Uint8 padding2;
371 } SDL_JoyHatEvent;
372
373 /**
374 * \brief Joystick button event structure (event.jbutton.*)
375 */
376 typedef struct SDL_JoyButtonEvent
377 {
378 Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
379 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
380 SDL_JoystickID which; /**< The joystick instance id */
381 Uint8 button; /**< The joystick button index */
382 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
383 Uint8 padding1;
384 Uint8 padding2;
385 } SDL_JoyButtonEvent;
386
387 /**
388 * \brief Joystick device event structure (event.jdevice.*)
389 */
390 typedef struct SDL_JoyDeviceEvent
391 {
392 Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
393 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
394 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
395 } SDL_JoyDeviceEvent;
396
397
398 /**
399 * \brief Game controller axis motion event structure (event.caxis.*)
400 */
401 typedef struct SDL_ControllerAxisEvent
402 {
403 Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
404 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
405 SDL_JoystickID which; /**< The joystick instance id */
406 Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
407 Uint8 padding1;
408 Uint8 padding2;
409 Uint8 padding3;
410 Sint16 value; /**< The axis value (range: -32768 to 32767) */
411 Uint16 padding4;
412 } SDL_ControllerAxisEvent;
413
414
415 /**
416 * \brief Game controller button event structure (event.cbutton.*)
417 */
418 typedef struct SDL_ControllerButtonEvent
419 {
420 Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
421 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
422 SDL_JoystickID which; /**< The joystick instance id */
423 Uint8 button; /**< The controller button (SDL_GameControllerButton) */
424 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
425 Uint8 padding1;
426 Uint8 padding2;
427 } SDL_ControllerButtonEvent;
428
429
430 /**
431 * \brief Controller device event structure (event.cdevice.*)
432 */
433 typedef struct SDL_ControllerDeviceEvent
434 {
435 Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
436 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
437 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
438 } SDL_ControllerDeviceEvent;
439
440 /**
441 * \brief Game controller touchpad event structure (event.ctouchpad.*)
442 */
443 typedef struct SDL_ControllerTouchpadEvent
444 {
445 Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
446 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
447 SDL_JoystickID which; /**< The joystick instance id */
448 Sint32 touchpad; /**< The index of the touchpad */
449 Sint32 finger; /**< The index of the finger on the touchpad */
450 float x; /**< Normalized in the range 0...1 with 0 being on the left */
451 float y; /**< Normalized in the range 0...1 with 0 being at the top */
452 float pressure; /**< Normalized in the range 0...1 */
453 } SDL_ControllerTouchpadEvent;
454
455 /**
456 * \brief Game controller sensor event structure (event.csensor.*)
457 */
458 typedef struct SDL_ControllerSensorEvent
459 {
460 Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
461 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
462 SDL_JoystickID which; /**< The joystick instance id */
463 Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
464 float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
465 } SDL_ControllerSensorEvent;
466
467 /**
468 * \brief Audio device event structure (event.adevice.*)
469 */
470 typedef struct SDL_AudioDeviceEvent
471 {
472 Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
473 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
474 Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
475 Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
476 Uint8 padding1;
477 Uint8 padding2;
478 Uint8 padding3;
479 } SDL_AudioDeviceEvent;
480
481
482 /**
483 * \brief Touch finger event structure (event.tfinger.*)
484 */
485 typedef struct SDL_TouchFingerEvent
486 {
487 Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
488 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
489 SDL_TouchID touchId; /**< The touch device id */
490 SDL_FingerID fingerId;
491 float x; /**< Normalized in the range 0...1 */
492 float y; /**< Normalized in the range 0...1 */
493 float dx; /**< Normalized in the range -1...1 */
494 float dy; /**< Normalized in the range -1...1 */
495 float pressure; /**< Normalized in the range 0...1 */
496 Uint32 windowID; /**< The window underneath the finger, if any */
497 } SDL_TouchFingerEvent;
498
499
500 /**
501 * \brief Multiple Finger Gesture Event (event.mgesture.*)
502 */
503 typedef struct SDL_MultiGestureEvent
504 {
505 Uint32 type; /**< ::SDL_MULTIGESTURE */
506 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
507 SDL_TouchID touchId; /**< The touch device id */
508 float dTheta;
509 float dDist;
510 float x;
511 float y;
512 Uint16 numFingers;
513 Uint16 padding;
514 } SDL_MultiGestureEvent;
515
516
517 /**
518 * \brief Dollar Gesture Event (event.dgesture.*)
519 */
520 typedef struct SDL_DollarGestureEvent
521 {
522 Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
523 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
524 SDL_TouchID touchId; /**< The touch device id */
525 SDL_GestureID gestureId;
526 Uint32 numFingers;
527 float error;
528 float x; /**< Normalized center of gesture */
529 float y; /**< Normalized center of gesture */
530 } SDL_DollarGestureEvent;
531
532
533 /**
534 * \brief An event used to request a file open by the system (event.drop.*)
535 * This event is enabled by default, you can disable it with SDL_EventState().
536 * \note If this event is enabled, you must free the filename in the event.
537 */
538 typedef struct SDL_DropEvent
539 {
540 Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
541 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
542 char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
543 Uint32 windowID; /**< The window that was dropped on, if any */
544 } SDL_DropEvent;
545
546
547 /**
548 * \brief Sensor event structure (event.sensor.*)
549 */
550 typedef struct SDL_SensorEvent
551 {
552 Uint32 type; /**< ::SDL_SENSORUPDATE */
553 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
554 Sint32 which; /**< The instance ID of the sensor */
555 float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
556 } SDL_SensorEvent;
557
558 /**
559 * \brief The "quit requested" event
560 */
561 typedef struct SDL_QuitEvent
562 {
563 Uint32 type; /**< ::SDL_QUIT */
564 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
565 } SDL_QuitEvent;
566
567 /**
568 * \brief OS Specific event
569 */
570 typedef struct SDL_OSEvent
571 {
572 Uint32 type; /**< ::SDL_QUIT */
573 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
574 } SDL_OSEvent;
575
576 /**
577 * \brief A user-defined event type (event.user.*)
578 */
579 typedef struct SDL_UserEvent
580 {
581 Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
582 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
583 Uint32 windowID; /**< The associated window if any */
584 Sint32 code; /**< User defined event code */
585 void *data1; /**< User defined data pointer */
586 void *data2; /**< User defined data pointer */
587 } SDL_UserEvent;
588
589
590 struct SDL_SysWMmsg;
591 typedef struct SDL_SysWMmsg SDL_SysWMmsg;
592
593 /**
594 * \brief A video driver dependent system event (event.syswm.*)
595 * This event is disabled by default, you can enable it with SDL_EventState()
596 *
597 * \note If you want to use this event, you should include SDL_syswm.h.
598 */
599 typedef struct SDL_SysWMEvent
600 {
601 Uint32 type; /**< ::SDL_SYSWMEVENT */
602 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
603 SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
604 } SDL_SysWMEvent;
605
606 /**
607 * \brief General event structure
608 */
609 typedef union SDL_Event
610 {
611 Uint32 type; /**< Event type, shared with all events */
612 SDL_CommonEvent common; /**< Common event data */
613 SDL_DisplayEvent display; /**< Display event data */
614 SDL_WindowEvent window; /**< Window event data */
615 SDL_KeyboardEvent key; /**< Keyboard event data */
616 SDL_TextEditingEvent edit; /**< Text editing event data */
617 SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
618 SDL_TextInputEvent text; /**< Text input event data */
619 SDL_MouseMotionEvent motion; /**< Mouse motion event data */
620 SDL_MouseButtonEvent button; /**< Mouse button event data */
621 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
622 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
623 SDL_JoyBallEvent jball; /**< Joystick ball event data */
624 SDL_JoyHatEvent jhat; /**< Joystick hat event data */
625 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
626 SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
627 SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
628 SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
629 SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
630 SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
631 SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
632 SDL_AudioDeviceEvent adevice; /**< Audio device event data */
633 SDL_SensorEvent sensor; /**< Sensor event data */
634 SDL_QuitEvent quit; /**< Quit request event data */
635 SDL_UserEvent user; /**< Custom event data */
636 SDL_SysWMEvent syswm; /**< System dependent window event data */
637 SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
638 SDL_MultiGestureEvent mgesture; /**< Gesture event data */
639 SDL_DollarGestureEvent dgesture; /**< Gesture event data */
640 SDL_DropEvent drop; /**< Drag and drop event data */
641
642 /* This is necessary for ABI compatibility between Visual C++ and GCC.
643 Visual C++ will respect the push pack pragma and use 52 bytes (size of
644 SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
645 architectures) for this union, and GCC will use the alignment of the
646 largest datatype within the union, which is 8 bytes on 64-bit
647 architectures.
648
649 So... we'll add padding to force the size to be 56 bytes for both.
650
651 On architectures where pointers are 16 bytes, this needs rounding up to
652 the next multiple of 16, 64, and on architectures where pointers are
653 even larger the size of SDL_UserEvent will dominate as being 3 pointers.
654 */
655 Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
656 } SDL_Event;
657
658 /* Make sure we haven't broken binary compatibility */
659 SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
660
661
662 /* Function prototypes */
663
664 /**
665 * Pump the event loop, gathering events from the input devices.
666 *
667 * This function updates the event queue and internal input device state.
668 *
669 * **WARNING**: This should only be run in the thread that initialized the
670 * video subsystem, and for extra safety, you should consider only doing those
671 * things on the main thread in any case.
672 *
673 * SDL_PumpEvents() gathers all the pending input information from devices and
674 * places it in the event queue. Without calls to SDL_PumpEvents() no events
675 * would ever be placed on the queue. Often the need for calls to
676 * SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
677 * SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
678 * polling or waiting for events (e.g. you are filtering them), then you must
679 * call SDL_PumpEvents() to force an event queue update.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_PollEvent
684 * \sa SDL_WaitEvent
685 */
686 extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
687
688 /* @{ */
689 typedef enum
690 {
691 SDL_ADDEVENT,
692 SDL_PEEKEVENT,
693 SDL_GETEVENT
694 } SDL_eventaction;
695
696 /**
697 * Check the event queue for messages and optionally return them.
698 *
699 * `action` may be any of the following:
700 *
701 * - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
702 * event queue.
703 * - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
704 * within the specified minimum and maximum type, will be returned to the
705 * caller and will _not_ be removed from the queue.
706 * - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
707 * within the specified minimum and maximum type, will be returned to the
708 * caller and will be removed from the queue.
709 *
710 * You may have to call SDL_PumpEvents() before calling this function.
711 * Otherwise, the events may not be ready to be filtered when you call
712 * SDL_PeepEvents().
713 *
714 * This function is thread-safe.
715 *
716 * \param events destination buffer for the retrieved events
717 * \param numevents if action is SDL_ADDEVENT, the number of events to add
718 * back to the event queue; if action is SDL_PEEKEVENT or
719 * SDL_GETEVENT, the maximum number of events to retrieve
720 * \param action action to take; see [[#action|Remarks]] for details
721 * \param minType minimum value of the event type to be considered;
722 * SDL_FIRSTEVENT is a safe choice
723 * \param maxType maximum value of the event type to be considered;
724 * SDL_LASTEVENT is a safe choice
725 * \returns the number of events actually stored or a negative error code on
726 * failure; call SDL_GetError() for more information.
727 *
728 * \since This function is available since SDL 2.0.0.
729 *
730 * \sa SDL_PollEvent
731 * \sa SDL_PumpEvents
732 * \sa SDL_PushEvent
733 */
734 extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
735 SDL_eventaction action,
736 Uint32 minType, Uint32 maxType);
737 /* @} */
738
739 /**
740 * Check for the existence of a certain event type in the event queue.
741 *
742 * If you need to check for a range of event types, use SDL_HasEvents()
743 * instead.
744 *
745 * \param type the type of event to be queried; see SDL_EventType for details
746 * \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
747 * events matching `type` are not present.
748 *
749 * \since This function is available since SDL 2.0.0.
750 *
751 * \sa SDL_HasEvents
752 */
753 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
754
755
756 /**
757 * Check for the existence of certain event types in the event queue.
758 *
759 * If you need to check for a single event type, use SDL_HasEvent() instead.
760 *
761 * \param minType the low end of event type to be queried, inclusive; see
762 * SDL_EventType for details
763 * \param maxType the high end of event type to be queried, inclusive; see
764 * SDL_EventType for details
765 * \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
766 * present, or SDL_FALSE if not.
767 *
768 * \since This function is available since SDL 2.0.0.
769 *
770 * \sa SDL_HasEvents
771 */
772 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
773
774 /**
775 * Clear events of a specific type from the event queue.
776 *
777 * This will unconditionally remove any events from the queue that match
778 * `type`. If you need to remove a range of event types, use SDL_FlushEvents()
779 * instead.
780 *
781 * It's also normal to just ignore events you don't care about in your event
782 * loop without calling this function.
783 *
784 * This function only affects currently queued events. If you want to make
785 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
786 * on the main thread immediately before the flush call.
787 *
788 * \param type the type of event to be cleared; see SDL_EventType for details
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_FlushEvents
793 */
794 extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
795
796 /**
797 * Clear events of a range of types from the event queue.
798 *
799 * This will unconditionally remove any events from the queue that are in the
800 * range of `minType` to `maxType`, inclusive. If you need to remove a single
801 * event type, use SDL_FlushEvent() instead.
802 *
803 * It's also normal to just ignore events you don't care about in your event
804 * loop without calling this function.
805 *
806 * This function only affects currently queued events. If you want to make
807 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
808 * on the main thread immediately before the flush call.
809 *
810 * \param minType the low end of event type to be cleared, inclusive; see
811 * SDL_EventType for details
812 * \param maxType the high end of event type to be cleared, inclusive; see
813 * SDL_EventType for details
814 *
815 * \since This function is available since SDL 2.0.0.
816 *
817 * \sa SDL_FlushEvent
818 */
819 extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
820
821 /**
822 * Poll for currently pending events.
823 *
824 * If `event` is not NULL, the next event is removed from the queue and stored
825 * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
826 * this event, immediately stored in the SDL Event structure -- not an event
827 * to follow.
828 *
829 * If `event` is NULL, it simply returns 1 if there is an event in the queue,
830 * but will not remove it from the queue.
831 *
832 * As this function may implicitly call SDL_PumpEvents(), you can only call
833 * this function in the thread that set the video mode.
834 *
835 * SDL_PollEvent() is the favored way of receiving system events since it can
836 * be done from the main loop and does not suspend the main loop while waiting
837 * on an event to be posted.
838 *
839 * The common practice is to fully process the event queue once every frame,
840 * usually as a first step before updating the game's state:
841 *
842 * ```c
843 * while (game_is_still_running) {
844 * SDL_Event event;
845 * while (SDL_PollEvent(&event)) { // poll until all events are handled!
846 * // decide what to do with this event.
847 * }
848 *
849 * // update game state, draw the current frame
850 * }
851 * ```
852 *
853 * \param event the SDL_Event structure to be filled with the next event from
854 * the queue, or NULL
855 * \returns 1 if there is a pending event or 0 if there are none available.
856 *
857 * \since This function is available since SDL 2.0.0.
858 *
859 * \sa SDL_GetEventFilter
860 * \sa SDL_PeepEvents
861 * \sa SDL_PushEvent
862 * \sa SDL_SetEventFilter
863 * \sa SDL_WaitEvent
864 * \sa SDL_WaitEventTimeout
865 */
866 extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
867
868 /**
869 * Wait indefinitely for the next available event.
870 *
871 * If `event` is not NULL, the next event is removed from the queue and stored
872 * in the SDL_Event structure pointed to by `event`.
873 *
874 * As this function may implicitly call SDL_PumpEvents(), you can only call
875 * this function in the thread that initialized the video subsystem.
876 *
877 * \param event the SDL_Event structure to be filled in with the next event
878 * from the queue, or NULL
879 * \returns 1 on success or 0 if there was an error while waiting for events;
880 * call SDL_GetError() for more information.
881 *
882 * \since This function is available since SDL 2.0.0.
883 *
884 * \sa SDL_PollEvent
885 * \sa SDL_PumpEvents
886 * \sa SDL_WaitEventTimeout
887 */
888 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
889
890 /**
891 * Wait until the specified timeout (in milliseconds) for the next available
892 * event.
893 *
894 * If `event` is not NULL, the next event is removed from the queue and stored
895 * in the SDL_Event structure pointed to by `event`.
896 *
897 * As this function may implicitly call SDL_PumpEvents(), you can only call
898 * this function in the thread that initialized the video subsystem.
899 *
900 * \param event the SDL_Event structure to be filled in with the next event
901 * from the queue, or NULL
902 * \param timeout the maximum number of milliseconds to wait for the next
903 * available event
904 * \returns 1 on success or 0 if there was an error while waiting for events;
905 * call SDL_GetError() for more information. This also returns 0 if
906 * the timeout elapsed without an event arriving.
907 *
908 * \since This function is available since SDL 2.0.0.
909 *
910 * \sa SDL_PollEvent
911 * \sa SDL_PumpEvents
912 * \sa SDL_WaitEvent
913 */
914 extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
915 int timeout);
916
917 /**
918 * Add an event to the event queue.
919 *
920 * The event queue can actually be used as a two way communication channel.
921 * Not only can events be read from the queue, but the user can also push
922 * their own events onto it. `event` is a pointer to the event structure you
923 * wish to push onto the queue. The event is copied into the queue, and the
924 * caller may dispose of the memory pointed to after SDL_PushEvent() returns.
925 *
926 * Note: Pushing device input events onto the queue doesn't modify the state
927 * of the device within SDL.
928 *
929 * This function is thread-safe, and can be called from other threads safely.
930 *
931 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
932 * the event filter but events added with SDL_PeepEvents() do not.
933 *
934 * For pushing application-specific events, please use SDL_RegisterEvents() to
935 * get an event type that does not conflict with other code that also wants
936 * its own custom event types.
937 *
938 * \param event the SDL_Event to be added to the queue
939 * \returns 1 on success, 0 if the event was filtered, or a negative error
940 * code on failure; call SDL_GetError() for more information. A
941 * common reason for error is the event queue being full.
942 *
943 * \since This function is available since SDL 2.0.0.
944 *
945 * \sa SDL_PeepEvents
946 * \sa SDL_PollEvent
947 * \sa SDL_RegisterEvents
948 */
949 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
950
951 /**
952 * A function pointer used for callbacks that watch the event queue.
953 *
954 * \param userdata what was passed as `userdata` to SDL_SetEventFilter()
955 * or SDL_AddEventWatch, etc
956 * \param event the event that triggered the callback
957 * \returns 1 to permit event to be added to the queue, and 0 to disallow
958 * it. When used with SDL_AddEventWatch, the return value is ignored.
959 *
960 * \sa SDL_SetEventFilter
961 * \sa SDL_AddEventWatch
962 */
963 typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
964
965 /**
966 * Set up a filter to process all events before they change internal state and
967 * are posted to the internal event queue.
968 *
969 * If the filter function returns 1 when called, then the event will be added
970 * to the internal queue. If it returns 0, then the event will be dropped from
971 * the queue, but the internal state will still be updated. This allows
972 * selective filtering of dynamically arriving events.
973 *
974 * **WARNING**: Be very careful of what you do in the event filter function,
975 * as it may run in a different thread!
976 *
977 * On platforms that support it, if the quit event is generated by an
978 * interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
979 * application at the next event poll.
980 *
981 * There is one caveat when dealing with the ::SDL_QuitEvent event type. The
982 * event filter is only called when the window manager desires to close the
983 * application window. If the event filter returns 1, then the window will be
984 * closed, otherwise the window will remain open if possible.
985 *
986 * Note: Disabled events never make it to the event filter function; see
987 * SDL_EventState().
988 *
989 * Note: If you just want to inspect events without filtering, you should use
990 * SDL_AddEventWatch() instead.
991 *
992 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
993 * the event filter, but events pushed onto the queue with SDL_PeepEvents() do
994 * not.
995 *
996 * \param filter An SDL_EventFilter function to call when an event happens
997 * \param userdata a pointer that is passed to `filter`
998 *
999 * \since This function is available since SDL 2.0.0.
1000 *
1001 * \sa SDL_AddEventWatch
1002 * \sa SDL_EventState
1003 * \sa SDL_GetEventFilter
1004 * \sa SDL_PeepEvents
1005 * \sa SDL_PushEvent
1006 */
1007 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
1008 void *userdata);
1009
1010 /**
1011 * Query the current event filter.
1012 *
1013 * This function can be used to "chain" filters, by saving the existing filter
1014 * before replacing it with a function that will call that saved filter.
1015 *
1016 * \param filter the current callback function will be stored here
1017 * \param userdata the pointer that is passed to the current event filter will
1018 * be stored here
1019 * \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_SetEventFilter
1024 */
1025 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
1026 void **userdata);
1027
1028 /**
1029 * Add a callback to be triggered when an event is added to the event queue.
1030 *
1031 * `filter` will be called when an event happens, and its return value is
1032 * ignored.
1033 *
1034 * **WARNING**: Be very careful of what you do in the event filter function,
1035 * as it may run in a different thread!
1036 *
1037 * If the quit event is generated by a signal (e.g. SIGINT), it will bypass
1038 * the internal queue and be delivered to the watch callback immediately, and
1039 * arrive at the next event poll.
1040 *
1041 * Note: the callback is called for events posted by the user through
1042 * SDL_PushEvent(), but not for disabled events, nor for events by a filter
1043 * callback set with SDL_SetEventFilter(), nor for events posted by the user
1044 * through SDL_PeepEvents().
1045 *
1046 * \param filter an SDL_EventFilter function to call when an event happens.
1047 * \param userdata a pointer that is passed to `filter`
1048 *
1049 * \since This function is available since SDL 2.0.0.
1050 *
1051 * \sa SDL_DelEventWatch
1052 * \sa SDL_SetEventFilter
1053 */
1054 extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
1055 void *userdata);
1056
1057 /**
1058 * Remove an event watch callback added with SDL_AddEventWatch().
1059 *
1060 * This function takes the same input as SDL_AddEventWatch() to identify and
1061 * delete the corresponding callback.
1062 *
1063 * \param filter the function originally passed to SDL_AddEventWatch()
1064 * \param userdata the pointer originally passed to SDL_AddEventWatch()
1065 *
1066 * \since This function is available since SDL 2.0.0.
1067 *
1068 * \sa SDL_AddEventWatch
1069 */
1070 extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
1071 void *userdata);
1072
1073 /**
1074 * Run a specific filter function on the current event queue, removing any
1075 * events for which the filter returns 0.
1076 *
1077 * See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
1078 * this function does not change the filter permanently, it only uses the
1079 * supplied filter until this function returns.
1080 *
1081 * \param filter the SDL_EventFilter function to call when an event happens
1082 * \param userdata a pointer that is passed to `filter`
1083 *
1084 * \since This function is available since SDL 2.0.0.
1085 *
1086 * \sa SDL_GetEventFilter
1087 * \sa SDL_SetEventFilter
1088 */
1089 extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
1090 void *userdata);
1091
1092 /* @{ */
1093 #define SDL_QUERY -1
1094 #define SDL_IGNORE 0
1095 #define SDL_DISABLE 0
1096 #define SDL_ENABLE 1
1097
1098 /**
1099 * Set the state of processing events by type.
1100 *
1101 * `state` may be any of the following:
1102 *
1103 * - `SDL_QUERY`: returns the current processing state of the specified event
1104 * - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
1105 * from the event queue and will not be filtered
1106 * - `SDL_ENABLE`: the event will be processed normally
1107 *
1108 * \param type the type of event; see SDL_EventType for details
1109 * \param state how to process the event
1110 * \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
1111 * of the event before this function makes any changes to it.
1112 *
1113 * \since This function is available since SDL 2.0.0.
1114 *
1115 * \sa SDL_GetEventState
1116 */
1117 extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
1118 /* @} */
1119 #define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
1120
1121 /**
1122 * Allocate a set of user-defined events, and return the beginning event
1123 * number for that set of events.
1124 *
1125 * Calling this function with `numevents` <= 0 is an error and will return
1126 * (Uint32)-1.
1127 *
1128 * Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
1129 * 0xFFFFFFFF), but is clearer to write.
1130 *
1131 * \param numevents the number of events to be allocated
1132 * \returns the beginning event number, or (Uint32)-1 if there are not enough
1133 * user-defined events left.
1134 *
1135 * \since This function is available since SDL 2.0.0.
1136 *
1137 * \sa SDL_PushEvent
1138 */
1139 extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
1140
1141 /* Ends C function definitions when using C++ */
1142 #ifdef __cplusplus
1143 }
1144 #endif
1145 #include <SDL2/close_code.h>
1146
1147 #endif /* SDL_events_h_ */
1148
1149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_filesystem.h
23 *
24 * \brief Include file for filesystem SDL API functions
25 */
26
27 #ifndef SDL_filesystem_h_
28 #define SDL_filesystem_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the directory where the application was run from.
41 *
42 * This is not necessarily a fast call, so you should call this once near
43 * startup and save the string if you need it.
44 *
45 * **Mac OS X and iOS Specific Functionality**: If the application is in a
46 * ".app" bundle, this function returns the Resource directory (e.g.
47 * MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
48 * a property to the Info.plist file. Adding a string key with the name
49 * SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
50 * behaviour.
51 *
52 * Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
53 * application in /Applications/SDLApp/MyApp.app):
54 *
55 * - `resource`: bundle resource directory (the default). For example:
56 * `/Applications/SDLApp/MyApp.app/Contents/Resources`
57 * - `bundle`: the Bundle directory. For example:
58 * `/Applications/SDLApp/MyApp.app/`
59 * - `parent`: the containing directory of the bundle. For example:
60 * `/Applications/SDLApp/`
61 *
62 * The returned path is guaranteed to end with a path separator ('\' on
63 * Windows, '/' on most other platforms).
64 *
65 * The pointer returned is owned by the caller. Please call SDL_free() on the
66 * pointer when done with it.
67 *
68 * \returns an absolute path in UTF-8 encoding to the application data
69 * directory. NULL will be returned on error or when the platform
70 * doesn't implement this functionality, call SDL_GetError() for more
71 * information.
72 *
73 * \since This function is available since SDL 2.0.1.
74 *
75 * \sa SDL_GetPrefPath
76 */
77 extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
78
79 /**
80 * Get the user-and-app-specific path where files can be written.
81 *
82 * Get the "pref dir". This is meant to be where users can write personal
83 * files (preferences and save games, etc) that are specific to your
84 * application. This directory is unique per user, per application.
85 *
86 * This function will decide the appropriate location in the native
87 * filesystem, create the directory if necessary, and return a string of the
88 * absolute path to the directory in UTF-8 encoding.
89 *
90 * On Windows, the string might look like:
91 *
92 * `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
93 *
94 * On Linux, the string might look like"
95 *
96 * `/home/bob/.local/share/My Program Name/`
97 *
98 * On Mac OS X, the string might look like:
99 *
100 * `/Users/bob/Library/Application Support/My Program Name/`
101 *
102 * You should assume the path returned by this function is the only safe place
103 * to write files (and that SDL_GetBasePath(), while it might be writable, or
104 * even the parent of the returned path, isn't where you should be writing
105 * things).
106 *
107 * Both the org and app strings may become part of a directory name, so please
108 * follow these rules:
109 *
110 * - Try to use the same org string (_including case-sensitivity_) for all
111 * your applications that use this function.
112 * - Always use a unique app string for each one, and make sure it never
113 * changes for an app once you've decided on it.
114 * - Unicode characters are legal, as long as it's UTF-8 encoded, but...
115 * - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
116 * Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
117 *
118 * The returned path is guaranteed to end with a path separator ('\' on
119 * Windows, '/' on most other platforms).
120 *
121 * The pointer returned is owned by the caller. Please call SDL_free() on the
122 * pointer when done with it.
123 *
124 * \param org the name of your organization
125 * \param app the name of your application
126 * \returns a UTF-8 string of the user directory in platform-dependent
127 * notation. NULL if there's a problem (creating directory failed,
128 * etc.).
129 *
130 * \since This function is available since SDL 2.0.1.
131 *
132 * \sa SDL_GetBasePath
133 */
134 extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
135
136 /* Ends C function definitions when using C++ */
137 #ifdef __cplusplus
138 }
139 #endif
140 #include <SDL2/close_code.h>
141
142 #endif /* SDL_filesystem_h_ */
143
144 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gamecontroller.h
23 *
24 * Include file for SDL game controller event handling
25 */
26
27 #ifndef SDL_gamecontroller_h_
28 #define SDL_gamecontroller_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_rwops.h>
33 #include <SDL2/SDL_sensor.h>
34 #include <SDL2/SDL_joystick.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \file SDL_gamecontroller.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
47 * for game controllers, and load appropriate drivers.
48 *
49 * If you would like to receive controller updates while the application
50 * is in the background, you should set the following hint before calling
51 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
52 */
53
54 /**
55 * The gamecontroller structure used to identify an SDL game controller
56 */
57 struct _SDL_GameController;
58 typedef struct _SDL_GameController SDL_GameController;
59
60 typedef enum
61 {
62 SDL_CONTROLLER_TYPE_UNKNOWN = 0,
63 SDL_CONTROLLER_TYPE_XBOX360,
64 SDL_CONTROLLER_TYPE_XBOXONE,
65 SDL_CONTROLLER_TYPE_PS3,
66 SDL_CONTROLLER_TYPE_PS4,
67 SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
68 SDL_CONTROLLER_TYPE_VIRTUAL,
69 SDL_CONTROLLER_TYPE_PS5,
70 SDL_CONTROLLER_TYPE_AMAZON_LUNA,
71 SDL_CONTROLLER_TYPE_GOOGLE_STADIA
72 } SDL_GameControllerType;
73
74 typedef enum
75 {
76 SDL_CONTROLLER_BINDTYPE_NONE = 0,
77 SDL_CONTROLLER_BINDTYPE_BUTTON,
78 SDL_CONTROLLER_BINDTYPE_AXIS,
79 SDL_CONTROLLER_BINDTYPE_HAT
80 } SDL_GameControllerBindType;
81
82 /**
83 * Get the SDL joystick layer binding for this controller button/axis mapping
84 */
85 typedef struct SDL_GameControllerButtonBind
86 {
87 SDL_GameControllerBindType bindType;
88 union
89 {
90 int button;
91 int axis;
92 struct {
93 int hat;
94 int hat_mask;
95 } hat;
96 } value;
97
98 } SDL_GameControllerButtonBind;
99
100
101 /**
102 * To count the number of game controllers in the system for the following:
103 *
104 * ```c
105 * int nJoysticks = SDL_NumJoysticks();
106 * int nGameControllers = 0;
107 * for (int i = 0; i < nJoysticks; i++) {
108 * if (SDL_IsGameController(i)) {
109 * nGameControllers++;
110 * }
111 * }
112 * ```
113 *
114 * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
115 * guid,name,mappings
116 *
117 * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
118 * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
119 * The mapping format for joystick is:
120 * bX - a joystick button, index X
121 * hX.Y - hat X with value Y
122 * aX - axis X of the joystick
123 * Buttons can be used as a controller axis and vice versa.
124 *
125 * This string shows an example of a valid mapping for a controller
126 *
127 * ```c
128 * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
129 * ```
130 */
131
132 /**
133 * Load a set of Game Controller mappings from a seekable SDL data stream.
134 *
135 * You can call this function several times, if needed, to load different
136 * database files.
137 *
138 * If a new mapping is loaded for an already known controller GUID, the later
139 * version will overwrite the one currently loaded.
140 *
141 * Mappings not belonging to the current platform or with no platform field
142 * specified will be ignored (i.e. mappings for Linux will be ignored in
143 * Windows, etc).
144 *
145 * This function will load the text database entirely in memory before
146 * processing it, so take this into consideration if you are in a memory
147 * constrained environment.
148 *
149 * \param rw the data stream for the mappings to be added
150 * \param freerw non-zero to close the stream after being read
151 * \returns the number of mappings added or -1 on error; call SDL_GetError()
152 * for more information.
153 *
154 * \since This function is available since SDL 2.0.2.
155 *
156 * \sa SDL_GameControllerAddMapping
157 * \sa SDL_GameControllerAddMappingsFromFile
158 * \sa SDL_GameControllerMappingForGUID
159 */
160 extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
161
162 /**
163 * Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
164 *
165 * Convenience macro.
166 */
167 #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
168
169 /**
170 * Add support for controllers that SDL is unaware of or to cause an existing
171 * controller to have a different binding.
172 *
173 * The mapping string has the format "GUID,name,mapping", where GUID is the
174 * string value from SDL_JoystickGetGUIDString(), name is the human readable
175 * string for the device and mappings are controller mappings to joystick
176 * ones. Under Windows there is a reserved GUID of "xinput" that covers all
177 * XInput devices. The mapping format for joystick is: {| |bX |a joystick
178 * button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
179 * |} Buttons can be used as a controller axes and vice versa.
180 *
181 * This string shows an example of a valid mapping for a controller:
182 *
183 * ```c
184 * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
185 * ```
186 *
187 * \param mappingString the mapping string
188 * \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
189 * -1 on error; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GameControllerMapping
194 * \sa SDL_GameControllerMappingForGUID
195 */
196 extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
197
198 /**
199 * Get the number of mappings installed.
200 *
201 * \returns the number of mappings.
202 *
203 * \since This function is available since SDL 2.0.6.
204 */
205 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
206
207 /**
208 * Get the mapping at a particular index.
209 *
210 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
211 * the index is out of range.
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
216
217 /**
218 * Get the game controller mapping string for a given GUID.
219 *
220 * The returned string must be freed with SDL_free().
221 *
222 * \param guid a structure containing the GUID for which a mapping is desired
223 * \returns a mapping string or NULL on error; call SDL_GetError() for more
224 * information.
225 *
226 * \since This function is available since SDL 2.0.0.
227 *
228 * \sa SDL_JoystickGetDeviceGUID
229 * \sa SDL_JoystickGetGUID
230 */
231 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
232
233 /**
234 * Get the current mapping of a Game Controller.
235 *
236 * The returned string must be freed with SDL_free().
237 *
238 * Details about mappings are discussed with SDL_GameControllerAddMapping().
239 *
240 * \param gamecontroller the game controller you want to get the current
241 * mapping for
242 * \returns a string that has the controller's mapping or NULL if no mapping
243 * is available; call SDL_GetError() for more information.
244 *
245 * \since This function is available since SDL 2.0.0.
246 *
247 * \sa SDL_GameControllerAddMapping
248 * \sa SDL_GameControllerMappingForGUID
249 */
250 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
251
252 /**
253 * Check if the given joystick is supported by the game controller interface.
254 *
255 * `joystick_index` is the same as the `device_index` passed to
256 * SDL_JoystickOpen().
257 *
258 * \param joystick_index the device_index of a device, up to
259 * SDL_NumJoysticks()
260 * \returns SDL_TRUE if the given joystick is supported by the game controller
261 * interface, SDL_FALSE if it isn't or it's an invalid index.
262 *
263 * \since This function is available since SDL 2.0.0.
264 *
265 * \sa SDL_GameControllerNameForIndex
266 * \sa SDL_GameControllerOpen
267 */
268 extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
269
270 /**
271 * Get the implementation dependent name for the game controller.
272 *
273 * This function can be called before any controllers are opened.
274 *
275 * `joystick_index` is the same as the `device_index` passed to
276 * SDL_JoystickOpen().
277 *
278 * \param joystick_index the device_index of a device, from zero to
279 * SDL_NumJoysticks()-1
280 * \returns the implementation-dependent name for the game controller, or NULL
281 * if there is no name or the index is invalid.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_GameControllerName
286 * \sa SDL_GameControllerOpen
287 * \sa SDL_IsGameController
288 */
289 extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
290
291 /**
292 * Get the type of a game controller.
293 *
294 * This can be called before any controllers are opened.
295 *
296 * \param joystick_index the device_index of a device, from zero to
297 * SDL_NumJoysticks()-1
298 * \returns the controller type.
299 *
300 * \since This function is available since SDL 2.0.12.
301 */
302 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
303
304 /**
305 * Get the mapping of a game controller.
306 *
307 * This can be called before any controllers are opened.
308 *
309 * \param joystick_index the device_index of a device, from zero to
310 * SDL_NumJoysticks()-1
311 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
312 * no mapping is available.
313 *
314 * \since This function is available since SDL 2.0.9.
315 */
316 extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
317
318 /**
319 * Open a game controller for use.
320 *
321 * `joystick_index` is the same as the `device_index` passed to
322 * SDL_JoystickOpen().
323 *
324 * The index passed as an argument refers to the N'th game controller on the
325 * system. This index is not the value which will identify this controller in
326 * future controller events. The joystick's instance id (SDL_JoystickID) will
327 * be used there instead.
328 *
329 * \param joystick_index the device_index of a device, up to
330 * SDL_NumJoysticks()
331 * \returns a gamecontroller identifier or NULL if an error occurred; call
332 * SDL_GetError() for more information.
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_GameControllerClose
337 * \sa SDL_GameControllerNameForIndex
338 * \sa SDL_IsGameController
339 */
340 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
341
342 /**
343 * Get the SDL_GameController associated with an instance id.
344 *
345 * \param joyid the instance id to get the SDL_GameController for
346 * \returns an SDL_GameController on success or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.4.
350 */
351 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
352
353 /**
354 * Get the SDL_GameController associated with a player index.
355 *
356 * Please note that the player index is _not_ the device index, nor is it the
357 * instance id!
358 *
359 * \param player_index the player index, which is not the device index or the
360 * instance id!
361 * \returns the SDL_GameController associated with a player index.
362 *
363 * \since This function is available since SDL 2.0.12.
364 *
365 * \sa SDL_GameControllerGetPlayerIndex
366 * \sa SDL_GameControllerSetPlayerIndex
367 */
368 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
369
370 /**
371 * Get the implementation-dependent name for an opened game controller.
372 *
373 * This is the same name as returned by SDL_GameControllerNameForIndex(), but
374 * it takes a controller identifier instead of the (unstable) device index.
375 *
376 * \param gamecontroller a game controller identifier previously returned by
377 * SDL_GameControllerOpen()
378 * \returns the implementation dependent name for the game controller, or NULL
379 * if there is no name or the identifier passed is invalid.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_GameControllerNameForIndex
384 * \sa SDL_GameControllerOpen
385 */
386 extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
387
388 /**
389 * Get the type of this currently opened controller
390 *
391 * This is the same name as returned by SDL_GameControllerTypeForIndex(), but
392 * it takes a controller identifier instead of the (unstable) device index.
393 *
394 * \param gamecontroller the game controller object to query.
395 * \returns the controller type.
396 *
397 * \since This function is available since SDL 2.0.12.
398 */
399 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
400
401 /**
402 * Get the player index of an opened game controller.
403 *
404 * For XInput controllers this returns the XInput user index.
405 *
406 * \param gamecontroller the game controller object to query.
407 * \returns the player index for controller, or -1 if it's not available.
408 *
409 * \since This function is available since SDL 2.0.9.
410 */
411 extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
412
413 /**
414 * Set the player index of an opened game controller.
415 *
416 * \param gamecontroller the game controller object to adjust.
417 * \param player_index Player index to assign to this controller.
418 *
419 * \since This function is available since SDL 2.0.12.
420 */
421 extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
422
423 /**
424 * Get the USB vendor ID of an opened controller, if available.
425 *
426 * If the vendor ID isn't available this function returns 0.
427 *
428 * \param gamecontroller the game controller object to query.
429 * \return the USB vendor ID, or zero if unavailable.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
434
435 /**
436 * Get the USB product ID of an opened controller, if available.
437 *
438 * If the product ID isn't available this function returns 0.
439 *
440 * \param gamecontroller the game controller object to query.
441 * \return the USB product ID, or zero if unavailable.
442 *
443 * \since This function is available since SDL 2.0.6.
444 */
445 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
446
447 /**
448 * Get the product version of an opened controller, if available.
449 *
450 * If the product version isn't available this function returns 0.
451 *
452 * \param gamecontroller the game controller object to query.
453 * \return the USB product version, or zero if unavailable.
454 *
455 * \since This function is available since SDL 2.0.6.
456 */
457 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
458
459 /**
460 * Get the serial number of an opened controller, if available.
461 *
462 * Returns the serial number of the controller, or NULL if it is not
463 * available.
464 *
465 * \param gamecontroller the game controller object to query.
466 * \return the serial number, or NULL if unavailable.
467 *
468 * \since This function is available since SDL 2.0.14.
469 */
470 extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
471
472 /**
473 * Check if a controller has been opened and is currently connected.
474 *
475 * \param gamecontroller a game controller identifier previously returned by
476 * SDL_GameControllerOpen()
477 * \returns SDL_TRUE if the controller has been opened and is currently
478 * connected, or SDL_FALSE if not.
479 *
480 * \since This function is available since SDL 2.0.0.
481 *
482 * \sa SDL_GameControllerClose
483 * \sa SDL_GameControllerOpen
484 */
485 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
486
487 /**
488 * Get the Joystick ID from a Game Controller.
489 *
490 * This function will give you a SDL_Joystick object, which allows you to use
491 * the SDL_Joystick functions with a SDL_GameController object. This would be
492 * useful for getting a joystick's position at any given time, even if it
493 * hasn't moved (moving it would produce an event, which would have the axis'
494 * value).
495 *
496 * The pointer returned is owned by the SDL_GameController. You should not
497 * call SDL_JoystickClose() on it, for example, since doing so will likely
498 * cause SDL to crash.
499 *
500 * \param gamecontroller the game controller object that you want to get a
501 * joystick from
502 * \returns a SDL_Joystick object; call SDL_GetError() for more information.
503 *
504 * \since This function is available since SDL 2.0.0.
505 */
506 extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
507
508 /**
509 * Query or change current state of Game Controller events.
510 *
511 * If controller events are disabled, you must call SDL_GameControllerUpdate()
512 * yourself and check the state of the controller when you want controller
513 * information.
514 *
515 * Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
516 * and 1 will have any effect. Other numbers will just be returned.
517 *
518 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
519 * \returns the same value passed to the function, with exception to -1
520 * (SDL_QUERY), which will return the current state.
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_JoystickEventState
525 */
526 extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
527
528 /**
529 * Manually pump game controller updates if not using the loop.
530 *
531 * This function is called automatically by the event loop if events are
532 * enabled. Under such circumstances, it will not be necessary to call this
533 * function.
534 *
535 * \since This function is available since SDL 2.0.0.
536 */
537 extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
538
539
540 /**
541 * The list of axes available from a controller
542 *
543 * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
544 * and are centered within ~8000 of zero, though advanced UI will allow users to set
545 * or autodetect the dead zone, which varies between controllers.
546 *
547 * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
548 */
549 typedef enum
550 {
551 SDL_CONTROLLER_AXIS_INVALID = -1,
552 SDL_CONTROLLER_AXIS_LEFTX,
553 SDL_CONTROLLER_AXIS_LEFTY,
554 SDL_CONTROLLER_AXIS_RIGHTX,
555 SDL_CONTROLLER_AXIS_RIGHTY,
556 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
557 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
558 SDL_CONTROLLER_AXIS_MAX
559 } SDL_GameControllerAxis;
560
561 /**
562 * Convert a string into SDL_GameControllerAxis enum.
563 *
564 * This function is called internally to translate SDL_GameController mapping
565 * strings for the underlying joystick device into the consistent
566 * SDL_GameController mapping. You do not normally need to call this function
567 * unless you are parsing SDL_GameController mappings in your own code.
568 *
569 * Note specially that "righttrigger" and "lefttrigger" map to
570 * `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
571 * respectively.
572 *
573 * \param str string representing a SDL_GameController axis
574 * \returns the SDL_GameControllerAxis enum corresponding to the input string,
575 * or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
576 *
577 * \since This function is available since SDL 2.0.0.
578 *
579 * \sa SDL_GameControllerGetStringForAxis
580 */
581 extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
582
583 /**
584 * Convert from an SDL_GameControllerAxis enum to a string.
585 *
586 * The caller should not SDL_free() the returned string.
587 *
588 * \param axis an enum value for a given SDL_GameControllerAxis
589 * \returns a string for the given axis, or NULL if an invalid axis is
590 * specified. The string returned is of the format used by
591 * SDL_GameController mapping strings.
592 *
593 * \since This function is available since SDL 2.0.0.
594 *
595 * \sa SDL_GameControllerGetAxisFromString
596 */
597 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
598
599 /**
600 * Get the SDL joystick layer binding for a controller axis mapping.
601 *
602 * \param gamecontroller a game controller
603 * \param axis an axis enum value (one of the SDL_GameControllerAxis values)
604 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
605 * (like the given Controller axis doesn't exist on the device), its
606 * `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
607 *
608 * \since This function is available since SDL 2.0.0.
609 *
610 * \sa SDL_GameControllerGetBindForButton
611 */
612 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
613 SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
614 SDL_GameControllerAxis axis);
615
616 /**
617 * Query whether a game controller has a given axis.
618 *
619 * This merely reports whether the controller's mapping defined this axis, as
620 * that is all the information SDL has about the physical device.
621 *
622 * \param gamecontroller a game controller
623 * \param axis an axis enum value (an SDL_GameControllerAxis value)
624 * \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
625 *
626 * \since This function is available since SDL 2.0.14.
627 */
628 extern DECLSPEC SDL_bool SDLCALL
629 SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
630
631 /**
632 * Get the current state of an axis control on a game controller.
633 *
634 * The axis indices start at index 0.
635 *
636 * The state is a value ranging from -32768 to 32767. Triggers, however, range
637 * from 0 to 32767 (they never return a negative value).
638 *
639 * \param gamecontroller a game controller
640 * \param axis an axis index (one of the SDL_GameControllerAxis values)
641 * \returns axis state (including 0) on success or 0 (also) on failure; call
642 * SDL_GetError() for more information.
643 *
644 * \since This function is available since SDL 2.0.0.
645 *
646 * \sa SDL_GameControllerGetButton
647 */
648 extern DECLSPEC Sint16 SDLCALL
649 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
650
651 /**
652 * The list of buttons available from a controller
653 */
654 typedef enum
655 {
656 SDL_CONTROLLER_BUTTON_INVALID = -1,
657 SDL_CONTROLLER_BUTTON_A,
658 SDL_CONTROLLER_BUTTON_B,
659 SDL_CONTROLLER_BUTTON_X,
660 SDL_CONTROLLER_BUTTON_Y,
661 SDL_CONTROLLER_BUTTON_BACK,
662 SDL_CONTROLLER_BUTTON_GUIDE,
663 SDL_CONTROLLER_BUTTON_START,
664 SDL_CONTROLLER_BUTTON_LEFTSTICK,
665 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
666 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
667 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
668 SDL_CONTROLLER_BUTTON_DPAD_UP,
669 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
670 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
671 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
672 SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
673 SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
674 SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
675 SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
676 SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
677 SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
678 SDL_CONTROLLER_BUTTON_MAX
679 } SDL_GameControllerButton;
680
681 /**
682 * Convert a string into an SDL_GameControllerButton enum.
683 *
684 * This function is called internally to translate SDL_GameController mapping
685 * strings for the underlying joystick device into the consistent
686 * SDL_GameController mapping. You do not normally need to call this function
687 * unless you are parsing SDL_GameController mappings in your own code.
688 *
689 * \param str string representing a SDL_GameController axis
690 * \returns the SDL_GameControllerButton enum corresponding to the input
691 * string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
692 *
693 * \since This function is available since SDL 2.0.0.
694 */
695 extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
696
697 /**
698 * Convert from an SDL_GameControllerButton enum to a string.
699 *
700 * The caller should not SDL_free() the returned string.
701 *
702 * \param button an enum value for a given SDL_GameControllerButton
703 * \returns a string for the given button, or NULL if an invalid axis is
704 * specified. The string returned is of the format used by
705 * SDL_GameController mapping strings.
706 *
707 * \since This function is available since SDL 2.0.0.
708 *
709 * \sa SDL_GameControllerGetButtonFromString
710 */
711 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
712
713 /**
714 * Get the SDL joystick layer binding for a controller button mapping.
715 *
716 * \param gamecontroller a game controller
717 * \param button an button enum value (an SDL_GameControllerButton value)
718 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
719 * (like the given Controller button doesn't exist on the device),
720 * its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
721 *
722 * \since This function is available since SDL 2.0.0.
723 *
724 * \sa SDL_GameControllerGetBindForAxis
725 */
726 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
727 SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
728 SDL_GameControllerButton button);
729
730 /**
731 * Query whether a game controller has a given button.
732 *
733 * This merely reports whether the controller's mapping defined this button,
734 * as that is all the information SDL has about the physical device.
735 *
736 * \param gamecontroller a game controller
737 * \param button a button enum value (an SDL_GameControllerButton value)
738 * \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
739 *
740 * \since This function is available since SDL 2.0.14.
741 */
742 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
743 SDL_GameControllerButton button);
744
745 /**
746 * Get the current state of a button on a game controller.
747 *
748 * \param gamecontroller a game controller
749 * \param button a button index (one of the SDL_GameControllerButton values)
750 * \returns 1 for pressed state or 0 for not pressed state or error; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_GameControllerGetAxis
756 */
757 extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
758 SDL_GameControllerButton button);
759
760 /**
761 * Get the number of touchpads on a game controller.
762 *
763 * \since This function is available since SDL 2.0.14.
764 */
765 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
766
767 /**
768 * Get the number of supported simultaneous fingers on a touchpad on a game
769 * controller.
770 *
771 * \since This function is available since SDL 2.0.14.
772 */
773 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
774
775 /**
776 * Get the current state of a finger on a touchpad on a game controller.
777 *
778 * \since This function is available since SDL 2.0.14.
779 */
780 extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
781
782 /**
783 * Return whether a game controller has a particular sensor.
784 *
785 * \param gamecontroller The controller to query
786 * \param type The type of sensor to query
787 * \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
788 *
789 * \since This function is available since SDL 2.0.14.
790 */
791 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
792
793 /**
794 * Set whether data reporting for a game controller sensor is enabled.
795 *
796 * \param gamecontroller The controller to update
797 * \param type The type of sensor to enable/disable
798 * \param enabled Whether data reporting should be enabled
799 * \returns 0 or -1 if an error occurred.
800 *
801 * \since This function is available since SDL 2.0.14.
802 */
803 extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
804
805 /**
806 * Query whether sensor data reporting is enabled for a game controller.
807 *
808 * \param gamecontroller The controller to query
809 * \param type The type of sensor to query
810 * \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
811 *
812 * \since This function is available since SDL 2.0.14.
813 */
814 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
815
816 /**
817 * Get the data rate (number of events per second) of a game controller
818 * sensor.
819 *
820 * \param gamecontroller The controller to query
821 * \param type The type of sensor to query
822 * \return the data rate, or 0.0f if the data rate is not available.
823 *
824 * \since This function is available since SDL 2.0.16.
825 */
826 extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
827
828 /**
829 * Get the current state of a game controller sensor.
830 *
831 * The number of values and interpretation of the data is sensor dependent.
832 * See SDL_sensor.h for the details for each type of sensor.
833 *
834 * \param gamecontroller The controller to query
835 * \param type The type of sensor to query
836 * \param data A pointer filled with the current sensor state
837 * \param num_values The number of values to write to data
838 * \return 0 or -1 if an error occurred.
839 *
840 * \since This function is available since SDL 2.0.14.
841 */
842 extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
843
844 /**
845 * Start a rumble effect on a game controller.
846 *
847 * Each call to this function cancels any previous rumble effect, and calling
848 * it with 0 intensity stops any rumbling.
849 *
850 * \param gamecontroller The controller to vibrate
851 * \param low_frequency_rumble The intensity of the low frequency (left)
852 * rumble motor, from 0 to 0xFFFF
853 * \param high_frequency_rumble The intensity of the high frequency (right)
854 * rumble motor, from 0 to 0xFFFF
855 * \param duration_ms The duration of the rumble effect, in milliseconds
856 * \returns 0, or -1 if rumble isn't supported on this controller
857 *
858 * \since This function is available since SDL 2.0.9.
859 *
860 * \sa SDL_GameControllerHasRumble
861 */
862 extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
863
864 /**
865 * Start a rumble effect in the game controller's triggers.
866 *
867 * Each call to this function cancels any previous trigger rumble effect, and
868 * calling it with 0 intensity stops any rumbling.
869 *
870 * Note that this is rumbling of the _triggers_ and not the game controller as
871 * a whole. This is currently only supported on Xbox One controllers. If you
872 * want the (more common) whole-controller rumble, use
873 * SDL_GameControllerRumble() instead.
874 *
875 * \param gamecontroller The controller to vibrate
876 * \param left_rumble The intensity of the left trigger rumble motor, from 0
877 * to 0xFFFF
878 * \param right_rumble The intensity of the right trigger rumble motor, from 0
879 * to 0xFFFF
880 * \param duration_ms The duration of the rumble effect, in milliseconds
881 * \returns 0, or -1 if trigger rumble isn't supported on this controller
882 *
883 * \since This function is available since SDL 2.0.14.
884 *
885 * \sa SDL_GameControllerHasRumbleTriggers
886 */
887 extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
888
889 /**
890 * Query whether a game controller has an LED.
891 *
892 * \param gamecontroller The controller to query
893 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
894 * modifiable LED
895 *
896 * \since This function is available since SDL 2.0.14.
897 */
898 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
899
900 /**
901 * Query whether a game controller has rumble support.
902 *
903 * \param gamecontroller The controller to query
904 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
905 * support
906 *
907 * \since This function is available since SDL 2.0.18.
908 *
909 * \sa SDL_GameControllerRumble
910 */
911 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
912
913 /**
914 * Query whether a game controller has rumble support on triggers.
915 *
916 * \param gamecontroller The controller to query
917 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
918 * rumble support
919 *
920 * \since This function is available since SDL 2.0.18.
921 *
922 * \sa SDL_GameControllerRumbleTriggers
923 */
924 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
925
926 /**
927 * Update a game controller's LED color.
928 *
929 * \param gamecontroller The controller to update
930 * \param red The intensity of the red LED
931 * \param green The intensity of the green LED
932 * \param blue The intensity of the blue LED
933 * \returns 0, or -1 if this controller does not have a modifiable LED
934 *
935 * \since This function is available since SDL 2.0.14.
936 */
937 extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
938
939 /**
940 * Send a controller specific effect packet
941 *
942 * \param gamecontroller The controller to affect
943 * \param data The data to send to the controller
944 * \param size The size of the data to send to the controller
945 * \returns 0, or -1 if this controller or driver doesn't support effect
946 * packets
947 *
948 * \since This function is available since SDL 2.0.16.
949 */
950 extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
951
952 /**
953 * Close a game controller previously opened with SDL_GameControllerOpen().
954 *
955 * \param gamecontroller a game controller identifier previously returned by
956 * SDL_GameControllerOpen()
957 *
958 * \since This function is available since SDL 2.0.0.
959 *
960 * \sa SDL_GameControllerOpen
961 */
962 extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
963
964 /**
965 * Return the sfSymbolsName for a given button on a game controller on Apple
966 * platforms.
967 *
968 * \param gamecontroller the controller to query
969 * \param button a button on the game controller
970 * \returns the sfSymbolsName or NULL if the name can't be found
971 *
972 * \since This function is available since SDL 2.0.18.
973 *
974 * \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
975 */
976 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
977
978 /**
979 * Return the sfSymbolsName for a given axis on a game controller on Apple
980 * platforms.
981 *
982 * \param gamecontroller the controller to query
983 * \param axis an axis on the game controller
984 * \returns the sfSymbolsName or NULL if the name can't be found
985 *
986 * \since This function is available since SDL 2.0.18.
987 *
988 * \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
989 */
990 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
991
992
993 /* Ends C function definitions when using C++ */
994 #ifdef __cplusplus
995 }
996 #endif
997 #include <SDL2/close_code.h>
998
999 #endif /* SDL_gamecontroller_h_ */
1000
1001 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gesture.h
23 *
24 * Include file for SDL gesture event handling.
25 */
26
27 #ifndef SDL_gesture_h_
28 #define SDL_gesture_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/SDL_touch.h>
35
36
37 #include <SDL2/begin_code.h>
38 /* Set up for C function definitions, even when using C++ */
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 typedef Sint64 SDL_GestureID;
44
45 /* Function prototypes */
46
47 /**
48 * Begin recording a gesture on a specified touch device or all touch devices.
49 *
50 * If the parameter `touchId` is -1 (i.e., all devices), this function will
51 * always return 1, regardless of whether there actually are any devices.
52 *
53 * \param touchId the touch device id, or -1 for all touch devices
54 * \returns 1 on success or 0 if the specified device could not be found.
55 *
56 * \since This function is available since SDL 2.0.0.
57 *
58 * \sa SDL_GetTouchDevice
59 */
60 extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
61
62
63 /**
64 * Save all currently loaded Dollar Gesture templates.
65 *
66 * \param dst a SDL_RWops to save to
67 * \returns the number of saved templates on success or 0 on failure; call
68 * SDL_GetError() for more information.
69 *
70 * \since This function is available since SDL 2.0.0.
71 *
72 * \sa SDL_LoadDollarTemplates
73 * \sa SDL_SaveDollarTemplate
74 */
75 extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
76
77 /**
78 * Save a currently loaded Dollar Gesture template.
79 *
80 * \param gestureId a gesture id
81 * \param dst a SDL_RWops to save to
82 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
83 * information.
84 *
85 * \since This function is available since SDL 2.0.0.
86 *
87 * \sa SDL_LoadDollarTemplates
88 * \sa SDL_SaveAllDollarTemplates
89 */
90 extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
91
92
93 /**
94 * Load Dollar Gesture templates from a file.
95 *
96 * \param touchId a touch id
97 * \param src a SDL_RWops to load from
98 * \returns the number of loaded templates on success or a negative error code
99 * (or 0) on failure; call SDL_GetError() for more information.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_SaveAllDollarTemplates
104 * \sa SDL_SaveDollarTemplate
105 */
106 extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
107
108 /* Ends C function definitions when using C++ */
109 #ifdef __cplusplus
110 }
111 #endif
112 #include <SDL2/close_code.h>
113
114 #endif /* SDL_gesture_h_ */
115
116 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_haptic.h
23 *
24 * \brief The SDL haptic subsystem allows you to control haptic (force feedback)
25 * devices.
26 *
27 * The basic usage is as follows:
28 * - Initialize the subsystem (::SDL_INIT_HAPTIC).
29 * - Open a haptic device.
30 * - SDL_HapticOpen() to open from index.
31 * - SDL_HapticOpenFromJoystick() to open from an existing joystick.
32 * - Create an effect (::SDL_HapticEffect).
33 * - Upload the effect with SDL_HapticNewEffect().
34 * - Run the effect with SDL_HapticRunEffect().
35 * - (optional) Free the effect with SDL_HapticDestroyEffect().
36 * - Close the haptic device with SDL_HapticClose().
37 *
38 * \par Simple rumble example:
39 * \code
40 * SDL_Haptic *haptic;
41 *
42 * // Open the device
43 * haptic = SDL_HapticOpen( 0 );
44 * if (haptic == NULL)
45 * return -1;
46 *
47 * // Initialize simple rumble
48 * if (SDL_HapticRumbleInit( haptic ) != 0)
49 * return -1;
50 *
51 * // Play effect at 50% strength for 2 seconds
52 * if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
53 * return -1;
54 * SDL_Delay( 2000 );
55 *
56 * // Clean up
57 * SDL_HapticClose( haptic );
58 * \endcode
59 *
60 * \par Complete example:
61 * \code
62 * int test_haptic( SDL_Joystick * joystick ) {
63 * SDL_Haptic *haptic;
64 * SDL_HapticEffect effect;
65 * int effect_id;
66 *
67 * // Open the device
68 * haptic = SDL_HapticOpenFromJoystick( joystick );
69 * if (haptic == NULL) return -1; // Most likely joystick isn't haptic
70 *
71 * // See if it can do sine waves
72 * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
73 * SDL_HapticClose(haptic); // No sine effect
74 * return -1;
75 * }
76 *
77 * // Create the effect
78 * SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
79 * effect.type = SDL_HAPTIC_SINE;
80 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
81 * effect.periodic.direction.dir[0] = 18000; // Force comes from south
82 * effect.periodic.period = 1000; // 1000 ms
83 * effect.periodic.magnitude = 20000; // 20000/32767 strength
84 * effect.periodic.length = 5000; // 5 seconds long
85 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
86 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away
87 *
88 * // Upload the effect
89 * effect_id = SDL_HapticNewEffect( haptic, &effect );
90 *
91 * // Test the effect
92 * SDL_HapticRunEffect( haptic, effect_id, 1 );
93 * SDL_Delay( 5000); // Wait for the effect to finish
94 *
95 * // We destroy the effect, although closing the device also does this
96 * SDL_HapticDestroyEffect( haptic, effect_id );
97 *
98 * // Close the device
99 * SDL_HapticClose(haptic);
100 *
101 * return 0; // Success
102 * }
103 * \endcode
104 */
105
106 #ifndef SDL_haptic_h_
107 #define SDL_haptic_h_
108
109 #include <SDL2/SDL_stdinc.h>
110 #include <SDL2/SDL_error.h>
111 #include <SDL2/SDL_joystick.h>
112
113 #include <SDL2/begin_code.h>
114 /* Set up for C function definitions, even when using C++ */
115 #ifdef __cplusplus
116 extern "C" {
117 #endif /* __cplusplus */
118
119 /* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
120 *
121 * At the moment the magnitude variables are mixed between signed/unsigned, and
122 * it is also not made clear that ALL of those variables expect a max of 0x7FFF.
123 *
124 * Some platforms may have higher precision than that (Linux FF, Windows XInput)
125 * so we should fix the inconsistency in favor of higher possible precision,
126 * adjusting for platforms that use different scales.
127 * -flibit
128 */
129
130 /**
131 * \typedef SDL_Haptic
132 *
133 * \brief The haptic structure used to identify an SDL haptic.
134 *
135 * \sa SDL_HapticOpen
136 * \sa SDL_HapticOpenFromJoystick
137 * \sa SDL_HapticClose
138 */
139 struct _SDL_Haptic;
140 typedef struct _SDL_Haptic SDL_Haptic;
141
142
143 /**
144 * \name Haptic features
145 *
146 * Different haptic features a device can have.
147 */
148 /* @{ */
149
150 /**
151 * \name Haptic effects
152 */
153 /* @{ */
154
155 /**
156 * \brief Constant effect supported.
157 *
158 * Constant haptic effect.
159 *
160 * \sa SDL_HapticCondition
161 */
162 #define SDL_HAPTIC_CONSTANT (1u<<0)
163
164 /**
165 * \brief Sine wave effect supported.
166 *
167 * Periodic haptic effect that simulates sine waves.
168 *
169 * \sa SDL_HapticPeriodic
170 */
171 #define SDL_HAPTIC_SINE (1u<<1)
172
173 /**
174 * \brief Left/Right effect supported.
175 *
176 * Haptic effect for direct control over high/low frequency motors.
177 *
178 * \sa SDL_HapticLeftRight
179 * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
180 * we ran out of bits, and this is important for XInput devices.
181 */
182 #define SDL_HAPTIC_LEFTRIGHT (1u<<2)
183
184 /* !!! FIXME: put this back when we have more bits in 2.1 */
185 /* #define SDL_HAPTIC_SQUARE (1<<2) */
186
187 /**
188 * \brief Triangle wave effect supported.
189 *
190 * Periodic haptic effect that simulates triangular waves.
191 *
192 * \sa SDL_HapticPeriodic
193 */
194 #define SDL_HAPTIC_TRIANGLE (1u<<3)
195
196 /**
197 * \brief Sawtoothup wave effect supported.
198 *
199 * Periodic haptic effect that simulates saw tooth up waves.
200 *
201 * \sa SDL_HapticPeriodic
202 */
203 #define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
204
205 /**
206 * \brief Sawtoothdown wave effect supported.
207 *
208 * Periodic haptic effect that simulates saw tooth down waves.
209 *
210 * \sa SDL_HapticPeriodic
211 */
212 #define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
213
214 /**
215 * \brief Ramp effect supported.
216 *
217 * Ramp haptic effect.
218 *
219 * \sa SDL_HapticRamp
220 */
221 #define SDL_HAPTIC_RAMP (1u<<6)
222
223 /**
224 * \brief Spring effect supported - uses axes position.
225 *
226 * Condition haptic effect that simulates a spring. Effect is based on the
227 * axes position.
228 *
229 * \sa SDL_HapticCondition
230 */
231 #define SDL_HAPTIC_SPRING (1u<<7)
232
233 /**
234 * \brief Damper effect supported - uses axes velocity.
235 *
236 * Condition haptic effect that simulates dampening. Effect is based on the
237 * axes velocity.
238 *
239 * \sa SDL_HapticCondition
240 */
241 #define SDL_HAPTIC_DAMPER (1u<<8)
242
243 /**
244 * \brief Inertia effect supported - uses axes acceleration.
245 *
246 * Condition haptic effect that simulates inertia. Effect is based on the axes
247 * acceleration.
248 *
249 * \sa SDL_HapticCondition
250 */
251 #define SDL_HAPTIC_INERTIA (1u<<9)
252
253 /**
254 * \brief Friction effect supported - uses axes movement.
255 *
256 * Condition haptic effect that simulates friction. Effect is based on the
257 * axes movement.
258 *
259 * \sa SDL_HapticCondition
260 */
261 #define SDL_HAPTIC_FRICTION (1u<<10)
262
263 /**
264 * \brief Custom effect is supported.
265 *
266 * User defined custom haptic effect.
267 */
268 #define SDL_HAPTIC_CUSTOM (1u<<11)
269
270 /* @} *//* Haptic effects */
271
272 /* These last few are features the device has, not effects */
273
274 /**
275 * \brief Device can set global gain.
276 *
277 * Device supports setting the global gain.
278 *
279 * \sa SDL_HapticSetGain
280 */
281 #define SDL_HAPTIC_GAIN (1u<<12)
282
283 /**
284 * \brief Device can set autocenter.
285 *
286 * Device supports setting autocenter.
287 *
288 * \sa SDL_HapticSetAutocenter
289 */
290 #define SDL_HAPTIC_AUTOCENTER (1u<<13)
291
292 /**
293 * \brief Device can be queried for effect status.
294 *
295 * Device supports querying effect status.
296 *
297 * \sa SDL_HapticGetEffectStatus
298 */
299 #define SDL_HAPTIC_STATUS (1u<<14)
300
301 /**
302 * \brief Device can be paused.
303 *
304 * Devices supports being paused.
305 *
306 * \sa SDL_HapticPause
307 * \sa SDL_HapticUnpause
308 */
309 #define SDL_HAPTIC_PAUSE (1u<<15)
310
311
312 /**
313 * \name Direction encodings
314 */
315 /* @{ */
316
317 /**
318 * \brief Uses polar coordinates for the direction.
319 *
320 * \sa SDL_HapticDirection
321 */
322 #define SDL_HAPTIC_POLAR 0
323
324 /**
325 * \brief Uses cartesian coordinates for the direction.
326 *
327 * \sa SDL_HapticDirection
328 */
329 #define SDL_HAPTIC_CARTESIAN 1
330
331 /**
332 * \brief Uses spherical coordinates for the direction.
333 *
334 * \sa SDL_HapticDirection
335 */
336 #define SDL_HAPTIC_SPHERICAL 2
337
338 /**
339 * \brief Use this value to play an effect on the steering wheel axis. This
340 * provides better compatibility across platforms and devices as SDL will guess
341 * the correct axis.
342 * \sa SDL_HapticDirection
343 */
344 #define SDL_HAPTIC_STEERING_AXIS 3
345
346 /* @} *//* Direction encodings */
347
348 /* @} *//* Haptic features */
349
350 /*
351 * Misc defines.
352 */
353
354 /**
355 * \brief Used to play a device an infinite number of times.
356 *
357 * \sa SDL_HapticRunEffect
358 */
359 #define SDL_HAPTIC_INFINITY 4294967295U
360
361
362 /**
363 * \brief Structure that represents a haptic direction.
364 *
365 * This is the direction where the force comes from,
366 * instead of the direction in which the force is exerted.
367 *
368 * Directions can be specified by:
369 * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
370 * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
371 * - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
372 *
373 * Cardinal directions of the haptic device are relative to the positioning
374 * of the device. North is considered to be away from the user.
375 *
376 * The following diagram represents the cardinal directions:
377 * \verbatim
378 .--.
379 |__| .-------.
380 |=.| |.-----.|
381 |--| || ||
382 | | |'-----'|
383 |__|~')_____('
384 [ COMPUTER ]
385
386
387 North (0,-1)
388 ^
389 |
390 |
391 (-1,0) West <----[ HAPTIC ]----> East (1,0)
392 |
393 |
394 v
395 South (0,1)
396
397
398 [ USER ]
399 \|||/
400 (o o)
401 ---ooO-(_)-Ooo---
402 \endverbatim
403 *
404 * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
405 * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses
406 * the first \c dir parameter. The cardinal directions would be:
407 * - North: 0 (0 degrees)
408 * - East: 9000 (90 degrees)
409 * - South: 18000 (180 degrees)
410 * - West: 27000 (270 degrees)
411 *
412 * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
413 * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
414 * the first three \c dir parameters. The cardinal directions would be:
415 * - North: 0,-1, 0
416 * - East: 1, 0, 0
417 * - South: 0, 1, 0
418 * - West: -1, 0, 0
419 *
420 * The Z axis represents the height of the effect if supported, otherwise
421 * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
422 * can use any multiple you want, only the direction matters.
423 *
424 * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
425 * The first two \c dir parameters are used. The \c dir parameters are as
426 * follows (all values are in hundredths of degrees):
427 * - Degrees from (1, 0) rotated towards (0, 1).
428 * - Degrees towards (0, 0, 1) (device needs at least 3 axes).
429 *
430 *
431 * Example of force coming from the south with all encodings (force coming
432 * from the south means the user will have to pull the stick to counteract):
433 * \code
434 * SDL_HapticDirection direction;
435 *
436 * // Cartesian directions
437 * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
438 * direction.dir[0] = 0; // X position
439 * direction.dir[1] = 1; // Y position
440 * // Assuming the device has 2 axes, we don't need to specify third parameter.
441 *
442 * // Polar directions
443 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
444 * direction.dir[0] = 18000; // Polar only uses first parameter
445 *
446 * // Spherical coordinates
447 * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
448 * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
449 * \endcode
450 *
451 * \sa SDL_HAPTIC_POLAR
452 * \sa SDL_HAPTIC_CARTESIAN
453 * \sa SDL_HAPTIC_SPHERICAL
454 * \sa SDL_HAPTIC_STEERING_AXIS
455 * \sa SDL_HapticEffect
456 * \sa SDL_HapticNumAxes
457 */
458 typedef struct SDL_HapticDirection
459 {
460 Uint8 type; /**< The type of encoding. */
461 Sint32 dir[3]; /**< The encoded direction. */
462 } SDL_HapticDirection;
463
464
465 /**
466 * \brief A structure containing a template for a Constant effect.
467 *
468 * This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
469 *
470 * A constant effect applies a constant force in the specified direction
471 * to the joystick.
472 *
473 * \sa SDL_HAPTIC_CONSTANT
474 * \sa SDL_HapticEffect
475 */
476 typedef struct SDL_HapticConstant
477 {
478 /* Header */
479 Uint16 type; /**< ::SDL_HAPTIC_CONSTANT */
480 SDL_HapticDirection direction; /**< Direction of the effect. */
481
482 /* Replay */
483 Uint32 length; /**< Duration of the effect. */
484 Uint16 delay; /**< Delay before starting the effect. */
485
486 /* Trigger */
487 Uint16 button; /**< Button that triggers the effect. */
488 Uint16 interval; /**< How soon it can be triggered again after button. */
489
490 /* Constant */
491 Sint16 level; /**< Strength of the constant effect. */
492
493 /* Envelope */
494 Uint16 attack_length; /**< Duration of the attack. */
495 Uint16 attack_level; /**< Level at the start of the attack. */
496 Uint16 fade_length; /**< Duration of the fade. */
497 Uint16 fade_level; /**< Level at the end of the fade. */
498 } SDL_HapticConstant;
499
500 /**
501 * \brief A structure containing a template for a Periodic effect.
502 *
503 * The struct handles the following effects:
504 * - ::SDL_HAPTIC_SINE
505 * - ::SDL_HAPTIC_LEFTRIGHT
506 * - ::SDL_HAPTIC_TRIANGLE
507 * - ::SDL_HAPTIC_SAWTOOTHUP
508 * - ::SDL_HAPTIC_SAWTOOTHDOWN
509 *
510 * A periodic effect consists in a wave-shaped effect that repeats itself
511 * over time. The type determines the shape of the wave and the parameters
512 * determine the dimensions of the wave.
513 *
514 * Phase is given by hundredth of a degree meaning that giving the phase a value
515 * of 9000 will displace it 25% of its period. Here are sample values:
516 * - 0: No phase displacement.
517 * - 9000: Displaced 25% of its period.
518 * - 18000: Displaced 50% of its period.
519 * - 27000: Displaced 75% of its period.
520 * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
521 *
522 * Examples:
523 * \verbatim
524 SDL_HAPTIC_SINE
525 __ __ __ __
526 / \ / \ / \ /
527 / \__/ \__/ \__/
528
529 SDL_HAPTIC_SQUARE
530 __ __ __ __ __
531 | | | | | | | | | |
532 | |__| |__| |__| |__| |
533
534 SDL_HAPTIC_TRIANGLE
535 /\ /\ /\ /\ /\
536 / \ / \ / \ / \ /
537 / \/ \/ \/ \/
538
539 SDL_HAPTIC_SAWTOOTHUP
540 /| /| /| /| /| /| /|
541 / | / | / | / | / | / | / |
542 / |/ |/ |/ |/ |/ |/ |
543
544 SDL_HAPTIC_SAWTOOTHDOWN
545 \ |\ |\ |\ |\ |\ |\ |
546 \ | \ | \ | \ | \ | \ | \ |
547 \| \| \| \| \| \| \|
548 \endverbatim
549 *
550 * \sa SDL_HAPTIC_SINE
551 * \sa SDL_HAPTIC_LEFTRIGHT
552 * \sa SDL_HAPTIC_TRIANGLE
553 * \sa SDL_HAPTIC_SAWTOOTHUP
554 * \sa SDL_HAPTIC_SAWTOOTHDOWN
555 * \sa SDL_HapticEffect
556 */
557 typedef struct SDL_HapticPeriodic
558 {
559 /* Header */
560 Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
561 ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
562 ::SDL_HAPTIC_SAWTOOTHDOWN */
563 SDL_HapticDirection direction; /**< Direction of the effect. */
564
565 /* Replay */
566 Uint32 length; /**< Duration of the effect. */
567 Uint16 delay; /**< Delay before starting the effect. */
568
569 /* Trigger */
570 Uint16 button; /**< Button that triggers the effect. */
571 Uint16 interval; /**< How soon it can be triggered again after button. */
572
573 /* Periodic */
574 Uint16 period; /**< Period of the wave. */
575 Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
576 Sint16 offset; /**< Mean value of the wave. */
577 Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
578
579 /* Envelope */
580 Uint16 attack_length; /**< Duration of the attack. */
581 Uint16 attack_level; /**< Level at the start of the attack. */
582 Uint16 fade_length; /**< Duration of the fade. */
583 Uint16 fade_level; /**< Level at the end of the fade. */
584 } SDL_HapticPeriodic;
585
586 /**
587 * \brief A structure containing a template for a Condition effect.
588 *
589 * The struct handles the following effects:
590 * - ::SDL_HAPTIC_SPRING: Effect based on axes position.
591 * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
592 * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
593 * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
594 *
595 * Direction is handled by condition internals instead of a direction member.
596 * The condition effect specific members have three parameters. The first
597 * refers to the X axis, the second refers to the Y axis and the third
598 * refers to the Z axis. The right terms refer to the positive side of the
599 * axis and the left terms refer to the negative side of the axis. Please
600 * refer to the ::SDL_HapticDirection diagram for which side is positive and
601 * which is negative.
602 *
603 * \sa SDL_HapticDirection
604 * \sa SDL_HAPTIC_SPRING
605 * \sa SDL_HAPTIC_DAMPER
606 * \sa SDL_HAPTIC_INERTIA
607 * \sa SDL_HAPTIC_FRICTION
608 * \sa SDL_HapticEffect
609 */
610 typedef struct SDL_HapticCondition
611 {
612 /* Header */
613 Uint16 type; /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
614 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
615 SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */
616
617 /* Replay */
618 Uint32 length; /**< Duration of the effect. */
619 Uint16 delay; /**< Delay before starting the effect. */
620
621 /* Trigger */
622 Uint16 button; /**< Button that triggers the effect. */
623 Uint16 interval; /**< How soon it can be triggered again after button. */
624
625 /* Condition */
626 Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
627 Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
628 Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
629 Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
630 Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
631 Sint16 center[3]; /**< Position of the dead zone. */
632 } SDL_HapticCondition;
633
634 /**
635 * \brief A structure containing a template for a Ramp effect.
636 *
637 * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
638 *
639 * The ramp effect starts at start strength and ends at end strength.
640 * It augments in linear fashion. If you use attack and fade with a ramp
641 * the effects get added to the ramp effect making the effect become
642 * quadratic instead of linear.
643 *
644 * \sa SDL_HAPTIC_RAMP
645 * \sa SDL_HapticEffect
646 */
647 typedef struct SDL_HapticRamp
648 {
649 /* Header */
650 Uint16 type; /**< ::SDL_HAPTIC_RAMP */
651 SDL_HapticDirection direction; /**< Direction of the effect. */
652
653 /* Replay */
654 Uint32 length; /**< Duration of the effect. */
655 Uint16 delay; /**< Delay before starting the effect. */
656
657 /* Trigger */
658 Uint16 button; /**< Button that triggers the effect. */
659 Uint16 interval; /**< How soon it can be triggered again after button. */
660
661 /* Ramp */
662 Sint16 start; /**< Beginning strength level. */
663 Sint16 end; /**< Ending strength level. */
664
665 /* Envelope */
666 Uint16 attack_length; /**< Duration of the attack. */
667 Uint16 attack_level; /**< Level at the start of the attack. */
668 Uint16 fade_length; /**< Duration of the fade. */
669 Uint16 fade_level; /**< Level at the end of the fade. */
670 } SDL_HapticRamp;
671
672 /**
673 * \brief A structure containing a template for a Left/Right effect.
674 *
675 * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
676 *
677 * The Left/Right effect is used to explicitly control the large and small
678 * motors, commonly found in modern game controllers. The small (right) motor
679 * is high frequency, and the large (left) motor is low frequency.
680 *
681 * \sa SDL_HAPTIC_LEFTRIGHT
682 * \sa SDL_HapticEffect
683 */
684 typedef struct SDL_HapticLeftRight
685 {
686 /* Header */
687 Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
688
689 /* Replay */
690 Uint32 length; /**< Duration of the effect in milliseconds. */
691
692 /* Rumble */
693 Uint16 large_magnitude; /**< Control of the large controller motor. */
694 Uint16 small_magnitude; /**< Control of the small controller motor. */
695 } SDL_HapticLeftRight;
696
697 /**
698 * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
699 *
700 * This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
701 *
702 * A custom force feedback effect is much like a periodic effect, where the
703 * application can define its exact shape. You will have to allocate the
704 * data yourself. Data should consist of channels * samples Uint16 samples.
705 *
706 * If channels is one, the effect is rotated using the defined direction.
707 * Otherwise it uses the samples in data for the different axes.
708 *
709 * \sa SDL_HAPTIC_CUSTOM
710 * \sa SDL_HapticEffect
711 */
712 typedef struct SDL_HapticCustom
713 {
714 /* Header */
715 Uint16 type; /**< ::SDL_HAPTIC_CUSTOM */
716 SDL_HapticDirection direction; /**< Direction of the effect. */
717
718 /* Replay */
719 Uint32 length; /**< Duration of the effect. */
720 Uint16 delay; /**< Delay before starting the effect. */
721
722 /* Trigger */
723 Uint16 button; /**< Button that triggers the effect. */
724 Uint16 interval; /**< How soon it can be triggered again after button. */
725
726 /* Custom */
727 Uint8 channels; /**< Axes to use, minimum of one. */
728 Uint16 period; /**< Sample periods. */
729 Uint16 samples; /**< Amount of samples. */
730 Uint16 *data; /**< Should contain channels*samples items. */
731
732 /* Envelope */
733 Uint16 attack_length; /**< Duration of the attack. */
734 Uint16 attack_level; /**< Level at the start of the attack. */
735 Uint16 fade_length; /**< Duration of the fade. */
736 Uint16 fade_level; /**< Level at the end of the fade. */
737 } SDL_HapticCustom;
738
739 /**
740 * \brief The generic template for any haptic effect.
741 *
742 * All values max at 32767 (0x7FFF). Signed values also can be negative.
743 * Time values unless specified otherwise are in milliseconds.
744 *
745 * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
746 * value. Neither delay, interval, attack_length nor fade_length support
747 * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
748 *
749 * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
750 * ::SDL_HAPTIC_INFINITY.
751 *
752 * Button triggers may not be supported on all devices, it is advised to not
753 * use them if possible. Buttons start at index 1 instead of index 0 like
754 * the joystick.
755 *
756 * If both attack_length and fade_level are 0, the envelope is not used,
757 * otherwise both values are used.
758 *
759 * Common parts:
760 * \code
761 * // Replay - All effects have this
762 * Uint32 length; // Duration of effect (ms).
763 * Uint16 delay; // Delay before starting effect.
764 *
765 * // Trigger - All effects have this
766 * Uint16 button; // Button that triggers effect.
767 * Uint16 interval; // How soon before effect can be triggered again.
768 *
769 * // Envelope - All effects except condition effects have this
770 * Uint16 attack_length; // Duration of the attack (ms).
771 * Uint16 attack_level; // Level at the start of the attack.
772 * Uint16 fade_length; // Duration of the fade out (ms).
773 * Uint16 fade_level; // Level at the end of the fade.
774 * \endcode
775 *
776 *
777 * Here we have an example of a constant effect evolution in time:
778 * \verbatim
779 Strength
780 ^
781 |
782 | effect level --> _________________
783 | / \
784 | / \
785 | / \
786 | / \
787 | attack_level --> | \
788 | | | <--- fade_level
789 |
790 +--------------------------------------------------> Time
791 [--] [---]
792 attack_length fade_length
793
794 [------------------][-----------------------]
795 delay length
796 \endverbatim
797 *
798 * Note either the attack_level or the fade_level may be above the actual
799 * effect level.
800 *
801 * \sa SDL_HapticConstant
802 * \sa SDL_HapticPeriodic
803 * \sa SDL_HapticCondition
804 * \sa SDL_HapticRamp
805 * \sa SDL_HapticLeftRight
806 * \sa SDL_HapticCustom
807 */
808 typedef union SDL_HapticEffect
809 {
810 /* Common for all force feedback effects */
811 Uint16 type; /**< Effect type. */
812 SDL_HapticConstant constant; /**< Constant effect. */
813 SDL_HapticPeriodic periodic; /**< Periodic effect. */
814 SDL_HapticCondition condition; /**< Condition effect. */
815 SDL_HapticRamp ramp; /**< Ramp effect. */
816 SDL_HapticLeftRight leftright; /**< Left/Right effect. */
817 SDL_HapticCustom custom; /**< Custom effect. */
818 } SDL_HapticEffect;
819
820
821 /* Function prototypes */
822
823 /**
824 * Count the number of haptic devices attached to the system.
825 *
826 * \returns the number of haptic devices detected on the system or a negative
827 * error code on failure; call SDL_GetError() for more information.
828 *
829 * \since This function is available since SDL 2.0.0.
830 *
831 * \sa SDL_HapticName
832 */
833 extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
834
835 /**
836 * Get the implementation dependent name of a haptic device.
837 *
838 * This can be called before any joysticks are opened. If no name can be
839 * found, this function returns NULL.
840 *
841 * \param device_index index of the device to query.
842 * \returns the name of the device or NULL on failure; call SDL_GetError() for
843 * more information.
844 *
845 * \since This function is available since SDL 2.0.0.
846 *
847 * \sa SDL_NumHaptics
848 */
849 extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
850
851 /**
852 * Open a haptic device for use.
853 *
854 * The index passed as an argument refers to the N'th haptic device on this
855 * system.
856 *
857 * When opening a haptic device, its gain will be set to maximum and
858 * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
859 * and SDL_HapticSetAutocenter().
860 *
861 * \param device_index index of the device to open
862 * \returns the device identifier or NULL on failure; call SDL_GetError() for
863 * more information.
864 *
865 * \since This function is available since SDL 2.0.0.
866 *
867 * \sa SDL_HapticClose
868 * \sa SDL_HapticIndex
869 * \sa SDL_HapticOpenFromJoystick
870 * \sa SDL_HapticOpenFromMouse
871 * \sa SDL_HapticPause
872 * \sa SDL_HapticSetAutocenter
873 * \sa SDL_HapticSetGain
874 * \sa SDL_HapticStopAll
875 */
876 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
877
878 /**
879 * Check if the haptic device at the designated index has been opened.
880 *
881 * \param device_index the index of the device to query
882 * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
883 * SDL_GetError() for more information.
884 *
885 * \since This function is available since SDL 2.0.0.
886 *
887 * \sa SDL_HapticIndex
888 * \sa SDL_HapticOpen
889 */
890 extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
891
892 /**
893 * Get the index of a haptic device.
894 *
895 * \param haptic the SDL_Haptic device to query
896 * \returns the index of the specified haptic device or a negative error code
897 * on failure; call SDL_GetError() for more information.
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_HapticOpen
902 * \sa SDL_HapticOpened
903 */
904 extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
905
906 /**
907 * Query whether or not the current mouse has haptic capabilities.
908 *
909 * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_HapticOpenFromMouse
914 */
915 extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
916
917 /**
918 * Try to open a haptic device from the current mouse.
919 *
920 * \returns the haptic device identifier or NULL on failure; call
921 * SDL_GetError() for more information.
922 *
923 * \since This function is available since SDL 2.0.0.
924 *
925 * \sa SDL_HapticOpen
926 * \sa SDL_MouseIsHaptic
927 */
928 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
929
930 /**
931 * Query if a joystick has haptic features.
932 *
933 * \param joystick the SDL_Joystick to test for haptic capabilities
934 * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
935 * negative error code on failure; call SDL_GetError() for more
936 * information.
937 *
938 * \since This function is available since SDL 2.0.0.
939 *
940 * \sa SDL_HapticOpenFromJoystick
941 */
942 extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
943
944 /**
945 * Open a haptic device for use from a joystick device.
946 *
947 * You must still close the haptic device separately. It will not be closed
948 * with the joystick.
949 *
950 * When opened from a joystick you should first close the haptic device before
951 * closing the joystick device. If not, on some implementations the haptic
952 * device will also get unallocated and you'll be unable to use force feedback
953 * on that device.
954 *
955 * \param joystick the SDL_Joystick to create a haptic device from
956 * \returns a valid haptic device identifier on success or NULL on failure;
957 * call SDL_GetError() for more information.
958 *
959 * \since This function is available since SDL 2.0.0.
960 *
961 * \sa SDL_HapticClose
962 * \sa SDL_HapticOpen
963 * \sa SDL_JoystickIsHaptic
964 */
965 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
966 joystick);
967
968 /**
969 * Close a haptic device previously opened with SDL_HapticOpen().
970 *
971 * \param haptic the SDL_Haptic device to close
972 *
973 * \since This function is available since SDL 2.0.0.
974 *
975 * \sa SDL_HapticOpen
976 */
977 extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
978
979 /**
980 * Get the number of effects a haptic device can store.
981 *
982 * On some platforms this isn't fully supported, and therefore is an
983 * approximation. Always check to see if your created effect was actually
984 * created and do not rely solely on SDL_HapticNumEffects().
985 *
986 * \param haptic the SDL_Haptic device to query
987 * \returns the number of effects the haptic device can store or a negative
988 * error code on failure; call SDL_GetError() for more information.
989 *
990 * \since This function is available since SDL 2.0.0.
991 *
992 * \sa SDL_HapticNumEffectsPlaying
993 * \sa SDL_HapticQuery
994 */
995 extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
996
997 /**
998 * Get the number of effects a haptic device can play at the same time.
999 *
1000 * This is not supported on all platforms, but will always return a value.
1001 *
1002 * \param haptic the SDL_Haptic device to query maximum playing effects
1003 * \returns the number of effects the haptic device can play at the same time
1004 * or a negative error code on failure; call SDL_GetError() for more
1005 * information.
1006 *
1007 * \since This function is available since SDL 2.0.0.
1008 *
1009 * \sa SDL_HapticNumEffects
1010 * \sa SDL_HapticQuery
1011 */
1012 extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
1013
1014 /**
1015 * Get the haptic device's supported features in bitwise manner.
1016 *
1017 * \param haptic the SDL_Haptic device to query
1018 * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1019 * on failure; call SDL_GetError() for more information.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_HapticEffectSupported
1024 * \sa SDL_HapticNumEffects
1025 */
1026 extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
1027
1028
1029 /**
1030 * Get the number of haptic axes the device has.
1031 *
1032 * The number of haptic axes might be useful if working with the
1033 * SDL_HapticDirection effect.
1034 *
1035 * \param haptic the SDL_Haptic device to query
1036 * \returns the number of axes on success or a negative error code on failure;
1037 * call SDL_GetError() for more information.
1038 *
1039 * \since This function is available since SDL 2.0.0.
1040 */
1041 extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
1042
1043 /**
1044 * Check to see if an effect is supported by a haptic device.
1045 *
1046 * \param haptic the SDL_Haptic device to query
1047 * \param effect the desired effect to query
1048 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1049 * negative error code on failure; call SDL_GetError() for more
1050 * information.
1051 *
1052 * \since This function is available since SDL 2.0.0.
1053 *
1054 * \sa SDL_HapticNewEffect
1055 * \sa SDL_HapticQuery
1056 */
1057 extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
1058 SDL_HapticEffect *
1059 effect);
1060
1061 /**
1062 * Create a new haptic effect on a specified device.
1063 *
1064 * \param haptic an SDL_Haptic device to create the effect on
1065 * \param effect an SDL_HapticEffect structure containing the properties of
1066 * the effect to create
1067 * \returns the ID of the effect on success or a negative error code on
1068 * failure; call SDL_GetError() for more information.
1069 *
1070 * \since This function is available since SDL 2.0.0.
1071 *
1072 * \sa SDL_HapticDestroyEffect
1073 * \sa SDL_HapticRunEffect
1074 * \sa SDL_HapticUpdateEffect
1075 */
1076 extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
1077 SDL_HapticEffect * effect);
1078
1079 /**
1080 * Update the properties of an effect.
1081 *
1082 * Can be used dynamically, although behavior when dynamically changing
1083 * direction may be strange. Specifically the effect may re-upload itself and
1084 * start playing from the start. You also cannot change the type either when
1085 * running SDL_HapticUpdateEffect().
1086 *
1087 * \param haptic the SDL_Haptic device that has the effect
1088 * \param effect the identifier of the effect to update
1089 * \param data an SDL_HapticEffect structure containing the new effect
1090 * properties to use
1091 * \returns 0 on success or a negative error code on failure; call
1092 * SDL_GetError() for more information.
1093 *
1094 * \since This function is available since SDL 2.0.0.
1095 *
1096 * \sa SDL_HapticDestroyEffect
1097 * \sa SDL_HapticNewEffect
1098 * \sa SDL_HapticRunEffect
1099 */
1100 extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
1101 int effect,
1102 SDL_HapticEffect * data);
1103
1104 /**
1105 * Run the haptic effect on its associated haptic device.
1106 *
1107 * To repeat the effect over and over indefinitely, set `iterations` to
1108 * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1109 * one instance of the effect last indefinitely (so the effect does not fade),
1110 * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1111 * instead.
1112 *
1113 * \param haptic the SDL_Haptic device to run the effect on
1114 * \param effect the ID of the haptic effect to run
1115 * \param iterations the number of iterations to run the effect; use
1116 * `SDL_HAPTIC_INFINITY` to repeat forever
1117 * \returns 0 on success or a negative error code on failure; call
1118 * SDL_GetError() for more information.
1119 *
1120 * \since This function is available since SDL 2.0.0.
1121 *
1122 * \sa SDL_HapticDestroyEffect
1123 * \sa SDL_HapticGetEffectStatus
1124 * \sa SDL_HapticStopEffect
1125 */
1126 extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
1127 int effect,
1128 Uint32 iterations);
1129
1130 /**
1131 * Stop the haptic effect on its associated haptic device.
1132 *
1133 * *
1134 *
1135 * \param haptic the SDL_Haptic device to stop the effect on
1136 * \param effect the ID of the haptic effect to stop
1137 * \returns 0 on success or a negative error code on failure; call
1138 * SDL_GetError() for more information.
1139 *
1140 * \since This function is available since SDL 2.0.0.
1141 *
1142 * \sa SDL_HapticDestroyEffect
1143 * \sa SDL_HapticRunEffect
1144 */
1145 extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
1146 int effect);
1147
1148 /**
1149 * Destroy a haptic effect on the device.
1150 *
1151 * This will stop the effect if it's running. Effects are automatically
1152 * destroyed when the device is closed.
1153 *
1154 * \param haptic the SDL_Haptic device to destroy the effect on
1155 * \param effect the ID of the haptic effect to destroy
1156 *
1157 * \since This function is available since SDL 2.0.0.
1158 *
1159 * \sa SDL_HapticNewEffect
1160 */
1161 extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
1162 int effect);
1163
1164 /**
1165 * Get the status of the current effect on the specified haptic device.
1166 *
1167 * Device must support the SDL_HAPTIC_STATUS feature.
1168 *
1169 * \param haptic the SDL_Haptic device to query for the effect status on
1170 * \param effect the ID of the haptic effect to query its status
1171 * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
1172 * code on failure; call SDL_GetError() for more information.
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_HapticRunEffect
1177 * \sa SDL_HapticStopEffect
1178 */
1179 extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
1180 int effect);
1181
1182 /**
1183 * Set the global gain of the specified haptic device.
1184 *
1185 * Device must support the SDL_HAPTIC_GAIN feature.
1186 *
1187 * The user may specify the maximum gain by setting the environment variable
1188 * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1189 * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1190 * maximum.
1191 *
1192 * \param haptic the SDL_Haptic device to set the gain on
1193 * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
1194 * \returns 0 on success or a negative error code on failure; call
1195 * SDL_GetError() for more information.
1196 *
1197 * \since This function is available since SDL 2.0.0.
1198 *
1199 * \sa SDL_HapticQuery
1200 */
1201 extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
1202
1203 /**
1204 * Set the global autocenter of the device.
1205 *
1206 * Autocenter should be between 0 and 100. Setting it to 0 will disable
1207 * autocentering.
1208 *
1209 * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1210 *
1211 * \param haptic the SDL_Haptic device to set autocentering on
1212 * \param autocenter value to set autocenter to (0-100)
1213 * \returns 0 on success or a negative error code on failure; call
1214 * SDL_GetError() for more information.
1215 *
1216 * \since This function is available since SDL 2.0.0.
1217 *
1218 * \sa SDL_HapticQuery
1219 */
1220 extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
1221 int autocenter);
1222
1223 /**
1224 * Pause a haptic device.
1225 *
1226 * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
1227 * SDL_HapticUnpause() to resume playback.
1228 *
1229 * Do not modify the effects nor add new ones while the device is paused. That
1230 * can cause all sorts of weird errors.
1231 *
1232 * \param haptic the SDL_Haptic device to pause
1233 * \returns 0 on success or a negative error code on failure; call
1234 * SDL_GetError() for more information.
1235 *
1236 * \since This function is available since SDL 2.0.0.
1237 *
1238 * \sa SDL_HapticUnpause
1239 */
1240 extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
1241
1242 /**
1243 * Unpause a haptic device.
1244 *
1245 * Call to unpause after SDL_HapticPause().
1246 *
1247 * \param haptic the SDL_Haptic device to unpause
1248 * \returns 0 on success or a negative error code on failure; call
1249 * SDL_GetError() for more information.
1250 *
1251 * \since This function is available since SDL 2.0.0.
1252 *
1253 * \sa SDL_HapticPause
1254 */
1255 extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
1256
1257 /**
1258 * Stop all the currently playing effects on a haptic device.
1259 *
1260 * \param haptic the SDL_Haptic device to stop
1261 * \returns 0 on success or a negative error code on failure; call
1262 * SDL_GetError() for more information.
1263 *
1264 * \since This function is available since SDL 2.0.0.
1265 */
1266 extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
1267
1268 /**
1269 * Check whether rumble is supported on a haptic device.
1270 *
1271 * \param haptic haptic device to check for rumble support
1272 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1273 * negative error code on failure; call SDL_GetError() for more
1274 * information.
1275 *
1276 * \since This function is available since SDL 2.0.0.
1277 *
1278 * \sa SDL_HapticRumbleInit
1279 * \sa SDL_HapticRumblePlay
1280 * \sa SDL_HapticRumbleStop
1281 */
1282 extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
1283
1284 /**
1285 * Initialize a haptic device for simple rumble playback.
1286 *
1287 * \param haptic the haptic device to initialize for simple rumble playback
1288 * \returns 0 on success or a negative error code on failure; call
1289 * SDL_GetError() for more information.
1290 *
1291 * \since This function is available since SDL 2.0.0.
1292 *
1293 * \sa SDL_HapticOpen
1294 * \sa SDL_HapticRumblePlay
1295 * \sa SDL_HapticRumbleStop
1296 * \sa SDL_HapticRumbleSupported
1297 */
1298 extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
1299
1300 /**
1301 * Run a simple rumble effect on a haptic device.
1302 *
1303 * \param haptic the haptic device to play the rumble effect on
1304 * \param strength strength of the rumble to play as a 0-1 float value
1305 * \param length length of the rumble to play in milliseconds
1306 * \returns 0 on success or a negative error code on failure; call
1307 * SDL_GetError() for more information.
1308 *
1309 * \since This function is available since SDL 2.0.0.
1310 *
1311 * \sa SDL_HapticRumbleInit
1312 * \sa SDL_HapticRumbleStop
1313 * \sa SDL_HapticRumbleSupported
1314 */
1315 extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
1316
1317 /**
1318 * Stop the simple rumble on a haptic device.
1319 *
1320 * \param haptic the haptic device to stop the rumble effect on
1321 * \returns 0 on success or a negative error code on failure; call
1322 * SDL_GetError() for more information.
1323 *
1324 * \since This function is available since SDL 2.0.0.
1325 *
1326 * \sa SDL_HapticRumbleInit
1327 * \sa SDL_HapticRumblePlay
1328 * \sa SDL_HapticRumbleSupported
1329 */
1330 extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
1331
1332 /* Ends C function definitions when using C++ */
1333 #ifdef __cplusplus
1334 }
1335 #endif
1336 #include <SDL2/close_code.h>
1337
1338 #endif /* SDL_haptic_h_ */
1339
1340 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hidapi.h
23 *
24 * Header file for SDL HIDAPI functions.
25 *
26 * This is an adaptation of the original HIDAPI interface by Alan Ott,
27 * and includes source code licensed under the following BSD license:
28 *
29 Copyright (c) 2010, Alan Ott, Signal 11 Software
30 All rights reserved.
31
32 Redistribution and use in source and binary forms, with or without
33 modification, are permitted provided that the following conditions are met:
34
35 * Redistributions of source code must retain the above copyright notice,
36 this list of conditions and the following disclaimer.
37 * Redistributions in binary form must reproduce the above copyright
38 notice, this list of conditions and the following disclaimer in the
39 documentation and/or other materials provided with the distribution.
40 * Neither the name of Signal 11 Software nor the names of its
41 contributors may be used to endorse or promote products derived from
42 this software without specific prior written permission.
43
44 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
45 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
48 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
49 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
50 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
51 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54 POSSIBILITY OF SUCH DAMAGE.
55 *
56 * If you would like a version of SDL without this code, you can build SDL
57 * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
58 * on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
59 */
60
61 #ifndef SDL_hidapi_h_
62 #define SDL_hidapi_h_
63
64 #include <SDL2/SDL_stdinc.h>
65
66 #include <SDL2/begin_code.h>
67 /* Set up for C function definitions, even when using C++ */
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71
72 /**
73 * \brief A handle representing an open HID device
74 */
75 struct SDL_hid_device_;
76 typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
77
78 /** hidapi info structure */
79 /**
80 * \brief Information about a connected HID device
81 */
82 typedef struct SDL_hid_device_info
83 {
84 /** Platform-specific device path */
85 char *path;
86 /** Device Vendor ID */
87 unsigned short vendor_id;
88 /** Device Product ID */
89 unsigned short product_id;
90 /** Serial Number */
91 wchar_t *serial_number;
92 /** Device Release Number in binary-coded decimal,
93 also known as Device Version Number */
94 unsigned short release_number;
95 /** Manufacturer String */
96 wchar_t *manufacturer_string;
97 /** Product string */
98 wchar_t *product_string;
99 /** Usage Page for this Device/Interface
100 (Windows/Mac only). */
101 unsigned short usage_page;
102 /** Usage for this Device/Interface
103 (Windows/Mac only).*/
104 unsigned short usage;
105 /** The USB interface which this logical device
106 represents.
107
108 * Valid on both Linux implementations in all cases.
109 * Valid on the Windows implementation only if the device
110 contains more than one interface. */
111 int interface_number;
112
113 /** Additional information about the USB interface.
114 Valid on libusb and Android implementations. */
115 int interface_class;
116 int interface_subclass;
117 int interface_protocol;
118
119 /** Pointer to the next device */
120 struct SDL_hid_device_info *next;
121 } SDL_hid_device_info;
122
123
124 /**
125 * Initialize the HIDAPI library.
126 *
127 * This function initializes the HIDAPI library. Calling it is not strictly
128 * necessary, as it will be called automatically by SDL_hid_enumerate() and
129 * any of the SDL_hid_open_*() functions if it is needed. This function should
130 * be called at the beginning of execution however, if there is a chance of
131 * HIDAPI handles being opened by different threads simultaneously.
132 *
133 * Each call to this function should have a matching call to SDL_hid_exit()
134 *
135 * \returns 0 on success and -1 on error.
136 *
137 * \since This function is available since SDL 2.0.18.
138 *
139 * \sa SDL_hid_exit
140 */
141 extern DECLSPEC int SDLCALL SDL_hid_init(void);
142
143 /**
144 * Finalize the HIDAPI library.
145 *
146 * This function frees all of the static data associated with HIDAPI. It
147 * should be called at the end of execution to avoid memory leaks.
148 *
149 * \returns 0 on success and -1 on error.
150 *
151 * \since This function is available since SDL 2.0.18.
152 *
153 * \sa SDL_hid_init
154 */
155 extern DECLSPEC int SDLCALL SDL_hid_exit(void);
156
157 /**
158 * Check to see if devices may have been added or removed.
159 *
160 * Enumerating the HID devices is an expensive operation, so you can call this
161 * to see if there have been any system device changes since the last call to
162 * this function. A change in the counter returned doesn't necessarily mean
163 * that anything has changed, but you can call SDL_hid_enumerate() to get an
164 * updated device list.
165 *
166 * Calling this function for the first time may cause a thread or other system
167 * resource to be allocated to track device change notifications.
168 *
169 * \returns a change counter that is incremented with each potential device
170 * change, or 0 if device change detection isn't available.
171 *
172 * \since This function is available since SDL 2.0.18.
173 *
174 * \sa SDL_hid_enumerate
175 */
176 extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
177
178 /**
179 * Enumerate the HID Devices.
180 *
181 * This function returns a linked list of all the HID devices attached to the
182 * system which match vendor_id and product_id. If `vendor_id` is set to 0
183 * then any vendor matches. If `product_id` is set to 0 then any product
184 * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
185 * devices will be returned.
186 *
187 * \param vendor_id The Vendor ID (VID) of the types of device to open.
188 * \param product_id The Product ID (PID) of the types of device to open.
189 * \returns a pointer to a linked list of type SDL_hid_device_info, containing
190 * information about the HID devices attached to the system, or NULL
191 * in the case of failure. Free this linked list by calling
192 * SDL_hid_free_enumeration().
193 *
194 * \since This function is available since SDL 2.0.18.
195 *
196 * \sa SDL_hid_device_change_count
197 */
198 extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
199
200 /**
201 * Free an enumeration Linked List
202 *
203 * This function frees a linked list created by SDL_hid_enumerate().
204 *
205 * \param devs Pointer to a list of struct_device returned from
206 * SDL_hid_enumerate().
207 *
208 * \since This function is available since SDL 2.0.18.
209 */
210 extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
211
212 /**
213 * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
214 * a serial number.
215 *
216 * If `serial_number` is NULL, the first device with the specified VID and PID
217 * is opened.
218 *
219 * \param vendor_id The Vendor ID (VID) of the device to open.
220 * \param product_id The Product ID (PID) of the device to open.
221 * \param serial_number The Serial Number of the device to open (Optionally
222 * NULL).
223 * \returns a pointer to a SDL_hid_device object on success or NULL on
224 * failure.
225 *
226 * \since This function is available since SDL 2.0.18.
227 */
228 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
229
230 /**
231 * Open a HID device by its path name.
232 *
233 * The path name be determined by calling SDL_hid_enumerate(), or a
234 * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
235 *
236 * \param path The path name of the device to open
237 * \returns a pointer to a SDL_hid_device object on success or NULL on
238 * failure.
239 *
240 * \since This function is available since SDL 2.0.18.
241 */
242 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
243
244 /**
245 * Write an Output report to a HID device.
246 *
247 * The first byte of `data` must contain the Report ID. For devices which only
248 * support a single report, this must be set to 0x0. The remaining bytes
249 * contain the report data. Since the Report ID is mandatory, calls to
250 * SDL_hid_write() will always contain one more byte than the report contains.
251 * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
252 * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
253 * followed by the report data (16 bytes). In this example, the length passed
254 * in would be 17.
255 *
256 * SDL_hid_write() will send the data on the first OUT endpoint, if one
257 * exists. If it does not, it will send the data through the Control Endpoint
258 * (Endpoint 0).
259 *
260 * \param dev A device handle returned from SDL_hid_open().
261 * \param data The data to send, including the report number as the first
262 * byte.
263 * \param length The length in bytes of the data to send.
264 * \returns the actual number of bytes written and -1 on error.
265 *
266 * \since This function is available since SDL 2.0.18.
267 */
268 extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
269
270 /**
271 * Read an Input report from a HID device with timeout.
272 *
273 * Input reports are returned to the host through the INTERRUPT IN endpoint.
274 * The first byte will contain the Report number if the device uses numbered
275 * reports.
276 *
277 * \param dev A device handle returned from SDL_hid_open().
278 * \param data A buffer to put the read data into.
279 * \param length The number of bytes to read. For devices with multiple
280 * reports, make sure to read an extra byte for the report
281 * number.
282 * \param milliseconds timeout in milliseconds or -1 for blocking wait.
283 * \returns the actual number of bytes read and -1 on error. If no packet was
284 * available to be read within the timeout period, this function
285 * returns 0.
286 *
287 * \since This function is available since SDL 2.0.18.
288 */
289 extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
290
291 /**
292 * Read an Input report from a HID device.
293 *
294 * Input reports are returned to the host through the INTERRUPT IN endpoint.
295 * The first byte will contain the Report number if the device uses numbered
296 * reports.
297 *
298 * \param dev A device handle returned from SDL_hid_open().
299 * \param data A buffer to put the read data into.
300 * \param length The number of bytes to read. For devices with multiple
301 * reports, make sure to read an extra byte for the report
302 * number.
303 * \returns the actual number of bytes read and -1 on error. If no packet was
304 * available to be read and the handle is in non-blocking mode, this
305 * function returns 0.
306 *
307 * \since This function is available since SDL 2.0.18.
308 */
309 extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
310
311 /**
312 * Set the device handle to be non-blocking.
313 *
314 * In non-blocking mode calls to SDL_hid_read() will return immediately with a
315 * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
316 * will wait (block) until there is data to read before returning.
317 *
318 * Nonblocking can be turned on and off at any time.
319 *
320 * \param dev A device handle returned from SDL_hid_open().
321 * \param nonblock enable or not the nonblocking reads - 1 to enable
322 * nonblocking - 0 to disable nonblocking.
323 * \returns 0 on success and -1 on error.
324 *
325 * \since This function is available since SDL 2.0.18.
326 */
327 extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
328
329 /**
330 * Send a Feature report to the device.
331 *
332 * Feature reports are sent over the Control endpoint as a Set_Report
333 * transfer. The first byte of `data` must contain the Report ID. For devices
334 * which only support a single report, this must be set to 0x0. The remaining
335 * bytes contain the report data. Since the Report ID is mandatory, calls to
336 * SDL_hid_send_feature_report() will always contain one more byte than the
337 * report contains. For example, if a hid report is 16 bytes long, 17 bytes
338 * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
339 * devices which do not use numbered reports), followed by the report data (16
340 * bytes). In this example, the length passed in would be 17.
341 *
342 * \param dev A device handle returned from SDL_hid_open().
343 * \param data The data to send, including the report number as the first
344 * byte.
345 * \param length The length in bytes of the data to send, including the report
346 * number.
347 * \returns the actual number of bytes written and -1 on error.
348 *
349 * \since This function is available since SDL 2.0.18.
350 */
351 extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
352
353 /**
354 * Get a feature report from a HID device.
355 *
356 * Set the first byte of `data` to the Report ID of the report to be read.
357 * Make sure to allow space for this extra byte in `data`. Upon return, the
358 * first byte will still contain the Report ID, and the report data will start
359 * in data[1].
360 *
361 * \param dev A device handle returned from SDL_hid_open().
362 * \param data A buffer to put the read data into, including the Report ID.
363 * Set the first byte of `data` to the Report ID of the report to
364 * be read, or set it to zero if your device does not use numbered
365 * reports.
366 * \param length The number of bytes to read, including an extra byte for the
367 * report ID. The buffer can be longer than the actual report.
368 * \returns the number of bytes read plus one for the report ID (which is
369 * still in the first byte), or -1 on error.
370 *
371 * \since This function is available since SDL 2.0.18.
372 */
373 extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
374
375 /**
376 * Close a HID device.
377 *
378 * \param dev A device handle returned from SDL_hid_open().
379 *
380 * \since This function is available since SDL 2.0.18.
381 */
382 extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
383
384 /**
385 * Get The Manufacturer String from a HID device.
386 *
387 * \param dev A device handle returned from SDL_hid_open().
388 * \param string A wide string buffer to put the data into.
389 * \param maxlen The length of the buffer in multiples of wchar_t.
390 * \returns 0 on success and -1 on error.
391 *
392 * \since This function is available since SDL 2.0.18.
393 */
394 extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
395
396 /**
397 * Get The Product String from a HID device.
398 *
399 * \param dev A device handle returned from SDL_hid_open().
400 * \param string A wide string buffer to put the data into.
401 * \param maxlen The length of the buffer in multiples of wchar_t.
402 * \returns 0 on success and -1 on error.
403 *
404 * \since This function is available since SDL 2.0.18.
405 */
406 extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
407
408 /**
409 * Get The Serial Number String from a HID device.
410 *
411 * \param dev A device handle returned from SDL_hid_open().
412 * \param string A wide string buffer to put the data into.
413 * \param maxlen The length of the buffer in multiples of wchar_t.
414 * \returns 0 on success and -1 on error.
415 *
416 * \since This function is available since SDL 2.0.18.
417 */
418 extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
419
420 /**
421 * Get a string from a HID device, based on its string index.
422 *
423 * \param dev A device handle returned from SDL_hid_open().
424 * \param string_index The index of the string to get.
425 * \param string A wide string buffer to put the data into.
426 * \param maxlen The length of the buffer in multiples of wchar_t.
427 * \returns 0 on success and -1 on error.
428 *
429 * \since This function is available since SDL 2.0.18.
430 */
431 extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
432
433 /**
434 * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
435 *
436 * \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
437 *
438 * \since This function is available since SDL 2.0.18.
439 */
440 extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
441
442 /* Ends C function definitions when using C++ */
443 #ifdef __cplusplus
444 }
445 #endif
446 #include <SDL2/close_code.h>
447
448 #endif /* SDL_hidapi_h_ */
449
450 /* vi: set sts=4 ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hints.h
23 *
24 * Official documentation for SDL configuration variables
25 *
26 * This file contains functions to set and get configuration hints,
27 * as well as listing each of them alphabetically.
28 *
29 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
30 * the environment variable that can be used to override the default.
31 *
32 * In general these hints are just that - they may or may not be
33 * supported or applicable on any given platform, but they provide
34 * a way for an application or user to give the library a hint as
35 * to how they would like the library to work.
36 */
37
38 #ifndef SDL_hints_h_
39 #define SDL_hints_h_
40
41 #include <SDL2/SDL_stdinc.h>
42
43 #include <SDL2/begin_code.h>
44 /* Set up for C function definitions, even when using C++ */
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /**
50 * \brief A variable controlling whether the Android / iOS built-in
51 * accelerometer should be listed as a joystick device.
52 *
53 * This variable can be set to the following values:
54 * "0" - The accelerometer is not listed as a joystick
55 * "1" - The accelerometer is available as a 3 axis joystick (the default).
56 */
57 #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
58
59 /**
60 * \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
61 *
62 * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
63 * and your window is full-screen. This prevents the user from getting stuck in
64 * your application if you've enabled keyboard grab.
65 *
66 * The variable can be set to the following values:
67 * "0" - SDL will not handle Alt+Tab. Your application is responsible
68 for handling Alt+Tab while the keyboard is grabbed.
69 * "1" - SDL will minimize your window when Alt+Tab is pressed (default)
70 */
71 #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
72
73 /**
74 * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
75 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
76 *
77 * This variable can be set to the following values:
78 * "0" - don't allow topmost
79 * "1" - allow topmost
80 */
81 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
82
83 /**
84 * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
85 *
86 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
87 *
88 * If both hints were set then SDL_RWFromFile() will look into expansion files
89 * after a given relative path was not found in the internal storage and assets.
90 *
91 * By default this hint is not set and the APK expansion files are not searched.
92 */
93 #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
94
95 /**
96 * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
97 *
98 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
99 *
100 * If both hints were set then SDL_RWFromFile() will look into expansion files
101 * after a given relative path was not found in the internal storage and assets.
102 *
103 * By default this hint is not set and the APK expansion files are not searched.
104 */
105 #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
106
107 /**
108 * \brief A variable to control whether the event loop will block itself when the app is paused.
109 *
110 * The variable can be set to the following values:
111 * "0" - Non blocking.
112 * "1" - Blocking. (default)
113 *
114 * The value should be set before SDL is initialized.
115 */
116 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
117
118 /**
119 * \brief A variable to control whether SDL will pause audio in background
120 * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
121 *
122 * The variable can be set to the following values:
123 * "0" - Non paused.
124 * "1" - Paused. (default)
125 *
126 * The value should be set before SDL is initialized.
127 */
128 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
129
130 /**
131 * \brief A variable to control whether we trap the Android back button to handle it manually.
132 * This is necessary for the right mouse button to work on some Android devices, or
133 * to be able to trap the back button for use in your code reliably. If set to true,
134 * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
135 * SDL_SCANCODE_AC_BACK.
136 *
137 * The variable can be set to the following values:
138 * "0" - Back button will be handled as usual for system. (default)
139 * "1" - Back button will be trapped, allowing you to handle the key press
140 * manually. (This will also let right mouse click work on systems
141 * where the right mouse button functions as back.)
142 *
143 * The value of this hint is used at runtime, so it can be changed at any time.
144 */
145 #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
146
147 /**
148 * \brief Specify an application name.
149 *
150 * This hint lets you specify the application name sent to the OS when
151 * required. For example, this will often appear in volume control applets for
152 * audio streams, and in lists of applications which are inhibiting the
153 * screensaver. You should use a string that describes your program ("My Game
154 * 2: The Revenge")
155 *
156 * Setting this to "" or leaving it unset will have SDL use a reasonable
157 * default: probably the application's name or "SDL Application" if SDL
158 * doesn't have any better information.
159 *
160 * Note that, for audio streams, this can be overridden with
161 * SDL_HINT_AUDIO_DEVICE_APP_NAME.
162 *
163 * On targets where this is not supported, this hint does nothing.
164 */
165 #define SDL_HINT_APP_NAME "SDL_APP_NAME"
166
167 /**
168 * \brief A variable controlling whether controllers used with the Apple TV
169 * generate UI events.
170 *
171 * When UI events are generated by controller input, the app will be
172 * backgrounded when the Apple TV remote's menu button is pressed, and when the
173 * pause or B buttons on gamepads are pressed.
174 *
175 * More information about properly making use of controllers for the Apple TV
176 * can be found here:
177 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
178 *
179 * This variable can be set to the following values:
180 * "0" - Controller input does not generate UI events (the default).
181 * "1" - Controller input generates UI events.
182 */
183 #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
184
185 /**
186 * \brief A variable controlling whether the Apple TV remote's joystick axes
187 * will automatically match the rotation of the remote.
188 *
189 * This variable can be set to the following values:
190 * "0" - Remote orientation does not affect joystick axes (the default).
191 * "1" - Joystick axes are based on the orientation of the remote.
192 */
193 #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
194
195 /**
196 * \brief A variable controlling the audio category on iOS and Mac OS X
197 *
198 * This variable can be set to the following values:
199 *
200 * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
201 * "playback" - Use the AVAudioSessionCategoryPlayback category
202 *
203 * For more information, see Apple's documentation:
204 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
205 */
206 #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
207
208 /**
209 * \brief Specify an application name for an audio device.
210 *
211 * Some audio backends (such as PulseAudio) allow you to describe your audio
212 * stream. Among other things, this description might show up in a system
213 * control panel that lets the user adjust the volume on specific audio
214 * streams instead of using one giant master volume slider.
215 *
216 * This hints lets you transmit that information to the OS. The contents of
217 * this hint are used while opening an audio device. You should use a string
218 * that describes your program ("My Game 2: The Revenge")
219 *
220 * Setting this to "" or leaving it unset will have SDL use a reasonable
221 * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
222 * set. Otherwise, it'll probably the application's name or "SDL Application"
223 * if SDL doesn't have any better information.
224 *
225 * On targets where this is not supported, this hint does nothing.
226 */
227 #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
228
229 /**
230 * \brief Specify an application name for an audio device.
231 *
232 * Some audio backends (such as PulseAudio) allow you to describe your audio
233 * stream. Among other things, this description might show up in a system
234 * control panel that lets the user adjust the volume on specific audio
235 * streams instead of using one giant master volume slider.
236 *
237 * This hints lets you transmit that information to the OS. The contents of
238 * this hint are used while opening an audio device. You should use a string
239 * that describes your what your program is playing ("audio stream" is
240 * probably sufficient in many cases, but this could be useful for something
241 * like "team chat" if you have a headset playing VoIP audio separately).
242 *
243 * Setting this to "" or leaving it unset will have SDL use a reasonable
244 * default: "audio stream" or something similar.
245 *
246 * On targets where this is not supported, this hint does nothing.
247 */
248 #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
249
250 /**
251 * \brief Specify an application role for an audio device.
252 *
253 * Some audio backends (such as Pipewire) allow you to describe the role of
254 * your audio stream. Among other things, this description might show up in
255 * a system control panel or software for displaying and manipulating media
256 * playback/capture graphs.
257 *
258 * This hints lets you transmit that information to the OS. The contents of
259 * this hint are used while opening an audio device. You should use a string
260 * that describes your what your program is playing (Game, Music, Movie,
261 * etc...).
262 *
263 * Setting this to "" or leaving it unset will have SDL use a reasonable
264 * default: "Game" or something similar.
265 *
266 * On targets where this is not supported, this hint does nothing.
267 */
268 #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
269
270 /**
271 * \brief A variable controlling speed/quality tradeoff of audio resampling.
272 *
273 * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
274 * to handle audio resampling. There are different resampling modes available
275 * that produce different levels of quality, using more CPU.
276 *
277 * If this hint isn't specified to a valid setting, or libsamplerate isn't
278 * available, SDL will use the default, internal resampling algorithm.
279 *
280 * Note that this is currently only applicable to resampling audio that is
281 * being written to a device for playback or audio being read from a device
282 * for capture. SDL_AudioCVT always uses the default resampler (although this
283 * might change for SDL 2.1).
284 *
285 * This hint is currently only checked at audio subsystem initialization.
286 *
287 * This variable can be set to the following values:
288 *
289 * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
290 * "1" or "fast" - Use fast, slightly higher quality resampling, if available
291 * "2" or "medium" - Use medium quality resampling, if available
292 * "3" or "best" - Use high quality resampling, if available
293 */
294 #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
295
296 /**
297 * \brief A variable controlling whether SDL updates joystick state when getting input events
298 *
299 * This variable can be set to the following values:
300 *
301 * "0" - You'll call SDL_JoystickUpdate() manually
302 * "1" - SDL will automatically call SDL_JoystickUpdate() (default)
303 *
304 * This hint can be toggled on and off at runtime.
305 */
306 #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
307
308 /**
309 * \brief A variable controlling whether SDL updates sensor state when getting input events
310 *
311 * This variable can be set to the following values:
312 *
313 * "0" - You'll call SDL_SensorUpdate() manually
314 * "1" - SDL will automatically call SDL_SensorUpdate() (default)
315 *
316 * This hint can be toggled on and off at runtime.
317 */
318 #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
319
320 /**
321 * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
322 *
323 * The bitmap header version 4 is required for proper alpha channel support and
324 * SDL will use it when required. Should this not be desired, this hint can
325 * force the use of the 40 byte header version which is supported everywhere.
326 *
327 * The variable can be set to the following values:
328 * "0" - Surfaces with a colorkey or an alpha channel are saved to a
329 * 32-bit BMP file with an alpha mask. SDL will use the bitmap
330 * header version 4 and set the alpha mask accordingly.
331 * "1" - Surfaces with a colorkey or an alpha channel are saved to a
332 * 32-bit BMP file without an alpha mask. The alpha channel data
333 * will be in the file, but applications are going to ignore it.
334 *
335 * The default value is "0".
336 */
337 #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
338
339 /**
340 * \brief Override for SDL_GetDisplayUsableBounds()
341 *
342 * If set, this hint will override the expected results for
343 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
344 * to do this, but this allows an embedded system to request that some of the
345 * screen be reserved for other uses when paired with a well-behaved
346 * application.
347 *
348 * The contents of this hint must be 4 comma-separated integers, the first
349 * is the bounds x, then y, width and height, in that order.
350 */
351 #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
352
353 /**
354 * \brief Disable giving back control to the browser automatically
355 * when running with asyncify
356 *
357 * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
358 * such as refreshing the screen or polling events.
359 *
360 * This hint only applies to the emscripten platform
361 *
362 * The variable can be set to the following values:
363 * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
364 * "1" - Enable emscripten_sleep calls (the default)
365 */
366 #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
367
368 /**
369 * \brief override the binding element for keyboard inputs for Emscripten builds
370 *
371 * This hint only applies to the emscripten platform
372 *
373 * The variable can be one of
374 * "#window" - The javascript window object (this is the default)
375 * "#document" - The javascript document object
376 * "#screen" - the javascript window.screen object
377 * "#canvas" - the WebGL canvas element
378 * any other string without a leading # sign applies to the element on the page with that ID.
379 */
380 #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
381
382 /**
383 * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
384 *
385 * The variable can be set to the following values:
386 * "0" - Do not scan for Steam Controllers
387 * "1" - Scan for Steam Controllers (the default)
388 *
389 * The default value is "1". This hint must be set before initializing the joystick subsystem.
390 */
391 #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
392
393 /**
394 * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
395 *
396 * This variable can be set to the following values:
397 *
398 * "0" - Don't log any events (default)
399 * "1" - Log all events except mouse and finger motion, which are pretty spammy.
400 * "2" - Log all events.
401 *
402 * This is generally meant to be used to debug SDL itself, but can be useful
403 * for application developers that need better visibility into what is going
404 * on in the event queue. Logged events are sent through SDL_Log(), which
405 * means by default they appear on stdout on most platforms or maybe
406 * OutputDebugString() on Windows, and can be funneled by the app with
407 * SDL_LogSetOutputFunction(), etc.
408 *
409 * This hint can be toggled on and off at runtime, if you only need to log
410 * events for a small subset of program execution.
411 */
412 #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
413
414 /**
415 * \brief A variable controlling whether raising the window should be done more forcefully
416 *
417 * This variable can be set to the following values:
418 * "0" - No forcing (the default)
419 * "1" - Extra level of forcing
420 *
421 * At present, this is only an issue under MS Windows, which makes it nearly impossible to
422 * programmatically move a window to the foreground, for "security" reasons. See
423 * http://stackoverflow.com/a/34414846 for a discussion.
424 */
425 #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
426
427 /**
428 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
429 *
430 * SDL can try to accelerate the SDL screen surface by using streaming
431 * textures with a 3D rendering engine. This variable controls whether and
432 * how this is done.
433 *
434 * This variable can be set to the following values:
435 * "0" - Disable 3D acceleration
436 * "1" - Enable 3D acceleration, using the default renderer.
437 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
438 *
439 * By default SDL tries to make a best guess for each platform whether
440 * to use acceleration or not.
441 */
442 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
443
444 /**
445 * \brief A variable that lets you manually hint extra gamecontroller db entries.
446 *
447 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
448 *
449 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
450 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
451 */
452 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
453
454 /**
455 * \brief A variable that lets you provide a file with extra gamecontroller db entries.
456 *
457 * The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
458 *
459 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
460 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
461 */
462 #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
463
464 /**
465 * \brief A variable that overrides the automatic controller type detection
466 *
467 * The variable should be comma separated entries, in the form: VID/PID=type
468 *
469 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
470 *
471 * The type should be one of:
472 * Xbox360
473 * XboxOne
474 * PS3
475 * PS4
476 * PS5
477 * SwitchPro
478 *
479 * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
480 */
481 #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
482
483 /**
484 * \brief A variable containing a list of devices to skip when scanning for game controllers.
485 *
486 * The format of the string is a comma separated list of USB VID/PID pairs
487 * in hexadecimal form, e.g.
488 *
489 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
490 *
491 * The variable can also take the form of @file, in which case the named
492 * file will be loaded and interpreted as the value of the variable.
493 */
494 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
495
496 /**
497 * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
498 *
499 * The format of the string is a comma separated list of USB VID/PID pairs
500 * in hexadecimal form, e.g.
501 *
502 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
503 *
504 * The variable can also take the form of @file, in which case the named
505 * file will be loaded and interpreted as the value of the variable.
506 */
507 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
508
509 /**
510 * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
511 *
512 * For example, on Nintendo Switch controllers, normally you'd get:
513 *
514 * (Y)
515 * (X) (B)
516 * (A)
517 *
518 * but if this hint is set, you'll get:
519 *
520 * (X)
521 * (Y) (A)
522 * (B)
523 *
524 * The variable can be set to the following values:
525 * "0" - Report the face buttons by position, as though they were on an Xbox controller.
526 * "1" - Report the face buttons by label instead of position
527 *
528 * The default value is "1". This hint may be set at any time.
529 */
530 #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
531
532 /**
533 * \brief A variable controlling whether grabbing input grabs the keyboard
534 *
535 * This variable can be set to the following values:
536 * "0" - Grab will affect only the mouse
537 * "1" - Grab will affect mouse and keyboard
538 *
539 * By default SDL will not grab the keyboard so system shortcuts still work.
540 */
541 #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
542
543 /**
544 * \brief A variable controlling whether the idle timer is disabled on iOS.
545 *
546 * When an iOS app does not receive touches for some time, the screen is
547 * dimmed automatically. For games where the accelerometer is the only input
548 * this is problematic. This functionality can be disabled by setting this
549 * hint.
550 *
551 * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
552 * accomplish the same thing on iOS. They should be preferred over this hint.
553 *
554 * This variable can be set to the following values:
555 * "0" - Enable idle timer
556 * "1" - Disable idle timer
557 */
558 #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
559
560 /**
561 * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
562 *
563 * The variable can be set to the following values:
564 * "0" - SDL_TEXTEDITING events are sent, and it is the application's
565 * responsibility to render the text from these events and
566 * differentiate it somehow from committed text. (default)
567 * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
568 * and text that is being composed will be rendered in its own UI.
569 */
570 #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
571
572 /**
573 * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
574 *
575 * The variable can be set to the following values:
576 * "0" - Native UI components are not display. (default)
577 * "1" - Native UI components are displayed.
578 */
579 #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
580
581 /**
582 * \brief A variable to control if extended IME text support is enabled.
583 * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
584 * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
585 *
586 * The variable can be set to the following values:
587 * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
588 * "1" - Modern behavior.
589 */
590 #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
591
592 /**
593 * \brief A variable controlling whether the home indicator bar on iPhone X
594 * should be hidden.
595 *
596 * This variable can be set to the following values:
597 * "0" - The indicator bar is not hidden (default for windowed applications)
598 * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
599 * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
600 */
601 #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
602
603 /**
604 * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
605 *
606 * The variable can be set to the following values:
607 * "0" - Disable joystick & gamecontroller input events when the
608 * application is in the background.
609 * "1" - Enable joystick & gamecontroller input events when the
610 * application is in the background.
611 *
612 * The default value is "0". This hint may be set at any time.
613 */
614 #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
615
616 /**
617 * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
618 *
619 * This variable can be set to the following values:
620 * "0" - HIDAPI drivers are not used
621 * "1" - HIDAPI drivers are used (the default)
622 *
623 * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
624 */
625 #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
626
627 /**
628 * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
629 *
630 * This variable can be set to the following values:
631 * "0" - HIDAPI driver is not used
632 * "1" - HIDAPI driver is used
633 *
634 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
635 */
636 #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
637
638 /**
639 * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
640 * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
641 * this is useful for applications that need full compatibility for things like ADSR envelopes.
642 * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
643 * Rumble is both at any arbitrary value,
644 * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
645 *
646 * This variable can be set to the following values:
647 * "0" - Normal rumble behavior is behavior is used (default)
648 * "1" - Proper GameCube controller rumble behavior is used
649 *
650 */
651 #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
652
653 /**
654 * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
655 *
656 * This variable can be set to the following values:
657 * "0" - basic Joy-Con support with no analog input (the default)
658 * "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
659 *
660 * This does not combine Joy-Cons into a single controller. That's up to the user.
661 */
662 #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
663
664 /**
665 * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
666 *
667 * This variable can be set to the following values:
668 * "0" - HIDAPI driver is not used
669 * "1" - HIDAPI driver is used
670 *
671 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
672 */
673 #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
674
675 /**
676 * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
677 *
678 * This variable can be set to the following values:
679 * "0" - HIDAPI driver is not used
680 * "1" - HIDAPI driver is used
681 *
682 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
683 */
684 #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
685
686 /**
687 * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
688 *
689 * This variable can be set to the following values:
690 * "0" - extended reports are not enabled (the default)
691 * "1" - extended reports
692 *
693 * Extended input reports allow rumble on Bluetooth PS4 controllers, but
694 * break DirectInput handling for applications that don't use SDL.
695 *
696 * Once extended reports are enabled, they can not be disabled without
697 * power cycling the controller.
698 *
699 * For compatibility with applications written for versions of SDL prior
700 * to the introduction of PS5 controller support, this value will also
701 * control the state of extended reports on PS5 controllers when the
702 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
703 */
704 #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
705
706 /**
707 * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
708 *
709 * This variable can be set to the following values:
710 * "0" - HIDAPI driver is not used
711 * "1" - HIDAPI driver is used
712 *
713 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
714 */
715 #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
716
717 /**
718 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
719 *
720 * This variable can be set to the following values:
721 * "0" - player LEDs are not enabled
722 * "1" - player LEDs are enabled (the default)
723 */
724 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
725
726 /**
727 * \brief A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
728 *
729 * This variable can be set to the following values:
730 * "0" - extended reports are not enabled (the default)
731 * "1" - extended reports
732 *
733 * Extended input reports allow rumble on Bluetooth PS5 controllers, but
734 * break DirectInput handling for applications that don't use SDL.
735 *
736 * Once extended reports are enabled, they can not be disabled without
737 * power cycling the controller.
738 *
739 * For compatibility with applications written for versions of SDL prior
740 * to the introduction of PS5 controller support, this value defaults to
741 * the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
742 */
743 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
744
745 /**
746 * \brief A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
747 *
748 * This variable can be set to the following values:
749 * "0" - HIDAPI driver is not used
750 * "1" - HIDAPI driver is used
751 *
752 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
753 */
754 #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
755
756 /**
757 * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
758 *
759 * This variable can be set to the following values:
760 * "0" - HIDAPI driver is not used
761 * "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
762 * and may prompt the user for permission on iOS and Android.
763 *
764 * The default is "0"
765 */
766 #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
767
768 /**
769 * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
770 *
771 * This variable can be set to the following values:
772 * "0" - HIDAPI driver is not used
773 * "1" - HIDAPI driver is used
774 *
775 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
776 */
777 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
778
779 /**
780 * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
781 *
782 * This variable can be set to the following values:
783 * "0" - home button LED is turned off
784 * "1" - home button LED is turned on
785 *
786 * By default the Home button LED state is not changed.
787 */
788 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
789
790 /**
791 * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
792 *
793 * This variable can be set to the following values:
794 * "0" - HIDAPI driver is not used
795 * "1" - HIDAPI driver is used
796 *
797 * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
798 */
799 #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
800
801 /**
802 * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
803 *
804 * This variable can be set to the following values:
805 * "0" - RAWINPUT drivers are not used
806 * "1" - RAWINPUT drivers are used (the default)
807 */
808 #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
809
810 /**
811 * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
812 *
813 * This variable can be set to the following values:
814 * "0" - RAWINPUT driver will only use data from raw input APIs
815 * "1" - RAWINPUT driver will also pull data from XInput, providing
816 * better trigger axes, guide button presses, and rumble support
817 * for Xbox controllers
818 *
819 * The default is "1". This hint applies to any joysticks opened after setting the hint.
820 */
821 #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
822
823 /**
824 * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
825 *
826 * This variable can be set to the following values:
827 * "0" - ROG Chakram mice do not show up as joysticks (the default)
828 * "1" - ROG Chakram mice show up as joysticks
829 */
830 #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
831
832 /**
833 * \brief A variable controlling whether a separate thread should be used
834 * for handling joystick detection and raw input messages on Windows
835 *
836 * This variable can be set to the following values:
837 * "0" - A separate thread is not used (the default)
838 * "1" - A separate thread is used for handling raw input messages
839 *
840 */
841 #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
842
843 /**
844 * \brief Determines whether SDL enforces that DRM master is required in order
845 * to initialize the KMSDRM video backend.
846 *
847 * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
848 * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
849 * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
850 * is still able to process input and query attributes of attached displays,
851 * but it cannot change display state or draw to the screen directly.
852 *
853 * In some cases, it can be useful to have the KMSDRM backend even if it cannot
854 * be used for rendering. An app may want to use SDL for input processing while
855 * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
856 * using its own code to render to DRM overlays that SDL doesn't support.
857 *
858 * This hint must be set before initializing the video subsystem.
859 *
860 * This variable can be set to the following values:
861 * "0" - SDL will allow usage of the KMSDRM backend without DRM master
862 * "1" - SDL Will require DRM master to use the KMSDRM backend (default)
863 */
864 #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
865
866 /**
867 * \brief A comma separated list of devices to open as joysticks
868 *
869 * This variable is currently only used by the Linux joystick driver.
870 */
871 #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
872
873 /**
874 * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
875 *
876 * This variable can be set to the following values:
877 * "0" - Use /dev/input/event*
878 * "1" - Use /dev/input/js*
879 *
880 * By default the /dev/input/event* interfaces are used
881 */
882 #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
883
884 /**
885 * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
886 *
887 * This variable can be set to the following values:
888 * "0" - Return unfiltered joystick axis values (the default)
889 * "1" - Return axis values with deadzones taken into account
890 */
891 #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
892
893 /**
894 * \brief When set don't force the SDL app to become a foreground process
895 *
896 * This hint only applies to Mac OS X.
897 *
898 */
899 #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
900
901 /**
902 * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
903 *
904 * If present, holding ctrl while left clicking will generate a right click
905 * event when on Mac.
906 */
907 #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
908
909 /**
910 * \brief A variable setting the double click radius, in pixels.
911 */
912 #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
913
914 /**
915 * \brief A variable setting the double click time, in milliseconds.
916 */
917 #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
918
919 /**
920 * \brief Allow mouse click events when clicking to focus an SDL window
921 *
922 * This variable can be set to the following values:
923 * "0" - Ignore mouse clicks that activate a window
924 * "1" - Generate events for mouse clicks that activate a window
925 *
926 * By default SDL will ignore mouse clicks that activate a window
927 */
928 #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
929
930 /**
931 * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
932 */
933 #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
934
935 /**
936 * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
937 *
938 * This variable can be set to the following values:
939 * "0" - Relative mouse mode constrains the mouse to the window
940 * "1" - Relative mouse mode constrains the mouse to the center of the window
941 *
942 * Constraining to the center of the window works better for FPS games and when the
943 * application is running over RDP. Constraining to the whole window works better
944 * for 2D games and increases the chance that the mouse will be in the correct
945 * position when using high DPI mice.
946 *
947 * By default SDL will constrain the mouse to the center of the window
948 */
949 #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
950
951 /**
952 * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
953 *
954 * This variable can be set to the following values:
955 * "0" - Relative mouse mode uses raw input
956 * "1" - Relative mouse mode uses mouse warping
957 *
958 * By default SDL will use raw input for relative mouse mode
959 */
960 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
961
962 /**
963 * \brief A variable controlling whether relative mouse motion is affected by renderer scaling
964 *
965 * This variable can be set to the following values:
966 * "0" - Relative motion is unaffected by DPI or renderer's logical size
967 * "1" - Relative motion is scaled according to DPI scaling and logical size
968 *
969 * By default relative mouse deltas are affected by DPI and renderer scaling
970 */
971 #define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
972
973 /**
974 * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
975 */
976 #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
977
978 /**
979 * \brief A variable controlling whether mouse events should generate synthetic touch events
980 *
981 * This variable can be set to the following values:
982 * "0" - Mouse events will not generate touch events (default for desktop platforms)
983 * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
984 */
985 #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
986
987 /**
988 * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
989 *
990 * This variable can be set to the following values:
991 * "0" - The mouse is not captured while mouse buttons are pressed
992 * "1" - The mouse is captured while mouse buttons are pressed
993 *
994 * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
995 * outside the window, the application continues to receive mouse events until the button is
996 * released.
997 */
998 #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
999
1000 /**
1001 * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
1002 *
1003 * This hint only applies to Unix-like platforms, and should set before
1004 * any calls to SDL_Init()
1005 *
1006 * The variable can be set to the following values:
1007 * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
1008 * catches a signal, convert it into an SDL_QUIT event.
1009 * "1" - SDL will not install a signal handler at all.
1010 */
1011 #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
1012
1013 /**
1014 * \brief A variable controlling what driver to use for OpenGL ES contexts.
1015 *
1016 * On some platforms, currently Windows and X11, OpenGL drivers may support
1017 * creating contexts with an OpenGL ES profile. By default SDL uses these
1018 * profiles, when available, otherwise it attempts to load an OpenGL ES
1019 * library, e.g. that provided by the ANGLE project. This variable controls
1020 * whether SDL follows this default behaviour or will always load an
1021 * OpenGL ES library.
1022 *
1023 * Circumstances where this is useful include
1024 * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
1025 * or emulator, e.g. those from ARM, Imagination or Qualcomm.
1026 * - Resolving OpenGL ES function addresses at link time by linking with
1027 * the OpenGL ES library instead of querying them at run time with
1028 * SDL_GL_GetProcAddress().
1029 *
1030 * Caution: for an application to work with the default behaviour across
1031 * different OpenGL drivers it must query the OpenGL ES function
1032 * addresses at run time using SDL_GL_GetProcAddress().
1033 *
1034 * This variable is ignored on most platforms because OpenGL ES is native
1035 * or not supported.
1036 *
1037 * This variable can be set to the following values:
1038 * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
1039 * "1" - Load OpenGL ES library using the default library names.
1040 *
1041 */
1042 #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
1043
1044 /**
1045 * \brief A variable controlling which orientations are allowed on iOS/Android.
1046 *
1047 * In some circumstances it is necessary to be able to explicitly control
1048 * which UI orientations are allowed.
1049 *
1050 * This variable is a space delimited list of the following values:
1051 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
1052 */
1053 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
1054
1055 /**
1056 * \brief A variable controlling the use of a sentinel event when polling the event queue
1057 *
1058 * This variable can be set to the following values:
1059 * "0" - Disable poll sentinels
1060 * "1" - Enable poll sentinels
1061 *
1062 * When polling for events, SDL_PumpEvents is used to gather new events from devices.
1063 * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
1064 * become stuck until the new events stop.
1065 * This is most noticable when moving a high frequency mouse.
1066 *
1067 * By default, poll sentinels are enabled.
1068 */
1069 #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
1070
1071 /**
1072 * \brief Override for SDL_GetPreferredLocales()
1073 *
1074 * If set, this will be favored over anything the OS might report for the
1075 * user's preferred locales. Changing this hint at runtime will not generate
1076 * a SDL_LOCALECHANGED event (but if you can change the hint, you can push
1077 * your own event, if you want).
1078 *
1079 * The format of this hint is a comma-separated list of language and locale,
1080 * combined with an underscore, as is a common format: "en_GB". Locale is
1081 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
1082 */
1083 #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
1084
1085 /**
1086 * \brief A variable describing the content orientation on QtWayland-based platforms.
1087 *
1088 * On QtWayland platforms, windows are rotated client-side to allow for custom
1089 * transitions. In order to correctly position overlays (e.g. volume bar) and
1090 * gestures (e.g. events view, close/minimize gestures), the system needs to
1091 * know in which orientation the application is currently drawing its contents.
1092 *
1093 * This does not cause the window to be rotated or resized, the application
1094 * needs to take care of drawing the content in the right orientation (the
1095 * framebuffer is always in portrait mode).
1096 *
1097 * This variable can be one of the following values:
1098 * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
1099 */
1100 #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1101
1102 /**
1103 * \brief Flags to set on QtWayland windows to integrate with the native window manager.
1104 *
1105 * On QtWayland platforms, this hint controls the flags to set on the windows.
1106 * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
1107 *
1108 * This variable is a space-separated list of the following values (empty = no flags):
1109 * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
1110 */
1111 #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
1112
1113 /**
1114 * \brief A variable controlling whether the 2D render API is compatible or efficient.
1115 *
1116 * This variable can be set to the following values:
1117 *
1118 * "0" - Don't use batching to make rendering more efficient.
1119 * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
1120 *
1121 * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
1122 * it batches up draw requests and sends them all to the GPU only when forced
1123 * to (during SDL_RenderPresent, when changing render targets, by updating a
1124 * texture that the batch needs, etc). This is significantly more efficient,
1125 * but it can cause problems for apps that expect to render on top of the
1126 * render API's output. As such, SDL will disable batching if a specific
1127 * render backend is requested (since this might indicate that the app is
1128 * planning to use the underlying graphics API directly). This hint can
1129 * be used to explicitly request batching in this instance. It is a contract
1130 * that you will either never use the underlying graphics API directly, or
1131 * if you do, you will call SDL_RenderFlush() before you do so any current
1132 * batch goes to the GPU before your work begins. Not following this contract
1133 * will result in undefined behavior.
1134 */
1135 #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
1136
1137 /**
1138 * \brief A variable controlling how the 2D render API renders lines
1139 *
1140 * This variable can be set to the following values:
1141 * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
1142 * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
1143 * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
1144 * "3" - Use the driver geometry API (correct, draws thicker diagonal lines)
1145 *
1146 * This variable should be set when the renderer is created.
1147 */
1148 #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
1149
1150 /**
1151 * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
1152 *
1153 * This variable does not have any effect on the Direct3D 9 based renderer.
1154 *
1155 * This variable can be set to the following values:
1156 * "0" - Disable Debug Layer use
1157 * "1" - Enable Debug Layer use
1158 *
1159 * By default, SDL does not use Direct3D Debug Layer.
1160 */
1161 #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
1162
1163 /**
1164 * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
1165 *
1166 * This variable can be set to the following values:
1167 * "0" - Thread-safety is not enabled (faster)
1168 * "1" - Thread-safety is enabled
1169 *
1170 * By default the Direct3D device is created with thread-safety disabled.
1171 */
1172 #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
1173
1174 /**
1175 * \brief A variable specifying which render driver to use.
1176 *
1177 * If the application doesn't pick a specific renderer to use, this variable
1178 * specifies the name of the preferred renderer. If the preferred renderer
1179 * can't be initialized, the normal default renderer is used.
1180 *
1181 * This variable is case insensitive and can be set to the following values:
1182 * "direct3d"
1183 * "opengl"
1184 * "opengles2"
1185 * "opengles"
1186 * "metal"
1187 * "software"
1188 *
1189 * The default varies by platform, but it's the first one in the list that
1190 * is available on the current platform.
1191 */
1192 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
1193
1194 /**
1195 * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
1196 *
1197 * This variable can be set to the following values:
1198 * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
1199 * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
1200 *
1201 * By default letterbox is used
1202 */
1203 #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
1204
1205 /**
1206 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
1207 *
1208 * This variable can be set to the following values:
1209 * "0" - Disable shaders
1210 * "1" - Enable shaders
1211 *
1212 * By default shaders are used if OpenGL supports them.
1213 */
1214 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
1215
1216 /**
1217 * \brief A variable controlling the scaling quality
1218 *
1219 * This variable can be set to the following values:
1220 * "0" or "nearest" - Nearest pixel sampling
1221 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
1222 * "2" or "best" - Currently this is the same as "linear"
1223 *
1224 * By default nearest pixel sampling is used
1225 */
1226 #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
1227
1228 /**
1229 * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
1230 *
1231 * This variable can be set to the following values:
1232 * "0" - Disable vsync
1233 * "1" - Enable vsync
1234 *
1235 * By default SDL does not sync screen surface updates with vertical refresh.
1236 */
1237 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1238
1239 /**
1240 * \brief A variable to control whether the return key on the soft keyboard
1241 * should hide the soft keyboard on Android and iOS.
1242 *
1243 * The variable can be set to the following values:
1244 * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
1245 * "1" - The return key will hide the keyboard.
1246 *
1247 * The value of this hint is used at runtime, so it can be changed at any time.
1248 */
1249 #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
1250
1251 /**
1252 * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
1253 *
1254 * Also known as Z-order. The variable can take a negative or positive value.
1255 * The default is 10000.
1256 */
1257 #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
1258
1259 /**
1260 * \brief Specify an "activity name" for screensaver inhibition.
1261 *
1262 * Some platforms, notably Linux desktops, list the applications which are
1263 * inhibiting the screensaver or other power-saving features.
1264 *
1265 * This hint lets you specify the "activity name" sent to the OS when
1266 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
1267 * disabled). The contents of this hint are used when the screensaver is
1268 * disabled. You should use a string that describes what your program is doing
1269 * (and, therefore, why the screensaver is disabled). For example, "Playing a
1270 * game" or "Watching a video".
1271 *
1272 * Setting this to "" or leaving it unset will have SDL use a reasonable
1273 * default: "Playing a game" or something similar.
1274 *
1275 * On targets where this is not supported, this hint does nothing.
1276 */
1277 #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
1278
1279 /**
1280 * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
1281 *
1282 * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
1283 * that require special handling by the application. This hint exists to let SDL know that
1284 * the app is prepared to handle said restrictions.
1285 *
1286 * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
1287 * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
1288 * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
1289 * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
1290 * * Refer to the man pages for more information.
1291 *
1292 * This variable can be set to the following values:
1293 * "0" - default platform specific behaviour
1294 * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
1295 */
1296 #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
1297
1298 /**
1299 * \brief A string specifying additional information to use with SDL_SetThreadPriority.
1300 *
1301 * By default SDL_SetThreadPriority will make appropriate system changes in order to
1302 * apply a thread priority. For example on systems using pthreads the scheduler policy
1303 * is changed automatically to a policy that works well with a given priority.
1304 * Code which has specific requirements can override SDL's default behavior with this hint.
1305 *
1306 * pthread hint values are "current", "other", "fifo" and "rr".
1307 * Currently no other platform hint values are defined but may be in the future.
1308 *
1309 * \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
1310 * configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
1311 * after calling SDL_SetThreadPriority().
1312 */
1313 #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
1314
1315 /**
1316 * \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
1317 *
1318 * Use this hint in case you need to set SDL's threads stack size to other than the default.
1319 * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
1320 * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
1321 * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
1322 *
1323 * Instead of this hint, in 2.0.9 and later, you can use
1324 * SDL_CreateThreadWithStackSize(). This hint only works with the classic
1325 * SDL_CreateThread().
1326 */
1327 #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
1328
1329 /**
1330 * \brief A variable that controls the timer resolution, in milliseconds.
1331 *
1332 * The higher resolution the timer, the more frequently the CPU services
1333 * timer interrupts, and the more precise delays are, but this takes up
1334 * power and CPU time. This hint is only used on Windows.
1335 *
1336 * See this blog post for more information:
1337 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
1338 *
1339 * If this variable is set to "0", the system timer resolution is not set.
1340 *
1341 * The default value is "1". This hint may be set at any time.
1342 */
1343 #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
1344
1345 /**
1346 * \brief A variable controlling whether touch events should generate synthetic mouse events
1347 *
1348 * This variable can be set to the following values:
1349 * "0" - Touch events will not generate mouse events
1350 * "1" - Touch events will generate mouse events
1351 *
1352 * By default SDL will generate mouse events for touch events
1353 */
1354 #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
1355
1356 /**
1357 * \brief A variable controlling which touchpad should generate synthetic mouse events
1358 *
1359 * This variable can be set to the following values:
1360 * "0" - Only front touchpad should generate mouse events. Default
1361 * "1" - Only back touchpad should generate mouse events.
1362 * "2" - Both touchpads should generate mouse events.
1363 *
1364 * By default SDL will generate mouse events for all touch devices
1365 */
1366 #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
1367
1368 /**
1369 * \brief A variable controlling whether the Android / tvOS remotes
1370 * should be listed as joystick devices, instead of sending keyboard events.
1371 *
1372 * This variable can be set to the following values:
1373 * "0" - Remotes send enter/escape/arrow key events
1374 * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
1375 */
1376 #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
1377
1378 /**
1379 * \brief A variable controlling whether the screensaver is enabled.
1380 *
1381 * This variable can be set to the following values:
1382 * "0" - Disable screensaver
1383 * "1" - Enable screensaver
1384 *
1385 * By default SDL will disable the screensaver.
1386 */
1387 #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
1388
1389 /**
1390 * \brief Tell the video driver that we only want a double buffer.
1391 *
1392 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1393 * wastes no CPU time on waiting for vsync after issuing a flip, but
1394 * introduces a frame of latency. On the other hand, using a double buffer
1395 * scheme instead is recommended for cases where low latency is an important
1396 * factor because we save a whole frame of latency.
1397 * We do so by waiting for vsync immediately after issuing a flip, usually just
1398 * after eglSwapBuffers call in the backend's *_SwapWindow function.
1399 *
1400 * Since it's driver-specific, it's only supported where possible and
1401 * implemented. Currently supported the following drivers:
1402 *
1403 * - KMSDRM (kmsdrm)
1404 * - Raspberry Pi (raspberrypi)
1405 */
1406 #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
1407
1408 /**
1409 * \brief A variable controlling whether the EGL window is allowed to be
1410 * composited as transparent, rather than opaque.
1411 *
1412 * Most window systems will always render windows opaque, even if the surface
1413 * format has an alpha channel. This is not always true, however, so by default
1414 * SDL will try to enforce opaque composition. To override this behavior, you
1415 * can set this hint to "1".
1416 */
1417 #define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
1418
1419 /**
1420 * \brief A variable controlling whether the graphics context is externally managed.
1421 *
1422 * This variable can be set to the following values:
1423 * "0" - SDL will manage graphics contexts that are attached to windows.
1424 * "1" - Disable graphics context management on windows.
1425 *
1426 * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
1427 * context will be automatically saved and restored when pausing the application. Additionally, some
1428 * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
1429 * behavior, which is desireable when the application manages the graphics context, such as
1430 * an externally managed OpenGL context or attaching a Vulkan surface to the window.
1431 */
1432 #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
1433
1434 /**
1435 * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
1436 */
1437 #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
1438
1439 /**
1440 * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
1441 *
1442 * This hint only applies to Mac OS X.
1443 *
1444 * The variable can be set to the following values:
1445 * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
1446 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
1447 * button on their titlebars).
1448 * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
1449 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
1450 * button on their titlebars).
1451 *
1452 * The default value is "1". Spaces are disabled regardless of this hint if
1453 * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
1454 * any windows are created.
1455 */
1456 #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
1457
1458 /**
1459 * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
1460 * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
1461 * seeing if "true" causes more problems than it solves in modern times.
1462 *
1463 */
1464 #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
1465
1466 /**
1467 * \brief A variable controlling whether the libdecor Wayland backend is allowed to be used.
1468 *
1469 * This variable can be set to the following values:
1470 * "0" - libdecor use is disabled.
1471 * "1" - libdecor use is enabled (default).
1472 *
1473 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1474 */
1475 #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
1476
1477 /**
1478 * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
1479 *
1480 * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
1481 * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
1482 *
1483 * This variable can be set to the following values:
1484 * "0" - libdecor is enabled only if server-side decorations are unavailable.
1485 * "1" - libdecor is always enabled if available.
1486 *
1487 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1488 */
1489 #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
1490
1491 /**
1492 * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1493 *
1494 * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
1495 * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1496 * created SDL_Window:
1497 *
1498 * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
1499 * needed for example when sharing an OpenGL context across multiple windows.
1500 *
1501 * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
1502 * OpenGL rendering.
1503 *
1504 * This variable can be set to the following values:
1505 * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
1506 * share a pixel format with.
1507 */
1508 #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
1509
1510 /**
1511 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
1512 *
1513 * This variable can be set to the following values:
1514 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1515 * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
1516 *
1517 * By default SDL will not make the foreign window compatible with OpenGL.
1518 */
1519 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
1520
1521 /**
1522 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
1523 *
1524 * This variable can be set to the following values:
1525 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1526 * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
1527 *
1528 * By default SDL will not make the foreign window compatible with Vulkan.
1529 */
1530 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
1531
1532 /**
1533 * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
1534 *
1535 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
1536 * can use two different sets of binaries, those compiled by the user from source
1537 * or those provided by the Chrome browser. In the later case, these binaries require
1538 * that SDL loads a DLL providing the shader compiler.
1539 *
1540 * This variable can be set to the following values:
1541 * "d3dcompiler_46.dll" - default, best for Vista or later.
1542 * "d3dcompiler_43.dll" - for XP support.
1543 * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
1544 *
1545 */
1546 #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
1547
1548 /**
1549 * \brief A variable controlling whether X11 should use GLX or EGL by default
1550 *
1551 * This variable can be set to the following values:
1552 * "0" - Use GLX
1553 * "1" - Use EGL
1554 *
1555 * By default SDL will use GLX when both are present.
1556 */
1557 #define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
1558
1559 /**
1560 * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
1561 *
1562 * This variable can be set to the following values:
1563 * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
1564 * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
1565 *
1566 * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
1567 *
1568 */
1569 #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
1570
1571 /**
1572 * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
1573 *
1574 * This variable can be set to the following values:
1575 * "0" - Disable _NET_WM_PING
1576 * "1" - Enable _NET_WM_PING
1577 *
1578 * By default SDL will use _NET_WM_PING, but for applications that know they
1579 * will not always be able to respond to ping requests in a timely manner they can
1580 * turn it off to avoid the window manager thinking the app is hung.
1581 * The hint is checked in CreateWindow.
1582 */
1583 #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
1584
1585 /**
1586 * \brief A variable forcing the visual ID chosen for new X11 windows
1587 *
1588 */
1589 #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
1590
1591 /**
1592 * \brief A variable controlling whether the X11 Xinerama extension should be used.
1593 *
1594 * This variable can be set to the following values:
1595 * "0" - Disable Xinerama
1596 * "1" - Enable Xinerama
1597 *
1598 * By default SDL will use Xinerama if it is available.
1599 */
1600 #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
1601
1602 /**
1603 * \brief A variable controlling whether the X11 XRandR extension should be used.
1604 *
1605 * This variable can be set to the following values:
1606 * "0" - Disable XRandR
1607 * "1" - Enable XRandR
1608 *
1609 * By default SDL will not use XRandR because of window manager issues.
1610 */
1611 #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
1612
1613 /**
1614 * \brief A variable controlling whether the X11 VidMode extension should be used.
1615 *
1616 * This variable can be set to the following values:
1617 * "0" - Disable XVidMode
1618 * "1" - Enable XVidMode
1619 *
1620 * By default SDL will use XVidMode if it is available.
1621 */
1622 #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
1623
1624 /**
1625 * \brief Controls how the fact chunk affects the loading of a WAVE file.
1626 *
1627 * The fact chunk stores information about the number of samples of a WAVE
1628 * file. The Standards Update from Microsoft notes that this value can be used
1629 * to 'determine the length of the data in seconds'. This is especially useful
1630 * for compressed formats (for which this is a mandatory chunk) if they produce
1631 * multiple sample frames per block and truncating the block is not allowed.
1632 * The fact chunk can exactly specify how many sample frames there should be
1633 * in this case.
1634 *
1635 * Unfortunately, most application seem to ignore the fact chunk and so SDL
1636 * ignores it by default as well.
1637 *
1638 * This variable can be set to the following values:
1639 *
1640 * "truncate" - Use the number of samples to truncate the wave data if
1641 * the fact chunk is present and valid
1642 * "strict" - Like "truncate", but raise an error if the fact chunk
1643 * is invalid, not present for non-PCM formats, or if the
1644 * data chunk doesn't have that many samples
1645 * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
1646 * samples is zero
1647 * "ignore" - Ignore fact chunk entirely (default)
1648 */
1649 #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
1650
1651 /**
1652 * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
1653 *
1654 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
1655 * file) is not always reliable. In case the size is wrong, it's possible to
1656 * just ignore it and step through the chunks until a fixed limit is reached.
1657 *
1658 * Note that files that have trailing data unrelated to the WAVE file or
1659 * corrupt files may slow down the loading process without a reliable boundary.
1660 * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
1661 * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
1662 *
1663 * This variable can be set to the following values:
1664 *
1665 * "force" - Always use the RIFF chunk size as a boundary for the chunk search
1666 * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
1667 * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
1668 * "maximum" - Search for chunks until the end of file (not recommended)
1669 */
1670 #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
1671
1672 /**
1673 * \brief Controls how a truncated WAVE file is handled.
1674 *
1675 * A WAVE file is considered truncated if any of the chunks are incomplete or
1676 * the data chunk size is not a multiple of the block size. By default, SDL
1677 * decodes until the first incomplete block, as most applications seem to do.
1678 *
1679 * This variable can be set to the following values:
1680 *
1681 * "verystrict" - Raise an error if the file is truncated
1682 * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
1683 * "dropframe" - Decode until the first incomplete sample frame
1684 * "dropblock" - Decode until the first incomplete block (default)
1685 */
1686 #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
1687
1688 /**
1689 * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
1690 * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
1691 * thread's name, but it tends to cause problems with other debuggers,
1692 * and the .NET runtime. Note that SDL 2.0.6 and later will still use
1693 * the (safer) SetThreadDescription API, introduced in the Windows 10
1694 * Creators Update, if available.
1695 *
1696 * The variable can be set to the following values:
1697 * "0" - SDL will raise the 0x406D1388 Exception to name threads.
1698 * This is the default behavior of SDL <= 2.0.4.
1699 * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
1700 * This is necessary with .NET languages or debuggers that aren't Visual Studio.
1701 */
1702 #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
1703
1704 /**
1705 * \brief A variable controlling whether the windows message loop is processed by SDL
1706 *
1707 * This variable can be set to the following values:
1708 * "0" - The window message loop is not run
1709 * "1" - The window message loop is processed in SDL_PumpEvents()
1710 *
1711 * By default SDL will process the windows message loop
1712 */
1713 #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
1714
1715 /**
1716 * \brief Force SDL to use Critical Sections for mutexes on Windows.
1717 * On Windows 7 and newer, Slim Reader/Writer Locks are available.
1718 * They offer better performance, allocate no kernel ressources and
1719 * use less memory. SDL will fall back to Critical Sections on older
1720 * OS versions or if forced to by this hint.
1721 *
1722 * This variable can be set to the following values:
1723 * "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
1724 * "1" - Force the use of Critical Sections in all cases.
1725 *
1726 */
1727 #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
1728
1729 /**
1730 * \brief Force SDL to use Kernel Semaphores on Windows.
1731 * Kernel Semaphores are inter-process and require a context
1732 * switch on every interaction. On Windows 8 and newer, the
1733 * WaitOnAddress API is available. Using that and atomics to
1734 * implement semaphores increases performance.
1735 * SDL will fall back to Kernel Objects on older OS versions
1736 * or if forced to by this hint.
1737 *
1738 * This variable can be set to the following values:
1739 * "0" - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
1740 * "1" - Force the use of Kernel Objects in all cases.
1741 *
1742 */
1743 #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
1744
1745 /**
1746 * \brief A variable to specify custom icon resource id from RC file on Windows platform
1747 */
1748 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
1749 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
1750
1751 /**
1752 * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
1753 *
1754 * The variable can be set to the following values:
1755 * "0" - SDL will generate a window-close event when it sees Alt+F4.
1756 * "1" - SDL will only do normal key handling for Alt+F4.
1757 */
1758 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
1759
1760 /**
1761 * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
1762 * Direct3D 9Ex contains changes to state management that can eliminate device
1763 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
1764 * some changes to your application to cope with the new behavior, so this
1765 * is disabled by default.
1766 *
1767 * This hint must be set before initializing the video subsystem.
1768 *
1769 * For more information on Direct3D 9Ex, see:
1770 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
1771 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
1772 *
1773 * This variable can be set to the following values:
1774 * "0" - Use the original Direct3D 9 API (default)
1775 * "1" - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
1776 *
1777 */
1778 #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
1779
1780 /**
1781 * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
1782 *
1783 * This variable can be set to the following values:
1784 * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
1785 * "1" - The window frame is interactive when the cursor is hidden
1786 *
1787 * By default SDL will allow interaction with the window frame when the cursor is hidden
1788 */
1789 #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
1790
1791 /**
1792 * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
1793 *
1794 * This variable can be set to the following values:
1795 * "0" - The window is activated when the SDL_ShowWindow function is called
1796 * "1" - The window is not activated when the SDL_ShowWindow function is called
1797 *
1798 * By default SDL will activate the window when the SDL_ShowWindow function is called
1799 */
1800 #define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
1801
1802 /** \brief Allows back-button-press events on Windows Phone to be marked as handled
1803 *
1804 * Windows Phone devices typically feature a Back button. When pressed,
1805 * the OS will emit back-button-press events, which apps are expected to
1806 * handle in an appropriate manner. If apps do not explicitly mark these
1807 * events as 'Handled', then the OS will invoke its default behavior for
1808 * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
1809 * terminate the app (and attempt to switch to the previous app, or to the
1810 * device's home screen).
1811 *
1812 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
1813 * to mark back-button-press events as Handled, if and when one is sent to
1814 * the app.
1815 *
1816 * Internally, Windows Phone sends back button events as parameters to
1817 * special back-button-press callback functions. Apps that need to respond
1818 * to back-button-press events are expected to register one or more
1819 * callback functions for such, shortly after being launched (during the
1820 * app's initialization phase). After the back button is pressed, the OS
1821 * will invoke these callbacks. If the app's callback(s) do not explicitly
1822 * mark the event as handled by the time they return, or if the app never
1823 * registers one of these callback, the OS will consider the event
1824 * un-handled, and it will apply its default back button behavior (terminate
1825 * the app).
1826 *
1827 * SDL registers its own back-button-press callback with the Windows Phone
1828 * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
1829 * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
1830 * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
1831 * If the hint's value is set to "1", the back button event's Handled
1832 * property will get set to 'true'. If the hint's value is set to something
1833 * else, or if it is unset, SDL will leave the event's Handled property
1834 * alone. (By default, the OS sets this property to 'false', to note.)
1835 *
1836 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
1837 * back button is pressed, or can set it in direct-response to a back button
1838 * being pressed.
1839 *
1840 * In order to get notified when a back button is pressed, SDL apps should
1841 * register a callback function with SDL_AddEventWatch(), and have it listen
1842 * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
1843 * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
1844 * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
1845 * set by such a callback, will be applied to the OS' current
1846 * back-button-press event.
1847 *
1848 * More details on back button behavior in Windows Phone apps can be found
1849 * at the following page, on Microsoft's developer site:
1850 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
1851 */
1852 #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
1853
1854 /** \brief Label text for a WinRT app's privacy policy link
1855 *
1856 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
1857 * Microsoft mandates that this policy be available via the Windows Settings charm.
1858 * SDL provides code to add a link there, with its label text being set via the
1859 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1860 *
1861 * Please note that a privacy policy's contents are not set via this hint. A separate
1862 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
1863 * policy.
1864 *
1865 * The contents of this hint should be encoded as a UTF8 string.
1866 *
1867 * The default value is "Privacy Policy". This hint should only be set during app
1868 * initialization, preferably before any calls to SDL_Init().
1869 *
1870 * For additional information on linking to a privacy policy, see the documentation for
1871 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
1872 */
1873 #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
1874
1875 /**
1876 * \brief A URL to a WinRT app's privacy policy
1877 *
1878 * All network-enabled WinRT apps must make a privacy policy available to its
1879 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
1880 * be available in the Windows Settings charm, as accessed from within the app.
1881 * SDL provides code to add a URL-based link there, which can point to the app's
1882 * privacy policy.
1883 *
1884 * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
1885 * before calling any SDL_Init() functions. The contents of the hint should
1886 * be a valid URL. For example, "http://www.example.com".
1887 *
1888 * The default value is "", which will prevent SDL from adding a privacy policy
1889 * link to the Settings charm. This hint should only be set during app init.
1890 *
1891 * The label text of an app's "Privacy Policy" link may be customized via another
1892 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1893 *
1894 * Please note that on Windows Phone, Microsoft does not provide standard UI
1895 * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
1896 * will not get used on that platform. Network-enabled phone apps should display
1897 * their privacy policy through some other, in-app means.
1898 */
1899 #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
1900
1901 /**
1902 * \brief Mark X11 windows as override-redirect.
1903 *
1904 * If set, this _might_ increase framerate at the expense of the desktop
1905 * not working as expected. Override-redirect windows aren't noticed by the
1906 * window manager at all.
1907 *
1908 * You should probably only use this for fullscreen windows, and you probably
1909 * shouldn't even use it for that. But it's here if you want to try!
1910 */
1911 #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
1912
1913 /**
1914 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
1915 *
1916 * The variable can be set to the following values:
1917 * "0" - Disable XInput detection (only uses direct input)
1918 * "1" - Enable XInput detection (the default)
1919 */
1920 #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
1921
1922 /**
1923 * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
1924 *
1925 * This hint is for backwards compatibility only and will be removed in SDL 2.1
1926 *
1927 * The default value is "0". This hint must be set before SDL_Init()
1928 */
1929 #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
1930
1931 /**
1932 * \brief A variable that causes SDL to not ignore audio "monitors"
1933 *
1934 * This is currently only used for PulseAudio and ignored elsewhere.
1935 *
1936 * By default, SDL ignores audio devices that aren't associated with physical
1937 * hardware. Changing this hint to "1" will expose anything SDL sees that
1938 * appears to be an audio source or sink. This will add "devices" to the list
1939 * that the user probably doesn't want or need, but it can be useful in
1940 * scenarios where you want to hook up SDL to some sort of virtual device,
1941 * etc.
1942 *
1943 * The default value is "0". This hint must be set before SDL_Init().
1944 *
1945 * This hint is available since SDL 2.0.16. Before then, virtual devices are
1946 * always ignored.
1947 */
1948 #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
1949
1950 /**
1951 * \brief A variable that forces X11 windows to create as a custom type.
1952 *
1953 * This is currently only used for X11 and ignored elsewhere.
1954 *
1955 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
1956 * to report to the window manager the type of window it wants to create.
1957 * This might be set to various things if SDL_WINDOW_TOOLTIP or
1958 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
1959 * haven't set a specific type, this hint can be used to specify a custom
1960 * type. For example, a dock window might set this to
1961 * "_NET_WM_WINDOW_TYPE_DOCK".
1962 *
1963 * If not set or set to "", this hint is ignored. This hint must be set
1964 * before the SDL_CreateWindow() call that it is intended to affect.
1965 *
1966 * This hint is available since SDL 2.0.22.
1967 */
1968 #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
1969
1970 /**
1971 * \brief A variable that decides whether to send SDL_QUIT when closing the final window.
1972 *
1973 * By default, SDL sends an SDL_QUIT event when there is only one window
1974 * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
1975 * apps would also take the loss of this window as a signal to terminate the
1976 * program.
1977 *
1978 * However, it's not unreasonable in some cases to have the program continue
1979 * to live on, perhaps to create new windows later.
1980 *
1981 * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
1982 * when the final window is requesting to close. Note that in this case,
1983 * there are still other legitimate reasons one might get an SDL_QUIT
1984 * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
1985 * on Unix, etc.
1986 *
1987 * The default value is "1". This hint can be changed at any time.
1988 *
1989 * This hint is available since SDL 2.0.22. Before then, you always get
1990 * an SDL_QUIT event when closing the final window.
1991 */
1992 #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
1993
1994
1995 /**
1996 * \brief A variable that decides what video backend to use.
1997 *
1998 * By default, SDL will try all available video backends in a reasonable
1999 * order until it finds one that can work, but this hint allows the app
2000 * or user to force a specific target, such as "x11" if, say, you are
2001 * on Wayland but want to try talking to the X server instead.
2002 *
2003 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2004 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2005 * it was upgraded to a full SDL hint, so you can set the environment
2006 * variable as usual or programatically set the hint with SDL_SetHint,
2007 * which won't propagate to child processes.
2008 *
2009 * The default value is unset, in which case SDL will try to figure out
2010 * the best video backend on your behalf. This hint needs to be set
2011 * before SDL_Init() is called to be useful.
2012 *
2013 * This hint is available since SDL 2.0.22. Before then, you could set
2014 * the environment variable to get the same effect.
2015 */
2016 #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
2017
2018 /**
2019 * \brief A variable that decides what audio backend to use.
2020 *
2021 * By default, SDL will try all available audio backends in a reasonable
2022 * order until it finds one that can work, but this hint allows the app
2023 * or user to force a specific target, such as "alsa" if, say, you are
2024 * on PulseAudio but want to try talking to the lower level instead.
2025 *
2026 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2027 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2028 * it was upgraded to a full SDL hint, so you can set the environment
2029 * variable as usual or programatically set the hint with SDL_SetHint,
2030 * which won't propagate to child processes.
2031 *
2032 * The default value is unset, in which case SDL will try to figure out
2033 * the best audio backend on your behalf. This hint needs to be set
2034 * before SDL_Init() is called to be useful.
2035 *
2036 * This hint is available since SDL 2.0.22. Before then, you could set
2037 * the environment variable to get the same effect.
2038 */
2039 #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
2040
2041
2042 /**
2043 * \brief An enumeration of hint priorities
2044 */
2045 typedef enum
2046 {
2047 SDL_HINT_DEFAULT,
2048 SDL_HINT_NORMAL,
2049 SDL_HINT_OVERRIDE
2050 } SDL_HintPriority;
2051
2052
2053 /**
2054 * Set a hint with a specific priority.
2055 *
2056 * The priority controls the behavior when setting a hint that already has a
2057 * value. Hints will replace existing hints of their priority and lower.
2058 * Environment variables are considered to have override priority.
2059 *
2060 * \param name the hint to set
2061 * \param value the value of the hint variable
2062 * \param priority the SDL_HintPriority level for the hint
2063 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2064 *
2065 * \since This function is available since SDL 2.0.0.
2066 *
2067 * \sa SDL_GetHint
2068 * \sa SDL_SetHint
2069 */
2070 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
2071 const char *value,
2072 SDL_HintPriority priority);
2073
2074 /**
2075 * Set a hint with normal priority.
2076 *
2077 * Hints will not be set if there is an existing override hint or environment
2078 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
2079 * set the hint with override priority instead.
2080 *
2081 * \param name the hint to set
2082 * \param value the value of the hint variable
2083 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2084 *
2085 * \since This function is available since SDL 2.0.0.
2086 *
2087 * \sa SDL_GetHint
2088 * \sa SDL_SetHintWithPriority
2089 */
2090 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
2091 const char *value);
2092
2093 /**
2094 * Get the value of a hint.
2095 *
2096 * \param name the hint to query
2097 * \returns the string value of a hint or NULL if the hint isn't set.
2098 *
2099 * \since This function is available since SDL 2.0.0.
2100 *
2101 * \sa SDL_SetHint
2102 * \sa SDL_SetHintWithPriority
2103 */
2104 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
2105
2106 /**
2107 * Get the boolean value of a hint variable.
2108 *
2109 * \param name the name of the hint to get the boolean value from
2110 * \param default_value the value to return if the hint does not exist
2111 * \returns the boolean value of a hint or the provided default value if the
2112 * hint does not exist.
2113 *
2114 * \since This function is available since SDL 2.0.5.
2115 *
2116 * \sa SDL_GetHint
2117 * \sa SDL_SetHint
2118 */
2119 extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
2120
2121 /**
2122 * Type definition of the hint callback function.
2123 *
2124 * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
2125 * \param name what was passed as `name` to SDL_AddHintCallback()
2126 * \param oldValue the previous hint value
2127 * \param newValue the new value hint is to be set to
2128 */
2129 typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
2130
2131 /**
2132 * Add a function to watch a particular hint.
2133 *
2134 * \param name the hint to watch
2135 * \param callback An SDL_HintCallback function that will be called when the
2136 * hint value changes
2137 * \param userdata a pointer to pass to the callback function
2138 *
2139 * \since This function is available since SDL 2.0.0.
2140 *
2141 * \sa SDL_DelHintCallback
2142 */
2143 extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
2144 SDL_HintCallback callback,
2145 void *userdata);
2146
2147 /**
2148 * Remove a function watching a particular hint.
2149 *
2150 * \param name the hint being watched
2151 * \param callback An SDL_HintCallback function that will be called when the
2152 * hint value changes
2153 * \param userdata a pointer being passed to the callback function
2154 *
2155 * \since This function is available since SDL 2.0.0.
2156 *
2157 * \sa SDL_AddHintCallback
2158 */
2159 extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
2160 SDL_HintCallback callback,
2161 void *userdata);
2162
2163 /**
2164 * Clear all hints.
2165 *
2166 * This function is automatically called during SDL_Quit().
2167 *
2168 * \since This function is available since SDL 2.0.0.
2169 */
2170 extern DECLSPEC void SDLCALL SDL_ClearHints(void);
2171
2172
2173 /* Ends C function definitions when using C++ */
2174 #ifdef __cplusplus
2175 }
2176 #endif
2177 #include <SDL2/close_code.h>
2178
2179 #endif /* SDL_hints_h_ */
2180
2181 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_joystick.h
23 *
24 * Include file for SDL joystick event handling
25 *
26 * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
27 * behind a device_index changing as joysticks are plugged and unplugged.
28 *
29 * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
30 * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
31 *
32 * The term "player_index" is the number assigned to a player on a specific
33 * controller. For XInput controllers this returns the XInput user index.
34 * Many joysticks will not be able to supply this information.
35 *
36 * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
37 * the device (a X360 wired controller for example). This identifier is platform dependent.
38 */
39
40 #ifndef SDL_joystick_h_
41 #define SDL_joystick_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * \file SDL_joystick.h
54 *
55 * In order to use these functions, SDL_Init() must have been called
56 * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
57 * for joysticks, and load appropriate drivers.
58 *
59 * If you would like to receive joystick updates while the application
60 * is in the background, you should set the following hint before calling
61 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
62 */
63
64 /**
65 * The joystick structure used to identify an SDL joystick
66 */
67 struct _SDL_Joystick;
68 typedef struct _SDL_Joystick SDL_Joystick;
69
70 /* A structure that encodes the stable unique id for a joystick device */
71 typedef struct {
72 Uint8 data[16];
73 } SDL_JoystickGUID;
74
75 /**
76 * This is a unique ID for a joystick for the time it is connected to the system,
77 * and is never reused for the lifetime of the application. If the joystick is
78 * disconnected and reconnected, it will get a new ID.
79 *
80 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
81 */
82 typedef Sint32 SDL_JoystickID;
83
84 typedef enum
85 {
86 SDL_JOYSTICK_TYPE_UNKNOWN,
87 SDL_JOYSTICK_TYPE_GAMECONTROLLER,
88 SDL_JOYSTICK_TYPE_WHEEL,
89 SDL_JOYSTICK_TYPE_ARCADE_STICK,
90 SDL_JOYSTICK_TYPE_FLIGHT_STICK,
91 SDL_JOYSTICK_TYPE_DANCE_PAD,
92 SDL_JOYSTICK_TYPE_GUITAR,
93 SDL_JOYSTICK_TYPE_DRUM_KIT,
94 SDL_JOYSTICK_TYPE_ARCADE_PAD,
95 SDL_JOYSTICK_TYPE_THROTTLE
96 } SDL_JoystickType;
97
98 typedef enum
99 {
100 SDL_JOYSTICK_POWER_UNKNOWN = -1,
101 SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
102 SDL_JOYSTICK_POWER_LOW, /* <= 20% */
103 SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
104 SDL_JOYSTICK_POWER_FULL, /* <= 100% */
105 SDL_JOYSTICK_POWER_WIRED,
106 SDL_JOYSTICK_POWER_MAX
107 } SDL_JoystickPowerLevel;
108
109 /* Set max recognized G-force from accelerometer
110 See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
111 */
112 #define SDL_IPHONE_MAX_GFORCE 5.0
113
114
115 /* Function prototypes */
116
117 /**
118 * Locking for multi-threaded access to the joystick API
119 *
120 * If you are using the joystick API or handling events from multiple threads
121 * you should use these locking functions to protect access to the joysticks.
122 *
123 * In particular, you are guaranteed that the joystick list won't change, so
124 * the API functions that take a joystick index will be valid, and joystick
125 * and game controller events will not be delivered.
126 *
127 * \since This function is available since SDL 2.0.7.
128 */
129 extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
130
131
132 /**
133 * Unlocking for multi-threaded access to the joystick API
134 *
135 * If you are using the joystick API or handling events from multiple threads
136 * you should use these locking functions to protect access to the joysticks.
137 *
138 * In particular, you are guaranteed that the joystick list won't change, so
139 * the API functions that take a joystick index will be valid, and joystick
140 * and game controller events will not be delivered.
141 *
142 * \since This function is available since SDL 2.0.7.
143 */
144 extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
145
146 /**
147 * Count the number of joysticks attached to the system.
148 *
149 * \returns the number of attached joysticks on success or a negative error
150 * code on failure; call SDL_GetError() for more information.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_JoystickName
155 * \sa SDL_JoystickOpen
156 */
157 extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
158
159 /**
160 * Get the implementation dependent name of a joystick.
161 *
162 * This can be called before any joysticks are opened.
163 *
164 * \param device_index the index of the joystick to query (the N'th joystick
165 * on the system)
166 * \returns the name of the selected joystick. If no name can be found, this
167 * function returns NULL; call SDL_GetError() for more information.
168 *
169 * \since This function is available since SDL 2.0.0.
170 *
171 * \sa SDL_JoystickName
172 * \sa SDL_JoystickOpen
173 */
174 extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
175
176 /**
177 * Get the player index of a joystick, or -1 if it's not available This can be
178 * called before any joysticks are opened.
179 *
180 * \since This function is available since SDL 2.0.9.
181 */
182 extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
183
184 /**
185 * Get the implementation-dependent GUID for the joystick at a given device
186 * index.
187 *
188 * This function can be called before any joysticks are opened.
189 *
190 * \param device_index the index of the joystick to query (the N'th joystick
191 * on the system
192 * \returns the GUID of the selected joystick. If called on an invalid index,
193 * this function returns a zero GUID
194 *
195 * \since This function is available since SDL 2.0.0.
196 *
197 * \sa SDL_JoystickGetGUID
198 * \sa SDL_JoystickGetGUIDString
199 */
200 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
201
202 /**
203 * Get the USB vendor ID of a joystick, if available.
204 *
205 * This can be called before any joysticks are opened. If the vendor ID isn't
206 * available this function returns 0.
207 *
208 * \param device_index the index of the joystick to query (the N'th joystick
209 * on the system
210 * \returns the USB vendor ID of the selected joystick. If called on an
211 * invalid index, this function returns zero
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
216
217 /**
218 * Get the USB product ID of a joystick, if available.
219 *
220 * This can be called before any joysticks are opened. If the product ID isn't
221 * available this function returns 0.
222 *
223 * \param device_index the index of the joystick to query (the N'th joystick
224 * on the system
225 * \returns the USB product ID of the selected joystick. If called on an
226 * invalid index, this function returns zero
227 *
228 * \since This function is available since SDL 2.0.6.
229 */
230 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
231
232 /**
233 * Get the product version of a joystick, if available.
234 *
235 * This can be called before any joysticks are opened. If the product version
236 * isn't available this function returns 0.
237 *
238 * \param device_index the index of the joystick to query (the N'th joystick
239 * on the system
240 * \returns the product version of the selected joystick. If called on an
241 * invalid index, this function returns zero
242 *
243 * \since This function is available since SDL 2.0.6.
244 */
245 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
246
247 /**
248 * Get the type of a joystick, if available.
249 *
250 * This can be called before any joysticks are opened.
251 *
252 * \param device_index the index of the joystick to query (the N'th joystick
253 * on the system
254 * \returns the SDL_JoystickType of the selected joystick. If called on an
255 * invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
256 *
257 * \since This function is available since SDL 2.0.6.
258 */
259 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
260
261 /**
262 * Get the instance ID of a joystick.
263 *
264 * This can be called before any joysticks are opened. If the index is out of
265 * range, this function will return -1.
266 *
267 * \param device_index the index of the joystick to query (the N'th joystick
268 * on the system
269 * \returns the instance id of the selected joystick. If called on an invalid
270 * index, this function returns zero
271 *
272 * \since This function is available since SDL 2.0.6.
273 */
274 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
275
276 /**
277 * Open a joystick for use.
278 *
279 * The `device_index` argument refers to the N'th joystick presently
280 * recognized by SDL on the system. It is **NOT** the same as the instance ID
281 * used to identify the joystick in future events. See
282 * SDL_JoystickInstanceID() for more details about instance IDs.
283 *
284 * The joystick subsystem must be initialized before a joystick can be opened
285 * for use.
286 *
287 * \param device_index the index of the joystick to query
288 * \returns a joystick identifier or NULL if an error occurred; call
289 * SDL_GetError() for more information.
290 *
291 * \since This function is available since SDL 2.0.0.
292 *
293 * \sa SDL_JoystickClose
294 * \sa SDL_JoystickInstanceID
295 */
296 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
297
298 /**
299 * Get the SDL_Joystick associated with an instance id.
300 *
301 * \param instance_id the instance id to get the SDL_Joystick for
302 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
303 * for more information.
304 *
305 * \since This function is available since SDL 2.0.4.
306 */
307 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
308
309 /**
310 * Get the SDL_Joystick associated with a player index.
311 *
312 * \param player_index the player index to get the SDL_Joystick for
313 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
314 * for more information.
315 *
316 * \since This function is available since SDL 2.0.12.
317 */
318 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
319
320 /**
321 * Attach a new virtual joystick.
322 *
323 * \returns the joystick's device index, or -1 if an error occurred.
324 *
325 * \since This function is available since SDL 2.0.14.
326 */
327 extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
328 int naxes,
329 int nbuttons,
330 int nhats);
331
332 /**
333 * Detach a virtual joystick.
334 *
335 * \param device_index a value previously returned from
336 * SDL_JoystickAttachVirtual()
337 * \returns 0 on success, or -1 if an error occurred.
338 *
339 * \since This function is available since SDL 2.0.14.
340 */
341 extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
342
343 /**
344 * Query whether or not the joystick at a given device index is virtual.
345 *
346 * \param device_index a joystick device index.
347 * \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
348 *
349 * \since This function is available since SDL 2.0.14.
350 */
351 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
352
353 /**
354 * Set values on an opened, virtual-joystick's axis.
355 *
356 * Please note that values set here will not be applied until the next call to
357 * SDL_JoystickUpdate, which can either be called directly, or can be called
358 * indirectly through various other SDL APIs, including, but not limited to
359 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
360 * SDL_WaitEvent.
361 *
362 * \param joystick the virtual joystick on which to set state.
363 * \param axis the specific axis on the virtual joystick to set.
364 * \param value the new value for the specified axis.
365 * \returns 0 on success, -1 on error.
366 *
367 * \since This function is available since SDL 2.0.14.
368 */
369 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
370
371 /**
372 * Set values on an opened, virtual-joystick's button.
373 *
374 * Please note that values set here will not be applied until the next call to
375 * SDL_JoystickUpdate, which can either be called directly, or can be called
376 * indirectly through various other SDL APIs, including, but not limited to
377 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
378 * SDL_WaitEvent.
379 *
380 * \param joystick the virtual joystick on which to set state.
381 * \param button the specific button on the virtual joystick to set.
382 * \param value the new value for the specified button.
383 * \returns 0 on success, -1 on error.
384 *
385 * \since This function is available since SDL 2.0.14.
386 */
387 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
388
389 /**
390 * Set values on an opened, virtual-joystick's hat.
391 *
392 * Please note that values set here will not be applied until the next call to
393 * SDL_JoystickUpdate, which can either be called directly, or can be called
394 * indirectly through various other SDL APIs, including, but not limited to
395 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
396 * SDL_WaitEvent.
397 *
398 * \param joystick the virtual joystick on which to set state.
399 * \param hat the specific hat on the virtual joystick to set.
400 * \param value the new value for the specified hat.
401 * \returns 0 on success, -1 on error.
402 *
403 * \since This function is available since SDL 2.0.14.
404 */
405 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
406
407 /**
408 * Get the implementation dependent name of a joystick.
409 *
410 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
411 * \returns the name of the selected joystick. If no name can be found, this
412 * function returns NULL; call SDL_GetError() for more information.
413 *
414 * \since This function is available since SDL 2.0.0.
415 *
416 * \sa SDL_JoystickNameForIndex
417 * \sa SDL_JoystickOpen
418 */
419 extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
420
421 /**
422 * Get the player index of an opened joystick.
423 *
424 * For XInput controllers this returns the XInput user index. Many joysticks
425 * will not be able to supply this information.
426 *
427 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
428 * \returns the player index, or -1 if it's not available.
429 *
430 * \since This function is available since SDL 2.0.9.
431 */
432 extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
433
434 /**
435 * Set the player index of an opened joystick.
436 *
437 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
438 * \param player_index the player index to set.
439 *
440 * \since This function is available since SDL 2.0.12.
441 */
442 extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
443
444 /**
445 * Get the implementation-dependent GUID for the joystick.
446 *
447 * This function requires an open joystick.
448 *
449 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
450 * \returns the GUID of the given joystick. If called on an invalid index,
451 * this function returns a zero GUID; call SDL_GetError() for more
452 * information.
453 *
454 * \since This function is available since SDL 2.0.0.
455 *
456 * \sa SDL_JoystickGetDeviceGUID
457 * \sa SDL_JoystickGetGUIDString
458 */
459 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
460
461 /**
462 * Get the USB vendor ID of an opened joystick, if available.
463 *
464 * If the vendor ID isn't available this function returns 0.
465 *
466 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
467 * \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
468 *
469 * \since This function is available since SDL 2.0.6.
470 */
471 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
472
473 /**
474 * Get the USB product ID of an opened joystick, if available.
475 *
476 * If the product ID isn't available this function returns 0.
477 *
478 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
479 * \returns the USB product ID of the selected joystick, or 0 if unavailable.
480 *
481 * \since This function is available since SDL 2.0.6.
482 */
483 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
484
485 /**
486 * Get the product version of an opened joystick, if available.
487 *
488 * If the product version isn't available this function returns 0.
489 *
490 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
491 * \returns the product version of the selected joystick, or 0 if unavailable.
492 *
493 * \since This function is available since SDL 2.0.6.
494 */
495 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
496
497 /**
498 * Get the serial number of an opened joystick, if available.
499 *
500 * Returns the serial number of the joystick, or NULL if it is not available.
501 *
502 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
503 * \returns the serial number of the selected joystick, or NULL if
504 * unavailable.
505 *
506 * \since This function is available since SDL 2.0.14.
507 */
508 extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
509
510 /**
511 * Get the type of an opened joystick.
512 *
513 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
514 * \returns the SDL_JoystickType of the selected joystick.
515 *
516 * \since This function is available since SDL 2.0.6.
517 */
518 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
519
520 /**
521 * Get an ASCII string representation for a given SDL_JoystickGUID.
522 *
523 * You should supply at least 33 bytes for pszGUID.
524 *
525 * \param guid the SDL_JoystickGUID you wish to convert to string
526 * \param pszGUID buffer in which to write the ASCII string
527 * \param cbGUID the size of pszGUID
528 *
529 * \since This function is available since SDL 2.0.0.
530 *
531 * \sa SDL_JoystickGetDeviceGUID
532 * \sa SDL_JoystickGetGUID
533 * \sa SDL_JoystickGetGUIDFromString
534 */
535 extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
536
537 /**
538 * Convert a GUID string into a SDL_JoystickGUID structure.
539 *
540 * Performs no error checking. If this function is given a string containing
541 * an invalid GUID, the function will silently succeed, but the GUID generated
542 * will not be useful.
543 *
544 * \param pchGUID string containing an ASCII representation of a GUID
545 * \returns a SDL_JoystickGUID structure.
546 *
547 * \since This function is available since SDL 2.0.0.
548 *
549 * \sa SDL_JoystickGetGUIDString
550 */
551 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
552
553 /**
554 * Get the status of a specified joystick.
555 *
556 * \param joystick the joystick to query
557 * \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
558 * call SDL_GetError() for more information.
559 *
560 * \since This function is available since SDL 2.0.0.
561 *
562 * \sa SDL_JoystickClose
563 * \sa SDL_JoystickOpen
564 */
565 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
566
567 /**
568 * Get the instance ID of an opened joystick.
569 *
570 * \param joystick an SDL_Joystick structure containing joystick information
571 * \returns the instance ID of the specified joystick on success or a negative
572 * error code on failure; call SDL_GetError() for more information.
573 *
574 * \since This function is available since SDL 2.0.0.
575 *
576 * \sa SDL_JoystickOpen
577 */
578 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
579
580 /**
581 * Get the number of general axis controls on a joystick.
582 *
583 * Often, the directional pad on a game controller will either look like 4
584 * separate buttons or a POV hat, and not axes, but all of this is up to the
585 * device and platform.
586 *
587 * \param joystick an SDL_Joystick structure containing joystick information
588 * \returns the number of axis controls/number of axes on success or a
589 * negative error code on failure; call SDL_GetError() for more
590 * information.
591 *
592 * \since This function is available since SDL 2.0.0.
593 *
594 * \sa SDL_JoystickGetAxis
595 * \sa SDL_JoystickOpen
596 */
597 extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
598
599 /**
600 * Get the number of trackballs on a joystick.
601 *
602 * Joystick trackballs have only relative motion events associated with them
603 * and their state cannot be polled.
604 *
605 * Most joysticks do not have trackballs.
606 *
607 * \param joystick an SDL_Joystick structure containing joystick information
608 * \returns the number of trackballs on success or a negative error code on
609 * failure; call SDL_GetError() for more information.
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_JoystickGetBall
614 */
615 extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
616
617 /**
618 * Get the number of POV hats on a joystick.
619 *
620 * \param joystick an SDL_Joystick structure containing joystick information
621 * \returns the number of POV hats on success or a negative error code on
622 * failure; call SDL_GetError() for more information.
623 *
624 * \since This function is available since SDL 2.0.0.
625 *
626 * \sa SDL_JoystickGetHat
627 * \sa SDL_JoystickOpen
628 */
629 extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
630
631 /**
632 * Get the number of buttons on a joystick.
633 *
634 * \param joystick an SDL_Joystick structure containing joystick information
635 * \returns the number of buttons on success or a negative error code on
636 * failure; call SDL_GetError() for more information.
637 *
638 * \since This function is available since SDL 2.0.0.
639 *
640 * \sa SDL_JoystickGetButton
641 * \sa SDL_JoystickOpen
642 */
643 extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
644
645 /**
646 * Update the current state of the open joysticks.
647 *
648 * This is called automatically by the event loop if any joystick events are
649 * enabled.
650 *
651 * \since This function is available since SDL 2.0.0.
652 *
653 * \sa SDL_JoystickEventState
654 */
655 extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
656
657 /**
658 * Enable/disable joystick event polling.
659 *
660 * If joystick events are disabled, you must call SDL_JoystickUpdate()
661 * yourself and manually check the state of the joystick when you want
662 * joystick information.
663 *
664 * It is recommended that you leave joystick event handling enabled.
665 *
666 * **WARNING**: Calling this function may delete all events currently in SDL's
667 * event queue.
668 *
669 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
670 * \returns 1 if enabled, 0 if disabled, or a negative error code on failure;
671 * call SDL_GetError() for more information.
672 *
673 * If `state` is `SDL_QUERY` then the current state is returned,
674 * otherwise the new processing state is returned.
675 *
676 * \since This function is available since SDL 2.0.0.
677 *
678 * \sa SDL_GameControllerEventState
679 */
680 extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
681
682 #define SDL_JOYSTICK_AXIS_MAX 32767
683 #define SDL_JOYSTICK_AXIS_MIN -32768
684
685 /**
686 * Get the current state of an axis control on a joystick.
687 *
688 * SDL makes no promises about what part of the joystick any given axis refers
689 * to. Your game should have some sort of configuration UI to let users
690 * specify what each axis should be bound to. Alternately, SDL's higher-level
691 * Game Controller API makes a great effort to apply order to this lower-level
692 * interface, so you know that a specific axis is the "left thumb stick," etc.
693 *
694 * The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
695 * 32767) representing the current position of the axis. It may be necessary
696 * to impose certain tolerances on these values to account for jitter.
697 *
698 * \param joystick an SDL_Joystick structure containing joystick information
699 * \param axis the axis to query; the axis indices start at index 0
700 * \returns a 16-bit signed integer representing the current position of the
701 * axis or 0 on failure; call SDL_GetError() for more information.
702 *
703 * \since This function is available since SDL 2.0.0.
704 *
705 * \sa SDL_JoystickNumAxes
706 */
707 extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
708 int axis);
709
710 /**
711 * Get the initial state of an axis control on a joystick.
712 *
713 * The state is a value ranging from -32768 to 32767.
714 *
715 * The axis indices start at index 0.
716 *
717 * \param joystick an SDL_Joystick structure containing joystick information
718 * \param axis the axis to query; the axis indices start at index 0
719 * \param state Upon return, the initial value is supplied here.
720 * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
721 *
722 * \since This function is available since SDL 2.0.6.
723 */
724 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
725 int axis, Sint16 *state);
726
727 /**
728 * \name Hat positions
729 */
730 /* @{ */
731 #define SDL_HAT_CENTERED 0x00
732 #define SDL_HAT_UP 0x01
733 #define SDL_HAT_RIGHT 0x02
734 #define SDL_HAT_DOWN 0x04
735 #define SDL_HAT_LEFT 0x08
736 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
737 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
738 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
739 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
740 /* @} */
741
742 /**
743 * Get the current state of a POV hat on a joystick.
744 *
745 * The returned value will be one of the following positions:
746 *
747 * - `SDL_HAT_CENTERED`
748 * - `SDL_HAT_UP`
749 * - `SDL_HAT_RIGHT`
750 * - `SDL_HAT_DOWN`
751 * - `SDL_HAT_LEFT`
752 * - `SDL_HAT_RIGHTUP`
753 * - `SDL_HAT_RIGHTDOWN`
754 * - `SDL_HAT_LEFTUP`
755 * - `SDL_HAT_LEFTDOWN`
756 *
757 * \param joystick an SDL_Joystick structure containing joystick information
758 * \param hat the hat index to get the state from; indices start at index 0
759 * \returns the current hat position.
760 *
761 * \since This function is available since SDL 2.0.0.
762 *
763 * \sa SDL_JoystickNumHats
764 */
765 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
766 int hat);
767
768 /**
769 * Get the ball axis change since the last poll.
770 *
771 * Trackballs can only return relative motion since the last call to
772 * SDL_JoystickGetBall(), these motion deltas are placed into `dx` and `dy`.
773 *
774 * Most joysticks do not have trackballs.
775 *
776 * \param joystick the SDL_Joystick to query
777 * \param ball the ball index to query; ball indices start at index 0
778 * \param dx stores the difference in the x axis position since the last poll
779 * \param dy stores the difference in the y axis position since the last poll
780 * \returns 0 on success or a negative error code on failure; call
781 * SDL_GetError() for more information.
782 *
783 * \since This function is available since SDL 2.0.0.
784 *
785 * \sa SDL_JoystickNumBalls
786 */
787 extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
788 int ball, int *dx, int *dy);
789
790 /**
791 * Get the current state of a button on a joystick.
792 *
793 * \param joystick an SDL_Joystick structure containing joystick information
794 * \param button the button index to get the state from; indices start at
795 * index 0
796 * \returns 1 if the specified button is pressed, 0 otherwise.
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_JoystickNumButtons
801 */
802 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
803 int button);
804
805 /**
806 * Start a rumble effect.
807 *
808 * Each call to this function cancels any previous rumble effect, and calling
809 * it with 0 intensity stops any rumbling.
810 *
811 * \param joystick The joystick to vibrate
812 * \param low_frequency_rumble The intensity of the low frequency (left)
813 * rumble motor, from 0 to 0xFFFF
814 * \param high_frequency_rumble The intensity of the high frequency (right)
815 * rumble motor, from 0 to 0xFFFF
816 * \param duration_ms The duration of the rumble effect, in milliseconds
817 * \returns 0, or -1 if rumble isn't supported on this joystick
818 *
819 * \since This function is available since SDL 2.0.9.
820 *
821 * \sa SDL_JoystickHasRumble
822 */
823 extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
824
825 /**
826 * Start a rumble effect in the joystick's triggers
827 *
828 * Each call to this function cancels any previous trigger rumble effect, and
829 * calling it with 0 intensity stops any rumbling.
830 *
831 * Note that this is rumbling of the _triggers_ and not the game controller as
832 * a whole. This is currently only supported on Xbox One controllers. If you
833 * want the (more common) whole-controller rumble, use SDL_JoystickRumble()
834 * instead.
835 *
836 * \param joystick The joystick to vibrate
837 * \param left_rumble The intensity of the left trigger rumble motor, from 0
838 * to 0xFFFF
839 * \param right_rumble The intensity of the right trigger rumble motor, from 0
840 * to 0xFFFF
841 * \param duration_ms The duration of the rumble effect, in milliseconds
842 * \returns 0, or -1 if trigger rumble isn't supported on this joystick
843 *
844 * \since This function is available since SDL 2.0.14.
845 *
846 * \sa SDL_JoystickHasRumbleTriggers
847 */
848 extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
849
850 /**
851 * Query whether a joystick has an LED.
852 *
853 * An example of a joystick LED is the light on the back of a PlayStation 4's
854 * DualShock 4 controller.
855 *
856 * \param joystick The joystick to query
857 * \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
858 *
859 * \since This function is available since SDL 2.0.14.
860 */
861 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
862
863 /**
864 * Query whether a joystick has rumble support.
865 *
866 * \param joystick The joystick to query
867 * \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
868 *
869 * \since This function is available since SDL 2.0.18.
870 *
871 * \sa SDL_JoystickRumble
872 */
873 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
874
875 /**
876 * Query whether a joystick has rumble support on triggers.
877 *
878 * \param joystick The joystick to query
879 * \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
880 *
881 * \since This function is available since SDL 2.0.18.
882 *
883 * \sa SDL_JoystickRumbleTriggers
884 */
885 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
886
887 /**
888 * Update a joystick's LED color.
889 *
890 * An example of a joystick LED is the light on the back of a PlayStation 4's
891 * DualShock 4 controller.
892 *
893 * \param joystick The joystick to update
894 * \param red The intensity of the red LED
895 * \param green The intensity of the green LED
896 * \param blue The intensity of the blue LED
897 * \returns 0 on success, -1 if this joystick does not have a modifiable LED
898 *
899 * \since This function is available since SDL 2.0.14.
900 */
901 extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
902
903 /**
904 * Send a joystick specific effect packet
905 *
906 * \param joystick The joystick to affect
907 * \param data The data to send to the joystick
908 * \param size The size of the data to send to the joystick
909 * \returns 0, or -1 if this joystick or driver doesn't support effect packets
910 *
911 * \since This function is available since SDL 2.0.16.
912 */
913 extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
914
915 /**
916 * Close a joystick previously opened with SDL_JoystickOpen().
917 *
918 * \param joystick The joystick device to close
919 *
920 * \since This function is available since SDL 2.0.0.
921 *
922 * \sa SDL_JoystickOpen
923 */
924 extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
925
926 /**
927 * Get the battery level of a joystick as SDL_JoystickPowerLevel.
928 *
929 * \param joystick the SDL_Joystick to query
930 * \returns the current battery level as SDL_JoystickPowerLevel on success or
931 * `SDL_JOYSTICK_POWER_UNKNOWN` if it is unknown
932 *
933 * \since This function is available since SDL 2.0.4.
934 */
935 extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
936
937 /* Ends C function definitions when using C++ */
938 #ifdef __cplusplus
939 }
940 #endif
941 #include <SDL2/close_code.h>
942
943 #endif /* SDL_joystick_h_ */
944
945 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keyboard.h
23 *
24 * Include file for SDL keyboard event handling
25 */
26
27 #ifndef SDL_keyboard_h_
28 #define SDL_keyboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_keycode.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The SDL keysym structure, used in key events.
43 *
44 * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
45 */
46 typedef struct SDL_Keysym
47 {
48 SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */
49 SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */
50 Uint16 mod; /**< current key modifiers */
51 Uint32 unused;
52 } SDL_Keysym;
53
54 /* Function prototypes */
55
56 /**
57 * Query the window which currently has keyboard focus.
58 *
59 * \returns the window with keyboard focus.
60 *
61 * \since This function is available since SDL 2.0.0.
62 */
63 extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
64
65 /**
66 * Get a snapshot of the current state of the keyboard.
67 *
68 * The pointer returned is a pointer to an internal SDL array. It will be
69 * valid for the whole lifetime of the application and should not be freed by
70 * the caller.
71 *
72 * A array element with a value of 1 means that the key is pressed and a value
73 * of 0 means that it is not. Indexes into this array are obtained by using
74 * SDL_Scancode values.
75 *
76 * Use SDL_PumpEvents() to update the state array.
77 *
78 * This function gives you the current state after all events have been
79 * processed, so if a key or button has been pressed and released before you
80 * process events, then the pressed state will never show up in the
81 * SDL_GetKeyboardState() calls.
82 *
83 * Note: This function doesn't take into account whether shift has been
84 * pressed or not.
85 *
86 * \param numkeys if non-NULL, receives the length of the returned array
87 * \returns a pointer to an array of key states.
88 *
89 * \since This function is available since SDL 2.0.0.
90 *
91 * \sa SDL_PumpEvents
92 */
93 extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
94
95 /**
96 * Get the current key modifier state for the keyboard.
97 *
98 * \returns an OR'd combination of the modifier keys for the keyboard. See
99 * SDL_Keymod for details.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_GetKeyboardState
104 * \sa SDL_SetModState
105 */
106 extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
107
108 /**
109 * Set the current key modifier state for the keyboard.
110 *
111 * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
112 * modifier key states on your application. Simply pass your desired modifier
113 * states into `modstate`. This value may be a bitwise, OR'd combination of
114 * SDL_Keymod values.
115 *
116 * This does not change the keyboard state, only the key modifier flags that
117 * SDL reports.
118 *
119 * \param modstate the desired SDL_Keymod for the keyboard
120 *
121 * \since This function is available since SDL 2.0.0.
122 *
123 * \sa SDL_GetModState
124 */
125 extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
126
127 /**
128 * Get the key code corresponding to the given scancode according to the
129 * current keyboard layout.
130 *
131 * See SDL_Keycode for details.
132 *
133 * \param scancode the desired SDL_Scancode to query
134 * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
135 *
136 * \since This function is available since SDL 2.0.0.
137 *
138 * \sa SDL_GetKeyName
139 * \sa SDL_GetScancodeFromKey
140 */
141 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
142
143 /**
144 * Get the scancode corresponding to the given key code according to the
145 * current keyboard layout.
146 *
147 * See SDL_Scancode for details.
148 *
149 * \param key the desired SDL_Keycode to query
150 * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_GetKeyFromScancode
155 * \sa SDL_GetScancodeName
156 */
157 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
158
159 /**
160 * Get a human-readable name for a scancode.
161 *
162 * See SDL_Scancode for details.
163 *
164 * **Warning**: The returned name is by design not stable across platforms,
165 * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
166 * Windows" under Microsoft Windows, and some scancodes like
167 * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
168 * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
169 * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
170 * unsuitable for creating a stable cross-platform two-way mapping between
171 * strings and scancodes.
172 *
173 * \param scancode the desired SDL_Scancode to query
174 * \returns a pointer to the name for the scancode. If the scancode doesn't
175 * have a name this function returns an empty string ("").
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_GetScancodeFromKey
180 * \sa SDL_GetScancodeFromName
181 */
182 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
183
184 /**
185 * Get a scancode from a human-readable name.
186 *
187 * \param name the human-readable scancode name
188 * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
189 * recognized; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GetKeyFromName
194 * \sa SDL_GetScancodeFromKey
195 * \sa SDL_GetScancodeName
196 */
197 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
198
199 /**
200 * Get a human-readable name for a key.
201 *
202 * See SDL_Scancode and SDL_Keycode for details.
203 *
204 * \param key the desired SDL_Keycode to query
205 * \returns a pointer to a UTF-8 string that stays valid at least until the
206 * next call to this function. If you need it around any longer, you
207 * must copy it. If the key doesn't have a name, this function
208 * returns an empty string ("").
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_GetKeyFromName
213 * \sa SDL_GetKeyFromScancode
214 * \sa SDL_GetScancodeFromKey
215 */
216 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
217
218 /**
219 * Get a key code from a human-readable name.
220 *
221 * \param name the human-readable key name
222 * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
223 * SDL_GetError() for more information.
224 *
225 * \since This function is available since SDL 2.0.0.
226 *
227 * \sa SDL_GetKeyFromScancode
228 * \sa SDL_GetKeyName
229 * \sa SDL_GetScancodeFromName
230 */
231 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
232
233 /**
234 * Start accepting Unicode text input events.
235 *
236 * This function will start accepting Unicode text input events in the focused
237 * SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
238 * SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
239 * pair with SDL_StopTextInput().
240 *
241 * On some platforms using this function activates the screen keyboard.
242 *
243 * \since This function is available since SDL 2.0.0.
244 *
245 * \sa SDL_SetTextInputRect
246 * \sa SDL_StopTextInput
247 */
248 extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
249
250 /**
251 * Check whether or not Unicode text input events are enabled.
252 *
253 * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
254 *
255 * \since This function is available since SDL 2.0.0.
256 *
257 * \sa SDL_StartTextInput
258 */
259 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
260
261 /**
262 * Stop receiving any text input events.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_StartTextInput
267 */
268 extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
269
270 /**
271 * Dismiss the composition window/IME without disabling the subsystem.
272 *
273 * \since This function is available since SDL 2.0.22.
274 *
275 * \sa SDL_StartTextInput
276 * \sa SDL_StopTextInput
277 */
278 extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
279
280 /**
281 * Returns if an IME Composite or Candidate window is currently shown.
282 *
283 * \since This function is available since SDL 2.0.22.
284 */
285 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
286
287 /**
288 * Set the rectangle used to type Unicode text inputs.
289 *
290 * Note: If you want use system native IME window, try to set hint
291 * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
292 * any feedback.
293 *
294 * \param rect the SDL_Rect structure representing the rectangle to receive
295 * text (ignored if NULL)
296 *
297 * \since This function is available since SDL 2.0.0.
298 *
299 * \sa SDL_StartTextInput
300 */
301 extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
302
303 /**
304 * Check whether the platform has screen keyboard support.
305 *
306 * \returns SDL_TRUE if the platform has some screen keyboard support or
307 * SDL_FALSE if not.
308 *
309 * \since This function is available since SDL 2.0.0.
310 *
311 * \sa SDL_StartTextInput
312 * \sa SDL_IsScreenKeyboardShown
313 */
314 extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
315
316 /**
317 * Check whether the screen keyboard is shown for given window.
318 *
319 * \param window the window for which screen keyboard should be queried
320 * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
321 *
322 * \since This function is available since SDL 2.0.0.
323 *
324 * \sa SDL_HasScreenKeyboardSupport
325 */
326 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
327
328 /* Ends C function definitions when using C++ */
329 #ifdef __cplusplus
330 }
331 #endif
332 #include <SDL2/close_code.h>
333
334 #endif /* SDL_keyboard_h_ */
335
336 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keycode.h
23 *
24 * Defines constants which identify keyboard keys and modifiers.
25 */
26
27 #ifndef SDL_keycode_h_
28 #define SDL_keycode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_scancode.h>
32
33 /**
34 * \brief The SDL virtual key representation.
35 *
36 * Values of this type are used to represent keyboard keys using the current
37 * layout of the keyboard. These values include Unicode values representing
38 * the unmodified character that would be generated by pressing the key, or
39 * an SDLK_* constant for those keys that do not generate characters.
40 *
41 * A special exception is the number keys at the top of the keyboard which
42 * always map to SDLK_0...SDLK_9, regardless of layout.
43 */
44 typedef Sint32 SDL_Keycode;
45
46 #define SDLK_SCANCODE_MASK (1<<30)
47 #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
48
49 typedef enum
50 {
51 SDLK_UNKNOWN = 0,
52
53 SDLK_RETURN = '\r',
54 SDLK_ESCAPE = '\x1B',
55 SDLK_BACKSPACE = '\b',
56 SDLK_TAB = '\t',
57 SDLK_SPACE = ' ',
58 SDLK_EXCLAIM = '!',
59 SDLK_QUOTEDBL = '"',
60 SDLK_HASH = '#',
61 SDLK_PERCENT = '%',
62 SDLK_DOLLAR = '$',
63 SDLK_AMPERSAND = '&',
64 SDLK_QUOTE = '\'',
65 SDLK_LEFTPAREN = '(',
66 SDLK_RIGHTPAREN = ')',
67 SDLK_ASTERISK = '*',
68 SDLK_PLUS = '+',
69 SDLK_COMMA = ',',
70 SDLK_MINUS = '-',
71 SDLK_PERIOD = '.',
72 SDLK_SLASH = '/',
73 SDLK_0 = '0',
74 SDLK_1 = '1',
75 SDLK_2 = '2',
76 SDLK_3 = '3',
77 SDLK_4 = '4',
78 SDLK_5 = '5',
79 SDLK_6 = '6',
80 SDLK_7 = '7',
81 SDLK_8 = '8',
82 SDLK_9 = '9',
83 SDLK_COLON = ':',
84 SDLK_SEMICOLON = ';',
85 SDLK_LESS = '<',
86 SDLK_EQUALS = '=',
87 SDLK_GREATER = '>',
88 SDLK_QUESTION = '?',
89 SDLK_AT = '@',
90
91 /*
92 Skip uppercase letters
93 */
94
95 SDLK_LEFTBRACKET = '[',
96 SDLK_BACKSLASH = '\\',
97 SDLK_RIGHTBRACKET = ']',
98 SDLK_CARET = '^',
99 SDLK_UNDERSCORE = '_',
100 SDLK_BACKQUOTE = '`',
101 SDLK_a = 'a',
102 SDLK_b = 'b',
103 SDLK_c = 'c',
104 SDLK_d = 'd',
105 SDLK_e = 'e',
106 SDLK_f = 'f',
107 SDLK_g = 'g',
108 SDLK_h = 'h',
109 SDLK_i = 'i',
110 SDLK_j = 'j',
111 SDLK_k = 'k',
112 SDLK_l = 'l',
113 SDLK_m = 'm',
114 SDLK_n = 'n',
115 SDLK_o = 'o',
116 SDLK_p = 'p',
117 SDLK_q = 'q',
118 SDLK_r = 'r',
119 SDLK_s = 's',
120 SDLK_t = 't',
121 SDLK_u = 'u',
122 SDLK_v = 'v',
123 SDLK_w = 'w',
124 SDLK_x = 'x',
125 SDLK_y = 'y',
126 SDLK_z = 'z',
127
128 SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
129
130 SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
131 SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
132 SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
133 SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
134 SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
135 SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
136 SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
137 SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
138 SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
139 SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
140 SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
141 SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
142
143 SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
144 SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
145 SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
146 SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
147 SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
148 SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
149 SDLK_DELETE = '\x7F',
150 SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
151 SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
152 SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
153 SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
154 SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
155 SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
156
157 SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
158 SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
159 SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
160 SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
161 SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
162 SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
163 SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
164 SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
165 SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
166 SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
167 SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
168 SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
169 SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
170 SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
171 SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
172 SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
173 SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
174
175 SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
176 SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
177 SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
178 SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
179 SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
180 SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
181 SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
182 SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
183 SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
184 SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
185 SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
186 SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
187 SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
188 SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
189 SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
190 SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
191 SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
192 SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
193 SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
194 SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
195 SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
196 SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
197 SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
198 SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
199 SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
200 SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
201 SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
202 SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
203 SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
204 SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
205 SDLK_KP_EQUALSAS400 =
206 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
207
208 SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
209 SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
210 SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
211 SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
212 SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
213 SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
214 SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
215 SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
216 SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
217 SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
218 SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
219 SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
220
221 SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
222 SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
223 SDLK_THOUSANDSSEPARATOR =
224 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
225 SDLK_DECIMALSEPARATOR =
226 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
227 SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
228 SDLK_CURRENCYSUBUNIT =
229 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
230 SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
231 SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
232 SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
233 SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
234 SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
235 SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
236 SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
237 SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
238 SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
239 SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
240 SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
241 SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
242 SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
243 SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
244 SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
245 SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
246 SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
247 SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
248 SDLK_KP_DBLAMPERSAND =
249 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
250 SDLK_KP_VERTICALBAR =
251 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
252 SDLK_KP_DBLVERTICALBAR =
253 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
254 SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
255 SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
256 SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
257 SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
258 SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
259 SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
260 SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
261 SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
262 SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
263 SDLK_KP_MEMSUBTRACT =
264 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
265 SDLK_KP_MEMMULTIPLY =
266 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
267 SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
268 SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
269 SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
270 SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
271 SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
272 SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
273 SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
274 SDLK_KP_HEXADECIMAL =
275 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
276
277 SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
278 SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
279 SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
280 SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
281 SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
282 SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
283 SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
284 SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
285
286 SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
287
288 SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
289 SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
290 SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
291 SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
292 SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
293 SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
294 SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
295 SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
296 SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
297 SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
298 SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
299 SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
300 SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
301 SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
302 SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
303 SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
304 SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
305
306 SDLK_BRIGHTNESSDOWN =
307 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
308 SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
309 SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
310 SDLK_KBDILLUMTOGGLE =
311 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
312 SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
313 SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
314 SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
315 SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
316 SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
317 SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
318
319 SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
320 SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
321 } SDL_KeyCode;
322
323 /**
324 * \brief Enumeration of valid key mods (possibly OR'd together).
325 */
326 typedef enum
327 {
328 KMOD_NONE = 0x0000,
329 KMOD_LSHIFT = 0x0001,
330 KMOD_RSHIFT = 0x0002,
331 KMOD_LCTRL = 0x0040,
332 KMOD_RCTRL = 0x0080,
333 KMOD_LALT = 0x0100,
334 KMOD_RALT = 0x0200,
335 KMOD_LGUI = 0x0400,
336 KMOD_RGUI = 0x0800,
337 KMOD_NUM = 0x1000,
338 KMOD_CAPS = 0x2000,
339 KMOD_MODE = 0x4000,
340 KMOD_SCROLL = 0x8000,
341
342 KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
343 KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
344 KMOD_ALT = KMOD_LALT | KMOD_RALT,
345 KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
346
347 KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
348 } SDL_Keymod;
349
350 #endif /* SDL_keycode_h_ */
351
352 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_loadso.h
23 *
24 * System dependent library loading routines
25 *
26 * Some things to keep in mind:
27 * \li These functions only work on C function names. Other languages may
28 * have name mangling and intrinsic language support that varies from
29 * compiler to compiler.
30 * \li Make sure you declare your function pointers with the same calling
31 * convention as the actual library function. Your code will crash
32 * mysteriously if you do not do this.
33 * \li Avoid namespace collisions. If you load a symbol from the library,
34 * it is not defined whether or not it goes into the global symbol
35 * namespace for the application. If it does and it conflicts with
36 * symbols in your code or other shared libraries, you will not get
37 * the results you expect. :)
38 */
39
40 #ifndef SDL_loadso_h_
41 #define SDL_loadso_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * Dynamically load a shared object.
54 *
55 * \param sofile a system-dependent name of the object file
56 * \returns an opaque pointer to the object handle or NULL if there was an
57 * error; call SDL_GetError() for more information.
58 *
59 * \since This function is available since SDL 2.0.0.
60 *
61 * \sa SDL_LoadFunction
62 * \sa SDL_UnloadObject
63 */
64 extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
65
66 /**
67 * Look up the address of the named function in a shared object.
68 *
69 * This function pointer is no longer valid after calling SDL_UnloadObject().
70 *
71 * This function can only look up C function names. Other languages may have
72 * name mangling and intrinsic language support that varies from compiler to
73 * compiler.
74 *
75 * Make sure you declare your function pointers with the same calling
76 * convention as the actual library function. Your code will crash
77 * mysteriously if you do not do this.
78 *
79 * If the requested function doesn't exist, NULL is returned.
80 *
81 * \param handle a valid shared object handle returned by SDL_LoadObject()
82 * \param name the name of the function to look up
83 * \returns a pointer to the function or NULL if there was an error; call
84 * SDL_GetError() for more information.
85 *
86 * \since This function is available since SDL 2.0.0.
87 *
88 * \sa SDL_LoadObject
89 * \sa SDL_UnloadObject
90 */
91 extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
92 const char *name);
93
94 /**
95 * Unload a shared object from memory.
96 *
97 * \param handle a valid shared object handle returned by SDL_LoadObject()
98 *
99 * \since This function is available since SDL 2.0.0.
100 *
101 * \sa SDL_LoadFunction
102 * \sa SDL_LoadObject
103 */
104 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_loadso_h_ */
113
114 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_locale.h
23 *
24 * Include file for SDL locale services
25 */
26
27 #ifndef _SDL_locale_h
28 #define _SDL_locale_h
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 /* *INDENT-OFF* */
37 extern "C" {
38 /* *INDENT-ON* */
39 #endif
40
41
42 typedef struct SDL_Locale
43 {
44 const char *language; /**< A language name, like "en" for English. */
45 const char *country; /**< A country, like "US" for America. Can be NULL. */
46 } SDL_Locale;
47
48 /**
49 * Report the user's preferred locale.
50 *
51 * This returns an array of SDL_Locale structs, the final item zeroed out.
52 * When the caller is done with this array, it should call SDL_free() on the
53 * returned value; all the memory involved is allocated in a single block, so
54 * a single SDL_free() will suffice.
55 *
56 * Returned language strings are in the format xx, where 'xx' is an ISO-639
57 * language specifier (such as "en" for English, "de" for German, etc).
58 * Country strings are in the format YY, where "YY" is an ISO-3166 country
59 * code (such as "US" for the United States, "CA" for Canada, etc). Country
60 * might be NULL if there's no specific guidance on them (so you might get {
61 * "en", "US" } for American English, but { "en", NULL } means "English
62 * language, generically"). Language strings are never NULL, except to
63 * terminate the array.
64 *
65 * Please note that not all of these strings are 2 characters; some are three
66 * or more.
67 *
68 * The returned list of locales are in the order of the user's preference. For
69 * example, a German citizen that is fluent in US English and knows enough
70 * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
71 * "jp", NULL }. Someone from England might prefer British English (where
72 * "color" is spelled "colour", etc), but will settle for anything like it: {
73 * "en_GB", "en", NULL }.
74 *
75 * This function returns NULL on error, including when the platform does not
76 * supply this information at all.
77 *
78 * This might be a "slow" call that has to query the operating system. It's
79 * best to ask for this once and save the results. However, this list can
80 * change, usually because the user has changed a system preference outside of
81 * your program; SDL will send an SDL_LOCALECHANGED event in this case, if
82 * possible, and you can call this function again to get an updated copy of
83 * preferred locales.
84 *
85 * \return array of locales, terminated with a locale with a NULL language
86 * field. Will return NULL on error.
87 *
88 * \since This function is available since SDL 2.0.14.
89 */
90 extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
91
92 /* Ends C function definitions when using C++ */
93 #ifdef __cplusplus
94 /* *INDENT-OFF* */
95 }
96 /* *INDENT-ON* */
97 #endif
98 #include <SDL2/close_code.h>
99
100 #endif /* _SDL_locale_h */
101
102 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_log.h
23 *
24 * Simple log messages with categories and priorities.
25 *
26 * By default logs are quiet, but if you're debugging SDL you might want:
27 *
28 * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
29 *
30 * Here's where the messages go on different platforms:
31 * Windows: debug output stream
32 * Android: log output
33 * Others: standard error output (stderr)
34 */
35
36 #ifndef SDL_log_h_
37 #define SDL_log_h_
38
39 #include <SDL2/SDL_stdinc.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 /**
49 * \brief The maximum size of a log message
50 *
51 * Messages longer than the maximum size will be truncated
52 */
53 #define SDL_MAX_LOG_MESSAGE 4096
54
55 /**
56 * \brief The predefined log categories
57 *
58 * By default the application category is enabled at the INFO level,
59 * the assert category is enabled at the WARN level, test is enabled
60 * at the VERBOSE level and all other categories are enabled at the
61 * CRITICAL level.
62 */
63 typedef enum
64 {
65 SDL_LOG_CATEGORY_APPLICATION,
66 SDL_LOG_CATEGORY_ERROR,
67 SDL_LOG_CATEGORY_ASSERT,
68 SDL_LOG_CATEGORY_SYSTEM,
69 SDL_LOG_CATEGORY_AUDIO,
70 SDL_LOG_CATEGORY_VIDEO,
71 SDL_LOG_CATEGORY_RENDER,
72 SDL_LOG_CATEGORY_INPUT,
73 SDL_LOG_CATEGORY_TEST,
74
75 /* Reserved for future SDL library use */
76 SDL_LOG_CATEGORY_RESERVED1,
77 SDL_LOG_CATEGORY_RESERVED2,
78 SDL_LOG_CATEGORY_RESERVED3,
79 SDL_LOG_CATEGORY_RESERVED4,
80 SDL_LOG_CATEGORY_RESERVED5,
81 SDL_LOG_CATEGORY_RESERVED6,
82 SDL_LOG_CATEGORY_RESERVED7,
83 SDL_LOG_CATEGORY_RESERVED8,
84 SDL_LOG_CATEGORY_RESERVED9,
85 SDL_LOG_CATEGORY_RESERVED10,
86
87 /* Beyond this point is reserved for application use, e.g.
88 enum {
89 MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
90 MYAPP_CATEGORY_AWESOME2,
91 MYAPP_CATEGORY_AWESOME3,
92 ...
93 };
94 */
95 SDL_LOG_CATEGORY_CUSTOM
96 } SDL_LogCategory;
97
98 /**
99 * \brief The predefined log priorities
100 */
101 typedef enum
102 {
103 SDL_LOG_PRIORITY_VERBOSE = 1,
104 SDL_LOG_PRIORITY_DEBUG,
105 SDL_LOG_PRIORITY_INFO,
106 SDL_LOG_PRIORITY_WARN,
107 SDL_LOG_PRIORITY_ERROR,
108 SDL_LOG_PRIORITY_CRITICAL,
109 SDL_NUM_LOG_PRIORITIES
110 } SDL_LogPriority;
111
112
113 /**
114 * Set the priority of all log categories.
115 *
116 * \param priority the SDL_LogPriority to assign
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_LogSetPriority
121 */
122 extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
123
124 /**
125 * Set the priority of a particular log category.
126 *
127 * \param category the category to assign a priority to
128 * \param priority the SDL_LogPriority to assign
129 *
130 * \since This function is available since SDL 2.0.0.
131 *
132 * \sa SDL_LogGetPriority
133 * \sa SDL_LogSetAllPriority
134 */
135 extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
136 SDL_LogPriority priority);
137
138 /**
139 * Get the priority of a particular log category.
140 *
141 * \param category the category to query
142 * \returns the SDL_LogPriority for the requested category
143 *
144 * \since This function is available since SDL 2.0.0.
145 *
146 * \sa SDL_LogSetPriority
147 */
148 extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
149
150 /**
151 * Reset all priorities to default.
152 *
153 * This is called by SDL_Quit().
154 *
155 * \since This function is available since SDL 2.0.0.
156 *
157 * \sa SDL_LogSetAllPriority
158 * \sa SDL_LogSetPriority
159 */
160 extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
161
162 /**
163 * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
164 *
165 * = * \param fmt a printf() style message format string
166 *
167 * \param ... additional parameters matching % tokens in the `fmt` string, if
168 * any
169 *
170 * \since This function is available since SDL 2.0.0.
171 *
172 * \sa SDL_LogCritical
173 * \sa SDL_LogDebug
174 * \sa SDL_LogError
175 * \sa SDL_LogInfo
176 * \sa SDL_LogMessage
177 * \sa SDL_LogMessageV
178 * \sa SDL_LogVerbose
179 * \sa SDL_LogWarn
180 */
181 extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
182
183 /**
184 * Log a message with SDL_LOG_PRIORITY_VERBOSE.
185 *
186 * \param category the category of the message
187 * \param fmt a printf() style message format string
188 * \param ... additional parameters matching % tokens in the **fmt** string,
189 * if any
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_Log
194 * \sa SDL_LogCritical
195 * \sa SDL_LogDebug
196 * \sa SDL_LogError
197 * \sa SDL_LogInfo
198 * \sa SDL_LogMessage
199 * \sa SDL_LogMessageV
200 * \sa SDL_LogWarn
201 */
202 extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
203
204 /**
205 * Log a message with SDL_LOG_PRIORITY_DEBUG.
206 *
207 * \param category the category of the message
208 * \param fmt a printf() style message format string
209 * \param ... additional parameters matching % tokens in the **fmt** string,
210 * if any
211 *
212 * \since This function is available since SDL 2.0.0.
213 *
214 * \sa SDL_Log
215 * \sa SDL_LogCritical
216 * \sa SDL_LogError
217 * \sa SDL_LogInfo
218 * \sa SDL_LogMessage
219 * \sa SDL_LogMessageV
220 * \sa SDL_LogVerbose
221 * \sa SDL_LogWarn
222 */
223 extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
224
225 /**
226 * Log a message with SDL_LOG_PRIORITY_INFO.
227 *
228 * \param category the category of the message
229 * \param fmt a printf() style message format string
230 * \param ... additional parameters matching % tokens in the **fmt** string,
231 * if any
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_Log
236 * \sa SDL_LogCritical
237 * \sa SDL_LogDebug
238 * \sa SDL_LogError
239 * \sa SDL_LogMessage
240 * \sa SDL_LogMessageV
241 * \sa SDL_LogVerbose
242 * \sa SDL_LogWarn
243 */
244 extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
245
246 /**
247 * Log a message with SDL_LOG_PRIORITY_WARN.
248 *
249 * \param category the category of the message
250 * \param fmt a printf() style message format string
251 * \param ... additional parameters matching % tokens in the **fmt** string,
252 * if any
253 *
254 * \since This function is available since SDL 2.0.0.
255 *
256 * \sa SDL_Log
257 * \sa SDL_LogCritical
258 * \sa SDL_LogDebug
259 * \sa SDL_LogError
260 * \sa SDL_LogInfo
261 * \sa SDL_LogMessage
262 * \sa SDL_LogMessageV
263 * \sa SDL_LogVerbose
264 */
265 extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
266
267 /**
268 * Log a message with SDL_LOG_PRIORITY_ERROR.
269 *
270 * \param category the category of the message
271 * \param fmt a printf() style message format string
272 * \param ... additional parameters matching % tokens in the **fmt** string,
273 * if any
274 *
275 * \since This function is available since SDL 2.0.0.
276 *
277 * \sa SDL_Log
278 * \sa SDL_LogCritical
279 * \sa SDL_LogDebug
280 * \sa SDL_LogInfo
281 * \sa SDL_LogMessage
282 * \sa SDL_LogMessageV
283 * \sa SDL_LogVerbose
284 * \sa SDL_LogWarn
285 */
286 extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
287
288 /**
289 * Log a message with SDL_LOG_PRIORITY_CRITICAL.
290 *
291 * \param category the category of the message
292 * \param fmt a printf() style message format string
293 * \param ... additional parameters matching % tokens in the **fmt** string,
294 * if any
295 *
296 * \since This function is available since SDL 2.0.0.
297 *
298 * \sa SDL_Log
299 * \sa SDL_LogDebug
300 * \sa SDL_LogError
301 * \sa SDL_LogInfo
302 * \sa SDL_LogMessage
303 * \sa SDL_LogMessageV
304 * \sa SDL_LogVerbose
305 * \sa SDL_LogWarn
306 */
307 extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
308
309 /**
310 * Log a message with the specified category and priority.
311 *
312 * \param category the category of the message
313 * \param priority the priority of the message
314 * \param fmt a printf() style message format string
315 * \param ... additional parameters matching % tokens in the **fmt** string,
316 * if any
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_Log
321 * \sa SDL_LogCritical
322 * \sa SDL_LogDebug
323 * \sa SDL_LogError
324 * \sa SDL_LogInfo
325 * \sa SDL_LogMessageV
326 * \sa SDL_LogVerbose
327 * \sa SDL_LogWarn
328 */
329 extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
330 SDL_LogPriority priority,
331 SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
332
333 /**
334 * Log a message with the specified category and priority.
335 *
336 * \param category the category of the message
337 * \param priority the priority of the message
338 * \param fmt a printf() style message format string
339 * \param ap a variable argument list
340 *
341 * \since This function is available since SDL 2.0.0.
342 *
343 * \sa SDL_Log
344 * \sa SDL_LogCritical
345 * \sa SDL_LogDebug
346 * \sa SDL_LogError
347 * \sa SDL_LogInfo
348 * \sa SDL_LogMessage
349 * \sa SDL_LogVerbose
350 * \sa SDL_LogWarn
351 */
352 extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
353 SDL_LogPriority priority,
354 const char *fmt, va_list ap);
355
356 /**
357 * The prototype for the log output callback function.
358 *
359 * This function is called by SDL when there is new text to be logged.
360 *
361 * \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
362 * \param category the category of the message
363 * \param priority the priority of the message
364 * \param message the message being output
365 */
366 typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
367
368 /**
369 * Get the current log output function.
370 *
371 * \param callback an SDL_LogOutputFunction filled in with the current log
372 * callback
373 * \param userdata a pointer filled in with the pointer that is passed to
374 * `callback`
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_LogSetOutputFunction
379 */
380 extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
381
382 /**
383 * Replace the default log output function with one of your own.
384 *
385 * \param callback an SDL_LogOutputFunction to call instead of the default
386 * \param userdata a pointer that is passed to `callback`
387 *
388 * \since This function is available since SDL 2.0.0.
389 *
390 * \sa SDL_LogGetOutputFunction
391 */
392 extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
393
394
395 /* Ends C function definitions when using C++ */
396 #ifdef __cplusplus
397 }
398 #endif
399 #include <SDL2/close_code.h>
400
401 #endif /* SDL_log_h_ */
402
403 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_main_h_
22 #define SDL_main_h_
23
24 #include <SDL2/SDL_stdinc.h>
25
26 /**
27 * \file SDL_main.h
28 *
29 * Redefine main() on some platforms so that it is called by SDL.
30 */
31
32 #ifndef SDL_MAIN_HANDLED
33 #if defined(__WIN32__)
34 /* On Windows SDL provides WinMain(), which parses the command line and passes
35 the arguments to your main function.
36
37 If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
38 */
39 #define SDL_MAIN_AVAILABLE
40
41 #elif defined(__WINRT__)
42 /* On WinRT, SDL provides a main function that initializes CoreApplication,
43 creating an instance of IFrameworkView in the process.
44
45 Please note that #include'ing SDL_main.h is not enough to get a main()
46 function working. In non-XAML apps, the file,
47 src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
48 into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
49 called, with a pointer to the Direct3D-hosted XAML control passed in.
50 */
51 #define SDL_MAIN_NEEDED
52
53 #elif defined(__IPHONEOS__)
54 /* On iOS SDL provides a main function that creates an application delegate
55 and starts the iOS application run loop.
56
57 If you link with SDL dynamically on iOS, the main function can't be in a
58 shared library, so you need to link with libSDLmain.a, which includes a
59 stub main function that calls into the shared library to start execution.
60
61 See src/video/uikit/SDL_uikitappdelegate.m for more details.
62 */
63 #define SDL_MAIN_NEEDED
64
65 #elif defined(__ANDROID__)
66 /* On Android SDL provides a Java class in SDLActivity.java that is the
67 main activity entry point.
68
69 See docs/README-android.md for more details on extending that class.
70 */
71 #define SDL_MAIN_NEEDED
72
73 /* We need to export SDL_main so it can be launched from Java */
74 #define SDLMAIN_DECLSPEC DECLSPEC
75
76 #elif defined(__NACL__)
77 /* On NACL we use ppapi_simple to set up the application helper code,
78 then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
79 starting the user main function.
80 All user code is run in a separate thread by ppapi_simple, thus
81 allowing for blocking io to take place via nacl_io
82 */
83 #define SDL_MAIN_NEEDED
84
85 #elif defined(__PSP__)
86 /* On PSP SDL provides a main function that sets the module info,
87 activates the GPU and starts the thread required to be able to exit
88 the software.
89
90 If you provide this yourself, you may define SDL_MAIN_HANDLED
91 */
92 #define SDL_MAIN_AVAILABLE
93
94 #endif
95 #endif /* SDL_MAIN_HANDLED */
96
97 #ifndef SDLMAIN_DECLSPEC
98 #define SDLMAIN_DECLSPEC
99 #endif
100
101 /**
102 * \file SDL_main.h
103 *
104 * The application's main() function must be called with C linkage,
105 * and should be declared like this:
106 * \code
107 * #ifdef __cplusplus
108 * extern "C"
109 * #endif
110 * int main(int argc, char *argv[])
111 * {
112 * }
113 * \endcode
114 */
115
116 #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
117 #define main SDL_main
118 #endif
119
120 #include <SDL2/begin_code.h>
121 #ifdef __cplusplus
122 extern "C" {
123 #endif
124
125 /**
126 * The prototype for the application's main() function
127 */
128 typedef int (*SDL_main_func)(int argc, char *argv[]);
129 extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
130
131
132 /**
133 * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
134 * point.
135 *
136 * This function is defined in SDL_main.h, along with the preprocessor rule to
137 * redefine main() as SDL_main(). Thus to ensure that your main() function
138 * will not be changed it is necessary to define SDL_MAIN_HANDLED before
139 * including SDL.h.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_Init
144 */
145 extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
146
147 #ifdef __WIN32__
148
149 /**
150 * Register a win32 window class for SDL's use.
151 *
152 * This can be called to set the application window class at startup. It is
153 * safe to call this multiple times, as long as every call is eventually
154 * paired with a call to SDL_UnregisterApp, but a second registration attempt
155 * while a previous registration is still active will be ignored, other than
156 * to increment a counter.
157 *
158 * Most applications do not need to, and should not, call this directly; SDL
159 * will call it when initializing the video subsystem.
160 *
161 * \param name the window class name, in UTF-8 encoding. If NULL, SDL
162 * currently uses "SDL_app" but this isn't guaranteed.
163 * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
164 * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
165 * what is specified here.
166 * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
167 * will use `GetModuleHandle(NULL)` instead.
168 * \returns 0 on success, -1 on error. SDL_GetError() may have details.
169 *
170 * \since This function is available since SDL 2.0.2.
171 */
172 extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
173
174 /**
175 * Deregister the win32 window class from an SDL_RegisterApp call.
176 *
177 * This can be called to undo the effects of SDL_RegisterApp.
178 *
179 * Most applications do not need to, and should not, call this directly; SDL
180 * will call it when deinitializing the video subsystem.
181 *
182 * It is safe to call this multiple times, as long as every call is eventually
183 * paired with a prior call to SDL_RegisterApp. The window class will only be
184 * deregistered when the registration counter in SDL_RegisterApp decrements to
185 * zero through calls to this function.
186 *
187 * \since This function is available since SDL 2.0.2.
188 */
189 extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
190
191 #endif /* __WIN32__ */
192
193
194 #ifdef __WINRT__
195
196 /**
197 * Initialize and launch an SDL/WinRT application.
198 *
199 * \param mainFunction the SDL app's C-style main(), an SDL_main_func
200 * \param reserved reserved for future use; should be NULL
201 * \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
202 * more information on the failure.
203 *
204 * \since This function is available since SDL 2.0.3.
205 */
206 extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
207
208 #endif /* __WINRT__ */
209
210 #if defined(__IPHONEOS__)
211
212 /**
213 * Initializes and launches an SDL application.
214 *
215 * \param argc The argc parameter from the application's main() function
216 * \param argv The argv parameter from the application's main() function
217 * \param mainFunction The SDL app's C-style main(), an SDL_main_func
218 * \return the return value from mainFunction
219 *
220 * \since This function is available since SDL 2.0.10.
221 */
222 extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
223
224 #endif /* __IPHONEOS__ */
225
226
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_main_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_messagebox_h_
22 #define SDL_messagebox_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_video.h> /* For SDL_Window */
26
27 #include <SDL2/begin_code.h>
28 /* Set up for C function definitions, even when using C++ */
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34 * SDL_MessageBox flags. If supported will display warning icon, etc.
35 */
36 typedef enum
37 {
38 SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
39 SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
40 SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
41 SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
42 SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
43 } SDL_MessageBoxFlags;
44
45 /**
46 * Flags for SDL_MessageBoxButtonData.
47 */
48 typedef enum
49 {
50 SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */
51 SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */
52 } SDL_MessageBoxButtonFlags;
53
54 /**
55 * Individual button data.
56 */
57 typedef struct
58 {
59 Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */
60 int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */
61 const char * text; /**< The UTF-8 button text */
62 } SDL_MessageBoxButtonData;
63
64 /**
65 * RGB value used in a message box color scheme
66 */
67 typedef struct
68 {
69 Uint8 r, g, b;
70 } SDL_MessageBoxColor;
71
72 typedef enum
73 {
74 SDL_MESSAGEBOX_COLOR_BACKGROUND,
75 SDL_MESSAGEBOX_COLOR_TEXT,
76 SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
77 SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
78 SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
79 SDL_MESSAGEBOX_COLOR_MAX
80 } SDL_MessageBoxColorType;
81
82 /**
83 * A set of colors to use for message box dialogs
84 */
85 typedef struct
86 {
87 SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
88 } SDL_MessageBoxColorScheme;
89
90 /**
91 * MessageBox structure containing title, text, window, etc.
92 */
93 typedef struct
94 {
95 Uint32 flags; /**< ::SDL_MessageBoxFlags */
96 SDL_Window *window; /**< Parent window, can be NULL */
97 const char *title; /**< UTF-8 title */
98 const char *message; /**< UTF-8 message text */
99
100 int numbuttons;
101 const SDL_MessageBoxButtonData *buttons;
102
103 const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
104 } SDL_MessageBoxData;
105
106 /**
107 * Create a modal message box.
108 *
109 * If your needs aren't complex, it might be easier to use
110 * SDL_ShowSimpleMessageBox.
111 *
112 * This function should be called on the thread that created the parent
113 * window, or on the main thread if the messagebox has no parent. It will
114 * block execution of that thread until the user clicks a button or closes the
115 * messagebox.
116 *
117 * This function may be called at any time, even before SDL_Init(). This makes
118 * it useful for reporting errors like a failure to create a renderer or
119 * OpenGL context.
120 *
121 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
122 * formal toolkit like GTK+ or Qt.
123 *
124 * Note that if SDL_Init() would fail because there isn't any available video
125 * target, this function is likely to fail for the same reasons. If this is a
126 * concern, check the return value from this function and fall back to writing
127 * to stderr if you can.
128 *
129 * \param messageboxdata the SDL_MessageBoxData structure with title, text and
130 * other options
131 * \param buttonid the pointer to which user id of hit button should be copied
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_ShowSimpleMessageBox
138 */
139 extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
140
141 /**
142 * Display a simple modal message box.
143 *
144 * If your needs aren't complex, this function is preferred over
145 * SDL_ShowMessageBox.
146 *
147 * `flags` may be any of the following:
148 *
149 * - `SDL_MESSAGEBOX_ERROR`: error dialog
150 * - `SDL_MESSAGEBOX_WARNING`: warning dialog
151 * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
152 *
153 * This function should be called on the thread that created the parent
154 * window, or on the main thread if the messagebox has no parent. It will
155 * block execution of that thread until the user clicks a button or closes the
156 * messagebox.
157 *
158 * This function may be called at any time, even before SDL_Init(). This makes
159 * it useful for reporting errors like a failure to create a renderer or
160 * OpenGL context.
161 *
162 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
163 * formal toolkit like GTK+ or Qt.
164 *
165 * Note that if SDL_Init() would fail because there isn't any available video
166 * target, this function is likely to fail for the same reasons. If this is a
167 * concern, check the return value from this function and fall back to writing
168 * to stderr if you can.
169 *
170 * \param flags an SDL_MessageBoxFlags value
171 * \param title UTF-8 title text
172 * \param message UTF-8 message text
173 * \param window the parent window, or NULL for no parent
174 * \returns 0 on success or a negative error code on failure; call
175 * SDL_GetError() for more information.
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_ShowMessageBox
180 */
181 extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
182
183
184 /* Ends C function definitions when using C++ */
185 #ifdef __cplusplus
186 }
187 #endif
188 #include <SDL2/close_code.h>
189
190 #endif /* SDL_messagebox_h_ */
191
192 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_metal.h
23 *
24 * Header file for functions to creating Metal layers and views on SDL windows.
25 */
26
27 #ifndef SDL_metal_h_
28 #define SDL_metal_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
40 *
41 * \note This can be cast directly to an NSView or UIView.
42 */
43 typedef void *SDL_MetalView;
44
45 /**
46 * \name Metal support functions
47 */
48 /* @{ */
49
50 /**
51 * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
52 * window.
53 *
54 * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
55 * its own. It is up to user code to do that.
56 *
57 * The returned handle can be casted directly to a NSView or UIView. To access
58 * the backing CAMetalLayer, call SDL_Metal_GetLayer().
59 *
60 * \since This function is available since SDL 2.0.12.
61 *
62 * \sa SDL_Metal_DestroyView
63 * \sa SDL_Metal_GetLayer
64 */
65 extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
66
67 /**
68 * Destroy an existing SDL_MetalView object.
69 *
70 * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
71 * called after SDL_CreateWindow.
72 *
73 * \since This function is available since SDL 2.0.12.
74 *
75 * \sa SDL_Metal_CreateView
76 */
77 extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
78
79 /**
80 * Get a pointer to the backing CAMetalLayer for the given view.
81 *
82 * \since This function is available since SDL 2.0.14.
83 *
84 * \sa SDL_MetalCreateView
85 */
86 extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
87
88 /**
89 * Get the size of a window's underlying drawable in pixels (for use with
90 * setting viewport, scissor & etc).
91 *
92 * \param window SDL_Window from which the drawable size should be queried
93 * \param w Pointer to variable for storing the width in pixels, may be NULL
94 * \param h Pointer to variable for storing the height in pixels, may be NULL
95 *
96 * \since This function is available since SDL 2.0.14.
97 *
98 * \sa SDL_GetWindowSize
99 * \sa SDL_CreateWindow
100 */
101 extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
102 int *h);
103
104 /* @} *//* Metal support functions */
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_metal_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_misc.h
23 *
24 * \brief Include file for SDL API functions that don't fit elsewhere.
25 */
26
27 #ifndef SDL_misc_h_
28 #define SDL_misc_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Open a URL/URI in the browser or other appropriate external application.
41 *
42 * Open a URL in a separate, system-provided application. How this works will
43 * vary wildly depending on the platform. This will likely launch what makes
44 * sense to handle a specific URL's protocol (a web browser for `http://`,
45 * etc), but it might also be able to launch file managers for directories and
46 * other things.
47 *
48 * What happens when you open a URL varies wildly as well: your game window
49 * may lose focus (and may or may not lose focus if your game was fullscreen
50 * or grabbing input at the time). On mobile devices, your app will likely
51 * move to the background or your process might be paused. Any given platform
52 * may or may not handle a given URL.
53 *
54 * If this is unimplemented (or simply unavailable) for a platform, this will
55 * fail with an error. A successful result does not mean the URL loaded, just
56 * that we launched _something_ to handle it (or at least believe we did).
57 *
58 * All this to say: this function can be useful, but you should definitely
59 * test it on every platform you target.
60 *
61 * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for
62 * local files, if supported.
63 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
64 * information.
65 *
66 * \since This function is available since SDL 2.0.14.
67 */
68 extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
69
70 /* Ends C function definitions when using C++ */
71 #ifdef __cplusplus
72 }
73 #endif
74 #include <SDL2/close_code.h>
75
76 #endif /* SDL_misc_h_ */
77
78 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_mouse.h
23 *
24 * Include file for SDL mouse event handling.
25 */
26
27 #ifndef SDL_mouse_h_
28 #define SDL_mouse_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
41
42 /**
43 * \brief Cursor types for SDL_CreateSystemCursor().
44 */
45 typedef enum
46 {
47 SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */
48 SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */
49 SDL_SYSTEM_CURSOR_WAIT, /**< Wait */
50 SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
51 SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
52 SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */
53 SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */
54 SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */
55 SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */
56 SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */
57 SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */
58 SDL_SYSTEM_CURSOR_HAND, /**< Hand */
59 SDL_NUM_SYSTEM_CURSORS
60 } SDL_SystemCursor;
61
62 /**
63 * \brief Scroll direction types for the Scroll event
64 */
65 typedef enum
66 {
67 SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
68 SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
69 } SDL_MouseWheelDirection;
70
71 /* Function prototypes */
72
73 /**
74 * Get the window which currently has mouse focus.
75 *
76 * \returns the window with mouse focus.
77 *
78 * \since This function is available since SDL 2.0.0.
79 */
80 extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
81
82 /**
83 * Retrieve the current state of the mouse.
84 *
85 * The current button state is returned as a button bitmask, which can be
86 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
87 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
88 * mouse cursor position relative to the focus window. You can pass NULL for
89 * either `x` or `y`.
90 *
91 * \param x the x coordinate of the mouse cursor position relative to the
92 * focus window
93 * \param y the y coordinate of the mouse cursor position relative to the
94 * focus window
95 * \returns a 32-bit button bitmask of the current button state.
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_GetGlobalMouseState
100 * \sa SDL_GetRelativeMouseState
101 * \sa SDL_PumpEvents
102 */
103 extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
104
105 /**
106 * Get the current state of the mouse in relation to the desktop.
107 *
108 * This works similarly to SDL_GetMouseState(), but the coordinates will be
109 * reported relative to the top-left of the desktop. This can be useful if you
110 * need to track the mouse outside of a specific window and SDL_CaptureMouse()
111 * doesn't fit your needs. For example, it could be useful if you need to
112 * track the mouse while dragging a window, where coordinates relative to a
113 * window might not be in sync at all times.
114 *
115 * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
116 * from the last pump of the event queue. This function, however, queries the
117 * OS for the current mouse position, and as such, might be a slightly less
118 * efficient function. Unless you know what you're doing and have a good
119 * reason to use this function, you probably want SDL_GetMouseState() instead.
120 *
121 * \param x filled in with the current X coord relative to the desktop; can be
122 * NULL
123 * \param y filled in with the current Y coord relative to the desktop; can be
124 * NULL
125 * \returns the current button state as a bitmask which can be tested using
126 * the SDL_BUTTON(X) macros.
127 *
128 * \since This function is available since SDL 2.0.4.
129 *
130 * \sa SDL_CaptureMouse
131 */
132 extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
133
134 /**
135 * Retrieve the relative state of the mouse.
136 *
137 * The current button state is returned as a button bitmask, which can be
138 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
139 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
140 * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
141 * event initialization. You can pass NULL for either `x` or `y`.
142 *
143 * \param x a pointer filled with the last recorded x coordinate of the mouse
144 * \param y a pointer filled with the last recorded y coordinate of the mouse
145 * \returns a 32-bit button bitmask of the relative button state.
146 *
147 * \since This function is available since SDL 2.0.0.
148 *
149 * \sa SDL_GetMouseState
150 */
151 extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
152
153 /**
154 * Move the mouse cursor to the given position within the window.
155 *
156 * This function generates a mouse motion event.
157 *
158 * Note that this function will appear to succeed, but not actually move the
159 * mouse when used over Microsoft Remote Desktop.
160 *
161 * \param window the window to move the mouse into, or NULL for the current
162 * mouse focus
163 * \param x the x coordinate within the window
164 * \param y the y coordinate within the window
165 *
166 * \since This function is available since SDL 2.0.0.
167 *
168 * \sa SDL_WarpMouseGlobal
169 */
170 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
171 int x, int y);
172
173 /**
174 * Move the mouse to the given position in global screen space.
175 *
176 * This function generates a mouse motion event.
177 *
178 * A failure of this function usually means that it is unsupported by a
179 * platform.
180 *
181 * Note that this function will appear to succeed, but not actually move the
182 * mouse when used over Microsoft Remote Desktop.
183 *
184 * \param x the x coordinate
185 * \param y the y coordinate
186 * \returns 0 on success or a negative error code on failure; call
187 * SDL_GetError() for more information.
188 *
189 * \since This function is available since SDL 2.0.4.
190 *
191 * \sa SDL_WarpMouseInWindow
192 */
193 extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
194
195 /**
196 * Set relative mouse mode.
197 *
198 * While the mouse is in relative mode, the cursor is hidden, and the driver
199 * will try to report continuous motion in the current window. Only relative
200 * motion events will be delivered, the mouse position will not change.
201 *
202 * Note that this function will not be able to provide continuous relative
203 * motion when used over Microsoft Remote Desktop, instead motion is limited
204 * to the bounds of the screen.
205 *
206 * This function will flush any pending mouse motion.
207 *
208 * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
209 * \returns 0 on success or a negative error code on failure; call
210 * SDL_GetError() for more information.
211 *
212 * If relative mode is not supported, this returns -1.
213 *
214 * \since This function is available since SDL 2.0.0.
215 *
216 * \sa SDL_GetRelativeMouseMode
217 */
218 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
219
220 /**
221 * Capture the mouse and to track input outside an SDL window.
222 *
223 * Capturing enables your app to obtain mouse events globally, instead of just
224 * within your window. Not all video targets support this function. When
225 * capturing is enabled, the current window will get all mouse events, but
226 * unlike relative mode, no change is made to the cursor and it is not
227 * restrained to your window.
228 *
229 * This function may also deny mouse input to other windows--both those in
230 * your application and others on the system--so you should use this function
231 * sparingly, and in small bursts. For example, you might want to track the
232 * mouse while the user is dragging something, until the user releases a mouse
233 * button. It is not recommended that you capture the mouse for long periods
234 * of time, such as the entire time your app is running. For that, you should
235 * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowGrab(), depending
236 * on your goals.
237 *
238 * While captured, mouse events still report coordinates relative to the
239 * current (foreground) window, but those coordinates may be outside the
240 * bounds of the window (including negative values). Capturing is only allowed
241 * for the foreground window. If the window loses focus while capturing, the
242 * capture will be disabled automatically.
243 *
244 * While capturing is enabled, the current window will have the
245 * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
246 *
247 * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
248 * \returns 0 on success or -1 if not supported; call SDL_GetError() for more
249 * information.
250 *
251 * \since This function is available since SDL 2.0.4.
252 *
253 * \sa SDL_GetGlobalMouseState
254 */
255 extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
256
257 /**
258 * Query whether relative mouse mode is enabled.
259 *
260 * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
261 *
262 * \since This function is available since SDL 2.0.0.
263 *
264 * \sa SDL_SetRelativeMouseMode
265 */
266 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
267
268 /**
269 * Create a cursor using the specified bitmap data and mask (in MSB format).
270 *
271 * `mask` has to be in MSB (Most Significant Bit) format.
272 *
273 * The cursor width (`w`) must be a multiple of 8 bits.
274 *
275 * The cursor is created in black and white according to the following:
276 *
277 * - data=0, mask=1: white
278 * - data=1, mask=1: black
279 * - data=0, mask=0: transparent
280 * - data=1, mask=0: inverted color if possible, black if not.
281 *
282 * Cursors created with this function must be freed with SDL_FreeCursor().
283 *
284 * If you want to have a color cursor, or create your cursor from an
285 * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
286 * hide the cursor and draw your own as part of your game's rendering, but it
287 * will be bound to the framerate.
288 *
289 * Also, since SDL 2.0.0, SDL_CreateSystemCursor() is available, which
290 * provides twelve readily available system cursors to pick from.
291 *
292 * \param data the color value for each pixel of the cursor
293 * \param mask the mask value for each pixel of the cursor
294 * \param w the width of the cursor
295 * \param h the height of the cursor
296 * \param hot_x the X-axis location of the upper left corner of the cursor
297 * relative to the actual mouse position
298 * \param hot_y the Y-axis location of the upper left corner of the cursor
299 * relative to the actual mouse position
300 * \returns a new cursor with the specified parameters on success or NULL on
301 * failure; call SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_FreeCursor
306 * \sa SDL_SetCursor
307 * \sa SDL_ShowCursor
308 */
309 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
310 const Uint8 * mask,
311 int w, int h, int hot_x,
312 int hot_y);
313
314 /**
315 * Create a color cursor.
316 *
317 * \param surface an SDL_Surface structure representing the cursor image
318 * \param hot_x the x position of the cursor hot spot
319 * \param hot_y the y position of the cursor hot spot
320 * \returns the new cursor on success or NULL on failure; call SDL_GetError()
321 * for more information.
322 *
323 * \since This function is available since SDL 2.0.0.
324 *
325 * \sa SDL_CreateCursor
326 * \sa SDL_FreeCursor
327 */
328 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
329 int hot_x,
330 int hot_y);
331
332 /**
333 * Create a system cursor.
334 *
335 * \param id an SDL_SystemCursor enum value
336 * \returns a cursor on success or NULL on failure; call SDL_GetError() for
337 * more information.
338 *
339 * \since This function is available since SDL 2.0.0.
340 *
341 * \sa SDL_FreeCursor
342 */
343 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
344
345 /**
346 * Set the active cursor.
347 *
348 * This function sets the currently active cursor to the specified one. If the
349 * cursor is currently visible, the change will be immediately represented on
350 * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
351 * this is desired for any reason.
352 *
353 * \param cursor a cursor to make active
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateCursor
358 * \sa SDL_GetCursor
359 * \sa SDL_ShowCursor
360 */
361 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
362
363 /**
364 * Get the active cursor.
365 *
366 * This function returns a pointer to the current cursor which is owned by the
367 * library. It is not necessary to free the cursor with SDL_FreeCursor().
368 *
369 * \returns the active cursor or NULL if there is no mouse.
370 *
371 * \since This function is available since SDL 2.0.0.
372 *
373 * \sa SDL_SetCursor
374 */
375 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
376
377 /**
378 * Get the default cursor.
379 *
380 * \returns the default cursor on success or NULL on failure.
381 *
382 * \since This function is available since SDL 2.0.0.
383 *
384 * \sa SDL_CreateSystemCursor
385 */
386 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
387
388 /**
389 * Free a previously-created cursor.
390 *
391 * Use this function to free cursor resources created with SDL_CreateCursor(),
392 * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
393 *
394 * \param cursor the cursor to free
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_CreateColorCursor
399 * \sa SDL_CreateCursor
400 * \sa SDL_CreateSystemCursor
401 */
402 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
403
404 /**
405 * Toggle whether or not the cursor is shown.
406 *
407 * The cursor starts off displayed but can be turned off. Passing `SDL_ENABLE`
408 * displays the cursor and passing `SDL_DISABLE` hides it.
409 *
410 * The current state of the mouse cursor can be queried by passing
411 * `SDL_QUERY`; either `SDL_DISABLE` or `SDL_ENABLE` will be returned.
412 *
413 * \param toggle `SDL_ENABLE` to show the cursor, `SDL_DISABLE` to hide it,
414 * `SDL_QUERY` to query the current state without changing it.
415 * \returns `SDL_ENABLE` if the cursor is shown, or `SDL_DISABLE` if the
416 * cursor is hidden, or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CreateCursor
422 * \sa SDL_SetCursor
423 */
424 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
425
426 /**
427 * Used as a mask when testing buttons in buttonstate.
428 *
429 * - Button 1: Left mouse button
430 * - Button 2: Middle mouse button
431 * - Button 3: Right mouse button
432 */
433 #define SDL_BUTTON(X) (1 << ((X)-1))
434 #define SDL_BUTTON_LEFT 1
435 #define SDL_BUTTON_MIDDLE 2
436 #define SDL_BUTTON_RIGHT 3
437 #define SDL_BUTTON_X1 4
438 #define SDL_BUTTON_X2 5
439 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
440 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
441 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
442 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
443 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
444
445 /* Ends C function definitions when using C++ */
446 #ifdef __cplusplus
447 }
448 #endif
449 #include <SDL2/close_code.h>
450
451 #endif /* SDL_mouse_h_ */
452
453 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_mutex_h_
22 #define SDL_mutex_h_
23
24 /**
25 * \file SDL_mutex.h
26 *
27 * Functions to provide thread synchronization primitives.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Synchronization functions which can time out return this value
41 * if they time out.
42 */
43 #define SDL_MUTEX_TIMEDOUT 1
44
45 /**
46 * This is the timeout value which corresponds to never time out.
47 */
48 #define SDL_MUTEX_MAXWAIT (~(Uint32)0)
49
50
51 /**
52 * \name Mutex functions
53 */
54 /* @{ */
55
56 /* The SDL mutex structure, defined in SDL_sysmutex.c */
57 struct SDL_mutex;
58 typedef struct SDL_mutex SDL_mutex;
59
60 /**
61 * Create a new mutex.
62 *
63 * All newly-created mutexes begin in the _unlocked_ state.
64 *
65 * Calls to SDL_LockMutex() will not return while the mutex is locked by
66 * another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
67 *
68 * SDL mutexes are reentrant.
69 *
70 * \returns the initialized and unlocked mutex or NULL on failure; call
71 * SDL_GetError() for more information.
72 *
73 * \since This function is available since SDL 2.0.0.
74 *
75 * \sa SDL_DestroyMutex
76 * \sa SDL_LockMutex
77 * \sa SDL_TryLockMutex
78 * \sa SDL_UnlockMutex
79 */
80 extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
81
82 /**
83 * Lock the mutex.
84 *
85 * This will block until the mutex is available, which is to say it is in the
86 * unlocked state and the OS has chosen the caller as the next thread to lock
87 * it. Of all threads waiting to lock the mutex, only one may do so at a time.
88 *
89 * It is legal for the owning thread to lock an already-locked mutex. It must
90 * unlock it the same number of times before it is actually made available for
91 * other threads in the system (this is known as a "recursive mutex").
92 *
93 * \param mutex the mutex to lock
94 * \return 0, or -1 on error.
95 *
96 * \since This function is available since SDL 2.0.0.
97 */
98 extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
99 #define SDL_mutexP(m) SDL_LockMutex(m)
100
101 /**
102 * Try to lock a mutex without blocking.
103 *
104 * This works just like SDL_LockMutex(), but if the mutex is not available,
105 * this function returns `SDL_MUTEX_TIMEOUT` immediately.
106 *
107 * This technique is useful if you need exclusive access to a resource but
108 * don't want to wait for it, and will return to it to try again later.
109 *
110 * \param mutex the mutex to try to lock
111 * \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
112 * more information.
113 *
114 * \since This function is available since SDL 2.0.0.
115 *
116 * \sa SDL_CreateMutex
117 * \sa SDL_DestroyMutex
118 * \sa SDL_LockMutex
119 * \sa SDL_UnlockMutex
120 */
121 extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
122
123 /**
124 * Unlock the mutex.
125 *
126 * It is legal for the owning thread to lock an already-locked mutex. It must
127 * unlock it the same number of times before it is actually made available for
128 * other threads in the system (this is known as a "recursive mutex").
129 *
130 * It is an error to unlock a mutex that has not been locked by the current
131 * thread, and doing so results in undefined behavior.
132 *
133 * It is also an error to unlock a mutex that isn't locked at all.
134 *
135 * \param mutex the mutex to unlock.
136 * \returns 0, or -1 on error.
137 *
138 * \since This function is available since SDL 2.0.0.
139 */
140 extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
141 #define SDL_mutexV(m) SDL_UnlockMutex(m)
142
143 /**
144 * Destroy a mutex created with SDL_CreateMutex().
145 *
146 * This function must be called on any mutex that is no longer needed. Failure
147 * to destroy a mutex will result in a system memory or resource leak. While
148 * it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
149 * to destroy a locked mutex, and may result in undefined behavior depending
150 * on the platform.
151 *
152 * \param mutex the mutex to destroy
153 *
154 * \since This function is available since SDL 2.0.0.
155 *
156 * \sa SDL_CreateMutex
157 * \sa SDL_LockMutex
158 * \sa SDL_TryLockMutex
159 * \sa SDL_UnlockMutex
160 */
161 extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
162
163 /* @} *//* Mutex functions */
164
165
166 /**
167 * \name Semaphore functions
168 */
169 /* @{ */
170
171 /* The SDL semaphore structure, defined in SDL_syssem.c */
172 struct SDL_semaphore;
173 typedef struct SDL_semaphore SDL_sem;
174
175 /**
176 * Create a semaphore.
177 *
178 * This function creates a new semaphore and initializes it with the value
179 * `initial_value`. Each wait operation on the semaphore will atomically
180 * decrement the semaphore value and potentially block if the semaphore value
181 * is 0. Each post operation will atomically increment the semaphore value and
182 * wake waiting threads and allow them to retry the wait operation.
183 *
184 * \param initial_value the starting value of the semaphore
185 * \returns a new semaphore or NULL on failure; call SDL_GetError() for more
186 * information.
187 *
188 * \since This function is available since SDL 2.0.0.
189 *
190 * \sa SDL_DestroySemaphore
191 * \sa SDL_SemPost
192 * \sa SDL_SemTryWait
193 * \sa SDL_SemValue
194 * \sa SDL_SemWait
195 * \sa SDL_SemWaitTimeout
196 */
197 extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
198
199 /**
200 * Destroy a semaphore.
201 *
202 * It is not safe to destroy a semaphore if there are threads currently
203 * waiting on it.
204 *
205 * \param sem the semaphore to destroy
206 *
207 * \since This function is available since SDL 2.0.0.
208 *
209 * \sa SDL_CreateSemaphore
210 * \sa SDL_SemPost
211 * \sa SDL_SemTryWait
212 * \sa SDL_SemValue
213 * \sa SDL_SemWait
214 * \sa SDL_SemWaitTimeout
215 */
216 extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
217
218 /**
219 * Wait until a semaphore has a positive value and then decrements it.
220 *
221 * This function suspends the calling thread until either the semaphore
222 * pointed to by `sem` has a positive value or the call is interrupted by a
223 * signal or error. If the call is successful it will atomically decrement the
224 * semaphore value.
225 *
226 * This function is the equivalent of calling SDL_SemWaitTimeout() with a time
227 * length of `SDL_MUTEX_MAXWAIT`.
228 *
229 * \param sem the semaphore wait on
230 * \returns 0 on success or a negative error code on failure; call
231 * SDL_GetError() for more information.
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_CreateSemaphore
236 * \sa SDL_DestroySemaphore
237 * \sa SDL_SemPost
238 * \sa SDL_SemTryWait
239 * \sa SDL_SemValue
240 * \sa SDL_SemWait
241 * \sa SDL_SemWaitTimeout
242 */
243 extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
244
245 /**
246 * See if a semaphore has a positive value and decrement it if it does.
247 *
248 * This function checks to see if the semaphore pointed to by `sem` has a
249 * positive value and atomically decrements the semaphore value if it does. If
250 * the semaphore doesn't have a positive value, the function immediately
251 * returns SDL_MUTEX_TIMEDOUT.
252 *
253 * \param sem the semaphore to wait on
254 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
255 * block, or a negative error code on failure; call SDL_GetError()
256 * for more information.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_CreateSemaphore
261 * \sa SDL_DestroySemaphore
262 * \sa SDL_SemPost
263 * \sa SDL_SemValue
264 * \sa SDL_SemWait
265 * \sa SDL_SemWaitTimeout
266 */
267 extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
268
269 /**
270 * Wait until a semaphore has a positive value and then decrements it.
271 *
272 * This function suspends the calling thread until either the semaphore
273 * pointed to by `sem` has a positive value, the call is interrupted by a
274 * signal or error, or the specified time has elapsed. If the call is
275 * successful it will atomically decrement the semaphore value.
276 *
277 * \param sem the semaphore to wait on
278 * \param ms the length of the timeout, in milliseconds
279 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
280 * succeed in the allotted time, or a negative error code on failure;
281 * call SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateSemaphore
286 * \sa SDL_DestroySemaphore
287 * \sa SDL_SemPost
288 * \sa SDL_SemTryWait
289 * \sa SDL_SemValue
290 * \sa SDL_SemWait
291 */
292 extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
293
294 /**
295 * Atomically increment a semaphore's value and wake waiting threads.
296 *
297 * \param sem the semaphore to increment
298 * \returns 0 on success or a negative error code on failure; call
299 * SDL_GetError() for more information.
300 *
301 * \since This function is available since SDL 2.0.0.
302 *
303 * \sa SDL_CreateSemaphore
304 * \sa SDL_DestroySemaphore
305 * \sa SDL_SemTryWait
306 * \sa SDL_SemValue
307 * \sa SDL_SemWait
308 * \sa SDL_SemWaitTimeout
309 */
310 extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
311
312 /**
313 * Get the current value of a semaphore.
314 *
315 * \param sem the semaphore to query
316 * \returns the current value of the semaphore.
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_CreateSemaphore
321 */
322 extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
323
324 /* @} *//* Semaphore functions */
325
326
327 /**
328 * \name Condition variable functions
329 */
330 /* @{ */
331
332 /* The SDL condition variable structure, defined in SDL_syscond.c */
333 struct SDL_cond;
334 typedef struct SDL_cond SDL_cond;
335
336 /**
337 * Create a condition variable.
338 *
339 * \returns a new condition variable or NULL on failure; call SDL_GetError()
340 * for more information.
341 *
342 * \since This function is available since SDL 2.0.0.
343 *
344 * \sa SDL_CondBroadcast
345 * \sa SDL_CondSignal
346 * \sa SDL_CondWait
347 * \sa SDL_CondWaitTimeout
348 * \sa SDL_DestroyCond
349 */
350 extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
351
352 /**
353 * Destroy a condition variable.
354 *
355 * \param cond the condition variable to destroy
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_CondBroadcast
360 * \sa SDL_CondSignal
361 * \sa SDL_CondWait
362 * \sa SDL_CondWaitTimeout
363 * \sa SDL_CreateCond
364 */
365 extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
366
367 /**
368 * Restart one of the threads that are waiting on the condition variable.
369 *
370 * \param cond the condition variable to signal
371 * \returns 0 on success or a negative error code on failure; call
372 * SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_CondBroadcast
377 * \sa SDL_CondWait
378 * \sa SDL_CondWaitTimeout
379 * \sa SDL_CreateCond
380 * \sa SDL_DestroyCond
381 */
382 extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
383
384 /**
385 * Restart all threads that are waiting on the condition variable.
386 *
387 * \param cond the condition variable to signal
388 * \returns 0 on success or a negative error code on failure; call
389 * SDL_GetError() for more information.
390 *
391 * \since This function is available since SDL 2.0.0.
392 *
393 * \sa SDL_CondSignal
394 * \sa SDL_CondWait
395 * \sa SDL_CondWaitTimeout
396 * \sa SDL_CreateCond
397 * \sa SDL_DestroyCond
398 */
399 extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
400
401 /**
402 * Wait until a condition variable is signaled.
403 *
404 * This function unlocks the specified `mutex` and waits for another thread to
405 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
406 * `cond`. Once the condition variable is signaled, the mutex is re-locked and
407 * the function returns.
408 *
409 * The mutex must be locked before calling this function.
410 *
411 * This function is the equivalent of calling SDL_CondWaitTimeout() with a
412 * time length of `SDL_MUTEX_MAXWAIT`.
413 *
414 * \param cond the condition variable to wait on
415 * \param mutex the mutex used to coordinate thread access
416 * \returns 0 when it is signaled or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CondBroadcast
422 * \sa SDL_CondSignal
423 * \sa SDL_CondWaitTimeout
424 * \sa SDL_CreateCond
425 * \sa SDL_DestroyCond
426 */
427 extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
428
429 /**
430 * Wait until a condition variable is signaled or a certain time has passed.
431 *
432 * This function unlocks the specified `mutex` and waits for another thread to
433 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
434 * `cond`, or for the specified time to elapse. Once the condition variable is
435 * signaled or the time elapsed, the mutex is re-locked and the function
436 * returns.
437 *
438 * The mutex must be locked before calling this function.
439 *
440 * \param cond the condition variable to wait on
441 * \param mutex the mutex used to coordinate thread access
442 * \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
443 * to wait indefinitely
444 * \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
445 * the condition is not signaled in the allotted time, or a negative
446 * error code on failure; call SDL_GetError() for more information.
447 *
448 * \since This function is available since SDL 2.0.0.
449 *
450 * \sa SDL_CondBroadcast
451 * \sa SDL_CondSignal
452 * \sa SDL_CondWait
453 * \sa SDL_CreateCond
454 * \sa SDL_DestroyCond
455 */
456 extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
457 SDL_mutex * mutex, Uint32 ms);
458
459 /* @} *//* Condition variable functions */
460
461
462 /* Ends C function definitions when using C++ */
463 #ifdef __cplusplus
464 }
465 #endif
466 #include <SDL2/close_code.h>
467
468 #endif /* SDL_mutex_h_ */
469
470 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDLname_h_
22 #define SDLname_h_
23
24 #if defined(__STDC__) || defined(__cplusplus)
25 #define NeedFunctionPrototypes 1
26 #endif
27
28 #define SDL_NAME(X) SDL_##X
29
30 #endif /* SDLname_h_ */
31
32 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengl.h
23 *
24 * This is a simple file to encapsulate the OpenGL API headers.
25 */
26
27 /**
28 * \def NO_SDL_GLEXT
29 *
30 * Define this if you have your own version of glext.h and want to disable the
31 * version included in SDL_opengl.h.
32 */
33
34 #ifndef SDL_opengl_h_
35 #define SDL_opengl_h_
36
37 #include <SDL2/SDL_config.h>
38
39 #ifndef __IPHONEOS__ /* No OpenGL on iOS. */
40
41 /*
42 * Mesa 3-D graphics library
43 *
44 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
45 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
46 *
47 * Permission is hereby granted, free of charge, to any person obtaining a
48 * copy of this software and associated documentation files (the "Software"),
49 * to deal in the Software without restriction, including without limitation
50 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
51 * and/or sell copies of the Software, and to permit persons to whom the
52 * Software is furnished to do so, subject to the following conditions:
53 *
54 * The above copyright notice and this permission notice shall be included
55 * in all copies or substantial portions of the Software.
56 *
57 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
60 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
61 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
62 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
63 * OTHER DEALINGS IN THE SOFTWARE.
64 */
65
66
67 #ifndef __gl_h_
68 #define __gl_h_
69
70 #if defined(USE_MGL_NAMESPACE)
71 #include <SDL2/gl_mangle.h>
72 #endif
73
74
75 /**********************************************************************
76 * Begin system-specific stuff.
77 */
78
79 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
80 #define __WIN32__
81 #endif
82
83 #if defined(__WIN32__) && !defined(__CYGWIN__)
84 # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
85 # define GLAPI __declspec(dllexport)
86 # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
87 # define GLAPI __declspec(dllimport)
88 # else /* for use with static link lib build of Win32 edition only */
89 # define GLAPI extern
90 # endif /* _STATIC_MESA support */
91 # if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
92 # define GLAPIENTRY
93 # else
94 # define GLAPIENTRY __stdcall
95 # endif
96 #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
97 # define GLAPI extern
98 # define GLAPIENTRY __stdcall
99 #elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */
100 # define GLAPI extern
101 # define GLAPIENTRY _System
102 # define APIENTRY _System
103 # if defined(__GNUC__) && !defined(_System)
104 # define _System
105 # endif
106 #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
107 # define GLAPI __attribute__((visibility("default")))
108 # define GLAPIENTRY
109 #endif /* WIN32 && !CYGWIN */
110
111 /*
112 * WINDOWS: Include windows.h here to define APIENTRY.
113 * It is also useful when applications include this file by
114 * including only glut.h, since glut.h depends on windows.h.
115 * Applications needing to include windows.h with parms other
116 * than "WIN32_LEAN_AND_MEAN" may include windows.h before
117 * glut.h or gl.h.
118 */
119 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
120 #ifndef WIN32_LEAN_AND_MEAN
121 #define WIN32_LEAN_AND_MEAN 1
122 #endif
123 #ifndef NOMINMAX /* don't define min() and max(). */
124 #define NOMINMAX
125 #endif
126 #include <windows.h>
127 #endif
128
129 #ifndef GLAPI
130 #define GLAPI extern
131 #endif
132
133 #ifndef GLAPIENTRY
134 #define GLAPIENTRY
135 #endif
136
137 #ifndef APIENTRY
138 #define APIENTRY GLAPIENTRY
139 #endif
140
141 /* "P" suffix to be used for a pointer to a function */
142 #ifndef APIENTRYP
143 #define APIENTRYP APIENTRY *
144 #endif
145
146 #ifndef GLAPIENTRYP
147 #define GLAPIENTRYP GLAPIENTRY *
148 #endif
149
150 #if defined(PRAGMA_EXPORT_SUPPORTED)
151 #pragma export on
152 #endif
153
154 /*
155 * End system-specific stuff.
156 **********************************************************************/
157
158
159
160 #ifdef __cplusplus
161 extern "C" {
162 #endif
163
164
165
166 #define GL_VERSION_1_1 1
167 #define GL_VERSION_1_2 1
168 #define GL_VERSION_1_3 1
169 #define GL_ARB_imaging 1
170
171
172 /*
173 * Datatypes
174 */
175 typedef unsigned int GLenum;
176 typedef unsigned char GLboolean;
177 typedef unsigned int GLbitfield;
178 typedef void GLvoid;
179 typedef signed char GLbyte; /* 1-byte signed */
180 typedef short GLshort; /* 2-byte signed */
181 typedef int GLint; /* 4-byte signed */
182 typedef unsigned char GLubyte; /* 1-byte unsigned */
183 typedef unsigned short GLushort; /* 2-byte unsigned */
184 typedef unsigned int GLuint; /* 4-byte unsigned */
185 typedef int GLsizei; /* 4-byte signed */
186 typedef float GLfloat; /* single precision float */
187 typedef float GLclampf; /* single precision float in [0,1] */
188 typedef double GLdouble; /* double precision float */
189 typedef double GLclampd; /* double precision float in [0,1] */
190
191
192
193 /*
194 * Constants
195 */
196
197 /* Boolean values */
198 #define GL_FALSE 0
199 #define GL_TRUE 1
200
201 /* Data types */
202 #define GL_BYTE 0x1400
203 #define GL_UNSIGNED_BYTE 0x1401
204 #define GL_SHORT 0x1402
205 #define GL_UNSIGNED_SHORT 0x1403
206 #define GL_INT 0x1404
207 #define GL_UNSIGNED_INT 0x1405
208 #define GL_FLOAT 0x1406
209 #define GL_2_BYTES 0x1407
210 #define GL_3_BYTES 0x1408
211 #define GL_4_BYTES 0x1409
212 #define GL_DOUBLE 0x140A
213
214 /* Primitives */
215 #define GL_POINTS 0x0000
216 #define GL_LINES 0x0001
217 #define GL_LINE_LOOP 0x0002
218 #define GL_LINE_STRIP 0x0003
219 #define GL_TRIANGLES 0x0004
220 #define GL_TRIANGLE_STRIP 0x0005
221 #define GL_TRIANGLE_FAN 0x0006
222 #define GL_QUADS 0x0007
223 #define GL_QUAD_STRIP 0x0008
224 #define GL_POLYGON 0x0009
225
226 /* Vertex Arrays */
227 #define GL_VERTEX_ARRAY 0x8074
228 #define GL_NORMAL_ARRAY 0x8075
229 #define GL_COLOR_ARRAY 0x8076
230 #define GL_INDEX_ARRAY 0x8077
231 #define GL_TEXTURE_COORD_ARRAY 0x8078
232 #define GL_EDGE_FLAG_ARRAY 0x8079
233 #define GL_VERTEX_ARRAY_SIZE 0x807A
234 #define GL_VERTEX_ARRAY_TYPE 0x807B
235 #define GL_VERTEX_ARRAY_STRIDE 0x807C
236 #define GL_NORMAL_ARRAY_TYPE 0x807E
237 #define GL_NORMAL_ARRAY_STRIDE 0x807F
238 #define GL_COLOR_ARRAY_SIZE 0x8081
239 #define GL_COLOR_ARRAY_TYPE 0x8082
240 #define GL_COLOR_ARRAY_STRIDE 0x8083
241 #define GL_INDEX_ARRAY_TYPE 0x8085
242 #define GL_INDEX_ARRAY_STRIDE 0x8086
243 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
244 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
245 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
246 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
247 #define GL_VERTEX_ARRAY_POINTER 0x808E
248 #define GL_NORMAL_ARRAY_POINTER 0x808F
249 #define GL_COLOR_ARRAY_POINTER 0x8090
250 #define GL_INDEX_ARRAY_POINTER 0x8091
251 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
252 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
253 #define GL_V2F 0x2A20
254 #define GL_V3F 0x2A21
255 #define GL_C4UB_V2F 0x2A22
256 #define GL_C4UB_V3F 0x2A23
257 #define GL_C3F_V3F 0x2A24
258 #define GL_N3F_V3F 0x2A25
259 #define GL_C4F_N3F_V3F 0x2A26
260 #define GL_T2F_V3F 0x2A27
261 #define GL_T4F_V4F 0x2A28
262 #define GL_T2F_C4UB_V3F 0x2A29
263 #define GL_T2F_C3F_V3F 0x2A2A
264 #define GL_T2F_N3F_V3F 0x2A2B
265 #define GL_T2F_C4F_N3F_V3F 0x2A2C
266 #define GL_T4F_C4F_N3F_V4F 0x2A2D
267
268 /* Matrix Mode */
269 #define GL_MATRIX_MODE 0x0BA0
270 #define GL_MODELVIEW 0x1700
271 #define GL_PROJECTION 0x1701
272 #define GL_TEXTURE 0x1702
273
274 /* Points */
275 #define GL_POINT_SMOOTH 0x0B10
276 #define GL_POINT_SIZE 0x0B11
277 #define GL_POINT_SIZE_GRANULARITY 0x0B13
278 #define GL_POINT_SIZE_RANGE 0x0B12
279
280 /* Lines */
281 #define GL_LINE_SMOOTH 0x0B20
282 #define GL_LINE_STIPPLE 0x0B24
283 #define GL_LINE_STIPPLE_PATTERN 0x0B25
284 #define GL_LINE_STIPPLE_REPEAT 0x0B26
285 #define GL_LINE_WIDTH 0x0B21
286 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
287 #define GL_LINE_WIDTH_RANGE 0x0B22
288
289 /* Polygons */
290 #define GL_POINT 0x1B00
291 #define GL_LINE 0x1B01
292 #define GL_FILL 0x1B02
293 #define GL_CW 0x0900
294 #define GL_CCW 0x0901
295 #define GL_FRONT 0x0404
296 #define GL_BACK 0x0405
297 #define GL_POLYGON_MODE 0x0B40
298 #define GL_POLYGON_SMOOTH 0x0B41
299 #define GL_POLYGON_STIPPLE 0x0B42
300 #define GL_EDGE_FLAG 0x0B43
301 #define GL_CULL_FACE 0x0B44
302 #define GL_CULL_FACE_MODE 0x0B45
303 #define GL_FRONT_FACE 0x0B46
304 #define GL_POLYGON_OFFSET_FACTOR 0x8038
305 #define GL_POLYGON_OFFSET_UNITS 0x2A00
306 #define GL_POLYGON_OFFSET_POINT 0x2A01
307 #define GL_POLYGON_OFFSET_LINE 0x2A02
308 #define GL_POLYGON_OFFSET_FILL 0x8037
309
310 /* Display Lists */
311 #define GL_COMPILE 0x1300
312 #define GL_COMPILE_AND_EXECUTE 0x1301
313 #define GL_LIST_BASE 0x0B32
314 #define GL_LIST_INDEX 0x0B33
315 #define GL_LIST_MODE 0x0B30
316
317 /* Depth buffer */
318 #define GL_NEVER 0x0200
319 #define GL_LESS 0x0201
320 #define GL_EQUAL 0x0202
321 #define GL_LEQUAL 0x0203
322 #define GL_GREATER 0x0204
323 #define GL_NOTEQUAL 0x0205
324 #define GL_GEQUAL 0x0206
325 #define GL_ALWAYS 0x0207
326 #define GL_DEPTH_TEST 0x0B71
327 #define GL_DEPTH_BITS 0x0D56
328 #define GL_DEPTH_CLEAR_VALUE 0x0B73
329 #define GL_DEPTH_FUNC 0x0B74
330 #define GL_DEPTH_RANGE 0x0B70
331 #define GL_DEPTH_WRITEMASK 0x0B72
332 #define GL_DEPTH_COMPONENT 0x1902
333
334 /* Lighting */
335 #define GL_LIGHTING 0x0B50
336 #define GL_LIGHT0 0x4000
337 #define GL_LIGHT1 0x4001
338 #define GL_LIGHT2 0x4002
339 #define GL_LIGHT3 0x4003
340 #define GL_LIGHT4 0x4004
341 #define GL_LIGHT5 0x4005
342 #define GL_LIGHT6 0x4006
343 #define GL_LIGHT7 0x4007
344 #define GL_SPOT_EXPONENT 0x1205
345 #define GL_SPOT_CUTOFF 0x1206
346 #define GL_CONSTANT_ATTENUATION 0x1207
347 #define GL_LINEAR_ATTENUATION 0x1208
348 #define GL_QUADRATIC_ATTENUATION 0x1209
349 #define GL_AMBIENT 0x1200
350 #define GL_DIFFUSE 0x1201
351 #define GL_SPECULAR 0x1202
352 #define GL_SHININESS 0x1601
353 #define GL_EMISSION 0x1600
354 #define GL_POSITION 0x1203
355 #define GL_SPOT_DIRECTION 0x1204
356 #define GL_AMBIENT_AND_DIFFUSE 0x1602
357 #define GL_COLOR_INDEXES 0x1603
358 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
359 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
360 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
361 #define GL_FRONT_AND_BACK 0x0408
362 #define GL_SHADE_MODEL 0x0B54
363 #define GL_FLAT 0x1D00
364 #define GL_SMOOTH 0x1D01
365 #define GL_COLOR_MATERIAL 0x0B57
366 #define GL_COLOR_MATERIAL_FACE 0x0B55
367 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
368 #define GL_NORMALIZE 0x0BA1
369
370 /* User clipping planes */
371 #define GL_CLIP_PLANE0 0x3000
372 #define GL_CLIP_PLANE1 0x3001
373 #define GL_CLIP_PLANE2 0x3002
374 #define GL_CLIP_PLANE3 0x3003
375 #define GL_CLIP_PLANE4 0x3004
376 #define GL_CLIP_PLANE5 0x3005
377
378 /* Accumulation buffer */
379 #define GL_ACCUM_RED_BITS 0x0D58
380 #define GL_ACCUM_GREEN_BITS 0x0D59
381 #define GL_ACCUM_BLUE_BITS 0x0D5A
382 #define GL_ACCUM_ALPHA_BITS 0x0D5B
383 #define GL_ACCUM_CLEAR_VALUE 0x0B80
384 #define GL_ACCUM 0x0100
385 #define GL_ADD 0x0104
386 #define GL_LOAD 0x0101
387 #define GL_MULT 0x0103
388 #define GL_RETURN 0x0102
389
390 /* Alpha testing */
391 #define GL_ALPHA_TEST 0x0BC0
392 #define GL_ALPHA_TEST_REF 0x0BC2
393 #define GL_ALPHA_TEST_FUNC 0x0BC1
394
395 /* Blending */
396 #define GL_BLEND 0x0BE2
397 #define GL_BLEND_SRC 0x0BE1
398 #define GL_BLEND_DST 0x0BE0
399 #define GL_ZERO 0
400 #define GL_ONE 1
401 #define GL_SRC_COLOR 0x0300
402 #define GL_ONE_MINUS_SRC_COLOR 0x0301
403 #define GL_SRC_ALPHA 0x0302
404 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
405 #define GL_DST_ALPHA 0x0304
406 #define GL_ONE_MINUS_DST_ALPHA 0x0305
407 #define GL_DST_COLOR 0x0306
408 #define GL_ONE_MINUS_DST_COLOR 0x0307
409 #define GL_SRC_ALPHA_SATURATE 0x0308
410
411 /* Render Mode */
412 #define GL_FEEDBACK 0x1C01
413 #define GL_RENDER 0x1C00
414 #define GL_SELECT 0x1C02
415
416 /* Feedback */
417 #define GL_2D 0x0600
418 #define GL_3D 0x0601
419 #define GL_3D_COLOR 0x0602
420 #define GL_3D_COLOR_TEXTURE 0x0603
421 #define GL_4D_COLOR_TEXTURE 0x0604
422 #define GL_POINT_TOKEN 0x0701
423 #define GL_LINE_TOKEN 0x0702
424 #define GL_LINE_RESET_TOKEN 0x0707
425 #define GL_POLYGON_TOKEN 0x0703
426 #define GL_BITMAP_TOKEN 0x0704
427 #define GL_DRAW_PIXEL_TOKEN 0x0705
428 #define GL_COPY_PIXEL_TOKEN 0x0706
429 #define GL_PASS_THROUGH_TOKEN 0x0700
430 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
431 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
432 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
433
434 /* Selection */
435 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
436 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
437
438 /* Fog */
439 #define GL_FOG 0x0B60
440 #define GL_FOG_MODE 0x0B65
441 #define GL_FOG_DENSITY 0x0B62
442 #define GL_FOG_COLOR 0x0B66
443 #define GL_FOG_INDEX 0x0B61
444 #define GL_FOG_START 0x0B63
445 #define GL_FOG_END 0x0B64
446 #define GL_LINEAR 0x2601
447 #define GL_EXP 0x0800
448 #define GL_EXP2 0x0801
449
450 /* Logic Ops */
451 #define GL_LOGIC_OP 0x0BF1
452 #define GL_INDEX_LOGIC_OP 0x0BF1
453 #define GL_COLOR_LOGIC_OP 0x0BF2
454 #define GL_LOGIC_OP_MODE 0x0BF0
455 #define GL_CLEAR 0x1500
456 #define GL_SET 0x150F
457 #define GL_COPY 0x1503
458 #define GL_COPY_INVERTED 0x150C
459 #define GL_NOOP 0x1505
460 #define GL_INVERT 0x150A
461 #define GL_AND 0x1501
462 #define GL_NAND 0x150E
463 #define GL_OR 0x1507
464 #define GL_NOR 0x1508
465 #define GL_XOR 0x1506
466 #define GL_EQUIV 0x1509
467 #define GL_AND_REVERSE 0x1502
468 #define GL_AND_INVERTED 0x1504
469 #define GL_OR_REVERSE 0x150B
470 #define GL_OR_INVERTED 0x150D
471
472 /* Stencil */
473 #define GL_STENCIL_BITS 0x0D57
474 #define GL_STENCIL_TEST 0x0B90
475 #define GL_STENCIL_CLEAR_VALUE 0x0B91
476 #define GL_STENCIL_FUNC 0x0B92
477 #define GL_STENCIL_VALUE_MASK 0x0B93
478 #define GL_STENCIL_FAIL 0x0B94
479 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
480 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
481 #define GL_STENCIL_REF 0x0B97
482 #define GL_STENCIL_WRITEMASK 0x0B98
483 #define GL_STENCIL_INDEX 0x1901
484 #define GL_KEEP 0x1E00
485 #define GL_REPLACE 0x1E01
486 #define GL_INCR 0x1E02
487 #define GL_DECR 0x1E03
488
489 /* Buffers, Pixel Drawing/Reading */
490 #define GL_NONE 0
491 #define GL_LEFT 0x0406
492 #define GL_RIGHT 0x0407
493 /*GL_FRONT 0x0404 */
494 /*GL_BACK 0x0405 */
495 /*GL_FRONT_AND_BACK 0x0408 */
496 #define GL_FRONT_LEFT 0x0400
497 #define GL_FRONT_RIGHT 0x0401
498 #define GL_BACK_LEFT 0x0402
499 #define GL_BACK_RIGHT 0x0403
500 #define GL_AUX0 0x0409
501 #define GL_AUX1 0x040A
502 #define GL_AUX2 0x040B
503 #define GL_AUX3 0x040C
504 #define GL_COLOR_INDEX 0x1900
505 #define GL_RED 0x1903
506 #define GL_GREEN 0x1904
507 #define GL_BLUE 0x1905
508 #define GL_ALPHA 0x1906
509 #define GL_LUMINANCE 0x1909
510 #define GL_LUMINANCE_ALPHA 0x190A
511 #define GL_ALPHA_BITS 0x0D55
512 #define GL_RED_BITS 0x0D52
513 #define GL_GREEN_BITS 0x0D53
514 #define GL_BLUE_BITS 0x0D54
515 #define GL_INDEX_BITS 0x0D51
516 #define GL_SUBPIXEL_BITS 0x0D50
517 #define GL_AUX_BUFFERS 0x0C00
518 #define GL_READ_BUFFER 0x0C02
519 #define GL_DRAW_BUFFER 0x0C01
520 #define GL_DOUBLEBUFFER 0x0C32
521 #define GL_STEREO 0x0C33
522 #define GL_BITMAP 0x1A00
523 #define GL_COLOR 0x1800
524 #define GL_DEPTH 0x1801
525 #define GL_STENCIL 0x1802
526 #define GL_DITHER 0x0BD0
527 #define GL_RGB 0x1907
528 #define GL_RGBA 0x1908
529
530 /* Implementation limits */
531 #define GL_MAX_LIST_NESTING 0x0B31
532 #define GL_MAX_EVAL_ORDER 0x0D30
533 #define GL_MAX_LIGHTS 0x0D31
534 #define GL_MAX_CLIP_PLANES 0x0D32
535 #define GL_MAX_TEXTURE_SIZE 0x0D33
536 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
537 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
538 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
539 #define GL_MAX_NAME_STACK_DEPTH 0x0D37
540 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
541 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
542 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
543 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
544
545 /* Gets */
546 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
547 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
548 #define GL_COLOR_CLEAR_VALUE 0x0C22
549 #define GL_COLOR_WRITEMASK 0x0C23
550 #define GL_CURRENT_INDEX 0x0B01
551 #define GL_CURRENT_COLOR 0x0B00
552 #define GL_CURRENT_NORMAL 0x0B02
553 #define GL_CURRENT_RASTER_COLOR 0x0B04
554 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
555 #define GL_CURRENT_RASTER_INDEX 0x0B05
556 #define GL_CURRENT_RASTER_POSITION 0x0B07
557 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
558 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
559 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
560 #define GL_INDEX_CLEAR_VALUE 0x0C20
561 #define GL_INDEX_MODE 0x0C30
562 #define GL_INDEX_WRITEMASK 0x0C21
563 #define GL_MODELVIEW_MATRIX 0x0BA6
564 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
565 #define GL_NAME_STACK_DEPTH 0x0D70
566 #define GL_PROJECTION_MATRIX 0x0BA7
567 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
568 #define GL_RENDER_MODE 0x0C40
569 #define GL_RGBA_MODE 0x0C31
570 #define GL_TEXTURE_MATRIX 0x0BA8
571 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
572 #define GL_VIEWPORT 0x0BA2
573
574 /* Evaluators */
575 #define GL_AUTO_NORMAL 0x0D80
576 #define GL_MAP1_COLOR_4 0x0D90
577 #define GL_MAP1_INDEX 0x0D91
578 #define GL_MAP1_NORMAL 0x0D92
579 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
580 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
581 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
582 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
583 #define GL_MAP1_VERTEX_3 0x0D97
584 #define GL_MAP1_VERTEX_4 0x0D98
585 #define GL_MAP2_COLOR_4 0x0DB0
586 #define GL_MAP2_INDEX 0x0DB1
587 #define GL_MAP2_NORMAL 0x0DB2
588 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
589 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
590 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
591 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
592 #define GL_MAP2_VERTEX_3 0x0DB7
593 #define GL_MAP2_VERTEX_4 0x0DB8
594 #define GL_MAP1_GRID_DOMAIN 0x0DD0
595 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
596 #define GL_MAP2_GRID_DOMAIN 0x0DD2
597 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
598 #define GL_COEFF 0x0A00
599 #define GL_ORDER 0x0A01
600 #define GL_DOMAIN 0x0A02
601
602 /* Hints */
603 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
604 #define GL_POINT_SMOOTH_HINT 0x0C51
605 #define GL_LINE_SMOOTH_HINT 0x0C52
606 #define GL_POLYGON_SMOOTH_HINT 0x0C53
607 #define GL_FOG_HINT 0x0C54
608 #define GL_DONT_CARE 0x1100
609 #define GL_FASTEST 0x1101
610 #define GL_NICEST 0x1102
611
612 /* Scissor box */
613 #define GL_SCISSOR_BOX 0x0C10
614 #define GL_SCISSOR_TEST 0x0C11
615
616 /* Pixel Mode / Transfer */
617 #define GL_MAP_COLOR 0x0D10
618 #define GL_MAP_STENCIL 0x0D11
619 #define GL_INDEX_SHIFT 0x0D12
620 #define GL_INDEX_OFFSET 0x0D13
621 #define GL_RED_SCALE 0x0D14
622 #define GL_RED_BIAS 0x0D15
623 #define GL_GREEN_SCALE 0x0D18
624 #define GL_GREEN_BIAS 0x0D19
625 #define GL_BLUE_SCALE 0x0D1A
626 #define GL_BLUE_BIAS 0x0D1B
627 #define GL_ALPHA_SCALE 0x0D1C
628 #define GL_ALPHA_BIAS 0x0D1D
629 #define GL_DEPTH_SCALE 0x0D1E
630 #define GL_DEPTH_BIAS 0x0D1F
631 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
632 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
633 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
634 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
635 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
636 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
637 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
638 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
639 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
640 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
641 #define GL_PIXEL_MAP_S_TO_S 0x0C71
642 #define GL_PIXEL_MAP_I_TO_I 0x0C70
643 #define GL_PIXEL_MAP_I_TO_R 0x0C72
644 #define GL_PIXEL_MAP_I_TO_G 0x0C73
645 #define GL_PIXEL_MAP_I_TO_B 0x0C74
646 #define GL_PIXEL_MAP_I_TO_A 0x0C75
647 #define GL_PIXEL_MAP_R_TO_R 0x0C76
648 #define GL_PIXEL_MAP_G_TO_G 0x0C77
649 #define GL_PIXEL_MAP_B_TO_B 0x0C78
650 #define GL_PIXEL_MAP_A_TO_A 0x0C79
651 #define GL_PACK_ALIGNMENT 0x0D05
652 #define GL_PACK_LSB_FIRST 0x0D01
653 #define GL_PACK_ROW_LENGTH 0x0D02
654 #define GL_PACK_SKIP_PIXELS 0x0D04
655 #define GL_PACK_SKIP_ROWS 0x0D03
656 #define GL_PACK_SWAP_BYTES 0x0D00
657 #define GL_UNPACK_ALIGNMENT 0x0CF5
658 #define GL_UNPACK_LSB_FIRST 0x0CF1
659 #define GL_UNPACK_ROW_LENGTH 0x0CF2
660 #define GL_UNPACK_SKIP_PIXELS 0x0CF4
661 #define GL_UNPACK_SKIP_ROWS 0x0CF3
662 #define GL_UNPACK_SWAP_BYTES 0x0CF0
663 #define GL_ZOOM_X 0x0D16
664 #define GL_ZOOM_Y 0x0D17
665
666 /* Texture mapping */
667 #define GL_TEXTURE_ENV 0x2300
668 #define GL_TEXTURE_ENV_MODE 0x2200
669 #define GL_TEXTURE_1D 0x0DE0
670 #define GL_TEXTURE_2D 0x0DE1
671 #define GL_TEXTURE_WRAP_S 0x2802
672 #define GL_TEXTURE_WRAP_T 0x2803
673 #define GL_TEXTURE_MAG_FILTER 0x2800
674 #define GL_TEXTURE_MIN_FILTER 0x2801
675 #define GL_TEXTURE_ENV_COLOR 0x2201
676 #define GL_TEXTURE_GEN_S 0x0C60
677 #define GL_TEXTURE_GEN_T 0x0C61
678 #define GL_TEXTURE_GEN_R 0x0C62
679 #define GL_TEXTURE_GEN_Q 0x0C63
680 #define GL_TEXTURE_GEN_MODE 0x2500
681 #define GL_TEXTURE_BORDER_COLOR 0x1004
682 #define GL_TEXTURE_WIDTH 0x1000
683 #define GL_TEXTURE_HEIGHT 0x1001
684 #define GL_TEXTURE_BORDER 0x1005
685 #define GL_TEXTURE_COMPONENTS 0x1003
686 #define GL_TEXTURE_RED_SIZE 0x805C
687 #define GL_TEXTURE_GREEN_SIZE 0x805D
688 #define GL_TEXTURE_BLUE_SIZE 0x805E
689 #define GL_TEXTURE_ALPHA_SIZE 0x805F
690 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
691 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
692 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
693 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
694 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
695 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
696 #define GL_OBJECT_LINEAR 0x2401
697 #define GL_OBJECT_PLANE 0x2501
698 #define GL_EYE_LINEAR 0x2400
699 #define GL_EYE_PLANE 0x2502
700 #define GL_SPHERE_MAP 0x2402
701 #define GL_DECAL 0x2101
702 #define GL_MODULATE 0x2100
703 #define GL_NEAREST 0x2600
704 #define GL_REPEAT 0x2901
705 #define GL_CLAMP 0x2900
706 #define GL_S 0x2000
707 #define GL_T 0x2001
708 #define GL_R 0x2002
709 #define GL_Q 0x2003
710
711 /* Utility */
712 #define GL_VENDOR 0x1F00
713 #define GL_RENDERER 0x1F01
714 #define GL_VERSION 0x1F02
715 #define GL_EXTENSIONS 0x1F03
716
717 /* Errors */
718 #define GL_NO_ERROR 0
719 #define GL_INVALID_ENUM 0x0500
720 #define GL_INVALID_VALUE 0x0501
721 #define GL_INVALID_OPERATION 0x0502
722 #define GL_STACK_OVERFLOW 0x0503
723 #define GL_STACK_UNDERFLOW 0x0504
724 #define GL_OUT_OF_MEMORY 0x0505
725
726 /* glPush/PopAttrib bits */
727 #define GL_CURRENT_BIT 0x00000001
728 #define GL_POINT_BIT 0x00000002
729 #define GL_LINE_BIT 0x00000004
730 #define GL_POLYGON_BIT 0x00000008
731 #define GL_POLYGON_STIPPLE_BIT 0x00000010
732 #define GL_PIXEL_MODE_BIT 0x00000020
733 #define GL_LIGHTING_BIT 0x00000040
734 #define GL_FOG_BIT 0x00000080
735 #define GL_DEPTH_BUFFER_BIT 0x00000100
736 #define GL_ACCUM_BUFFER_BIT 0x00000200
737 #define GL_STENCIL_BUFFER_BIT 0x00000400
738 #define GL_VIEWPORT_BIT 0x00000800
739 #define GL_TRANSFORM_BIT 0x00001000
740 #define GL_ENABLE_BIT 0x00002000
741 #define GL_COLOR_BUFFER_BIT 0x00004000
742 #define GL_HINT_BIT 0x00008000
743 #define GL_EVAL_BIT 0x00010000
744 #define GL_LIST_BIT 0x00020000
745 #define GL_TEXTURE_BIT 0x00040000
746 #define GL_SCISSOR_BIT 0x00080000
747 #define GL_ALL_ATTRIB_BITS 0x000FFFFF
748
749
750 /* OpenGL 1.1 */
751 #define GL_PROXY_TEXTURE_1D 0x8063
752 #define GL_PROXY_TEXTURE_2D 0x8064
753 #define GL_TEXTURE_PRIORITY 0x8066
754 #define GL_TEXTURE_RESIDENT 0x8067
755 #define GL_TEXTURE_BINDING_1D 0x8068
756 #define GL_TEXTURE_BINDING_2D 0x8069
757 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
758 #define GL_ALPHA4 0x803B
759 #define GL_ALPHA8 0x803C
760 #define GL_ALPHA12 0x803D
761 #define GL_ALPHA16 0x803E
762 #define GL_LUMINANCE4 0x803F
763 #define GL_LUMINANCE8 0x8040
764 #define GL_LUMINANCE12 0x8041
765 #define GL_LUMINANCE16 0x8042
766 #define GL_LUMINANCE4_ALPHA4 0x8043
767 #define GL_LUMINANCE6_ALPHA2 0x8044
768 #define GL_LUMINANCE8_ALPHA8 0x8045
769 #define GL_LUMINANCE12_ALPHA4 0x8046
770 #define GL_LUMINANCE12_ALPHA12 0x8047
771 #define GL_LUMINANCE16_ALPHA16 0x8048
772 #define GL_INTENSITY 0x8049
773 #define GL_INTENSITY4 0x804A
774 #define GL_INTENSITY8 0x804B
775 #define GL_INTENSITY12 0x804C
776 #define GL_INTENSITY16 0x804D
777 #define GL_R3_G3_B2 0x2A10
778 #define GL_RGB4 0x804F
779 #define GL_RGB5 0x8050
780 #define GL_RGB8 0x8051
781 #define GL_RGB10 0x8052
782 #define GL_RGB12 0x8053
783 #define GL_RGB16 0x8054
784 #define GL_RGBA2 0x8055
785 #define GL_RGBA4 0x8056
786 #define GL_RGB5_A1 0x8057
787 #define GL_RGBA8 0x8058
788 #define GL_RGB10_A2 0x8059
789 #define GL_RGBA12 0x805A
790 #define GL_RGBA16 0x805B
791 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
792 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
793 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
794 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
795
796
797
798 /*
799 * Miscellaneous
800 */
801
802 GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
803
804 GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
805
806 GLAPI void GLAPIENTRY glClear( GLbitfield mask );
807
808 GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
809
810 GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
811
812 GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
813
814 GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
815
816 GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
817
818 GLAPI void GLAPIENTRY glCullFace( GLenum mode );
819
820 GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
821
822 GLAPI void GLAPIENTRY glPointSize( GLfloat size );
823
824 GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
825
826 GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
827
828 GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
829
830 GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
831
832 GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
833
834 GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
835
836 GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
837
838 GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
839
840 GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
841
842 GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
843
844 GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
845
846 GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
847
848 GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
849
850 GLAPI void GLAPIENTRY glEnable( GLenum cap );
851
852 GLAPI void GLAPIENTRY glDisable( GLenum cap );
853
854 GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
855
856
857 GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
858
859 GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
860
861
862 GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
863
864 GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
865
866 GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
867
868 GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
869
870
871 GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
872
873 GLAPI void GLAPIENTRY glPopAttrib( void );
874
875
876 GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
877
878 GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
879
880
881 GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
882
883 GLAPI GLenum GLAPIENTRY glGetError( void );
884
885 GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
886
887 GLAPI void GLAPIENTRY glFinish( void );
888
889 GLAPI void GLAPIENTRY glFlush( void );
890
891 GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
892
893
894 /*
895 * Depth Buffer
896 */
897
898 GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
899
900 GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
901
902 GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
903
904 GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
905
906
907 /*
908 * Accumulation Buffer
909 */
910
911 GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
912
913 GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
914
915
916 /*
917 * Transformation
918 */
919
920 GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
921
922 GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
923 GLdouble bottom, GLdouble top,
924 GLdouble near_val, GLdouble far_val );
925
926 GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
927 GLdouble bottom, GLdouble top,
928 GLdouble near_val, GLdouble far_val );
929
930 GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
931 GLsizei width, GLsizei height );
932
933 GLAPI void GLAPIENTRY glPushMatrix( void );
934
935 GLAPI void GLAPIENTRY glPopMatrix( void );
936
937 GLAPI void GLAPIENTRY glLoadIdentity( void );
938
939 GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
940 GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
941
942 GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
943 GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
944
945 GLAPI void GLAPIENTRY glRotated( GLdouble angle,
946 GLdouble x, GLdouble y, GLdouble z );
947 GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
948 GLfloat x, GLfloat y, GLfloat z );
949
950 GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
951 GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
952
953 GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
954 GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
955
956
957 /*
958 * Display Lists
959 */
960
961 GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
962
963 GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
964
965 GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
966
967 GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
968
969 GLAPI void GLAPIENTRY glEndList( void );
970
971 GLAPI void GLAPIENTRY glCallList( GLuint list );
972
973 GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
974 const GLvoid *lists );
975
976 GLAPI void GLAPIENTRY glListBase( GLuint base );
977
978
979 /*
980 * Drawing Functions
981 */
982
983 GLAPI void GLAPIENTRY glBegin( GLenum mode );
984
985 GLAPI void GLAPIENTRY glEnd( void );
986
987
988 GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
989 GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
990 GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
991 GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
992
993 GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
994 GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
995 GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
996 GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
997
998 GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
999 GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1000 GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
1001 GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
1002
1003 GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
1004 GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
1005 GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
1006 GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
1007
1008 GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
1009 GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
1010 GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
1011 GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
1012
1013 GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
1014 GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
1015 GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
1016 GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
1017
1018
1019 GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
1020 GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
1021 GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
1022 GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
1023 GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
1024
1025 GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
1026 GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
1027 GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
1028 GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
1029 GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
1030
1031
1032 GLAPI void GLAPIENTRY glIndexd( GLdouble c );
1033 GLAPI void GLAPIENTRY glIndexf( GLfloat c );
1034 GLAPI void GLAPIENTRY glIndexi( GLint c );
1035 GLAPI void GLAPIENTRY glIndexs( GLshort c );
1036 GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
1037
1038 GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
1039 GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
1040 GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
1041 GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
1042 GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
1043
1044 GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
1045 GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
1046 GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
1047 GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
1048 GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
1049 GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
1050 GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
1051 GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
1052
1053 GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
1054 GLbyte blue, GLbyte alpha );
1055 GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
1056 GLdouble blue, GLdouble alpha );
1057 GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
1058 GLfloat blue, GLfloat alpha );
1059 GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
1060 GLint blue, GLint alpha );
1061 GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
1062 GLshort blue, GLshort alpha );
1063 GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
1064 GLubyte blue, GLubyte alpha );
1065 GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
1066 GLuint blue, GLuint alpha );
1067 GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
1068 GLushort blue, GLushort alpha );
1069
1070
1071 GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
1072 GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
1073 GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
1074 GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
1075 GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
1076 GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
1077 GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
1078 GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
1079
1080 GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
1081 GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
1082 GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
1083 GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
1084 GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
1085 GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
1086 GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
1087 GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
1088
1089
1090 GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
1091 GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
1092 GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
1093 GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
1094
1095 GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
1096 GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
1097 GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
1098 GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
1099
1100 GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
1101 GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
1102 GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
1103 GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
1104
1105 GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1106 GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1107 GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
1108 GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
1109
1110 GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
1111 GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
1112 GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
1113 GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
1114
1115 GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
1116 GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
1117 GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
1118 GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
1119
1120 GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
1121 GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
1122 GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
1123 GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
1124
1125 GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
1126 GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
1127 GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
1128 GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
1129
1130
1131 GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
1132 GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
1133 GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
1134 GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
1135
1136 GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
1137 GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
1138 GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
1139 GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
1140
1141 GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1142 GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1143 GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
1144 GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
1145
1146 GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
1147 GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
1148 GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
1149 GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
1150
1151 GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
1152 GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
1153 GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
1154 GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
1155
1156 GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
1157 GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
1158 GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
1159 GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
1160
1161
1162 GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1163 GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1164 GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
1165 GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1166
1167
1168 GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
1169 GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
1170 GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
1171 GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
1172
1173
1174 /*
1175 * Vertex Arrays (1.1)
1176 */
1177
1178 GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
1179 GLsizei stride, const GLvoid *ptr );
1180
1181 GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
1182 const GLvoid *ptr );
1183
1184 GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
1185 GLsizei stride, const GLvoid *ptr );
1186
1187 GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
1188 const GLvoid *ptr );
1189
1190 GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
1191 GLsizei stride, const GLvoid *ptr );
1192
1193 GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
1194
1195 GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
1196
1197 GLAPI void GLAPIENTRY glArrayElement( GLint i );
1198
1199 GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
1200
1201 GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
1202 GLenum type, const GLvoid *indices );
1203
1204 GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
1205 const GLvoid *pointer );
1206
1207 /*
1208 * Lighting
1209 */
1210
1211 GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
1212
1213 GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
1214 GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
1215 GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
1216 const GLfloat *params );
1217 GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
1218 const GLint *params );
1219
1220 GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
1221 GLfloat *params );
1222 GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
1223 GLint *params );
1224
1225 GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
1226 GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
1227 GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
1228 GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
1229
1230 GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
1231 GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
1232 GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
1233 GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
1234
1235 GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
1236 GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
1237
1238 GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
1239
1240
1241 /*
1242 * Raster functions
1243 */
1244
1245 GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
1246
1247 GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
1248 GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
1249
1250 GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
1251 GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
1252
1253 GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
1254 const GLfloat *values );
1255 GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
1256 const GLuint *values );
1257 GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
1258 const GLushort *values );
1259
1260 GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
1261 GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
1262 GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
1263
1264 GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
1265 GLfloat xorig, GLfloat yorig,
1266 GLfloat xmove, GLfloat ymove,
1267 const GLubyte *bitmap );
1268
1269 GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
1270 GLsizei width, GLsizei height,
1271 GLenum format, GLenum type,
1272 GLvoid *pixels );
1273
1274 GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
1275 GLenum format, GLenum type,
1276 const GLvoid *pixels );
1277
1278 GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
1279 GLsizei width, GLsizei height,
1280 GLenum type );
1281
1282 /*
1283 * Stenciling
1284 */
1285
1286 GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
1287
1288 GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
1289
1290 GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
1291
1292 GLAPI void GLAPIENTRY glClearStencil( GLint s );
1293
1294
1295
1296 /*
1297 * Texture mapping
1298 */
1299
1300 GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
1301 GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
1302 GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
1303
1304 GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
1305 GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
1306 GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
1307
1308 GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
1309 GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
1310 GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
1311
1312
1313 GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
1314 GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
1315
1316 GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
1317 GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
1318
1319 GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
1320 GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
1321
1322
1323 GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
1324 GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
1325
1326 GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
1327 const GLfloat *params );
1328 GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
1329 const GLint *params );
1330
1331 GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
1332 GLenum pname, GLfloat *params);
1333 GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
1334 GLenum pname, GLint *params );
1335
1336 GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
1337 GLenum pname, GLfloat *params );
1338 GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
1339 GLenum pname, GLint *params );
1340
1341
1342 GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
1343 GLint internalFormat,
1344 GLsizei width, GLint border,
1345 GLenum format, GLenum type,
1346 const GLvoid *pixels );
1347
1348 GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
1349 GLint internalFormat,
1350 GLsizei width, GLsizei height,
1351 GLint border, GLenum format, GLenum type,
1352 const GLvoid *pixels );
1353
1354 GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
1355 GLenum format, GLenum type,
1356 GLvoid *pixels );
1357
1358
1359 /* 1.1 functions */
1360
1361 GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
1362
1363 GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
1364
1365 GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
1366
1367 GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
1368 const GLuint *textures,
1369 const GLclampf *priorities );
1370
1371 GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
1372 const GLuint *textures,
1373 GLboolean *residences );
1374
1375 GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
1376
1377
1378 GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
1379 GLint xoffset,
1380 GLsizei width, GLenum format,
1381 GLenum type, const GLvoid *pixels );
1382
1383
1384 GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
1385 GLint xoffset, GLint yoffset,
1386 GLsizei width, GLsizei height,
1387 GLenum format, GLenum type,
1388 const GLvoid *pixels );
1389
1390
1391 GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
1392 GLenum internalformat,
1393 GLint x, GLint y,
1394 GLsizei width, GLint border );
1395
1396
1397 GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
1398 GLenum internalformat,
1399 GLint x, GLint y,
1400 GLsizei width, GLsizei height,
1401 GLint border );
1402
1403
1404 GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
1405 GLint xoffset, GLint x, GLint y,
1406 GLsizei width );
1407
1408
1409 GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
1410 GLint xoffset, GLint yoffset,
1411 GLint x, GLint y,
1412 GLsizei width, GLsizei height );
1413
1414
1415 /*
1416 * Evaluators
1417 */
1418
1419 GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
1420 GLint stride,
1421 GLint order, const GLdouble *points );
1422 GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
1423 GLint stride,
1424 GLint order, const GLfloat *points );
1425
1426 GLAPI void GLAPIENTRY glMap2d( GLenum target,
1427 GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
1428 GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
1429 const GLdouble *points );
1430 GLAPI void GLAPIENTRY glMap2f( GLenum target,
1431 GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
1432 GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
1433 const GLfloat *points );
1434
1435 GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
1436 GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
1437 GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
1438
1439 GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
1440 GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
1441
1442 GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
1443 GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
1444
1445 GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
1446 GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
1447
1448 GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
1449 GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
1450
1451 GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
1452 GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
1453
1454 GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
1455 GLint vn, GLdouble v1, GLdouble v2 );
1456 GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
1457 GLint vn, GLfloat v1, GLfloat v2 );
1458
1459 GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
1460
1461 GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
1462
1463 GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
1464
1465 GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1466
1467
1468 /*
1469 * Fog
1470 */
1471
1472 GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
1473
1474 GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
1475
1476 GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
1477
1478 GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
1479
1480
1481 /*
1482 * Selection and Feedback
1483 */
1484
1485 GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
1486
1487 GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
1488
1489 GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
1490
1491 GLAPI void GLAPIENTRY glInitNames( void );
1492
1493 GLAPI void GLAPIENTRY glLoadName( GLuint name );
1494
1495 GLAPI void GLAPIENTRY glPushName( GLuint name );
1496
1497 GLAPI void GLAPIENTRY glPopName( void );
1498
1499
1500
1501 /*
1502 * OpenGL 1.2
1503 */
1504
1505 #define GL_RESCALE_NORMAL 0x803A
1506 #define GL_CLAMP_TO_EDGE 0x812F
1507 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
1508 #define GL_MAX_ELEMENTS_INDICES 0x80E9
1509 #define GL_BGR 0x80E0
1510 #define GL_BGRA 0x80E1
1511 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
1512 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
1513 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
1514 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
1515 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
1516 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
1517 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
1518 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
1519 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
1520 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
1521 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
1522 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
1523 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
1524 #define GL_SINGLE_COLOR 0x81F9
1525 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
1526 #define GL_TEXTURE_MIN_LOD 0x813A
1527 #define GL_TEXTURE_MAX_LOD 0x813B
1528 #define GL_TEXTURE_BASE_LEVEL 0x813C
1529 #define GL_TEXTURE_MAX_LEVEL 0x813D
1530 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
1531 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
1532 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
1533 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
1534 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1535 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1536 #define GL_PACK_SKIP_IMAGES 0x806B
1537 #define GL_PACK_IMAGE_HEIGHT 0x806C
1538 #define GL_UNPACK_SKIP_IMAGES 0x806D
1539 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
1540 #define GL_TEXTURE_3D 0x806F
1541 #define GL_PROXY_TEXTURE_3D 0x8070
1542 #define GL_TEXTURE_DEPTH 0x8071
1543 #define GL_TEXTURE_WRAP_R 0x8072
1544 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
1545 #define GL_TEXTURE_BINDING_3D 0x806A
1546
1547 GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
1548 GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
1549
1550 GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
1551 GLint internalFormat,
1552 GLsizei width, GLsizei height,
1553 GLsizei depth, GLint border,
1554 GLenum format, GLenum type,
1555 const GLvoid *pixels );
1556
1557 GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
1558 GLint xoffset, GLint yoffset,
1559 GLint zoffset, GLsizei width,
1560 GLsizei height, GLsizei depth,
1561 GLenum format,
1562 GLenum type, const GLvoid *pixels);
1563
1564 GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
1565 GLint xoffset, GLint yoffset,
1566 GLint zoffset, GLint x,
1567 GLint y, GLsizei width,
1568 GLsizei height );
1569
1570 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
1571 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
1572 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
1573 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1574
1575
1576 /*
1577 * GL_ARB_imaging
1578 */
1579
1580 #define GL_CONSTANT_COLOR 0x8001
1581 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1582 #define GL_CONSTANT_ALPHA 0x8003
1583 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1584 #define GL_COLOR_TABLE 0x80D0
1585 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
1586 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
1587 #define GL_PROXY_COLOR_TABLE 0x80D3
1588 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
1589 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
1590 #define GL_COLOR_TABLE_SCALE 0x80D6
1591 #define GL_COLOR_TABLE_BIAS 0x80D7
1592 #define GL_COLOR_TABLE_FORMAT 0x80D8
1593 #define GL_COLOR_TABLE_WIDTH 0x80D9
1594 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
1595 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
1596 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
1597 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
1598 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
1599 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
1600 #define GL_CONVOLUTION_1D 0x8010
1601 #define GL_CONVOLUTION_2D 0x8011
1602 #define GL_SEPARABLE_2D 0x8012
1603 #define GL_CONVOLUTION_BORDER_MODE 0x8013
1604 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
1605 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
1606 #define GL_REDUCE 0x8016
1607 #define GL_CONVOLUTION_FORMAT 0x8017
1608 #define GL_CONVOLUTION_WIDTH 0x8018
1609 #define GL_CONVOLUTION_HEIGHT 0x8019
1610 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
1611 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
1612 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
1613 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
1614 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
1615 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
1616 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
1617 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
1618 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
1619 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
1620 #define GL_CONSTANT_BORDER 0x8151
1621 #define GL_REPLICATE_BORDER 0x8153
1622 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
1623 #define GL_COLOR_MATRIX 0x80B1
1624 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
1625 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
1626 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
1627 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
1628 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
1629 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
1630 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
1631 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
1632 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
1633 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
1634 #define GL_HISTOGRAM 0x8024
1635 #define GL_PROXY_HISTOGRAM 0x8025
1636 #define GL_HISTOGRAM_WIDTH 0x8026
1637 #define GL_HISTOGRAM_FORMAT 0x8027
1638 #define GL_HISTOGRAM_RED_SIZE 0x8028
1639 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
1640 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
1641 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
1642 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
1643 #define GL_HISTOGRAM_SINK 0x802D
1644 #define GL_MINMAX 0x802E
1645 #define GL_MINMAX_FORMAT 0x802F
1646 #define GL_MINMAX_SINK 0x8030
1647 #define GL_TABLE_TOO_LARGE 0x8031
1648 #define GL_BLEND_EQUATION 0x8009
1649 #define GL_MIN 0x8007
1650 #define GL_MAX 0x8008
1651 #define GL_FUNC_ADD 0x8006
1652 #define GL_FUNC_SUBTRACT 0x800A
1653 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1654 #define GL_BLEND_COLOR 0x8005
1655
1656
1657 GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
1658 GLsizei width, GLenum format,
1659 GLenum type, const GLvoid *table );
1660
1661 GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
1662 GLsizei start, GLsizei count,
1663 GLenum format, GLenum type,
1664 const GLvoid *data );
1665
1666 GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
1667 const GLint *params);
1668
1669 GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
1670 const GLfloat *params);
1671
1672 GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
1673 GLint x, GLint y, GLsizei width );
1674
1675 GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
1676 GLint x, GLint y, GLsizei width );
1677
1678 GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
1679 GLenum type, GLvoid *table );
1680
1681 GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
1682 GLfloat *params );
1683
1684 GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
1685 GLint *params );
1686
1687 GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
1688
1689 GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
1690 GLclampf blue, GLclampf alpha );
1691
1692 GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
1693 GLenum internalformat, GLboolean sink );
1694
1695 GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
1696
1697 GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
1698 GLenum format, GLenum type,
1699 GLvoid *values );
1700
1701 GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
1702 GLfloat *params );
1703
1704 GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
1705 GLint *params );
1706
1707 GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
1708 GLboolean sink );
1709
1710 GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
1711
1712 GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
1713 GLenum format, GLenum types,
1714 GLvoid *values );
1715
1716 GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
1717 GLfloat *params );
1718
1719 GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
1720 GLint *params );
1721
1722 GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
1723 GLenum internalformat, GLsizei width, GLenum format, GLenum type,
1724 const GLvoid *image );
1725
1726 GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
1727 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1728 GLenum type, const GLvoid *image );
1729
1730 GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
1731 GLfloat params );
1732
1733 GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
1734 const GLfloat *params );
1735
1736 GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
1737 GLint params );
1738
1739 GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
1740 const GLint *params );
1741
1742 GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
1743 GLenum internalformat, GLint x, GLint y, GLsizei width );
1744
1745 GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
1746 GLenum internalformat, GLint x, GLint y, GLsizei width,
1747 GLsizei height);
1748
1749 GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
1750 GLenum type, GLvoid *image );
1751
1752 GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
1753 GLfloat *params );
1754
1755 GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
1756 GLint *params );
1757
1758 GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
1759 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1760 GLenum type, const GLvoid *row, const GLvoid *column );
1761
1762 GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
1763 GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
1764
1765
1766
1767
1768 /*
1769 * OpenGL 1.3
1770 */
1771
1772 /* multitexture */
1773 #define GL_TEXTURE0 0x84C0
1774 #define GL_TEXTURE1 0x84C1
1775 #define GL_TEXTURE2 0x84C2
1776 #define GL_TEXTURE3 0x84C3
1777 #define GL_TEXTURE4 0x84C4
1778 #define GL_TEXTURE5 0x84C5
1779 #define GL_TEXTURE6 0x84C6
1780 #define GL_TEXTURE7 0x84C7
1781 #define GL_TEXTURE8 0x84C8
1782 #define GL_TEXTURE9 0x84C9
1783 #define GL_TEXTURE10 0x84CA
1784 #define GL_TEXTURE11 0x84CB
1785 #define GL_TEXTURE12 0x84CC
1786 #define GL_TEXTURE13 0x84CD
1787 #define GL_TEXTURE14 0x84CE
1788 #define GL_TEXTURE15 0x84CF
1789 #define GL_TEXTURE16 0x84D0
1790 #define GL_TEXTURE17 0x84D1
1791 #define GL_TEXTURE18 0x84D2
1792 #define GL_TEXTURE19 0x84D3
1793 #define GL_TEXTURE20 0x84D4
1794 #define GL_TEXTURE21 0x84D5
1795 #define GL_TEXTURE22 0x84D6
1796 #define GL_TEXTURE23 0x84D7
1797 #define GL_TEXTURE24 0x84D8
1798 #define GL_TEXTURE25 0x84D9
1799 #define GL_TEXTURE26 0x84DA
1800 #define GL_TEXTURE27 0x84DB
1801 #define GL_TEXTURE28 0x84DC
1802 #define GL_TEXTURE29 0x84DD
1803 #define GL_TEXTURE30 0x84DE
1804 #define GL_TEXTURE31 0x84DF
1805 #define GL_ACTIVE_TEXTURE 0x84E0
1806 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
1807 #define GL_MAX_TEXTURE_UNITS 0x84E2
1808 /* texture_cube_map */
1809 #define GL_NORMAL_MAP 0x8511
1810 #define GL_REFLECTION_MAP 0x8512
1811 #define GL_TEXTURE_CUBE_MAP 0x8513
1812 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
1813 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
1814 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
1815 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
1816 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
1817 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
1818 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
1819 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
1820 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1821 /* texture_compression */
1822 #define GL_COMPRESSED_ALPHA 0x84E9
1823 #define GL_COMPRESSED_LUMINANCE 0x84EA
1824 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
1825 #define GL_COMPRESSED_INTENSITY 0x84EC
1826 #define GL_COMPRESSED_RGB 0x84ED
1827 #define GL_COMPRESSED_RGBA 0x84EE
1828 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
1829 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
1830 #define GL_TEXTURE_COMPRESSED 0x86A1
1831 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1832 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1833 /* multisample */
1834 #define GL_MULTISAMPLE 0x809D
1835 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1836 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
1837 #define GL_SAMPLE_COVERAGE 0x80A0
1838 #define GL_SAMPLE_BUFFERS 0x80A8
1839 #define GL_SAMPLES 0x80A9
1840 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1841 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1842 #define GL_MULTISAMPLE_BIT 0x20000000
1843 /* transpose_matrix */
1844 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
1845 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
1846 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
1847 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
1848 /* texture_env_combine */
1849 #define GL_COMBINE 0x8570
1850 #define GL_COMBINE_RGB 0x8571
1851 #define GL_COMBINE_ALPHA 0x8572
1852 #define GL_SOURCE0_RGB 0x8580
1853 #define GL_SOURCE1_RGB 0x8581
1854 #define GL_SOURCE2_RGB 0x8582
1855 #define GL_SOURCE0_ALPHA 0x8588
1856 #define GL_SOURCE1_ALPHA 0x8589
1857 #define GL_SOURCE2_ALPHA 0x858A
1858 #define GL_OPERAND0_RGB 0x8590
1859 #define GL_OPERAND1_RGB 0x8591
1860 #define GL_OPERAND2_RGB 0x8592
1861 #define GL_OPERAND0_ALPHA 0x8598
1862 #define GL_OPERAND1_ALPHA 0x8599
1863 #define GL_OPERAND2_ALPHA 0x859A
1864 #define GL_RGB_SCALE 0x8573
1865 #define GL_ADD_SIGNED 0x8574
1866 #define GL_INTERPOLATE 0x8575
1867 #define GL_SUBTRACT 0x84E7
1868 #define GL_CONSTANT 0x8576
1869 #define GL_PRIMARY_COLOR 0x8577
1870 #define GL_PREVIOUS 0x8578
1871 /* texture_env_dot3 */
1872 #define GL_DOT3_RGB 0x86AE
1873 #define GL_DOT3_RGBA 0x86AF
1874 /* texture_border_clamp */
1875 #define GL_CLAMP_TO_BORDER 0x812D
1876
1877 GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
1878
1879 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
1880
1881 GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
1882
1883 GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
1884
1885 GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
1886
1887 GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
1888
1889 GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
1890
1891 GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
1892
1893 GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
1894
1895 GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
1896
1897 GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
1898
1899 GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
1900
1901 GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
1902
1903 GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
1904
1905 GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
1906
1907 GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
1908
1909 GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
1910
1911 GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
1912
1913 GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
1914
1915 GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
1916
1917 GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
1918
1919 GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
1920
1921 GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
1922
1923 GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
1924
1925 GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
1926
1927 GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
1928
1929 GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
1930
1931 GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
1932
1933 GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
1934
1935 GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
1936
1937 GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
1938
1939 GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
1940
1941 GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
1942
1943 GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1944
1945 GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
1946
1947 GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1948
1949 GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
1950
1951 GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
1952
1953 GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
1954
1955 GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
1956
1957 GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
1958
1959
1960 GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
1961
1962 GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
1963
1964 GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
1965
1966 GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
1967
1968 GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
1969
1970
1971 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
1972 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
1973 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
1974 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
1975 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
1976 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
1977 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
1978 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
1979 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
1980
1981
1982
1983 /*
1984 * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
1985 */
1986 #ifndef GL_ARB_multitexture
1987 #define GL_ARB_multitexture 1
1988
1989 #define GL_TEXTURE0_ARB 0x84C0
1990 #define GL_TEXTURE1_ARB 0x84C1
1991 #define GL_TEXTURE2_ARB 0x84C2
1992 #define GL_TEXTURE3_ARB 0x84C3
1993 #define GL_TEXTURE4_ARB 0x84C4
1994 #define GL_TEXTURE5_ARB 0x84C5
1995 #define GL_TEXTURE6_ARB 0x84C6
1996 #define GL_TEXTURE7_ARB 0x84C7
1997 #define GL_TEXTURE8_ARB 0x84C8
1998 #define GL_TEXTURE9_ARB 0x84C9
1999 #define GL_TEXTURE10_ARB 0x84CA
2000 #define GL_TEXTURE11_ARB 0x84CB
2001 #define GL_TEXTURE12_ARB 0x84CC
2002 #define GL_TEXTURE13_ARB 0x84CD
2003 #define GL_TEXTURE14_ARB 0x84CE
2004 #define GL_TEXTURE15_ARB 0x84CF
2005 #define GL_TEXTURE16_ARB 0x84D0
2006 #define GL_TEXTURE17_ARB 0x84D1
2007 #define GL_TEXTURE18_ARB 0x84D2
2008 #define GL_TEXTURE19_ARB 0x84D3
2009 #define GL_TEXTURE20_ARB 0x84D4
2010 #define GL_TEXTURE21_ARB 0x84D5
2011 #define GL_TEXTURE22_ARB 0x84D6
2012 #define GL_TEXTURE23_ARB 0x84D7
2013 #define GL_TEXTURE24_ARB 0x84D8
2014 #define GL_TEXTURE25_ARB 0x84D9
2015 #define GL_TEXTURE26_ARB 0x84DA
2016 #define GL_TEXTURE27_ARB 0x84DB
2017 #define GL_TEXTURE28_ARB 0x84DC
2018 #define GL_TEXTURE29_ARB 0x84DD
2019 #define GL_TEXTURE30_ARB 0x84DE
2020 #define GL_TEXTURE31_ARB 0x84DF
2021 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
2022 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
2023 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
2024
2025 GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
2026 GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
2027 GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
2028 GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
2029 GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
2030 GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
2031 GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
2032 GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
2033 GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
2034 GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
2035 GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
2036 GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
2037 GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
2038 GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
2039 GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
2040 GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
2041 GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
2042 GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
2043 GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
2044 GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
2045 GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
2046 GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
2047 GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
2048 GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
2049 GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
2050 GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
2051 GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2052 GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
2053 GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2054 GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
2055 GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
2056 GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
2057 GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2058 GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
2059
2060 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
2061 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
2062 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
2063 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
2064 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
2065 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
2066 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
2067 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
2068 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
2069 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
2070 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
2071 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
2072 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
2073 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
2074 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
2075 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
2076 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
2077 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
2078 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
2079 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
2080 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
2081 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
2082 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
2083 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
2084 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
2085 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
2086 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2087 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
2088 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2089 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
2090 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
2091 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
2092 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2093 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
2094
2095 #endif /* GL_ARB_multitexture */
2096
2097
2098
2099 /*
2100 * Define this token if you want "old-style" header file behaviour (extensions
2101 * defined in gl.h). Otherwise, extensions will be included from glext.h.
2102 */
2103 #if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
2104 #include <SDL2/SDL_opengl_glext.h>
2105 #endif /* GL_GLEXT_LEGACY */
2106
2107
2108
2109 /*
2110 * ???. GL_MESA_packed_depth_stencil
2111 * XXX obsolete
2112 */
2113 #ifndef GL_MESA_packed_depth_stencil
2114 #define GL_MESA_packed_depth_stencil 1
2115
2116 #define GL_DEPTH_STENCIL_MESA 0x8750
2117 #define GL_UNSIGNED_INT_24_8_MESA 0x8751
2118 #define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
2119 #define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
2120 #define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
2121
2122 #endif /* GL_MESA_packed_depth_stencil */
2123
2124
2125 #ifndef GL_ATI_blend_equation_separate
2126 #define GL_ATI_blend_equation_separate 1
2127
2128 #define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
2129
2130 GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
2131 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
2132
2133 #endif /* GL_ATI_blend_equation_separate */
2134
2135
2136 /* GL_OES_EGL_image */
2137 #ifndef GL_OES_EGL_image
2138 typedef void* GLeglImageOES;
2139 #endif
2140
2141 #ifndef GL_OES_EGL_image
2142 #define GL_OES_EGL_image 1
2143 #ifdef GL_GLEXT_PROTOTYPES
2144 GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
2145 GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
2146 #endif
2147 typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
2148 typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
2149 #endif
2150
2151
2152 /**
2153 ** NOTE!!!!! If you add new functions to this file, or update
2154 ** glext.h be sure to regenerate the gl_mangle.h file. See comments
2155 ** in that file for details.
2156 **/
2157
2158
2159
2160 /**********************************************************************
2161 * Begin system-specific stuff
2162 */
2163 #if defined(PRAGMA_EXPORT_SUPPORTED)
2164 #pragma export off
2165 #endif
2166
2167 /*
2168 * End system-specific stuff
2169 **********************************************************************/
2170
2171
2172 #ifdef __cplusplus
2173 }
2174 #endif
2175
2176 #endif /* __gl_h_ */
2177
2178 #endif /* !__IPHONEOS__ */
2179
2180 #endif /* SDL_opengl_h_ */
2181
2182 /* vi: set ts=4 sw=4 expandtab: */
0 #ifndef __glext_h_
1 #define __glext_h_ 1
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 /*
8 ** Copyright (c) 2013-2014 The Khronos Group Inc.
9 **
10 ** Permission is hereby granted, free of charge, to any person obtaining a
11 ** copy of this software and/or associated documentation files (the
12 ** "Materials"), to deal in the Materials without restriction, including
13 ** without limitation the rights to use, copy, modify, merge, publish,
14 ** distribute, sublicense, and/or sell copies of the Materials, and to
15 ** permit persons to whom the Materials are furnished to do so, subject to
16 ** the following conditions:
17 **
18 ** The above copyright notice and this permission notice shall be included
19 ** in all copies or substantial portions of the Materials.
20 **
21 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28 */
29 /*
30 ** This header is generated from the Khronos OpenGL / OpenGL ES XML
31 ** API Registry. The current version of the Registry, generator scripts
32 ** used to make the header, and the header can be found at
33 ** http://www.opengl.org/registry/
34 **
35 ** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $
36 */
37
38 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
39 #ifndef WIN32_LEAN_AND_MEAN
40 #define WIN32_LEAN_AND_MEAN 1
41 #endif
42 #ifndef NOMINMAX /* don't define min() and max(). */
43 #define NOMINMAX
44 #endif
45 #include <windows.h>
46 #endif
47
48 #ifndef APIENTRY
49 #define APIENTRY
50 #endif
51 #ifndef APIENTRYP
52 #define APIENTRYP APIENTRY *
53 #endif
54 #ifndef GLAPI
55 #define GLAPI extern
56 #endif
57
58 #define GL_GLEXT_VERSION 20140521
59
60 /* Generated C header for:
61 * API: gl
62 * Profile: compatibility
63 * Versions considered: .*
64 * Versions emitted: 1\.[2-9]|[234]\.[0-9]
65 * Default extensions included: gl
66 * Additional extensions included: _nomatch_^
67 * Extensions removed: _nomatch_^
68 */
69
70 #ifndef GL_VERSION_1_2
71 #define GL_VERSION_1_2 1
72 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
73 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
74 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
75 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
76 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
77 #define GL_TEXTURE_BINDING_3D 0x806A
78 #define GL_PACK_SKIP_IMAGES 0x806B
79 #define GL_PACK_IMAGE_HEIGHT 0x806C
80 #define GL_UNPACK_SKIP_IMAGES 0x806D
81 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
82 #define GL_TEXTURE_3D 0x806F
83 #define GL_PROXY_TEXTURE_3D 0x8070
84 #define GL_TEXTURE_DEPTH 0x8071
85 #define GL_TEXTURE_WRAP_R 0x8072
86 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
87 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
88 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
89 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
90 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
91 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
92 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
93 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
94 #define GL_BGR 0x80E0
95 #define GL_BGRA 0x80E1
96 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
97 #define GL_MAX_ELEMENTS_INDICES 0x80E9
98 #define GL_CLAMP_TO_EDGE 0x812F
99 #define GL_TEXTURE_MIN_LOD 0x813A
100 #define GL_TEXTURE_MAX_LOD 0x813B
101 #define GL_TEXTURE_BASE_LEVEL 0x813C
102 #define GL_TEXTURE_MAX_LEVEL 0x813D
103 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
104 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
105 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
106 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
107 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
108 #define GL_RESCALE_NORMAL 0x803A
109 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
110 #define GL_SINGLE_COLOR 0x81F9
111 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
112 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
113 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
114 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
115 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
116 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
117 #ifdef GL_GLEXT_PROTOTYPES
118 GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
119 GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
120 GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
121 GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
122 #endif
123 #endif /* GL_VERSION_1_2 */
124
125 #ifndef GL_VERSION_1_3
126 #define GL_VERSION_1_3 1
127 #define GL_TEXTURE0 0x84C0
128 #define GL_TEXTURE1 0x84C1
129 #define GL_TEXTURE2 0x84C2
130 #define GL_TEXTURE3 0x84C3
131 #define GL_TEXTURE4 0x84C4
132 #define GL_TEXTURE5 0x84C5
133 #define GL_TEXTURE6 0x84C6
134 #define GL_TEXTURE7 0x84C7
135 #define GL_TEXTURE8 0x84C8
136 #define GL_TEXTURE9 0x84C9
137 #define GL_TEXTURE10 0x84CA
138 #define GL_TEXTURE11 0x84CB
139 #define GL_TEXTURE12 0x84CC
140 #define GL_TEXTURE13 0x84CD
141 #define GL_TEXTURE14 0x84CE
142 #define GL_TEXTURE15 0x84CF
143 #define GL_TEXTURE16 0x84D0
144 #define GL_TEXTURE17 0x84D1
145 #define GL_TEXTURE18 0x84D2
146 #define GL_TEXTURE19 0x84D3
147 #define GL_TEXTURE20 0x84D4
148 #define GL_TEXTURE21 0x84D5
149 #define GL_TEXTURE22 0x84D6
150 #define GL_TEXTURE23 0x84D7
151 #define GL_TEXTURE24 0x84D8
152 #define GL_TEXTURE25 0x84D9
153 #define GL_TEXTURE26 0x84DA
154 #define GL_TEXTURE27 0x84DB
155 #define GL_TEXTURE28 0x84DC
156 #define GL_TEXTURE29 0x84DD
157 #define GL_TEXTURE30 0x84DE
158 #define GL_TEXTURE31 0x84DF
159 #define GL_ACTIVE_TEXTURE 0x84E0
160 #define GL_MULTISAMPLE 0x809D
161 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
162 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
163 #define GL_SAMPLE_COVERAGE 0x80A0
164 #define GL_SAMPLE_BUFFERS 0x80A8
165 #define GL_SAMPLES 0x80A9
166 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
167 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
168 #define GL_TEXTURE_CUBE_MAP 0x8513
169 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
170 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
171 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
172 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
173 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
174 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
175 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
176 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
177 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
178 #define GL_COMPRESSED_RGB 0x84ED
179 #define GL_COMPRESSED_RGBA 0x84EE
180 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
181 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
182 #define GL_TEXTURE_COMPRESSED 0x86A1
183 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
184 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
185 #define GL_CLAMP_TO_BORDER 0x812D
186 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
187 #define GL_MAX_TEXTURE_UNITS 0x84E2
188 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
189 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
190 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
191 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
192 #define GL_MULTISAMPLE_BIT 0x20000000
193 #define GL_NORMAL_MAP 0x8511
194 #define GL_REFLECTION_MAP 0x8512
195 #define GL_COMPRESSED_ALPHA 0x84E9
196 #define GL_COMPRESSED_LUMINANCE 0x84EA
197 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
198 #define GL_COMPRESSED_INTENSITY 0x84EC
199 #define GL_COMBINE 0x8570
200 #define GL_COMBINE_RGB 0x8571
201 #define GL_COMBINE_ALPHA 0x8572
202 #define GL_SOURCE0_RGB 0x8580
203 #define GL_SOURCE1_RGB 0x8581
204 #define GL_SOURCE2_RGB 0x8582
205 #define GL_SOURCE0_ALPHA 0x8588
206 #define GL_SOURCE1_ALPHA 0x8589
207 #define GL_SOURCE2_ALPHA 0x858A
208 #define GL_OPERAND0_RGB 0x8590
209 #define GL_OPERAND1_RGB 0x8591
210 #define GL_OPERAND2_RGB 0x8592
211 #define GL_OPERAND0_ALPHA 0x8598
212 #define GL_OPERAND1_ALPHA 0x8599
213 #define GL_OPERAND2_ALPHA 0x859A
214 #define GL_RGB_SCALE 0x8573
215 #define GL_ADD_SIGNED 0x8574
216 #define GL_INTERPOLATE 0x8575
217 #define GL_SUBTRACT 0x84E7
218 #define GL_CONSTANT 0x8576
219 #define GL_PRIMARY_COLOR 0x8577
220 #define GL_PREVIOUS 0x8578
221 #define GL_DOT3_RGB 0x86AE
222 #define GL_DOT3_RGBA 0x86AF
223 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
224 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
225 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
226 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
227 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
228 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
229 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
230 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
231 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
232 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
233 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
234 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
235 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
236 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
237 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
238 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
239 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
240 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
241 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
242 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
243 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
244 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
245 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
246 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
247 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
248 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
249 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
250 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
251 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
252 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
253 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
254 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
255 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
256 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
257 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
258 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
259 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
260 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
261 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
262 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
263 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
264 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
265 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
266 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
267 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
268 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
269 #ifdef GL_GLEXT_PROTOTYPES
270 GLAPI void APIENTRY glActiveTexture (GLenum texture);
271 GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
272 GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
273 GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
274 GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
275 GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
276 GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
277 GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
278 GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
279 GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
280 GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
281 GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
282 GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
283 GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
284 GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
285 GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
286 GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
287 GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
288 GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
289 GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
290 GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
291 GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
292 GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
293 GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
294 GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
295 GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
296 GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
297 GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
298 GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
299 GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
300 GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
301 GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
302 GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
303 GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
304 GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
305 GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
306 GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
307 GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
308 GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
309 GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
310 GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
311 GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
312 GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
313 GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
314 GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
315 GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
316 #endif
317 #endif /* GL_VERSION_1_3 */
318
319 #ifndef GL_VERSION_1_4
320 #define GL_VERSION_1_4 1
321 #define GL_BLEND_DST_RGB 0x80C8
322 #define GL_BLEND_SRC_RGB 0x80C9
323 #define GL_BLEND_DST_ALPHA 0x80CA
324 #define GL_BLEND_SRC_ALPHA 0x80CB
325 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
326 #define GL_DEPTH_COMPONENT16 0x81A5
327 #define GL_DEPTH_COMPONENT24 0x81A6
328 #define GL_DEPTH_COMPONENT32 0x81A7
329 #define GL_MIRRORED_REPEAT 0x8370
330 #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
331 #define GL_TEXTURE_LOD_BIAS 0x8501
332 #define GL_INCR_WRAP 0x8507
333 #define GL_DECR_WRAP 0x8508
334 #define GL_TEXTURE_DEPTH_SIZE 0x884A
335 #define GL_TEXTURE_COMPARE_MODE 0x884C
336 #define GL_TEXTURE_COMPARE_FUNC 0x884D
337 #define GL_POINT_SIZE_MIN 0x8126
338 #define GL_POINT_SIZE_MAX 0x8127
339 #define GL_POINT_DISTANCE_ATTENUATION 0x8129
340 #define GL_GENERATE_MIPMAP 0x8191
341 #define GL_GENERATE_MIPMAP_HINT 0x8192
342 #define GL_FOG_COORDINATE_SOURCE 0x8450
343 #define GL_FOG_COORDINATE 0x8451
344 #define GL_FRAGMENT_DEPTH 0x8452
345 #define GL_CURRENT_FOG_COORDINATE 0x8453
346 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
347 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
348 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
349 #define GL_FOG_COORDINATE_ARRAY 0x8457
350 #define GL_COLOR_SUM 0x8458
351 #define GL_CURRENT_SECONDARY_COLOR 0x8459
352 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
353 #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
354 #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
355 #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
356 #define GL_SECONDARY_COLOR_ARRAY 0x845E
357 #define GL_TEXTURE_FILTER_CONTROL 0x8500
358 #define GL_DEPTH_TEXTURE_MODE 0x884B
359 #define GL_COMPARE_R_TO_TEXTURE 0x884E
360 #define GL_FUNC_ADD 0x8006
361 #define GL_FUNC_SUBTRACT 0x800A
362 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
363 #define GL_MIN 0x8007
364 #define GL_MAX 0x8008
365 #define GL_CONSTANT_COLOR 0x8001
366 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
367 #define GL_CONSTANT_ALPHA 0x8003
368 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
369 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
370 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
371 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
372 typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
373 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
374 typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
375 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
376 typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
377 typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
378 typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
379 typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
380 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
381 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
382 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
383 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
384 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
385 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
386 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
387 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
388 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
389 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
390 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
391 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
392 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
393 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
394 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
395 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
396 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
397 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
398 typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
399 typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
400 typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
401 typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
402 typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
403 typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
404 typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
405 typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
406 typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
407 typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
408 typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
409 typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
410 typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
411 typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
412 typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
413 typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
414 typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
415 typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
416 #ifdef GL_GLEXT_PROTOTYPES
417 GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
418 GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
419 GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
420 GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
421 GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
422 GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
423 GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
424 GLAPI void APIENTRY glFogCoordf (GLfloat coord);
425 GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
426 GLAPI void APIENTRY glFogCoordd (GLdouble coord);
427 GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
428 GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
429 GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
430 GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
431 GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
432 GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
433 GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
434 GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
435 GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
436 GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
437 GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
438 GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
439 GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
440 GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
441 GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
442 GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
443 GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
444 GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
445 GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
446 GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
447 GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
448 GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
449 GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
450 GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
451 GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
452 GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
453 GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
454 GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
455 GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
456 GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
457 GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
458 GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
459 GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
460 GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
461 GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
462 GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
463 GLAPI void APIENTRY glBlendEquation (GLenum mode);
464 #endif
465 #endif /* GL_VERSION_1_4 */
466
467 #ifndef GL_VERSION_1_5
468 #define GL_VERSION_1_5 1
469 #include <stddef.h>
470 #ifdef __MACOSX__
471 typedef long GLsizeiptr;
472 typedef long GLintptr;
473 #else
474 typedef ptrdiff_t GLsizeiptr;
475 typedef ptrdiff_t GLintptr;
476 #endif
477 #define GL_BUFFER_SIZE 0x8764
478 #define GL_BUFFER_USAGE 0x8765
479 #define GL_QUERY_COUNTER_BITS 0x8864
480 #define GL_CURRENT_QUERY 0x8865
481 #define GL_QUERY_RESULT 0x8866
482 #define GL_QUERY_RESULT_AVAILABLE 0x8867
483 #define GL_ARRAY_BUFFER 0x8892
484 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
485 #define GL_ARRAY_BUFFER_BINDING 0x8894
486 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
487 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
488 #define GL_READ_ONLY 0x88B8
489 #define GL_WRITE_ONLY 0x88B9
490 #define GL_READ_WRITE 0x88BA
491 #define GL_BUFFER_ACCESS 0x88BB
492 #define GL_BUFFER_MAPPED 0x88BC
493 #define GL_BUFFER_MAP_POINTER 0x88BD
494 #define GL_STREAM_DRAW 0x88E0
495 #define GL_STREAM_READ 0x88E1
496 #define GL_STREAM_COPY 0x88E2
497 #define GL_STATIC_DRAW 0x88E4
498 #define GL_STATIC_READ 0x88E5
499 #define GL_STATIC_COPY 0x88E6
500 #define GL_DYNAMIC_DRAW 0x88E8
501 #define GL_DYNAMIC_READ 0x88E9
502 #define GL_DYNAMIC_COPY 0x88EA
503 #define GL_SAMPLES_PASSED 0x8914
504 #define GL_SRC1_ALPHA 0x8589
505 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
506 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
507 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
508 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
509 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
510 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
511 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
512 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
513 #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
514 #define GL_FOG_COORD_SRC 0x8450
515 #define GL_FOG_COORD 0x8451
516 #define GL_CURRENT_FOG_COORD 0x8453
517 #define GL_FOG_COORD_ARRAY_TYPE 0x8454
518 #define GL_FOG_COORD_ARRAY_STRIDE 0x8455
519 #define GL_FOG_COORD_ARRAY_POINTER 0x8456
520 #define GL_FOG_COORD_ARRAY 0x8457
521 #define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
522 #define GL_SRC0_RGB 0x8580
523 #define GL_SRC1_RGB 0x8581
524 #define GL_SRC2_RGB 0x8582
525 #define GL_SRC0_ALPHA 0x8588
526 #define GL_SRC2_ALPHA 0x858A
527 typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
528 typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
529 typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
530 typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
531 typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
532 typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
533 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
534 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
535 typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
536 typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
537 typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
538 typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
539 typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
540 typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
541 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
542 typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
543 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
544 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
545 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
546 #ifdef GL_GLEXT_PROTOTYPES
547 GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
548 GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
549 GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
550 GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
551 GLAPI void APIENTRY glEndQuery (GLenum target);
552 GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
553 GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
554 GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
555 GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
556 GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
557 GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
558 GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
559 GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
560 GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
561 GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
562 GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
563 GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
564 GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
565 GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
566 #endif
567 #endif /* GL_VERSION_1_5 */
568
569 #ifndef GL_VERSION_2_0
570 #define GL_VERSION_2_0 1
571 typedef char GLchar;
572 #define GL_BLEND_EQUATION_RGB 0x8009
573 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
574 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
575 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
576 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
577 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
578 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
579 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
580 #define GL_STENCIL_BACK_FUNC 0x8800
581 #define GL_STENCIL_BACK_FAIL 0x8801
582 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
583 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
584 #define GL_MAX_DRAW_BUFFERS 0x8824
585 #define GL_DRAW_BUFFER0 0x8825
586 #define GL_DRAW_BUFFER1 0x8826
587 #define GL_DRAW_BUFFER2 0x8827
588 #define GL_DRAW_BUFFER3 0x8828
589 #define GL_DRAW_BUFFER4 0x8829
590 #define GL_DRAW_BUFFER5 0x882A
591 #define GL_DRAW_BUFFER6 0x882B
592 #define GL_DRAW_BUFFER7 0x882C
593 #define GL_DRAW_BUFFER8 0x882D
594 #define GL_DRAW_BUFFER9 0x882E
595 #define GL_DRAW_BUFFER10 0x882F
596 #define GL_DRAW_BUFFER11 0x8830
597 #define GL_DRAW_BUFFER12 0x8831
598 #define GL_DRAW_BUFFER13 0x8832
599 #define GL_DRAW_BUFFER14 0x8833
600 #define GL_DRAW_BUFFER15 0x8834
601 #define GL_BLEND_EQUATION_ALPHA 0x883D
602 #define GL_MAX_VERTEX_ATTRIBS 0x8869
603 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
604 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
605 #define GL_FRAGMENT_SHADER 0x8B30
606 #define GL_VERTEX_SHADER 0x8B31
607 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
608 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
609 #define GL_MAX_VARYING_FLOATS 0x8B4B
610 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
611 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
612 #define GL_SHADER_TYPE 0x8B4F
613 #define GL_FLOAT_VEC2 0x8B50
614 #define GL_FLOAT_VEC3 0x8B51
615 #define GL_FLOAT_VEC4 0x8B52
616 #define GL_INT_VEC2 0x8B53
617 #define GL_INT_VEC3 0x8B54
618 #define GL_INT_VEC4 0x8B55
619 #define GL_BOOL 0x8B56
620 #define GL_BOOL_VEC2 0x8B57
621 #define GL_BOOL_VEC3 0x8B58
622 #define GL_BOOL_VEC4 0x8B59
623 #define GL_FLOAT_MAT2 0x8B5A
624 #define GL_FLOAT_MAT3 0x8B5B
625 #define GL_FLOAT_MAT4 0x8B5C
626 #define GL_SAMPLER_1D 0x8B5D
627 #define GL_SAMPLER_2D 0x8B5E
628 #define GL_SAMPLER_3D 0x8B5F
629 #define GL_SAMPLER_CUBE 0x8B60
630 #define GL_SAMPLER_1D_SHADOW 0x8B61
631 #define GL_SAMPLER_2D_SHADOW 0x8B62
632 #define GL_DELETE_STATUS 0x8B80
633 #define GL_COMPILE_STATUS 0x8B81
634 #define GL_LINK_STATUS 0x8B82
635 #define GL_VALIDATE_STATUS 0x8B83
636 #define GL_INFO_LOG_LENGTH 0x8B84
637 #define GL_ATTACHED_SHADERS 0x8B85
638 #define GL_ACTIVE_UNIFORMS 0x8B86
639 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
640 #define GL_SHADER_SOURCE_LENGTH 0x8B88
641 #define GL_ACTIVE_ATTRIBUTES 0x8B89
642 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
643 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
644 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
645 #define GL_CURRENT_PROGRAM 0x8B8D
646 #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
647 #define GL_LOWER_LEFT 0x8CA1
648 #define GL_UPPER_LEFT 0x8CA2
649 #define GL_STENCIL_BACK_REF 0x8CA3
650 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
651 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
652 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
653 #define GL_POINT_SPRITE 0x8861
654 #define GL_COORD_REPLACE 0x8862
655 #define GL_MAX_TEXTURE_COORDS 0x8871
656 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
657 typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
658 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
659 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
660 typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
661 typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
662 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
663 typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
664 typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
665 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
666 typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
667 typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
668 typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
669 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
670 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
671 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
672 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
673 typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
674 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
675 typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
676 typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
677 typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
678 typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
679 typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
680 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
681 typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
682 typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
683 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
684 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
685 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
686 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
687 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
688 typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
689 typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
690 typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
691 typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
692 typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
693 typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
694 typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
695 typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
696 typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
697 typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
698 typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
699 typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
700 typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
701 typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
702 typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
703 typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
704 typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
705 typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
706 typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
707 typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
708 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
709 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
710 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
711 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
712 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
713 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
714 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
715 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
716 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
717 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
718 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
719 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
720 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
721 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
722 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
723 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
724 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
725 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
726 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
727 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
728 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
729 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
730 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
731 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
732 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
733 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
734 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
735 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
736 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
737 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
738 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
739 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
740 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
741 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
742 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
743 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
744 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
745 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
746 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
747 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
748 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
749 #ifdef GL_GLEXT_PROTOTYPES
750 GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
751 GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
752 GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
753 GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
754 GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
755 GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
756 GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
757 GLAPI void APIENTRY glCompileShader (GLuint shader);
758 GLAPI GLuint APIENTRY glCreateProgram (void);
759 GLAPI GLuint APIENTRY glCreateShader (GLenum type);
760 GLAPI void APIENTRY glDeleteProgram (GLuint program);
761 GLAPI void APIENTRY glDeleteShader (GLuint shader);
762 GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
763 GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
764 GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
765 GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
766 GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
767 GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
768 GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
769 GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
770 GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
771 GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
772 GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
773 GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
774 GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
775 GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
776 GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
777 GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
778 GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
779 GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
780 GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
781 GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
782 GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
783 GLAPI void APIENTRY glLinkProgram (GLuint program);
784 GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
785 GLAPI void APIENTRY glUseProgram (GLuint program);
786 GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
787 GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
788 GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
789 GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
790 GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
791 GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
792 GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
793 GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
794 GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
795 GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
796 GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
797 GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
798 GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
799 GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
800 GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
801 GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
802 GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
803 GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
804 GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
805 GLAPI void APIENTRY glValidateProgram (GLuint program);
806 GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
807 GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
808 GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
809 GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
810 GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
811 GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
812 GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
813 GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
814 GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
815 GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
816 GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
817 GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
818 GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
819 GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
820 GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
821 GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
822 GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
823 GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
824 GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
825 GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
826 GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
827 GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
828 GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
829 GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
830 GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
831 GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
832 GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
833 GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
834 GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
835 GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
836 GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
837 GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
838 GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
839 GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
840 GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
841 GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
842 GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
843 #endif
844 #endif /* GL_VERSION_2_0 */
845
846 #ifndef GL_VERSION_2_1
847 #define GL_VERSION_2_1 1
848 #define GL_PIXEL_PACK_BUFFER 0x88EB
849 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
850 #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
851 #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
852 #define GL_FLOAT_MAT2x3 0x8B65
853 #define GL_FLOAT_MAT2x4 0x8B66
854 #define GL_FLOAT_MAT3x2 0x8B67
855 #define GL_FLOAT_MAT3x4 0x8B68
856 #define GL_FLOAT_MAT4x2 0x8B69
857 #define GL_FLOAT_MAT4x3 0x8B6A
858 #define GL_SRGB 0x8C40
859 #define GL_SRGB8 0x8C41
860 #define GL_SRGB_ALPHA 0x8C42
861 #define GL_SRGB8_ALPHA8 0x8C43
862 #define GL_COMPRESSED_SRGB 0x8C48
863 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49
864 #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
865 #define GL_SLUMINANCE_ALPHA 0x8C44
866 #define GL_SLUMINANCE8_ALPHA8 0x8C45
867 #define GL_SLUMINANCE 0x8C46
868 #define GL_SLUMINANCE8 0x8C47
869 #define GL_COMPRESSED_SLUMINANCE 0x8C4A
870 #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
871 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
872 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
873 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
874 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
875 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
876 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
877 #ifdef GL_GLEXT_PROTOTYPES
878 GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
879 GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
880 GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
881 GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
882 GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
883 GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
884 #endif
885 #endif /* GL_VERSION_2_1 */
886
887 #ifndef GL_VERSION_3_0
888 #define GL_VERSION_3_0 1
889 typedef unsigned short GLhalf;
890 #define GL_COMPARE_REF_TO_TEXTURE 0x884E
891 #define GL_CLIP_DISTANCE0 0x3000
892 #define GL_CLIP_DISTANCE1 0x3001
893 #define GL_CLIP_DISTANCE2 0x3002
894 #define GL_CLIP_DISTANCE3 0x3003
895 #define GL_CLIP_DISTANCE4 0x3004
896 #define GL_CLIP_DISTANCE5 0x3005
897 #define GL_CLIP_DISTANCE6 0x3006
898 #define GL_CLIP_DISTANCE7 0x3007
899 #define GL_MAX_CLIP_DISTANCES 0x0D32
900 #define GL_MAJOR_VERSION 0x821B
901 #define GL_MINOR_VERSION 0x821C
902 #define GL_NUM_EXTENSIONS 0x821D
903 #define GL_CONTEXT_FLAGS 0x821E
904 #define GL_COMPRESSED_RED 0x8225
905 #define GL_COMPRESSED_RG 0x8226
906 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
907 #define GL_RGBA32F 0x8814
908 #define GL_RGB32F 0x8815
909 #define GL_RGBA16F 0x881A
910 #define GL_RGB16F 0x881B
911 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
912 #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
913 #define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
914 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
915 #define GL_CLAMP_READ_COLOR 0x891C
916 #define GL_FIXED_ONLY 0x891D
917 #define GL_MAX_VARYING_COMPONENTS 0x8B4B
918 #define GL_TEXTURE_1D_ARRAY 0x8C18
919 #define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
920 #define GL_TEXTURE_2D_ARRAY 0x8C1A
921 #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
922 #define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
923 #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
924 #define GL_R11F_G11F_B10F 0x8C3A
925 #define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
926 #define GL_RGB9_E5 0x8C3D
927 #define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
928 #define GL_TEXTURE_SHARED_SIZE 0x8C3F
929 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
930 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
931 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
932 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
933 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
934 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
935 #define GL_PRIMITIVES_GENERATED 0x8C87
936 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
937 #define GL_RASTERIZER_DISCARD 0x8C89
938 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
939 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
940 #define GL_INTERLEAVED_ATTRIBS 0x8C8C
941 #define GL_SEPARATE_ATTRIBS 0x8C8D
942 #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
943 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
944 #define GL_RGBA32UI 0x8D70
945 #define GL_RGB32UI 0x8D71
946 #define GL_RGBA16UI 0x8D76
947 #define GL_RGB16UI 0x8D77
948 #define GL_RGBA8UI 0x8D7C
949 #define GL_RGB8UI 0x8D7D
950 #define GL_RGBA32I 0x8D82
951 #define GL_RGB32I 0x8D83
952 #define GL_RGBA16I 0x8D88
953 #define GL_RGB16I 0x8D89
954 #define GL_RGBA8I 0x8D8E
955 #define GL_RGB8I 0x8D8F
956 #define GL_RED_INTEGER 0x8D94
957 #define GL_GREEN_INTEGER 0x8D95
958 #define GL_BLUE_INTEGER 0x8D96
959 #define GL_RGB_INTEGER 0x8D98
960 #define GL_RGBA_INTEGER 0x8D99
961 #define GL_BGR_INTEGER 0x8D9A
962 #define GL_BGRA_INTEGER 0x8D9B
963 #define GL_SAMPLER_1D_ARRAY 0x8DC0
964 #define GL_SAMPLER_2D_ARRAY 0x8DC1
965 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
966 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
967 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5
968 #define GL_UNSIGNED_INT_VEC2 0x8DC6
969 #define GL_UNSIGNED_INT_VEC3 0x8DC7
970 #define GL_UNSIGNED_INT_VEC4 0x8DC8
971 #define GL_INT_SAMPLER_1D 0x8DC9
972 #define GL_INT_SAMPLER_2D 0x8DCA
973 #define GL_INT_SAMPLER_3D 0x8DCB
974 #define GL_INT_SAMPLER_CUBE 0x8DCC
975 #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
976 #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
977 #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
978 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
979 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
980 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
981 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
982 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
983 #define GL_QUERY_WAIT 0x8E13
984 #define GL_QUERY_NO_WAIT 0x8E14
985 #define GL_QUERY_BY_REGION_WAIT 0x8E15
986 #define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
987 #define GL_BUFFER_ACCESS_FLAGS 0x911F
988 #define GL_BUFFER_MAP_LENGTH 0x9120
989 #define GL_BUFFER_MAP_OFFSET 0x9121
990 #define GL_DEPTH_COMPONENT32F 0x8CAC
991 #define GL_DEPTH32F_STENCIL8 0x8CAD
992 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
993 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
994 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
995 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
996 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
997 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
998 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
999 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
1000 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
1001 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
1002 #define GL_FRAMEBUFFER_DEFAULT 0x8218
1003 #define GL_FRAMEBUFFER_UNDEFINED 0x8219
1004 #define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
1005 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1006 #define GL_DEPTH_STENCIL 0x84F9
1007 #define GL_UNSIGNED_INT_24_8 0x84FA
1008 #define GL_DEPTH24_STENCIL8 0x88F0
1009 #define GL_TEXTURE_STENCIL_SIZE 0x88F1
1010 #define GL_TEXTURE_RED_TYPE 0x8C10
1011 #define GL_TEXTURE_GREEN_TYPE 0x8C11
1012 #define GL_TEXTURE_BLUE_TYPE 0x8C12
1013 #define GL_TEXTURE_ALPHA_TYPE 0x8C13
1014 #define GL_TEXTURE_DEPTH_TYPE 0x8C16
1015 #define GL_UNSIGNED_NORMALIZED 0x8C17
1016 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1017 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
1018 #define GL_RENDERBUFFER_BINDING 0x8CA7
1019 #define GL_READ_FRAMEBUFFER 0x8CA8
1020 #define GL_DRAW_FRAMEBUFFER 0x8CA9
1021 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
1022 #define GL_RENDERBUFFER_SAMPLES 0x8CAB
1023 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1024 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1025 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1026 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1027 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
1028 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1029 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1030 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1031 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
1032 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
1033 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1034 #define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
1035 #define GL_COLOR_ATTACHMENT0 0x8CE0
1036 #define GL_COLOR_ATTACHMENT1 0x8CE1
1037 #define GL_COLOR_ATTACHMENT2 0x8CE2
1038 #define GL_COLOR_ATTACHMENT3 0x8CE3
1039 #define GL_COLOR_ATTACHMENT4 0x8CE4
1040 #define GL_COLOR_ATTACHMENT5 0x8CE5
1041 #define GL_COLOR_ATTACHMENT6 0x8CE6
1042 #define GL_COLOR_ATTACHMENT7 0x8CE7
1043 #define GL_COLOR_ATTACHMENT8 0x8CE8
1044 #define GL_COLOR_ATTACHMENT9 0x8CE9
1045 #define GL_COLOR_ATTACHMENT10 0x8CEA
1046 #define GL_COLOR_ATTACHMENT11 0x8CEB
1047 #define GL_COLOR_ATTACHMENT12 0x8CEC
1048 #define GL_COLOR_ATTACHMENT13 0x8CED
1049 #define GL_COLOR_ATTACHMENT14 0x8CEE
1050 #define GL_COLOR_ATTACHMENT15 0x8CEF
1051 #define GL_DEPTH_ATTACHMENT 0x8D00
1052 #define GL_STENCIL_ATTACHMENT 0x8D20
1053 #define GL_FRAMEBUFFER 0x8D40
1054 #define GL_RENDERBUFFER 0x8D41
1055 #define GL_RENDERBUFFER_WIDTH 0x8D42
1056 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1057 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1058 #define GL_STENCIL_INDEX1 0x8D46
1059 #define GL_STENCIL_INDEX4 0x8D47
1060 #define GL_STENCIL_INDEX8 0x8D48
1061 #define GL_STENCIL_INDEX16 0x8D49
1062 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1063 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1064 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1065 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1066 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1067 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1068 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
1069 #define GL_MAX_SAMPLES 0x8D57
1070 #define GL_INDEX 0x8222
1071 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
1072 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15
1073 #define GL_FRAMEBUFFER_SRGB 0x8DB9
1074 #define GL_HALF_FLOAT 0x140B
1075 #define GL_MAP_READ_BIT 0x0001
1076 #define GL_MAP_WRITE_BIT 0x0002
1077 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
1078 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
1079 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
1080 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
1081 #define GL_COMPRESSED_RED_RGTC1 0x8DBB
1082 #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
1083 #define GL_COMPRESSED_RG_RGTC2 0x8DBD
1084 #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
1085 #define GL_RG 0x8227
1086 #define GL_RG_INTEGER 0x8228
1087 #define GL_R8 0x8229
1088 #define GL_R16 0x822A
1089 #define GL_RG8 0x822B
1090 #define GL_RG16 0x822C
1091 #define GL_R16F 0x822D
1092 #define GL_R32F 0x822E
1093 #define GL_RG16F 0x822F
1094 #define GL_RG32F 0x8230
1095 #define GL_R8I 0x8231
1096 #define GL_R8UI 0x8232
1097 #define GL_R16I 0x8233
1098 #define GL_R16UI 0x8234
1099 #define GL_R32I 0x8235
1100 #define GL_R32UI 0x8236
1101 #define GL_RG8I 0x8237
1102 #define GL_RG8UI 0x8238
1103 #define GL_RG16I 0x8239
1104 #define GL_RG16UI 0x823A
1105 #define GL_RG32I 0x823B
1106 #define GL_RG32UI 0x823C
1107 #define GL_VERTEX_ARRAY_BINDING 0x85B5
1108 #define GL_CLAMP_VERTEX_COLOR 0x891A
1109 #define GL_CLAMP_FRAGMENT_COLOR 0x891B
1110 #define GL_ALPHA_INTEGER 0x8D97
1111 typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1112 typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
1113 typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
1114 typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
1115 typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
1116 typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
1117 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
1118 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
1119 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1120 typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
1121 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1122 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1123 typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
1124 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
1125 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
1126 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1127 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
1128 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
1129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
1130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
1131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
1132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
1133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
1134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
1135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
1136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
1138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
1139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
1140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
1141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
1142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
1143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
1144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
1145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
1146 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
1147 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
1148 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
1149 typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
1150 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
1151 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
1152 typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
1153 typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
1154 typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
1155 typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1156 typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1157 typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1158 typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1159 typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1160 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
1161 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
1162 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
1163 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
1164 typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
1165 typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
1166 typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1167 typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1168 typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
1169 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
1170 typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
1171 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
1172 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
1173 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1174 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
1175 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
1176 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
1177 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
1178 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
1179 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
1180 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1181 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1182 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1183 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1184 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1185 typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
1186 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1187 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1188 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1189 typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1190 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1191 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
1192 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
1193 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
1194 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
1195 #ifdef GL_GLEXT_PROTOTYPES
1196 GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1197 GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
1198 GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
1199 GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
1200 GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
1201 GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
1202 GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
1203 GLAPI void APIENTRY glEndTransformFeedback (void);
1204 GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1205 GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
1206 GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1207 GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1208 GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
1209 GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
1210 GLAPI void APIENTRY glEndConditionalRender (void);
1211 GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1212 GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
1213 GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
1214 GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
1215 GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
1216 GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
1217 GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
1218 GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
1219 GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
1220 GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
1221 GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1222 GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
1223 GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
1224 GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
1225 GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
1226 GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
1227 GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
1228 GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
1229 GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
1230 GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
1231 GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
1232 GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
1233 GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
1234 GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
1235 GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
1236 GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
1237 GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
1238 GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
1239 GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
1240 GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1241 GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
1242 GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
1243 GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
1244 GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
1245 GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
1246 GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
1247 GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
1248 GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
1249 GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
1250 GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
1251 GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1252 GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1253 GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
1254 GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
1255 GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
1256 GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
1257 GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
1258 GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1259 GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
1260 GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
1261 GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
1262 GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
1263 GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
1264 GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
1265 GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1266 GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1267 GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1268 GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1269 GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1270 GLAPI void APIENTRY glGenerateMipmap (GLenum target);
1271 GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1272 GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1273 GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1274 GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1275 GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
1276 GLAPI void APIENTRY glBindVertexArray (GLuint array);
1277 GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
1278 GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
1279 GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
1280 #endif
1281 #endif /* GL_VERSION_3_0 */
1282
1283 #ifndef GL_VERSION_3_1
1284 #define GL_VERSION_3_1 1
1285 #define GL_SAMPLER_2D_RECT 0x8B63
1286 #define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
1287 #define GL_SAMPLER_BUFFER 0x8DC2
1288 #define GL_INT_SAMPLER_2D_RECT 0x8DCD
1289 #define GL_INT_SAMPLER_BUFFER 0x8DD0
1290 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
1291 #define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
1292 #define GL_TEXTURE_BUFFER 0x8C2A
1293 #define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
1294 #define GL_TEXTURE_BINDING_BUFFER 0x8C2C
1295 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
1296 #define GL_TEXTURE_RECTANGLE 0x84F5
1297 #define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
1298 #define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
1299 #define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
1300 #define GL_R8_SNORM 0x8F94
1301 #define GL_RG8_SNORM 0x8F95
1302 #define GL_RGB8_SNORM 0x8F96
1303 #define GL_RGBA8_SNORM 0x8F97
1304 #define GL_R16_SNORM 0x8F98
1305 #define GL_RG16_SNORM 0x8F99
1306 #define GL_RGB16_SNORM 0x8F9A
1307 #define GL_RGBA16_SNORM 0x8F9B
1308 #define GL_SIGNED_NORMALIZED 0x8F9C
1309 #define GL_PRIMITIVE_RESTART 0x8F9D
1310 #define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
1311 #define GL_COPY_READ_BUFFER 0x8F36
1312 #define GL_COPY_WRITE_BUFFER 0x8F37
1313 #define GL_UNIFORM_BUFFER 0x8A11
1314 #define GL_UNIFORM_BUFFER_BINDING 0x8A28
1315 #define GL_UNIFORM_BUFFER_START 0x8A29
1316 #define GL_UNIFORM_BUFFER_SIZE 0x8A2A
1317 #define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
1318 #define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
1319 #define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
1320 #define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
1321 #define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
1322 #define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
1323 #define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
1324 #define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
1325 #define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
1326 #define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
1327 #define GL_UNIFORM_TYPE 0x8A37
1328 #define GL_UNIFORM_SIZE 0x8A38
1329 #define GL_UNIFORM_NAME_LENGTH 0x8A39
1330 #define GL_UNIFORM_BLOCK_INDEX 0x8A3A
1331 #define GL_UNIFORM_OFFSET 0x8A3B
1332 #define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
1333 #define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
1334 #define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
1335 #define GL_UNIFORM_BLOCK_BINDING 0x8A3F
1336 #define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
1337 #define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
1338 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
1339 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
1340 #define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
1341 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
1342 #define GL_INVALID_INDEX 0xFFFFFFFFu
1343 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1344 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1345 typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
1346 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
1347 typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1348 typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1349 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1350 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1351 typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
1352 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1353 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1354 typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1355 #ifdef GL_GLEXT_PROTOTYPES
1356 GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1357 GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1358 GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
1359 GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
1360 GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1361 GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1362 GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1363 GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1364 GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
1365 GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1366 GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1367 GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1368 #endif
1369 #endif /* GL_VERSION_3_1 */
1370
1371 #ifndef GL_VERSION_3_2
1372 #define GL_VERSION_3_2 1
1373 typedef struct __GLsync *GLsync;
1374 #ifndef GLEXT_64_TYPES_DEFINED
1375 /* This code block is duplicated in glxext.h, so must be protected */
1376 #define GLEXT_64_TYPES_DEFINED
1377 /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
1378 /* (as used in the GL_EXT_timer_query extension). */
1379 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1380 #include <inttypes.h>
1381 #elif defined(__sun__) || defined(__digital__)
1382 #include <inttypes.h>
1383 #if defined(__STDC__)
1384 #if defined(__arch64__) || defined(_LP64)
1385 typedef long int int64_t;
1386 typedef unsigned long int uint64_t;
1387 #else
1388 typedef long long int int64_t;
1389 typedef unsigned long long int uint64_t;
1390 #endif /* __arch64__ */
1391 #endif /* __STDC__ */
1392 #elif defined( __VMS ) || defined(__sgi)
1393 #include <inttypes.h>
1394 #elif defined(__SCO__) || defined(__USLC__)
1395 #include <stdint.h>
1396 #elif defined(__UNIXOS2__) || defined(__SOL64__)
1397 typedef long int int32_t;
1398 typedef long long int int64_t;
1399 typedef unsigned long long int uint64_t;
1400 #elif defined(_WIN32) && defined(__GNUC__)
1401 #include <stdint.h>
1402 #elif defined(_WIN32)
1403 typedef __int32 int32_t;
1404 typedef __int64 int64_t;
1405 typedef unsigned __int64 uint64_t;
1406 #else
1407 /* Fallback if nothing above works */
1408 #include <inttypes.h>
1409 #endif
1410 #endif
1411 typedef uint64_t GLuint64;
1412 typedef int64_t GLint64;
1413 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
1414 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
1415 #define GL_LINES_ADJACENCY 0x000A
1416 #define GL_LINE_STRIP_ADJACENCY 0x000B
1417 #define GL_TRIANGLES_ADJACENCY 0x000C
1418 #define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
1419 #define GL_PROGRAM_POINT_SIZE 0x8642
1420 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
1421 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
1422 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
1423 #define GL_GEOMETRY_SHADER 0x8DD9
1424 #define GL_GEOMETRY_VERTICES_OUT 0x8916
1425 #define GL_GEOMETRY_INPUT_TYPE 0x8917
1426 #define GL_GEOMETRY_OUTPUT_TYPE 0x8918
1427 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
1428 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
1429 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
1430 #define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
1431 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
1432 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
1433 #define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
1434 #define GL_CONTEXT_PROFILE_MASK 0x9126
1435 #define GL_DEPTH_CLAMP 0x864F
1436 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
1437 #define GL_FIRST_VERTEX_CONVENTION 0x8E4D
1438 #define GL_LAST_VERTEX_CONVENTION 0x8E4E
1439 #define GL_PROVOKING_VERTEX 0x8E4F
1440 #define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
1441 #define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
1442 #define GL_OBJECT_TYPE 0x9112
1443 #define GL_SYNC_CONDITION 0x9113
1444 #define GL_SYNC_STATUS 0x9114
1445 #define GL_SYNC_FLAGS 0x9115
1446 #define GL_SYNC_FENCE 0x9116
1447 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
1448 #define GL_UNSIGNALED 0x9118
1449 #define GL_SIGNALED 0x9119
1450 #define GL_ALREADY_SIGNALED 0x911A
1451 #define GL_TIMEOUT_EXPIRED 0x911B
1452 #define GL_CONDITION_SATISFIED 0x911C
1453 #define GL_WAIT_FAILED 0x911D
1454 #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
1455 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
1456 #define GL_SAMPLE_POSITION 0x8E50
1457 #define GL_SAMPLE_MASK 0x8E51
1458 #define GL_SAMPLE_MASK_VALUE 0x8E52
1459 #define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
1460 #define GL_TEXTURE_2D_MULTISAMPLE 0x9100
1461 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
1462 #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
1463 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
1464 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
1465 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
1466 #define GL_TEXTURE_SAMPLES 0x9106
1467 #define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
1468 #define GL_SAMPLER_2D_MULTISAMPLE 0x9108
1469 #define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
1470 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
1471 #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
1472 #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
1473 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
1474 #define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
1475 #define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
1476 #define GL_MAX_INTEGER_SAMPLES 0x9110
1477 typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1478 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1479 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1480 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1481 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
1482 typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
1483 typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
1484 typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
1485 typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1486 typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1487 typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
1488 typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1489 typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
1490 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
1491 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
1492 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1493 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1494 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
1495 typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
1496 #ifdef GL_GLEXT_PROTOTYPES
1497 GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1498 GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1499 GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1500 GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1501 GLAPI void APIENTRY glProvokingVertex (GLenum mode);
1502 GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
1503 GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
1504 GLAPI void APIENTRY glDeleteSync (GLsync sync);
1505 GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1506 GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1507 GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
1508 GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1509 GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
1510 GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
1511 GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
1512 GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1513 GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1514 GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
1515 GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
1516 #endif
1517 #endif /* GL_VERSION_3_2 */
1518
1519 #ifndef GL_VERSION_3_3
1520 #define GL_VERSION_3_3 1
1521 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
1522 #define GL_SRC1_COLOR 0x88F9
1523 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA
1524 #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
1525 #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
1526 #define GL_ANY_SAMPLES_PASSED 0x8C2F
1527 #define GL_SAMPLER_BINDING 0x8919
1528 #define GL_RGB10_A2UI 0x906F
1529 #define GL_TEXTURE_SWIZZLE_R 0x8E42
1530 #define GL_TEXTURE_SWIZZLE_G 0x8E43
1531 #define GL_TEXTURE_SWIZZLE_B 0x8E44
1532 #define GL_TEXTURE_SWIZZLE_A 0x8E45
1533 #define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
1534 #define GL_TIME_ELAPSED 0x88BF
1535 #define GL_TIMESTAMP 0x8E28
1536 #define GL_INT_2_10_10_10_REV 0x8D9F
1537 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1538 typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
1539 typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
1540 typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
1541 typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
1542 typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
1543 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
1544 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1545 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
1546 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
1547 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1548 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
1549 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1550 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1551 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
1552 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
1553 typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
1554 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
1555 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
1556 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
1557 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1558 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1559 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1560 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1561 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1562 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1563 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1564 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1565 typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
1566 typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
1567 typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
1568 typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
1569 typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
1570 typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
1571 typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
1572 typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
1573 typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
1574 typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
1575 typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
1576 typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
1577 typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
1578 typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
1579 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
1580 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1581 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
1582 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1583 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
1584 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1585 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
1586 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1587 typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
1588 typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
1589 typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
1590 typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1591 typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
1592 typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
1593 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
1594 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1595 #ifdef GL_GLEXT_PROTOTYPES
1596 GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1597 GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
1598 GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
1599 GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
1600 GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
1601 GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
1602 GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
1603 GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
1604 GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
1605 GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
1606 GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
1607 GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
1608 GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
1609 GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
1610 GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
1611 GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
1612 GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
1613 GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
1614 GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
1615 GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
1616 GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1617 GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1618 GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1619 GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1620 GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1621 GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1622 GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1623 GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1624 GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
1625 GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
1626 GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
1627 GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
1628 GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
1629 GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
1630 GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
1631 GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
1632 GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
1633 GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
1634 GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
1635 GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
1636 GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
1637 GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
1638 GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
1639 GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
1640 GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
1641 GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
1642 GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
1643 GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
1644 GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
1645 GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
1646 GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
1647 GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
1648 GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
1649 GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
1650 GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
1651 GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
1652 GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
1653 GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
1654 #endif
1655 #endif /* GL_VERSION_3_3 */
1656
1657 #ifndef GL_VERSION_4_0
1658 #define GL_VERSION_4_0 1
1659 #define GL_SAMPLE_SHADING 0x8C36
1660 #define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
1661 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
1662 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
1663 #define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
1664 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
1665 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
1666 #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
1667 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
1668 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
1669 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
1670 #define GL_DRAW_INDIRECT_BUFFER 0x8F3F
1671 #define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
1672 #define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
1673 #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
1674 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
1675 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
1676 #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
1677 #define GL_MAX_VERTEX_STREAMS 0x8E71
1678 #define GL_DOUBLE_VEC2 0x8FFC
1679 #define GL_DOUBLE_VEC3 0x8FFD
1680 #define GL_DOUBLE_VEC4 0x8FFE
1681 #define GL_DOUBLE_MAT2 0x8F46
1682 #define GL_DOUBLE_MAT3 0x8F47
1683 #define GL_DOUBLE_MAT4 0x8F48
1684 #define GL_DOUBLE_MAT2x3 0x8F49
1685 #define GL_DOUBLE_MAT2x4 0x8F4A
1686 #define GL_DOUBLE_MAT3x2 0x8F4B
1687 #define GL_DOUBLE_MAT3x4 0x8F4C
1688 #define GL_DOUBLE_MAT4x2 0x8F4D
1689 #define GL_DOUBLE_MAT4x3 0x8F4E
1690 #define GL_ACTIVE_SUBROUTINES 0x8DE5
1691 #define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
1692 #define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
1693 #define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
1694 #define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
1695 #define GL_MAX_SUBROUTINES 0x8DE7
1696 #define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
1697 #define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
1698 #define GL_COMPATIBLE_SUBROUTINES 0x8E4B
1699 #define GL_PATCHES 0x000E
1700 #define GL_PATCH_VERTICES 0x8E72
1701 #define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
1702 #define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
1703 #define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
1704 #define GL_TESS_GEN_MODE 0x8E76
1705 #define GL_TESS_GEN_SPACING 0x8E77
1706 #define GL_TESS_GEN_VERTEX_ORDER 0x8E78
1707 #define GL_TESS_GEN_POINT_MODE 0x8E79
1708 #define GL_ISOLINES 0x8E7A
1709 #define GL_FRACTIONAL_ODD 0x8E7B
1710 #define GL_FRACTIONAL_EVEN 0x8E7C
1711 #define GL_MAX_PATCH_VERTICES 0x8E7D
1712 #define GL_MAX_TESS_GEN_LEVEL 0x8E7E
1713 #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
1714 #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
1715 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
1716 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
1717 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
1718 #define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
1719 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
1720 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
1721 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
1722 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
1723 #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
1724 #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
1725 #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
1726 #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
1727 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
1728 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
1729 #define GL_TESS_EVALUATION_SHADER 0x8E87
1730 #define GL_TESS_CONTROL_SHADER 0x8E88
1731 #define GL_TRANSFORM_FEEDBACK 0x8E22
1732 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
1733 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
1734 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
1735 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
1736 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
1737 typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
1738 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1739 typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
1740 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1741 typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
1742 typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
1743 typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
1744 typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
1745 typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
1746 typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1747 typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1748 typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1749 typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1750 typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1751 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1752 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1753 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1754 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1755 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1756 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1757 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1758 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1759 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1760 typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
1761 typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1762 typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1763 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1764 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1765 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1766 typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
1767 typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
1768 typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1769 typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
1770 typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
1771 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
1772 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
1773 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
1774 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
1775 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
1776 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
1777 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
1778 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
1779 typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
1780 typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
1781 typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
1782 #ifdef GL_GLEXT_PROTOTYPES
1783 GLAPI void APIENTRY glMinSampleShading (GLfloat value);
1784 GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
1785 GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1786 GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
1787 GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1788 GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
1789 GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
1790 GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
1791 GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
1792 GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
1793 GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1794 GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
1795 GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
1796 GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
1797 GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
1798 GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1799 GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1800 GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1801 GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1802 GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1803 GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1804 GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1805 GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1806 GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1807 GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
1808 GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
1809 GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
1810 GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1811 GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1812 GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1813 GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
1814 GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
1815 GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1816 GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
1817 GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
1818 GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
1819 GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
1820 GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
1821 GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
1822 GLAPI void APIENTRY glPauseTransformFeedback (void);
1823 GLAPI void APIENTRY glResumeTransformFeedback (void);
1824 GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
1825 GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
1826 GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
1827 GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
1828 GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
1829 #endif
1830 #endif /* GL_VERSION_4_0 */
1831
1832 #ifndef GL_VERSION_4_1
1833 #define GL_VERSION_4_1 1
1834 #define GL_FIXED 0x140C
1835 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1836 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1837 #define GL_LOW_FLOAT 0x8DF0
1838 #define GL_MEDIUM_FLOAT 0x8DF1
1839 #define GL_HIGH_FLOAT 0x8DF2
1840 #define GL_LOW_INT 0x8DF3
1841 #define GL_MEDIUM_INT 0x8DF4
1842 #define GL_HIGH_INT 0x8DF5
1843 #define GL_SHADER_COMPILER 0x8DFA
1844 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1845 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1846 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1847 #define GL_MAX_VARYING_VECTORS 0x8DFC
1848 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1849 #define GL_RGB565 0x8D62
1850 #define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
1851 #define GL_PROGRAM_BINARY_LENGTH 0x8741
1852 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
1853 #define GL_PROGRAM_BINARY_FORMATS 0x87FF
1854 #define GL_VERTEX_SHADER_BIT 0x00000001
1855 #define GL_FRAGMENT_SHADER_BIT 0x00000002
1856 #define GL_GEOMETRY_SHADER_BIT 0x00000004
1857 #define GL_TESS_CONTROL_SHADER_BIT 0x00000008
1858 #define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
1859 #define GL_ALL_SHADER_BITS 0xFFFFFFFF
1860 #define GL_PROGRAM_SEPARABLE 0x8258
1861 #define GL_ACTIVE_PROGRAM 0x8259
1862 #define GL_PROGRAM_PIPELINE_BINDING 0x825A
1863 #define GL_MAX_VIEWPORTS 0x825B
1864 #define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
1865 #define GL_VIEWPORT_BOUNDS_RANGE 0x825D
1866 #define GL_LAYER_PROVOKING_VERTEX 0x825E
1867 #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
1868 #define GL_UNDEFINED_VERTEX 0x8260
1869 typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
1870 typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1871 typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1872 typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
1873 typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
1874 typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1875 typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1876 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
1877 typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1878 typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
1879 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
1880 typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
1881 typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
1882 typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
1883 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
1884 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
1885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
1886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
1888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
1890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
1892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1893 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
1894 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1895 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1896 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1897 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1898 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1899 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
1900 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1901 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1902 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1903 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1904 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1905 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1906 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1907 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1908 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1909 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1910 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1911 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1912 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1913 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
1914 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1915 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1916 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1917 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1918 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1919 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1920 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1921 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1922 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1923 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1924 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1925 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1926 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1927 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1928 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1929 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1930 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1931 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1932 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1933 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1934 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1935 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
1936 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1937 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
1938 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
1939 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
1940 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1941 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
1942 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
1943 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
1944 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
1945 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1946 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
1947 typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
1948 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
1949 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
1950 typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
1951 typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
1952 typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
1953 typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
1954 typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
1955 typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
1956 typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
1957 #ifdef GL_GLEXT_PROTOTYPES
1958 GLAPI void APIENTRY glReleaseShaderCompiler (void);
1959 GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1960 GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1961 GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
1962 GLAPI void APIENTRY glClearDepthf (GLfloat d);
1963 GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1964 GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1965 GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
1966 GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
1967 GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
1968 GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
1969 GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
1970 GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
1971 GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
1972 GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
1973 GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
1974 GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
1975 GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1976 GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
1977 GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1978 GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
1979 GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1980 GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
1981 GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1982 GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
1983 GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1984 GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1985 GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1986 GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1987 GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1988 GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
1989 GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1990 GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1991 GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1992 GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1993 GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1994 GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1995 GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1996 GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1997 GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1998 GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1999 GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2000 GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
2001 GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2002 GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
2003 GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2004 GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
2005 GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2006 GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2007 GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2008 GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2009 GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2010 GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2011 GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2012 GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2013 GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2014 GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2015 GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2016 GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2017 GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2018 GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2019 GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2020 GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2021 GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2022 GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2023 GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2024 GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
2025 GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
2026 GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
2027 GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
2028 GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
2029 GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2030 GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
2031 GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
2032 GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
2033 GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
2034 GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
2035 GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
2036 GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
2037 GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
2038 GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
2039 GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
2040 GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
2041 GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
2042 GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
2043 GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
2044 GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
2045 GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
2046 #endif
2047 #endif /* GL_VERSION_4_1 */
2048
2049 #ifndef GL_VERSION_4_2
2050 #define GL_VERSION_4_2 1
2051 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
2052 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
2053 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
2054 #define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
2055 #define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
2056 #define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
2057 #define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
2058 #define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
2059 #define GL_NUM_SAMPLE_COUNTS 0x9380
2060 #define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
2061 #define GL_ATOMIC_COUNTER_BUFFER 0x92C0
2062 #define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
2063 #define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
2064 #define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
2065 #define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
2066 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
2067 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
2068 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
2069 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
2070 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
2071 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
2072 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
2073 #define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
2074 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
2075 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
2076 #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
2077 #define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
2078 #define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
2079 #define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
2080 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
2081 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
2082 #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
2083 #define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
2084 #define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
2085 #define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
2086 #define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
2087 #define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
2088 #define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
2089 #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
2090 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
2091 #define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
2092 #define GL_UNIFORM_BARRIER_BIT 0x00000004
2093 #define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
2094 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
2095 #define GL_COMMAND_BARRIER_BIT 0x00000040
2096 #define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
2097 #define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
2098 #define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
2099 #define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
2100 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
2101 #define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
2102 #define GL_ALL_BARRIER_BITS 0xFFFFFFFF
2103 #define GL_MAX_IMAGE_UNITS 0x8F38
2104 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
2105 #define GL_IMAGE_BINDING_NAME 0x8F3A
2106 #define GL_IMAGE_BINDING_LEVEL 0x8F3B
2107 #define GL_IMAGE_BINDING_LAYERED 0x8F3C
2108 #define GL_IMAGE_BINDING_LAYER 0x8F3D
2109 #define GL_IMAGE_BINDING_ACCESS 0x8F3E
2110 #define GL_IMAGE_1D 0x904C
2111 #define GL_IMAGE_2D 0x904D
2112 #define GL_IMAGE_3D 0x904E
2113 #define GL_IMAGE_2D_RECT 0x904F
2114 #define GL_IMAGE_CUBE 0x9050
2115 #define GL_IMAGE_BUFFER 0x9051
2116 #define GL_IMAGE_1D_ARRAY 0x9052
2117 #define GL_IMAGE_2D_ARRAY 0x9053
2118 #define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
2119 #define GL_IMAGE_2D_MULTISAMPLE 0x9055
2120 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
2121 #define GL_INT_IMAGE_1D 0x9057
2122 #define GL_INT_IMAGE_2D 0x9058
2123 #define GL_INT_IMAGE_3D 0x9059
2124 #define GL_INT_IMAGE_2D_RECT 0x905A
2125 #define GL_INT_IMAGE_CUBE 0x905B
2126 #define GL_INT_IMAGE_BUFFER 0x905C
2127 #define GL_INT_IMAGE_1D_ARRAY 0x905D
2128 #define GL_INT_IMAGE_2D_ARRAY 0x905E
2129 #define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
2130 #define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
2131 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
2132 #define GL_UNSIGNED_INT_IMAGE_1D 0x9062
2133 #define GL_UNSIGNED_INT_IMAGE_2D 0x9063
2134 #define GL_UNSIGNED_INT_IMAGE_3D 0x9064
2135 #define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
2136 #define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
2137 #define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
2138 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
2139 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
2140 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
2141 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
2142 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
2143 #define GL_MAX_IMAGE_SAMPLES 0x906D
2144 #define GL_IMAGE_BINDING_FORMAT 0x906E
2145 #define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
2146 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
2147 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
2148 #define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
2149 #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
2150 #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
2151 #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
2152 #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
2153 #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
2154 #define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
2155 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
2156 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
2157 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
2158 #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
2159 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2160 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2161 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2162 typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2163 typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2164 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2165 typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
2166 typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2167 typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2168 typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2169 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
2170 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2171 #ifdef GL_GLEXT_PROTOTYPES
2172 GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2173 GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2174 GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2175 GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2176 GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2177 GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2178 GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
2179 GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2180 GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2181 GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2182 GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
2183 GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2184 #endif
2185 #endif /* GL_VERSION_4_2 */
2186
2187 #ifndef GL_VERSION_4_3
2188 #define GL_VERSION_4_3 1
2189 typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2190 #define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
2191 #define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
2192 #define GL_COMPRESSED_RGB8_ETC2 0x9274
2193 #define GL_COMPRESSED_SRGB8_ETC2 0x9275
2194 #define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
2195 #define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
2196 #define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
2197 #define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
2198 #define GL_COMPRESSED_R11_EAC 0x9270
2199 #define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
2200 #define GL_COMPRESSED_RG11_EAC 0x9272
2201 #define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
2202 #define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
2203 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
2204 #define GL_MAX_ELEMENT_INDEX 0x8D6B
2205 #define GL_COMPUTE_SHADER 0x91B9
2206 #define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
2207 #define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
2208 #define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
2209 #define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
2210 #define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
2211 #define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
2212 #define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
2213 #define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
2214 #define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
2215 #define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
2216 #define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
2217 #define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
2218 #define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
2219 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
2220 #define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
2221 #define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
2222 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
2223 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
2224 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244
2225 #define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
2226 #define GL_DEBUG_SOURCE_API 0x8246
2227 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
2228 #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
2229 #define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
2230 #define GL_DEBUG_SOURCE_APPLICATION 0x824A
2231 #define GL_DEBUG_SOURCE_OTHER 0x824B
2232 #define GL_DEBUG_TYPE_ERROR 0x824C
2233 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
2234 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
2235 #define GL_DEBUG_TYPE_PORTABILITY 0x824F
2236 #define GL_DEBUG_TYPE_PERFORMANCE 0x8250
2237 #define GL_DEBUG_TYPE_OTHER 0x8251
2238 #define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
2239 #define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
2240 #define GL_DEBUG_LOGGED_MESSAGES 0x9145
2241 #define GL_DEBUG_SEVERITY_HIGH 0x9146
2242 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147
2243 #define GL_DEBUG_SEVERITY_LOW 0x9148
2244 #define GL_DEBUG_TYPE_MARKER 0x8268
2245 #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
2246 #define GL_DEBUG_TYPE_POP_GROUP 0x826A
2247 #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
2248 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
2249 #define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
2250 #define GL_BUFFER 0x82E0
2251 #define GL_SHADER 0x82E1
2252 #define GL_PROGRAM 0x82E2
2253 #define GL_QUERY 0x82E3
2254 #define GL_PROGRAM_PIPELINE 0x82E4
2255 #define GL_SAMPLER 0x82E6
2256 #define GL_MAX_LABEL_LENGTH 0x82E8
2257 #define GL_DEBUG_OUTPUT 0x92E0
2258 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
2259 #define GL_MAX_UNIFORM_LOCATIONS 0x826E
2260 #define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
2261 #define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
2262 #define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
2263 #define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
2264 #define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
2265 #define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
2266 #define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
2267 #define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
2268 #define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
2269 #define GL_INTERNALFORMAT_SUPPORTED 0x826F
2270 #define GL_INTERNALFORMAT_PREFERRED 0x8270
2271 #define GL_INTERNALFORMAT_RED_SIZE 0x8271
2272 #define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
2273 #define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
2274 #define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
2275 #define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
2276 #define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
2277 #define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
2278 #define GL_INTERNALFORMAT_RED_TYPE 0x8278
2279 #define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
2280 #define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
2281 #define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
2282 #define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
2283 #define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
2284 #define GL_MAX_WIDTH 0x827E
2285 #define GL_MAX_HEIGHT 0x827F
2286 #define GL_MAX_DEPTH 0x8280
2287 #define GL_MAX_LAYERS 0x8281
2288 #define GL_MAX_COMBINED_DIMENSIONS 0x8282
2289 #define GL_COLOR_COMPONENTS 0x8283
2290 #define GL_DEPTH_COMPONENTS 0x8284
2291 #define GL_STENCIL_COMPONENTS 0x8285
2292 #define GL_COLOR_RENDERABLE 0x8286
2293 #define GL_DEPTH_RENDERABLE 0x8287
2294 #define GL_STENCIL_RENDERABLE 0x8288
2295 #define GL_FRAMEBUFFER_RENDERABLE 0x8289
2296 #define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
2297 #define GL_FRAMEBUFFER_BLEND 0x828B
2298 #define GL_READ_PIXELS 0x828C
2299 #define GL_READ_PIXELS_FORMAT 0x828D
2300 #define GL_READ_PIXELS_TYPE 0x828E
2301 #define GL_TEXTURE_IMAGE_FORMAT 0x828F
2302 #define GL_TEXTURE_IMAGE_TYPE 0x8290
2303 #define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
2304 #define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
2305 #define GL_MIPMAP 0x8293
2306 #define GL_MANUAL_GENERATE_MIPMAP 0x8294
2307 #define GL_AUTO_GENERATE_MIPMAP 0x8295
2308 #define GL_COLOR_ENCODING 0x8296
2309 #define GL_SRGB_READ 0x8297
2310 #define GL_SRGB_WRITE 0x8298
2311 #define GL_FILTER 0x829A
2312 #define GL_VERTEX_TEXTURE 0x829B
2313 #define GL_TESS_CONTROL_TEXTURE 0x829C
2314 #define GL_TESS_EVALUATION_TEXTURE 0x829D
2315 #define GL_GEOMETRY_TEXTURE 0x829E
2316 #define GL_FRAGMENT_TEXTURE 0x829F
2317 #define GL_COMPUTE_TEXTURE 0x82A0
2318 #define GL_TEXTURE_SHADOW 0x82A1
2319 #define GL_TEXTURE_GATHER 0x82A2
2320 #define GL_TEXTURE_GATHER_SHADOW 0x82A3
2321 #define GL_SHADER_IMAGE_LOAD 0x82A4
2322 #define GL_SHADER_IMAGE_STORE 0x82A5
2323 #define GL_SHADER_IMAGE_ATOMIC 0x82A6
2324 #define GL_IMAGE_TEXEL_SIZE 0x82A7
2325 #define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
2326 #define GL_IMAGE_PIXEL_FORMAT 0x82A9
2327 #define GL_IMAGE_PIXEL_TYPE 0x82AA
2328 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
2329 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
2330 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
2331 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
2332 #define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
2333 #define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
2334 #define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
2335 #define GL_CLEAR_BUFFER 0x82B4
2336 #define GL_TEXTURE_VIEW 0x82B5
2337 #define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
2338 #define GL_FULL_SUPPORT 0x82B7
2339 #define GL_CAVEAT_SUPPORT 0x82B8
2340 #define GL_IMAGE_CLASS_4_X_32 0x82B9
2341 #define GL_IMAGE_CLASS_2_X_32 0x82BA
2342 #define GL_IMAGE_CLASS_1_X_32 0x82BB
2343 #define GL_IMAGE_CLASS_4_X_16 0x82BC
2344 #define GL_IMAGE_CLASS_2_X_16 0x82BD
2345 #define GL_IMAGE_CLASS_1_X_16 0x82BE
2346 #define GL_IMAGE_CLASS_4_X_8 0x82BF
2347 #define GL_IMAGE_CLASS_2_X_8 0x82C0
2348 #define GL_IMAGE_CLASS_1_X_8 0x82C1
2349 #define GL_IMAGE_CLASS_11_11_10 0x82C2
2350 #define GL_IMAGE_CLASS_10_10_10_2 0x82C3
2351 #define GL_VIEW_CLASS_128_BITS 0x82C4
2352 #define GL_VIEW_CLASS_96_BITS 0x82C5
2353 #define GL_VIEW_CLASS_64_BITS 0x82C6
2354 #define GL_VIEW_CLASS_48_BITS 0x82C7
2355 #define GL_VIEW_CLASS_32_BITS 0x82C8
2356 #define GL_VIEW_CLASS_24_BITS 0x82C9
2357 #define GL_VIEW_CLASS_16_BITS 0x82CA
2358 #define GL_VIEW_CLASS_8_BITS 0x82CB
2359 #define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
2360 #define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
2361 #define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
2362 #define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
2363 #define GL_VIEW_CLASS_RGTC1_RED 0x82D0
2364 #define GL_VIEW_CLASS_RGTC2_RG 0x82D1
2365 #define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
2366 #define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
2367 #define GL_UNIFORM 0x92E1
2368 #define GL_UNIFORM_BLOCK 0x92E2
2369 #define GL_PROGRAM_INPUT 0x92E3
2370 #define GL_PROGRAM_OUTPUT 0x92E4
2371 #define GL_BUFFER_VARIABLE 0x92E5
2372 #define GL_SHADER_STORAGE_BLOCK 0x92E6
2373 #define GL_VERTEX_SUBROUTINE 0x92E8
2374 #define GL_TESS_CONTROL_SUBROUTINE 0x92E9
2375 #define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
2376 #define GL_GEOMETRY_SUBROUTINE 0x92EB
2377 #define GL_FRAGMENT_SUBROUTINE 0x92EC
2378 #define GL_COMPUTE_SUBROUTINE 0x92ED
2379 #define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
2380 #define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
2381 #define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
2382 #define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
2383 #define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
2384 #define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
2385 #define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
2386 #define GL_ACTIVE_RESOURCES 0x92F5
2387 #define GL_MAX_NAME_LENGTH 0x92F6
2388 #define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
2389 #define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
2390 #define GL_NAME_LENGTH 0x92F9
2391 #define GL_TYPE 0x92FA
2392 #define GL_ARRAY_SIZE 0x92FB
2393 #define GL_OFFSET 0x92FC
2394 #define GL_BLOCK_INDEX 0x92FD
2395 #define GL_ARRAY_STRIDE 0x92FE
2396 #define GL_MATRIX_STRIDE 0x92FF
2397 #define GL_IS_ROW_MAJOR 0x9300
2398 #define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
2399 #define GL_BUFFER_BINDING 0x9302
2400 #define GL_BUFFER_DATA_SIZE 0x9303
2401 #define GL_NUM_ACTIVE_VARIABLES 0x9304
2402 #define GL_ACTIVE_VARIABLES 0x9305
2403 #define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
2404 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
2405 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
2406 #define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
2407 #define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
2408 #define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
2409 #define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
2410 #define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
2411 #define GL_LOCATION 0x930E
2412 #define GL_LOCATION_INDEX 0x930F
2413 #define GL_IS_PER_PATCH 0x92E7
2414 #define GL_SHADER_STORAGE_BUFFER 0x90D2
2415 #define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
2416 #define GL_SHADER_STORAGE_BUFFER_START 0x90D4
2417 #define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
2418 #define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
2419 #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
2420 #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
2421 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
2422 #define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
2423 #define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
2424 #define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
2425 #define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
2426 #define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
2427 #define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
2428 #define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
2429 #define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
2430 #define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
2431 #define GL_TEXTURE_BUFFER_OFFSET 0x919D
2432 #define GL_TEXTURE_BUFFER_SIZE 0x919E
2433 #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
2434 #define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
2435 #define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
2436 #define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
2437 #define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
2438 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
2439 #define GL_VERTEX_ATTRIB_BINDING 0x82D4
2440 #define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
2441 #define GL_VERTEX_BINDING_DIVISOR 0x82D6
2442 #define GL_VERTEX_BINDING_OFFSET 0x82D7
2443 #define GL_VERTEX_BINDING_STRIDE 0x82D8
2444 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
2445 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
2446 #define GL_VERTEX_BINDING_BUFFER 0x8F4F
2447 #define GL_DISPLAY_LIST 0x82E7
2448 typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2449 typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2450 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2451 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
2452 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2453 typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
2454 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
2455 typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2456 typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2457 typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
2458 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
2459 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
2460 typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2461 typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2462 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2463 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2464 typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2465 typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2466 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2467 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2468 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2469 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2470 typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2471 typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2472 typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2473 typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2474 typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2475 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2476 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2477 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2478 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2479 typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
2480 typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
2481 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2482 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2483 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
2484 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2485 typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2486 typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
2487 typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2488 typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2489 typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
2490 typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2491 #ifdef GL_GLEXT_PROTOTYPES
2492 GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2493 GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2494 GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2495 GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
2496 GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2497 GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
2498 GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
2499 GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2500 GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2501 GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
2502 GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
2503 GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
2504 GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2505 GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2506 GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2507 GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2508 GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2509 GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
2510 GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2511 GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2512 GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
2513 GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
2514 GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2515 GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2516 GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2517 GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2518 GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2519 GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2520 GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2521 GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2522 GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2523 GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
2524 GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
2525 GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2526 GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2527 GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
2528 GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2529 GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2530 GLAPI void APIENTRY glPopDebugGroup (void);
2531 GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2532 GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2533 GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
2534 GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2535 #endif
2536 #endif /* GL_VERSION_4_3 */
2537
2538 #ifndef GL_VERSION_4_4
2539 #define GL_VERSION_4_4 1
2540 #define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
2541 #define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
2542 #define GL_TEXTURE_BUFFER_BINDING 0x8C2A
2543 #define GL_MAP_PERSISTENT_BIT 0x0040
2544 #define GL_MAP_COHERENT_BIT 0x0080
2545 #define GL_DYNAMIC_STORAGE_BIT 0x0100
2546 #define GL_CLIENT_STORAGE_BIT 0x0200
2547 #define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
2548 #define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
2549 #define GL_BUFFER_STORAGE_FLAGS 0x8220
2550 #define GL_CLEAR_TEXTURE 0x9365
2551 #define GL_LOCATION_COMPONENT 0x934A
2552 #define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
2553 #define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
2554 #define GL_QUERY_BUFFER 0x9192
2555 #define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
2556 #define GL_QUERY_BUFFER_BINDING 0x9193
2557 #define GL_QUERY_RESULT_NO_WAIT 0x9194
2558 #define GL_MIRROR_CLAMP_TO_EDGE 0x8743
2559 typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2560 typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2561 typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2562 typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2563 typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2564 typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2565 typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
2566 typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2567 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2568 #ifdef GL_GLEXT_PROTOTYPES
2569 GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2570 GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2571 GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2572 GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2573 GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2574 GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
2575 GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
2576 GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
2577 GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2578 #endif
2579 #endif /* GL_VERSION_4_4 */
2580
2581 #ifndef GL_ARB_ES2_compatibility
2582 #define GL_ARB_ES2_compatibility 1
2583 #endif /* GL_ARB_ES2_compatibility */
2584
2585 #ifndef GL_ARB_ES3_compatibility
2586 #define GL_ARB_ES3_compatibility 1
2587 #endif /* GL_ARB_ES3_compatibility */
2588
2589 #ifndef GL_ARB_arrays_of_arrays
2590 #define GL_ARB_arrays_of_arrays 1
2591 #endif /* GL_ARB_arrays_of_arrays */
2592
2593 #ifndef GL_ARB_base_instance
2594 #define GL_ARB_base_instance 1
2595 #endif /* GL_ARB_base_instance */
2596
2597 #ifndef GL_ARB_bindless_texture
2598 #define GL_ARB_bindless_texture 1
2599 typedef uint64_t GLuint64EXT;
2600 #define GL_UNSIGNED_INT64_ARB 0x140F
2601 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
2602 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
2603 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2604 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2605 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2606 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
2607 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2608 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
2609 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
2610 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
2611 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2612 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2613 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
2614 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
2615 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
2616 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
2617 #ifdef GL_GLEXT_PROTOTYPES
2618 GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
2619 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
2620 GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
2621 GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
2622 GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2623 GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
2624 GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
2625 GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
2626 GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
2627 GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
2628 GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2629 GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
2630 GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
2631 GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
2632 GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
2633 GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
2634 #endif
2635 #endif /* GL_ARB_bindless_texture */
2636
2637 #ifndef GL_ARB_blend_func_extended
2638 #define GL_ARB_blend_func_extended 1
2639 #endif /* GL_ARB_blend_func_extended */
2640
2641 #ifndef GL_ARB_buffer_storage
2642 #define GL_ARB_buffer_storage 1
2643 #endif /* GL_ARB_buffer_storage */
2644
2645 #ifndef GL_ARB_cl_event
2646 #define GL_ARB_cl_event 1
2647 struct _cl_context;
2648 struct _cl_event;
2649 #define GL_SYNC_CL_EVENT_ARB 0x8240
2650 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
2651 typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2652 #ifdef GL_GLEXT_PROTOTYPES
2653 GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2654 #endif
2655 #endif /* GL_ARB_cl_event */
2656
2657 #ifndef GL_ARB_clear_buffer_object
2658 #define GL_ARB_clear_buffer_object 1
2659 #endif /* GL_ARB_clear_buffer_object */
2660
2661 #ifndef GL_ARB_clear_texture
2662 #define GL_ARB_clear_texture 1
2663 #endif /* GL_ARB_clear_texture */
2664
2665 #ifndef GL_ARB_color_buffer_float
2666 #define GL_ARB_color_buffer_float 1
2667 #define GL_RGBA_FLOAT_MODE_ARB 0x8820
2668 #define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
2669 #define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
2670 #define GL_CLAMP_READ_COLOR_ARB 0x891C
2671 #define GL_FIXED_ONLY_ARB 0x891D
2672 typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
2673 #ifdef GL_GLEXT_PROTOTYPES
2674 GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
2675 #endif
2676 #endif /* GL_ARB_color_buffer_float */
2677
2678 #ifndef GL_ARB_compatibility
2679 #define GL_ARB_compatibility 1
2680 #endif /* GL_ARB_compatibility */
2681
2682 #ifndef GL_ARB_compressed_texture_pixel_storage
2683 #define GL_ARB_compressed_texture_pixel_storage 1
2684 #endif /* GL_ARB_compressed_texture_pixel_storage */
2685
2686 #ifndef GL_ARB_compute_shader
2687 #define GL_ARB_compute_shader 1
2688 #define GL_COMPUTE_SHADER_BIT 0x00000020
2689 #endif /* GL_ARB_compute_shader */
2690
2691 #ifndef GL_ARB_compute_variable_group_size
2692 #define GL_ARB_compute_variable_group_size 1
2693 #define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
2694 #define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
2695 #define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
2696 #define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
2697 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2698 #ifdef GL_GLEXT_PROTOTYPES
2699 GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2700 #endif
2701 #endif /* GL_ARB_compute_variable_group_size */
2702
2703 #ifndef GL_ARB_conservative_depth
2704 #define GL_ARB_conservative_depth 1
2705 #endif /* GL_ARB_conservative_depth */
2706
2707 #ifndef GL_ARB_copy_buffer
2708 #define GL_ARB_copy_buffer 1
2709 #define GL_COPY_READ_BUFFER_BINDING 0x8F36
2710 #define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
2711 #endif /* GL_ARB_copy_buffer */
2712
2713 #ifndef GL_ARB_copy_image
2714 #define GL_ARB_copy_image 1
2715 #endif /* GL_ARB_copy_image */
2716
2717 #ifndef GL_ARB_debug_output
2718 #define GL_ARB_debug_output 1
2719 typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2720 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
2721 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
2722 #define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
2723 #define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
2724 #define GL_DEBUG_SOURCE_API_ARB 0x8246
2725 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
2726 #define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
2727 #define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
2728 #define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
2729 #define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
2730 #define GL_DEBUG_TYPE_ERROR_ARB 0x824C
2731 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
2732 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
2733 #define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
2734 #define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
2735 #define GL_DEBUG_TYPE_OTHER_ARB 0x8251
2736 #define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
2737 #define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
2738 #define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
2739 #define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
2740 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
2741 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
2742 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2743 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2744 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
2745 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2746 #ifdef GL_GLEXT_PROTOTYPES
2747 GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2748 GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2749 GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
2750 GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2751 #endif
2752 #endif /* GL_ARB_debug_output */
2753
2754 #ifndef GL_ARB_depth_buffer_float
2755 #define GL_ARB_depth_buffer_float 1
2756 #endif /* GL_ARB_depth_buffer_float */
2757
2758 #ifndef GL_ARB_depth_clamp
2759 #define GL_ARB_depth_clamp 1
2760 #endif /* GL_ARB_depth_clamp */
2761
2762 #ifndef GL_ARB_depth_texture
2763 #define GL_ARB_depth_texture 1
2764 #define GL_DEPTH_COMPONENT16_ARB 0x81A5
2765 #define GL_DEPTH_COMPONENT24_ARB 0x81A6
2766 #define GL_DEPTH_COMPONENT32_ARB 0x81A7
2767 #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
2768 #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
2769 #endif /* GL_ARB_depth_texture */
2770
2771 #ifndef GL_ARB_draw_buffers
2772 #define GL_ARB_draw_buffers 1
2773 #define GL_MAX_DRAW_BUFFERS_ARB 0x8824
2774 #define GL_DRAW_BUFFER0_ARB 0x8825
2775 #define GL_DRAW_BUFFER1_ARB 0x8826
2776 #define GL_DRAW_BUFFER2_ARB 0x8827
2777 #define GL_DRAW_BUFFER3_ARB 0x8828
2778 #define GL_DRAW_BUFFER4_ARB 0x8829
2779 #define GL_DRAW_BUFFER5_ARB 0x882A
2780 #define GL_DRAW_BUFFER6_ARB 0x882B
2781 #define GL_DRAW_BUFFER7_ARB 0x882C
2782 #define GL_DRAW_BUFFER8_ARB 0x882D
2783 #define GL_DRAW_BUFFER9_ARB 0x882E
2784 #define GL_DRAW_BUFFER10_ARB 0x882F
2785 #define GL_DRAW_BUFFER11_ARB 0x8830
2786 #define GL_DRAW_BUFFER12_ARB 0x8831
2787 #define GL_DRAW_BUFFER13_ARB 0x8832
2788 #define GL_DRAW_BUFFER14_ARB 0x8833
2789 #define GL_DRAW_BUFFER15_ARB 0x8834
2790 typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
2791 #ifdef GL_GLEXT_PROTOTYPES
2792 GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
2793 #endif
2794 #endif /* GL_ARB_draw_buffers */
2795
2796 #ifndef GL_ARB_draw_buffers_blend
2797 #define GL_ARB_draw_buffers_blend 1
2798 typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
2799 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2800 typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
2801 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2802 #ifdef GL_GLEXT_PROTOTYPES
2803 GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
2804 GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2805 GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
2806 GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2807 #endif
2808 #endif /* GL_ARB_draw_buffers_blend */
2809
2810 #ifndef GL_ARB_draw_elements_base_vertex
2811 #define GL_ARB_draw_elements_base_vertex 1
2812 #endif /* GL_ARB_draw_elements_base_vertex */
2813
2814 #ifndef GL_ARB_draw_indirect
2815 #define GL_ARB_draw_indirect 1
2816 #endif /* GL_ARB_draw_indirect */
2817
2818 #ifndef GL_ARB_draw_instanced
2819 #define GL_ARB_draw_instanced 1
2820 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2821 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2822 #ifdef GL_GLEXT_PROTOTYPES
2823 GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2824 GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2825 #endif
2826 #endif /* GL_ARB_draw_instanced */
2827
2828 #ifndef GL_ARB_enhanced_layouts
2829 #define GL_ARB_enhanced_layouts 1
2830 #endif /* GL_ARB_enhanced_layouts */
2831
2832 #ifndef GL_ARB_explicit_attrib_location
2833 #define GL_ARB_explicit_attrib_location 1
2834 #endif /* GL_ARB_explicit_attrib_location */
2835
2836 #ifndef GL_ARB_explicit_uniform_location
2837 #define GL_ARB_explicit_uniform_location 1
2838 #endif /* GL_ARB_explicit_uniform_location */
2839
2840 #ifndef GL_ARB_fragment_coord_conventions
2841 #define GL_ARB_fragment_coord_conventions 1
2842 #endif /* GL_ARB_fragment_coord_conventions */
2843
2844 #ifndef GL_ARB_fragment_layer_viewport
2845 #define GL_ARB_fragment_layer_viewport 1
2846 #endif /* GL_ARB_fragment_layer_viewport */
2847
2848 #ifndef GL_ARB_fragment_program
2849 #define GL_ARB_fragment_program 1
2850 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
2851 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
2852 #define GL_PROGRAM_LENGTH_ARB 0x8627
2853 #define GL_PROGRAM_FORMAT_ARB 0x8876
2854 #define GL_PROGRAM_BINDING_ARB 0x8677
2855 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
2856 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
2857 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
2858 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
2859 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
2860 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
2861 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
2862 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
2863 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8
2864 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
2865 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
2866 #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
2867 #define GL_PROGRAM_ATTRIBS_ARB 0x88AC
2868 #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
2869 #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
2870 #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
2871 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
2872 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
2873 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
2874 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
2875 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
2876 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
2877 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
2878 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
2879 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
2880 #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
2881 #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
2882 #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
2883 #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
2884 #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
2885 #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
2886 #define GL_PROGRAM_STRING_ARB 0x8628
2887 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
2888 #define GL_CURRENT_MATRIX_ARB 0x8641
2889 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
2890 #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
2891 #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
2892 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
2893 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871
2894 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
2895 #define GL_PROGRAM_ERROR_STRING_ARB 0x8874
2896 #define GL_MATRIX0_ARB 0x88C0
2897 #define GL_MATRIX1_ARB 0x88C1
2898 #define GL_MATRIX2_ARB 0x88C2
2899 #define GL_MATRIX3_ARB 0x88C3
2900 #define GL_MATRIX4_ARB 0x88C4
2901 #define GL_MATRIX5_ARB 0x88C5
2902 #define GL_MATRIX6_ARB 0x88C6
2903 #define GL_MATRIX7_ARB 0x88C7
2904 #define GL_MATRIX8_ARB 0x88C8
2905 #define GL_MATRIX9_ARB 0x88C9
2906 #define GL_MATRIX10_ARB 0x88CA
2907 #define GL_MATRIX11_ARB 0x88CB
2908 #define GL_MATRIX12_ARB 0x88CC
2909 #define GL_MATRIX13_ARB 0x88CD
2910 #define GL_MATRIX14_ARB 0x88CE
2911 #define GL_MATRIX15_ARB 0x88CF
2912 #define GL_MATRIX16_ARB 0x88D0
2913 #define GL_MATRIX17_ARB 0x88D1
2914 #define GL_MATRIX18_ARB 0x88D2
2915 #define GL_MATRIX19_ARB 0x88D3
2916 #define GL_MATRIX20_ARB 0x88D4
2917 #define GL_MATRIX21_ARB 0x88D5
2918 #define GL_MATRIX22_ARB 0x88D6
2919 #define GL_MATRIX23_ARB 0x88D7
2920 #define GL_MATRIX24_ARB 0x88D8
2921 #define GL_MATRIX25_ARB 0x88D9
2922 #define GL_MATRIX26_ARB 0x88DA
2923 #define GL_MATRIX27_ARB 0x88DB
2924 #define GL_MATRIX28_ARB 0x88DC
2925 #define GL_MATRIX29_ARB 0x88DD
2926 #define GL_MATRIX30_ARB 0x88DE
2927 #define GL_MATRIX31_ARB 0x88DF
2928 typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
2929 typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
2930 typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
2931 typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
2932 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2933 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2934 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2935 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2936 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2937 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2938 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2939 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2940 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2941 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2942 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2943 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2944 typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
2945 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
2946 typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
2947 #ifdef GL_GLEXT_PROTOTYPES
2948 GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
2949 GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
2950 GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
2951 GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
2952 GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2953 GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2954 GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2955 GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2956 GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2957 GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2958 GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2959 GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2960 GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2961 GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2962 GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2963 GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2964 GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
2965 GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
2966 GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
2967 #endif
2968 #endif /* GL_ARB_fragment_program */
2969
2970 #ifndef GL_ARB_fragment_program_shadow
2971 #define GL_ARB_fragment_program_shadow 1
2972 #endif /* GL_ARB_fragment_program_shadow */
2973
2974 #ifndef GL_ARB_fragment_shader
2975 #define GL_ARB_fragment_shader 1
2976 #define GL_FRAGMENT_SHADER_ARB 0x8B30
2977 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
2978 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
2979 #endif /* GL_ARB_fragment_shader */
2980
2981 #ifndef GL_ARB_framebuffer_no_attachments
2982 #define GL_ARB_framebuffer_no_attachments 1
2983 #endif /* GL_ARB_framebuffer_no_attachments */
2984
2985 #ifndef GL_ARB_framebuffer_object
2986 #define GL_ARB_framebuffer_object 1
2987 #endif /* GL_ARB_framebuffer_object */
2988
2989 #ifndef GL_ARB_framebuffer_sRGB
2990 #define GL_ARB_framebuffer_sRGB 1
2991 #endif /* GL_ARB_framebuffer_sRGB */
2992
2993 #ifndef GL_KHR_context_flush_control
2994 #define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
2995 #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
2996 #endif /* GL_KHR_context_flush_control */
2997
2998 #ifndef GL_ARB_geometry_shader4
2999 #define GL_ARB_geometry_shader4 1
3000 #define GL_LINES_ADJACENCY_ARB 0x000A
3001 #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
3002 #define GL_TRIANGLES_ADJACENCY_ARB 0x000C
3003 #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
3004 #define GL_PROGRAM_POINT_SIZE_ARB 0x8642
3005 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
3006 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
3007 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
3008 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
3009 #define GL_GEOMETRY_SHADER_ARB 0x8DD9
3010 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
3011 #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
3012 #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
3013 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
3014 #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
3015 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
3016 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
3017 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
3018 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
3019 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
3020 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3021 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3022 #ifdef GL_GLEXT_PROTOTYPES
3023 GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
3024 GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
3025 GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3026 GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3027 #endif
3028 #endif /* GL_ARB_geometry_shader4 */
3029
3030 #ifndef GL_ARB_get_program_binary
3031 #define GL_ARB_get_program_binary 1
3032 #endif /* GL_ARB_get_program_binary */
3033
3034 #ifndef GL_ARB_gpu_shader5
3035 #define GL_ARB_gpu_shader5 1
3036 #endif /* GL_ARB_gpu_shader5 */
3037
3038 #ifndef GL_ARB_gpu_shader_fp64
3039 #define GL_ARB_gpu_shader_fp64 1
3040 #endif /* GL_ARB_gpu_shader_fp64 */
3041
3042 #ifndef GL_ARB_half_float_pixel
3043 #define GL_ARB_half_float_pixel 1
3044 typedef unsigned short GLhalfARB;
3045 #define GL_HALF_FLOAT_ARB 0x140B
3046 #endif /* GL_ARB_half_float_pixel */
3047
3048 #ifndef GL_ARB_half_float_vertex
3049 #define GL_ARB_half_float_vertex 1
3050 #endif /* GL_ARB_half_float_vertex */
3051
3052 #ifndef GL_ARB_imaging
3053 #define GL_ARB_imaging 1
3054 #define GL_BLEND_COLOR 0x8005
3055 #define GL_BLEND_EQUATION 0x8009
3056 #define GL_CONVOLUTION_1D 0x8010
3057 #define GL_CONVOLUTION_2D 0x8011
3058 #define GL_SEPARABLE_2D 0x8012
3059 #define GL_CONVOLUTION_BORDER_MODE 0x8013
3060 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
3061 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
3062 #define GL_REDUCE 0x8016
3063 #define GL_CONVOLUTION_FORMAT 0x8017
3064 #define GL_CONVOLUTION_WIDTH 0x8018
3065 #define GL_CONVOLUTION_HEIGHT 0x8019
3066 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
3067 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
3068 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
3069 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
3070 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
3071 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
3072 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
3073 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
3074 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
3075 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
3076 #define GL_HISTOGRAM 0x8024
3077 #define GL_PROXY_HISTOGRAM 0x8025
3078 #define GL_HISTOGRAM_WIDTH 0x8026
3079 #define GL_HISTOGRAM_FORMAT 0x8027
3080 #define GL_HISTOGRAM_RED_SIZE 0x8028
3081 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
3082 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
3083 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
3084 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
3085 #define GL_HISTOGRAM_SINK 0x802D
3086 #define GL_MINMAX 0x802E
3087 #define GL_MINMAX_FORMAT 0x802F
3088 #define GL_MINMAX_SINK 0x8030
3089 #define GL_TABLE_TOO_LARGE 0x8031
3090 #define GL_COLOR_MATRIX 0x80B1
3091 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
3092 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
3093 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
3094 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
3095 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
3096 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
3097 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
3098 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
3099 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
3100 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
3101 #define GL_COLOR_TABLE 0x80D0
3102 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
3103 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
3104 #define GL_PROXY_COLOR_TABLE 0x80D3
3105 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
3106 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
3107 #define GL_COLOR_TABLE_SCALE 0x80D6
3108 #define GL_COLOR_TABLE_BIAS 0x80D7
3109 #define GL_COLOR_TABLE_FORMAT 0x80D8
3110 #define GL_COLOR_TABLE_WIDTH 0x80D9
3111 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
3112 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
3113 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
3114 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
3115 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
3116 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
3117 #define GL_CONSTANT_BORDER 0x8151
3118 #define GL_REPLICATE_BORDER 0x8153
3119 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
3120 typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3121 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3122 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3123 typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3124 typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
3125 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3126 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3127 typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3128 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3129 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3130 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3131 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
3132 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3133 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
3134 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3135 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3136 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3137 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
3138 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3139 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3140 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3141 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3142 typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3143 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3144 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3145 typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3146 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3147 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3148 typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3149 typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
3150 typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
3151 typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
3152 #ifdef GL_GLEXT_PROTOTYPES
3153 GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3154 GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3155 GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
3156 GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3157 GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
3158 GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
3159 GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
3160 GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3161 GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3162 GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3163 GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3164 GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
3165 GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3166 GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
3167 GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
3168 GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3169 GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3170 GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
3171 GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
3172 GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
3173 GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3174 GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3175 GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3176 GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
3177 GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
3178 GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3179 GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
3180 GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
3181 GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3182 GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
3183 GLAPI void APIENTRY glResetHistogram (GLenum target);
3184 GLAPI void APIENTRY glResetMinmax (GLenum target);
3185 #endif
3186 #endif /* GL_ARB_imaging */
3187
3188 #ifndef GL_ARB_indirect_parameters
3189 #define GL_ARB_indirect_parameters 1
3190 #define GL_PARAMETER_BUFFER_ARB 0x80EE
3191 #define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
3192 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3193 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3194 #ifdef GL_GLEXT_PROTOTYPES
3195 GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3196 GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3197 #endif
3198 #endif /* GL_ARB_indirect_parameters */
3199
3200 #ifndef GL_ARB_instanced_arrays
3201 #define GL_ARB_instanced_arrays 1
3202 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
3203 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
3204 #ifdef GL_GLEXT_PROTOTYPES
3205 GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
3206 #endif
3207 #endif /* GL_ARB_instanced_arrays */
3208
3209 #ifndef GL_ARB_internalformat_query
3210 #define GL_ARB_internalformat_query 1
3211 #endif /* GL_ARB_internalformat_query */
3212
3213 #ifndef GL_ARB_internalformat_query2
3214 #define GL_ARB_internalformat_query2 1
3215 #define GL_SRGB_DECODE_ARB 0x8299
3216 #endif /* GL_ARB_internalformat_query2 */
3217
3218 #ifndef GL_ARB_invalidate_subdata
3219 #define GL_ARB_invalidate_subdata 1
3220 #endif /* GL_ARB_invalidate_subdata */
3221
3222 #ifndef GL_ARB_map_buffer_alignment
3223 #define GL_ARB_map_buffer_alignment 1
3224 #endif /* GL_ARB_map_buffer_alignment */
3225
3226 #ifndef GL_ARB_map_buffer_range
3227 #define GL_ARB_map_buffer_range 1
3228 #endif /* GL_ARB_map_buffer_range */
3229
3230 #ifndef GL_ARB_matrix_palette
3231 #define GL_ARB_matrix_palette 1
3232 #define GL_MATRIX_PALETTE_ARB 0x8840
3233 #define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
3234 #define GL_MAX_PALETTE_MATRICES_ARB 0x8842
3235 #define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
3236 #define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
3237 #define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
3238 #define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
3239 #define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
3240 #define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
3241 #define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
3242 typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
3243 typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
3244 typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
3245 typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
3246 typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
3247 #ifdef GL_GLEXT_PROTOTYPES
3248 GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
3249 GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
3250 GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
3251 GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
3252 GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
3253 #endif
3254 #endif /* GL_ARB_matrix_palette */
3255
3256 #ifndef GL_ARB_multi_bind
3257 #define GL_ARB_multi_bind 1
3258 #endif /* GL_ARB_multi_bind */
3259
3260 #ifndef GL_ARB_multi_draw_indirect
3261 #define GL_ARB_multi_draw_indirect 1
3262 #endif /* GL_ARB_multi_draw_indirect */
3263
3264 #ifndef GL_ARB_multisample
3265 #define GL_ARB_multisample 1
3266 #define GL_MULTISAMPLE_ARB 0x809D
3267 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
3268 #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
3269 #define GL_SAMPLE_COVERAGE_ARB 0x80A0
3270 #define GL_SAMPLE_BUFFERS_ARB 0x80A8
3271 #define GL_SAMPLES_ARB 0x80A9
3272 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
3273 #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
3274 #define GL_MULTISAMPLE_BIT_ARB 0x20000000
3275 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
3276 #ifdef GL_GLEXT_PROTOTYPES
3277 GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
3278 #endif
3279 #endif /* GL_ARB_multisample */
3280
3281 #ifndef GL_ARB_multitexture
3282 #define GL_ARB_multitexture 1
3283 #define GL_TEXTURE0_ARB 0x84C0
3284 #define GL_TEXTURE1_ARB 0x84C1
3285 #define GL_TEXTURE2_ARB 0x84C2
3286 #define GL_TEXTURE3_ARB 0x84C3
3287 #define GL_TEXTURE4_ARB 0x84C4
3288 #define GL_TEXTURE5_ARB 0x84C5
3289 #define GL_TEXTURE6_ARB 0x84C6
3290 #define GL_TEXTURE7_ARB 0x84C7
3291 #define GL_TEXTURE8_ARB 0x84C8
3292 #define GL_TEXTURE9_ARB 0x84C9
3293 #define GL_TEXTURE10_ARB 0x84CA
3294 #define GL_TEXTURE11_ARB 0x84CB
3295 #define GL_TEXTURE12_ARB 0x84CC
3296 #define GL_TEXTURE13_ARB 0x84CD
3297 #define GL_TEXTURE14_ARB 0x84CE
3298 #define GL_TEXTURE15_ARB 0x84CF
3299 #define GL_TEXTURE16_ARB 0x84D0
3300 #define GL_TEXTURE17_ARB 0x84D1
3301 #define GL_TEXTURE18_ARB 0x84D2
3302 #define GL_TEXTURE19_ARB 0x84D3
3303 #define GL_TEXTURE20_ARB 0x84D4
3304 #define GL_TEXTURE21_ARB 0x84D5
3305 #define GL_TEXTURE22_ARB 0x84D6
3306 #define GL_TEXTURE23_ARB 0x84D7
3307 #define GL_TEXTURE24_ARB 0x84D8
3308 #define GL_TEXTURE25_ARB 0x84D9
3309 #define GL_TEXTURE26_ARB 0x84DA
3310 #define GL_TEXTURE27_ARB 0x84DB
3311 #define GL_TEXTURE28_ARB 0x84DC
3312 #define GL_TEXTURE29_ARB 0x84DD
3313 #define GL_TEXTURE30_ARB 0x84DE
3314 #define GL_TEXTURE31_ARB 0x84DF
3315 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
3316 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
3317 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
3318 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
3319 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
3320 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
3321 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
3322 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
3323 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
3324 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
3325 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
3326 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
3327 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
3328 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
3329 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
3330 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
3331 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
3332 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
3333 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
3334 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
3335 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
3336 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3337 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
3338 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3339 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
3340 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
3341 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
3342 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
3343 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
3344 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3345 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
3346 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3347 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
3348 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
3349 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
3350 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3351 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
3352 #ifdef GL_GLEXT_PROTOTYPES
3353 GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
3354 GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
3355 GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
3356 GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
3357 GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
3358 GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
3359 GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
3360 GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
3361 GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
3362 GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
3363 GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
3364 GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
3365 GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
3366 GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
3367 GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
3368 GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
3369 GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
3370 GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
3371 GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3372 GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
3373 GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3374 GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
3375 GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
3376 GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
3377 GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
3378 GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
3379 GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3380 GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
3381 GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3382 GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
3383 GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
3384 GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
3385 GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3386 GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
3387 #endif
3388 #endif /* GL_ARB_multitexture */
3389
3390 #ifndef GL_ARB_occlusion_query
3391 #define GL_ARB_occlusion_query 1
3392 #define GL_QUERY_COUNTER_BITS_ARB 0x8864
3393 #define GL_CURRENT_QUERY_ARB 0x8865
3394 #define GL_QUERY_RESULT_ARB 0x8866
3395 #define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
3396 #define GL_SAMPLES_PASSED_ARB 0x8914
3397 typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
3398 typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
3399 typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
3400 typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
3401 typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
3402 typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
3403 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
3404 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
3405 #ifdef GL_GLEXT_PROTOTYPES
3406 GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
3407 GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
3408 GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
3409 GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
3410 GLAPI void APIENTRY glEndQueryARB (GLenum target);
3411 GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
3412 GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
3413 GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
3414 #endif
3415 #endif /* GL_ARB_occlusion_query */
3416
3417 #ifndef GL_ARB_occlusion_query2
3418 #define GL_ARB_occlusion_query2 1
3419 #endif /* GL_ARB_occlusion_query2 */
3420
3421 #ifndef GL_ARB_pixel_buffer_object
3422 #define GL_ARB_pixel_buffer_object 1
3423 #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
3424 #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
3425 #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
3426 #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
3427 #endif /* GL_ARB_pixel_buffer_object */
3428
3429 #ifndef GL_ARB_point_parameters
3430 #define GL_ARB_point_parameters 1
3431 #define GL_POINT_SIZE_MIN_ARB 0x8126
3432 #define GL_POINT_SIZE_MAX_ARB 0x8127
3433 #define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
3434 #define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
3435 typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
3436 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
3437 #ifdef GL_GLEXT_PROTOTYPES
3438 GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
3439 GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
3440 #endif
3441 #endif /* GL_ARB_point_parameters */
3442
3443 #ifndef GL_ARB_point_sprite
3444 #define GL_ARB_point_sprite 1
3445 #define GL_POINT_SPRITE_ARB 0x8861
3446 #define GL_COORD_REPLACE_ARB 0x8862
3447 #endif /* GL_ARB_point_sprite */
3448
3449 #ifndef GL_ARB_program_interface_query
3450 #define GL_ARB_program_interface_query 1
3451 #endif /* GL_ARB_program_interface_query */
3452
3453 #ifndef GL_ARB_provoking_vertex
3454 #define GL_ARB_provoking_vertex 1
3455 #endif /* GL_ARB_provoking_vertex */
3456
3457 #ifndef GL_ARB_query_buffer_object
3458 #define GL_ARB_query_buffer_object 1
3459 #endif /* GL_ARB_query_buffer_object */
3460
3461 #ifndef GL_ARB_robust_buffer_access_behavior
3462 #define GL_ARB_robust_buffer_access_behavior 1
3463 #endif /* GL_ARB_robust_buffer_access_behavior */
3464
3465 #ifndef GL_ARB_robustness
3466 #define GL_ARB_robustness 1
3467 #define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
3468 #define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
3469 #define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
3470 #define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
3471 #define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
3472 #define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
3473 #define GL_NO_RESET_NOTIFICATION_ARB 0x8261
3474 typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
3475 typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3476 typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3477 typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
3478 typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3479 typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3480 typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3481 typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3482 typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3483 typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3484 typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3485 typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
3486 typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
3487 typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
3488 typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
3489 typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3490 typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3491 typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3492 typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3493 typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3494 #ifdef GL_GLEXT_PROTOTYPES
3495 GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
3496 GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3497 GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3498 GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
3499 GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3500 GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3501 GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3502 GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3503 GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3504 GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3505 GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3506 GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
3507 GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
3508 GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
3509 GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
3510 GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3511 GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3512 GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3513 GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3514 GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3515 #endif
3516 #endif /* GL_ARB_robustness */
3517
3518 #ifndef GL_ARB_robustness_isolation
3519 #define GL_ARB_robustness_isolation 1
3520 #endif /* GL_ARB_robustness_isolation */
3521
3522 #ifndef GL_ARB_sample_shading
3523 #define GL_ARB_sample_shading 1
3524 #define GL_SAMPLE_SHADING_ARB 0x8C36
3525 #define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
3526 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
3527 #ifdef GL_GLEXT_PROTOTYPES
3528 GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
3529 #endif
3530 #endif /* GL_ARB_sample_shading */
3531
3532 #ifndef GL_ARB_sampler_objects
3533 #define GL_ARB_sampler_objects 1
3534 #endif /* GL_ARB_sampler_objects */
3535
3536 #ifndef GL_ARB_seamless_cube_map
3537 #define GL_ARB_seamless_cube_map 1
3538 #endif /* GL_ARB_seamless_cube_map */
3539
3540 #ifndef GL_ARB_seamless_cubemap_per_texture
3541 #define GL_ARB_seamless_cubemap_per_texture 1
3542 #endif /* GL_ARB_seamless_cubemap_per_texture */
3543
3544 #ifndef GL_ARB_separate_shader_objects
3545 #define GL_ARB_separate_shader_objects 1
3546 #endif /* GL_ARB_separate_shader_objects */
3547
3548 #ifndef GL_ARB_shader_atomic_counters
3549 #define GL_ARB_shader_atomic_counters 1
3550 #endif /* GL_ARB_shader_atomic_counters */
3551
3552 #ifndef GL_ARB_shader_bit_encoding
3553 #define GL_ARB_shader_bit_encoding 1
3554 #endif /* GL_ARB_shader_bit_encoding */
3555
3556 #ifndef GL_ARB_shader_draw_parameters
3557 #define GL_ARB_shader_draw_parameters 1
3558 #endif /* GL_ARB_shader_draw_parameters */
3559
3560 #ifndef GL_ARB_shader_group_vote
3561 #define GL_ARB_shader_group_vote 1
3562 #endif /* GL_ARB_shader_group_vote */
3563
3564 #ifndef GL_ARB_shader_image_load_store
3565 #define GL_ARB_shader_image_load_store 1
3566 #endif /* GL_ARB_shader_image_load_store */
3567
3568 #ifndef GL_ARB_shader_image_size
3569 #define GL_ARB_shader_image_size 1
3570 #endif /* GL_ARB_shader_image_size */
3571
3572 #ifndef GL_ARB_shader_objects
3573 #define GL_ARB_shader_objects 1
3574 #ifdef __APPLE__
3575 typedef void *GLhandleARB;
3576 #else
3577 typedef unsigned int GLhandleARB;
3578 #endif
3579 typedef char GLcharARB;
3580 #define GL_PROGRAM_OBJECT_ARB 0x8B40
3581 #define GL_SHADER_OBJECT_ARB 0x8B48
3582 #define GL_OBJECT_TYPE_ARB 0x8B4E
3583 #define GL_OBJECT_SUBTYPE_ARB 0x8B4F
3584 #define GL_FLOAT_VEC2_ARB 0x8B50
3585 #define GL_FLOAT_VEC3_ARB 0x8B51
3586 #define GL_FLOAT_VEC4_ARB 0x8B52
3587 #define GL_INT_VEC2_ARB 0x8B53
3588 #define GL_INT_VEC3_ARB 0x8B54
3589 #define GL_INT_VEC4_ARB 0x8B55
3590 #define GL_BOOL_ARB 0x8B56
3591 #define GL_BOOL_VEC2_ARB 0x8B57
3592 #define GL_BOOL_VEC3_ARB 0x8B58
3593 #define GL_BOOL_VEC4_ARB 0x8B59
3594 #define GL_FLOAT_MAT2_ARB 0x8B5A
3595 #define GL_FLOAT_MAT3_ARB 0x8B5B
3596 #define GL_FLOAT_MAT4_ARB 0x8B5C
3597 #define GL_SAMPLER_1D_ARB 0x8B5D
3598 #define GL_SAMPLER_2D_ARB 0x8B5E
3599 #define GL_SAMPLER_3D_ARB 0x8B5F
3600 #define GL_SAMPLER_CUBE_ARB 0x8B60
3601 #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
3602 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
3603 #define GL_SAMPLER_2D_RECT_ARB 0x8B63
3604 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
3605 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
3606 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
3607 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82
3608 #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
3609 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
3610 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
3611 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
3612 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
3613 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
3614 typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
3615 typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
3616 typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
3617 typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
3618 typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3619 typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
3620 typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
3621 typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
3622 typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
3623 typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
3624 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
3625 typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
3626 typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
3627 typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3628 typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3629 typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
3630 typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
3631 typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
3632 typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3633 typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3634 typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3635 typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3636 typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3637 typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3638 typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3639 typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3640 typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3641 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3642 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3643 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3644 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
3645 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
3646 typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3647 typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3648 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
3649 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3650 typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
3651 typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
3652 typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3653 #ifdef GL_GLEXT_PROTOTYPES
3654 GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
3655 GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
3656 GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
3657 GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
3658 GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3659 GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
3660 GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
3661 GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
3662 GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
3663 GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
3664 GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
3665 GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
3666 GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
3667 GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3668 GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3669 GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
3670 GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
3671 GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
3672 GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3673 GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
3674 GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
3675 GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
3676 GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
3677 GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
3678 GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
3679 GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
3680 GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
3681 GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3682 GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3683 GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3684 GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
3685 GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
3686 GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3687 GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3688 GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
3689 GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3690 GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
3691 GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
3692 GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3693 #endif
3694 #endif /* GL_ARB_shader_objects */
3695
3696 #ifndef GL_ARB_shader_precision
3697 #define GL_ARB_shader_precision 1
3698 #endif /* GL_ARB_shader_precision */
3699
3700 #ifndef GL_ARB_shader_stencil_export
3701 #define GL_ARB_shader_stencil_export 1
3702 #endif /* GL_ARB_shader_stencil_export */
3703
3704 #ifndef GL_ARB_shader_storage_buffer_object
3705 #define GL_ARB_shader_storage_buffer_object 1
3706 #endif /* GL_ARB_shader_storage_buffer_object */
3707
3708 #ifndef GL_ARB_shader_subroutine
3709 #define GL_ARB_shader_subroutine 1
3710 #endif /* GL_ARB_shader_subroutine */
3711
3712 #ifndef GL_ARB_shader_texture_lod
3713 #define GL_ARB_shader_texture_lod 1
3714 #endif /* GL_ARB_shader_texture_lod */
3715
3716 #ifndef GL_ARB_shading_language_100
3717 #define GL_ARB_shading_language_100 1
3718 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
3719 #endif /* GL_ARB_shading_language_100 */
3720
3721 #ifndef GL_ARB_shading_language_420pack
3722 #define GL_ARB_shading_language_420pack 1
3723 #endif /* GL_ARB_shading_language_420pack */
3724
3725 #ifndef GL_ARB_shading_language_include
3726 #define GL_ARB_shading_language_include 1
3727 #define GL_SHADER_INCLUDE_ARB 0x8DAE
3728 #define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
3729 #define GL_NAMED_STRING_TYPE_ARB 0x8DEA
3730 typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3731 typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3732 typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3733 typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3734 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3735 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3736 #ifdef GL_GLEXT_PROTOTYPES
3737 GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3738 GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
3739 GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3740 GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
3741 GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3742 GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3743 #endif
3744 #endif /* GL_ARB_shading_language_include */
3745
3746 #ifndef GL_ARB_shading_language_packing
3747 #define GL_ARB_shading_language_packing 1
3748 #endif /* GL_ARB_shading_language_packing */
3749
3750 #ifndef GL_ARB_shadow
3751 #define GL_ARB_shadow 1
3752 #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
3753 #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
3754 #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
3755 #endif /* GL_ARB_shadow */
3756
3757 #ifndef GL_ARB_shadow_ambient
3758 #define GL_ARB_shadow_ambient 1
3759 #define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
3760 #endif /* GL_ARB_shadow_ambient */
3761
3762 #ifndef GL_ARB_sparse_texture
3763 #define GL_ARB_sparse_texture 1
3764 #define GL_TEXTURE_SPARSE_ARB 0x91A6
3765 #define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
3766 #define GL_MIN_SPARSE_LEVEL_ARB 0x919B
3767 #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
3768 #define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
3769 #define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
3770 #define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
3771 #define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
3772 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
3773 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
3774 #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
3775 typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3776 #ifdef GL_GLEXT_PROTOTYPES
3777 GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3778 #endif
3779 #endif /* GL_ARB_sparse_texture */
3780
3781 #ifndef GL_ARB_stencil_texturing
3782 #define GL_ARB_stencil_texturing 1
3783 #endif /* GL_ARB_stencil_texturing */
3784
3785 #ifndef GL_ARB_sync
3786 #define GL_ARB_sync 1
3787 #endif /* GL_ARB_sync */
3788
3789 #ifndef GL_ARB_tessellation_shader
3790 #define GL_ARB_tessellation_shader 1
3791 #endif /* GL_ARB_tessellation_shader */
3792
3793 #ifndef GL_ARB_texture_border_clamp
3794 #define GL_ARB_texture_border_clamp 1
3795 #define GL_CLAMP_TO_BORDER_ARB 0x812D
3796 #endif /* GL_ARB_texture_border_clamp */
3797
3798 #ifndef GL_ARB_texture_buffer_object
3799 #define GL_ARB_texture_buffer_object 1
3800 #define GL_TEXTURE_BUFFER_ARB 0x8C2A
3801 #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
3802 #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
3803 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
3804 #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
3805 typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
3806 #ifdef GL_GLEXT_PROTOTYPES
3807 GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
3808 #endif
3809 #endif /* GL_ARB_texture_buffer_object */
3810
3811 #ifndef GL_ARB_texture_buffer_object_rgb32
3812 #define GL_ARB_texture_buffer_object_rgb32 1
3813 #endif /* GL_ARB_texture_buffer_object_rgb32 */
3814
3815 #ifndef GL_ARB_texture_buffer_range
3816 #define GL_ARB_texture_buffer_range 1
3817 #endif /* GL_ARB_texture_buffer_range */
3818
3819 #ifndef GL_ARB_texture_compression
3820 #define GL_ARB_texture_compression 1
3821 #define GL_COMPRESSED_ALPHA_ARB 0x84E9
3822 #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
3823 #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
3824 #define GL_COMPRESSED_INTENSITY_ARB 0x84EC
3825 #define GL_COMPRESSED_RGB_ARB 0x84ED
3826 #define GL_COMPRESSED_RGBA_ARB 0x84EE
3827 #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
3828 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
3829 #define GL_TEXTURE_COMPRESSED_ARB 0x86A1
3830 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
3831 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
3832 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3833 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3834 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3835 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3836 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3837 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3838 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
3839 #ifdef GL_GLEXT_PROTOTYPES
3840 GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3841 GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3842 GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3843 GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3844 GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3845 GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3846 GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
3847 #endif
3848 #endif /* GL_ARB_texture_compression */
3849
3850 #ifndef GL_ARB_texture_compression_bptc
3851 #define GL_ARB_texture_compression_bptc 1
3852 #define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
3853 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
3854 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
3855 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
3856 #endif /* GL_ARB_texture_compression_bptc */
3857
3858 #ifndef GL_ARB_texture_compression_rgtc
3859 #define GL_ARB_texture_compression_rgtc 1
3860 #endif /* GL_ARB_texture_compression_rgtc */
3861
3862 #ifndef GL_ARB_texture_cube_map
3863 #define GL_ARB_texture_cube_map 1
3864 #define GL_NORMAL_MAP_ARB 0x8511
3865 #define GL_REFLECTION_MAP_ARB 0x8512
3866 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513
3867 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
3868 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
3869 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
3870 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
3871 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
3872 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
3873 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
3874 #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
3875 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
3876 #endif /* GL_ARB_texture_cube_map */
3877
3878 #ifndef GL_ARB_texture_cube_map_array
3879 #define GL_ARB_texture_cube_map_array 1
3880 #define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
3881 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
3882 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
3883 #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
3884 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
3885 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
3886 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
3887 #endif /* GL_ARB_texture_cube_map_array */
3888
3889 #ifndef GL_ARB_texture_env_add
3890 #define GL_ARB_texture_env_add 1
3891 #endif /* GL_ARB_texture_env_add */
3892
3893 #ifndef GL_ARB_texture_env_combine
3894 #define GL_ARB_texture_env_combine 1
3895 #define GL_COMBINE_ARB 0x8570
3896 #define GL_COMBINE_RGB_ARB 0x8571
3897 #define GL_COMBINE_ALPHA_ARB 0x8572
3898 #define GL_SOURCE0_RGB_ARB 0x8580
3899 #define GL_SOURCE1_RGB_ARB 0x8581
3900 #define GL_SOURCE2_RGB_ARB 0x8582
3901 #define GL_SOURCE0_ALPHA_ARB 0x8588
3902 #define GL_SOURCE1_ALPHA_ARB 0x8589
3903 #define GL_SOURCE2_ALPHA_ARB 0x858A
3904 #define GL_OPERAND0_RGB_ARB 0x8590
3905 #define GL_OPERAND1_RGB_ARB 0x8591
3906 #define GL_OPERAND2_RGB_ARB 0x8592
3907 #define GL_OPERAND0_ALPHA_ARB 0x8598
3908 #define GL_OPERAND1_ALPHA_ARB 0x8599
3909 #define GL_OPERAND2_ALPHA_ARB 0x859A
3910 #define GL_RGB_SCALE_ARB 0x8573
3911 #define GL_ADD_SIGNED_ARB 0x8574
3912 #define GL_INTERPOLATE_ARB 0x8575
3913 #define GL_SUBTRACT_ARB 0x84E7
3914 #define GL_CONSTANT_ARB 0x8576
3915 #define GL_PRIMARY_COLOR_ARB 0x8577
3916 #define GL_PREVIOUS_ARB 0x8578
3917 #endif /* GL_ARB_texture_env_combine */
3918
3919 #ifndef GL_ARB_texture_env_crossbar
3920 #define GL_ARB_texture_env_crossbar 1
3921 #endif /* GL_ARB_texture_env_crossbar */
3922
3923 #ifndef GL_ARB_texture_env_dot3
3924 #define GL_ARB_texture_env_dot3 1
3925 #define GL_DOT3_RGB_ARB 0x86AE
3926 #define GL_DOT3_RGBA_ARB 0x86AF
3927 #endif /* GL_ARB_texture_env_dot3 */
3928
3929 #ifndef GL_ARB_texture_float
3930 #define GL_ARB_texture_float 1
3931 #define GL_TEXTURE_RED_TYPE_ARB 0x8C10
3932 #define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
3933 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
3934 #define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
3935 #define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
3936 #define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
3937 #define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
3938 #define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
3939 #define GL_RGBA32F_ARB 0x8814
3940 #define GL_RGB32F_ARB 0x8815
3941 #define GL_ALPHA32F_ARB 0x8816
3942 #define GL_INTENSITY32F_ARB 0x8817
3943 #define GL_LUMINANCE32F_ARB 0x8818
3944 #define GL_LUMINANCE_ALPHA32F_ARB 0x8819
3945 #define GL_RGBA16F_ARB 0x881A
3946 #define GL_RGB16F_ARB 0x881B
3947 #define GL_ALPHA16F_ARB 0x881C
3948 #define GL_INTENSITY16F_ARB 0x881D
3949 #define GL_LUMINANCE16F_ARB 0x881E
3950 #define GL_LUMINANCE_ALPHA16F_ARB 0x881F
3951 #endif /* GL_ARB_texture_float */
3952
3953 #ifndef GL_ARB_texture_gather
3954 #define GL_ARB_texture_gather 1
3955 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
3956 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
3957 #define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
3958 #endif /* GL_ARB_texture_gather */
3959
3960 #ifndef GL_ARB_texture_mirror_clamp_to_edge
3961 #define GL_ARB_texture_mirror_clamp_to_edge 1
3962 #endif /* GL_ARB_texture_mirror_clamp_to_edge */
3963
3964 #ifndef GL_ARB_texture_mirrored_repeat
3965 #define GL_ARB_texture_mirrored_repeat 1
3966 #define GL_MIRRORED_REPEAT_ARB 0x8370
3967 #endif /* GL_ARB_texture_mirrored_repeat */
3968
3969 #ifndef GL_ARB_texture_multisample
3970 #define GL_ARB_texture_multisample 1
3971 #endif /* GL_ARB_texture_multisample */
3972
3973 #ifndef GL_ARB_texture_non_power_of_two
3974 #define GL_ARB_texture_non_power_of_two 1
3975 #endif /* GL_ARB_texture_non_power_of_two */
3976
3977 #ifndef GL_ARB_texture_query_levels
3978 #define GL_ARB_texture_query_levels 1
3979 #endif /* GL_ARB_texture_query_levels */
3980
3981 #ifndef GL_ARB_texture_query_lod
3982 #define GL_ARB_texture_query_lod 1
3983 #endif /* GL_ARB_texture_query_lod */
3984
3985 #ifndef GL_ARB_texture_rectangle
3986 #define GL_ARB_texture_rectangle 1
3987 #define GL_TEXTURE_RECTANGLE_ARB 0x84F5
3988 #define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
3989 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
3990 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
3991 #endif /* GL_ARB_texture_rectangle */
3992
3993 #ifndef GL_ARB_texture_rg
3994 #define GL_ARB_texture_rg 1
3995 #endif /* GL_ARB_texture_rg */
3996
3997 #ifndef GL_ARB_texture_rgb10_a2ui
3998 #define GL_ARB_texture_rgb10_a2ui 1
3999 #endif /* GL_ARB_texture_rgb10_a2ui */
4000
4001 #ifndef GL_ARB_texture_stencil8
4002 #define GL_ARB_texture_stencil8 1
4003 #endif /* GL_ARB_texture_stencil8 */
4004
4005 #ifndef GL_ARB_texture_storage
4006 #define GL_ARB_texture_storage 1
4007 #endif /* GL_ARB_texture_storage */
4008
4009 #ifndef GL_ARB_texture_storage_multisample
4010 #define GL_ARB_texture_storage_multisample 1
4011 #endif /* GL_ARB_texture_storage_multisample */
4012
4013 #ifndef GL_ARB_texture_swizzle
4014 #define GL_ARB_texture_swizzle 1
4015 #endif /* GL_ARB_texture_swizzle */
4016
4017 #ifndef GL_ARB_texture_view
4018 #define GL_ARB_texture_view 1
4019 #endif /* GL_ARB_texture_view */
4020
4021 #ifndef GL_ARB_timer_query
4022 #define GL_ARB_timer_query 1
4023 #endif /* GL_ARB_timer_query */
4024
4025 #ifndef GL_ARB_transform_feedback2
4026 #define GL_ARB_transform_feedback2 1
4027 #define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
4028 #define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
4029 #endif /* GL_ARB_transform_feedback2 */
4030
4031 #ifndef GL_ARB_transform_feedback3
4032 #define GL_ARB_transform_feedback3 1
4033 #endif /* GL_ARB_transform_feedback3 */
4034
4035 #ifndef GL_ARB_transform_feedback_instanced
4036 #define GL_ARB_transform_feedback_instanced 1
4037 #endif /* GL_ARB_transform_feedback_instanced */
4038
4039 #ifndef GL_ARB_transpose_matrix
4040 #define GL_ARB_transpose_matrix 1
4041 #define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
4042 #define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
4043 #define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
4044 #define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
4045 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4046 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4047 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4048 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4049 #ifdef GL_GLEXT_PROTOTYPES
4050 GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
4051 GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
4052 GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
4053 GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
4054 #endif
4055 #endif /* GL_ARB_transpose_matrix */
4056
4057 #ifndef GL_ARB_uniform_buffer_object
4058 #define GL_ARB_uniform_buffer_object 1
4059 #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
4060 #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
4061 #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
4062 #endif /* GL_ARB_uniform_buffer_object */
4063
4064 #ifndef GL_ARB_vertex_array_bgra
4065 #define GL_ARB_vertex_array_bgra 1
4066 #endif /* GL_ARB_vertex_array_bgra */
4067
4068 #ifndef GL_ARB_vertex_array_object
4069 #define GL_ARB_vertex_array_object 1
4070 #endif /* GL_ARB_vertex_array_object */
4071
4072 #ifndef GL_ARB_vertex_attrib_64bit
4073 #define GL_ARB_vertex_attrib_64bit 1
4074 #endif /* GL_ARB_vertex_attrib_64bit */
4075
4076 #ifndef GL_ARB_vertex_attrib_binding
4077 #define GL_ARB_vertex_attrib_binding 1
4078 #endif /* GL_ARB_vertex_attrib_binding */
4079
4080 #ifndef GL_ARB_vertex_blend
4081 #define GL_ARB_vertex_blend 1
4082 #define GL_MAX_VERTEX_UNITS_ARB 0x86A4
4083 #define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
4084 #define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
4085 #define GL_VERTEX_BLEND_ARB 0x86A7
4086 #define GL_CURRENT_WEIGHT_ARB 0x86A8
4087 #define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
4088 #define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
4089 #define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
4090 #define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
4091 #define GL_WEIGHT_ARRAY_ARB 0x86AD
4092 #define GL_MODELVIEW0_ARB 0x1700
4093 #define GL_MODELVIEW1_ARB 0x850A
4094 #define GL_MODELVIEW2_ARB 0x8722
4095 #define GL_MODELVIEW3_ARB 0x8723
4096 #define GL_MODELVIEW4_ARB 0x8724
4097 #define GL_MODELVIEW5_ARB 0x8725
4098 #define GL_MODELVIEW6_ARB 0x8726
4099 #define GL_MODELVIEW7_ARB 0x8727
4100 #define GL_MODELVIEW8_ARB 0x8728
4101 #define GL_MODELVIEW9_ARB 0x8729
4102 #define GL_MODELVIEW10_ARB 0x872A
4103 #define GL_MODELVIEW11_ARB 0x872B
4104 #define GL_MODELVIEW12_ARB 0x872C
4105 #define GL_MODELVIEW13_ARB 0x872D
4106 #define GL_MODELVIEW14_ARB 0x872E
4107 #define GL_MODELVIEW15_ARB 0x872F
4108 #define GL_MODELVIEW16_ARB 0x8730
4109 #define GL_MODELVIEW17_ARB 0x8731
4110 #define GL_MODELVIEW18_ARB 0x8732
4111 #define GL_MODELVIEW19_ARB 0x8733
4112 #define GL_MODELVIEW20_ARB 0x8734
4113 #define GL_MODELVIEW21_ARB 0x8735
4114 #define GL_MODELVIEW22_ARB 0x8736
4115 #define GL_MODELVIEW23_ARB 0x8737
4116 #define GL_MODELVIEW24_ARB 0x8738
4117 #define GL_MODELVIEW25_ARB 0x8739
4118 #define GL_MODELVIEW26_ARB 0x873A
4119 #define GL_MODELVIEW27_ARB 0x873B
4120 #define GL_MODELVIEW28_ARB 0x873C
4121 #define GL_MODELVIEW29_ARB 0x873D
4122 #define GL_MODELVIEW30_ARB 0x873E
4123 #define GL_MODELVIEW31_ARB 0x873F
4124 typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
4125 typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
4126 typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
4127 typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
4128 typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
4129 typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
4130 typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
4131 typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
4132 typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
4133 typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
4134 #ifdef GL_GLEXT_PROTOTYPES
4135 GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
4136 GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
4137 GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
4138 GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
4139 GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
4140 GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
4141 GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
4142 GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
4143 GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
4144 GLAPI void APIENTRY glVertexBlendARB (GLint count);
4145 #endif
4146 #endif /* GL_ARB_vertex_blend */
4147
4148 #ifndef GL_ARB_vertex_buffer_object
4149 #define GL_ARB_vertex_buffer_object 1
4150 #ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
4151 typedef long GLsizeiptrARB;
4152 typedef long GLintptrARB;
4153 #else
4154 typedef ptrdiff_t GLsizeiptrARB;
4155 typedef ptrdiff_t GLintptrARB;
4156 #endif
4157 #define GL_BUFFER_SIZE_ARB 0x8764
4158 #define GL_BUFFER_USAGE_ARB 0x8765
4159 #define GL_ARRAY_BUFFER_ARB 0x8892
4160 #define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
4161 #define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
4162 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
4163 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
4164 #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
4165 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
4166 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
4167 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
4168 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
4169 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
4170 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
4171 #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
4172 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
4173 #define GL_READ_ONLY_ARB 0x88B8
4174 #define GL_WRITE_ONLY_ARB 0x88B9
4175 #define GL_READ_WRITE_ARB 0x88BA
4176 #define GL_BUFFER_ACCESS_ARB 0x88BB
4177 #define GL_BUFFER_MAPPED_ARB 0x88BC
4178 #define GL_BUFFER_MAP_POINTER_ARB 0x88BD
4179 #define GL_STREAM_DRAW_ARB 0x88E0
4180 #define GL_STREAM_READ_ARB 0x88E1
4181 #define GL_STREAM_COPY_ARB 0x88E2
4182 #define GL_STATIC_DRAW_ARB 0x88E4
4183 #define GL_STATIC_READ_ARB 0x88E5
4184 #define GL_STATIC_COPY_ARB 0x88E6
4185 #define GL_DYNAMIC_DRAW_ARB 0x88E8
4186 #define GL_DYNAMIC_READ_ARB 0x88E9
4187 #define GL_DYNAMIC_COPY_ARB 0x88EA
4188 typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
4189 typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
4190 typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
4191 typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
4192 typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4193 typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4194 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4195 typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
4196 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
4197 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
4198 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
4199 #ifdef GL_GLEXT_PROTOTYPES
4200 GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
4201 GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
4202 GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
4203 GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
4204 GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4205 GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4206 GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4207 GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
4208 GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
4209 GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
4210 GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
4211 #endif
4212 #endif /* GL_ARB_vertex_buffer_object */
4213
4214 #ifndef GL_ARB_vertex_program
4215 #define GL_ARB_vertex_program 1
4216 #define GL_COLOR_SUM_ARB 0x8458
4217 #define GL_VERTEX_PROGRAM_ARB 0x8620
4218 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
4219 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
4220 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
4221 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
4222 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
4223 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
4224 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
4225 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
4226 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
4227 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
4228 #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
4229 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
4230 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
4231 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
4232 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
4233 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
4234 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
4235 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
4236 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
4237 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
4238 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
4239 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
4240 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
4241 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
4242 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
4243 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
4244 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4245 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
4246 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4247 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
4248 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
4249 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
4250 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
4251 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
4252 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
4253 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4254 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
4255 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
4256 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
4257 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
4258 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4259 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
4260 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4261 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
4262 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
4263 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4264 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
4265 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
4266 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
4267 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
4268 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4269 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4270 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4271 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
4272 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
4273 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
4274 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
4275 #ifdef GL_GLEXT_PROTOTYPES
4276 GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
4277 GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
4278 GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
4279 GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
4280 GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
4281 GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
4282 GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
4283 GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
4284 GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
4285 GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
4286 GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
4287 GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
4288 GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4289 GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
4290 GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4291 GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
4292 GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
4293 GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
4294 GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
4295 GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
4296 GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
4297 GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4298 GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
4299 GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
4300 GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
4301 GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
4302 GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4303 GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
4304 GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4305 GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
4306 GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
4307 GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4308 GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
4309 GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
4310 GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
4311 GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
4312 GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4313 GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
4314 GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
4315 GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
4316 GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
4317 GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
4318 GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
4319 #endif
4320 #endif /* GL_ARB_vertex_program */
4321
4322 #ifndef GL_ARB_vertex_shader
4323 #define GL_ARB_vertex_shader 1
4324 #define GL_VERTEX_SHADER_ARB 0x8B31
4325 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
4326 #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
4327 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
4328 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
4329 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
4330 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
4331 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4332 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4333 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
4334 #ifdef GL_GLEXT_PROTOTYPES
4335 GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4336 GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4337 GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
4338 #endif
4339 #endif /* GL_ARB_vertex_shader */
4340
4341 #ifndef GL_ARB_vertex_type_10f_11f_11f_rev
4342 #define GL_ARB_vertex_type_10f_11f_11f_rev 1
4343 #endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
4344
4345 #ifndef GL_ARB_vertex_type_2_10_10_10_rev
4346 #define GL_ARB_vertex_type_2_10_10_10_rev 1
4347 #endif /* GL_ARB_vertex_type_2_10_10_10_rev */
4348
4349 #ifndef GL_ARB_viewport_array
4350 #define GL_ARB_viewport_array 1
4351 #endif /* GL_ARB_viewport_array */
4352
4353 #ifndef GL_ARB_window_pos
4354 #define GL_ARB_window_pos 1
4355 typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
4356 typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
4357 typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
4358 typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
4359 typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
4360 typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
4361 typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
4362 typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
4363 typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
4364 typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
4365 typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
4366 typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
4367 typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
4368 typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
4369 typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
4370 typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
4371 #ifdef GL_GLEXT_PROTOTYPES
4372 GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
4373 GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
4374 GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
4375 GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
4376 GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
4377 GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
4378 GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
4379 GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
4380 GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
4381 GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
4382 GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
4383 GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
4384 GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
4385 GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
4386 GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
4387 GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
4388 #endif
4389 #endif /* GL_ARB_window_pos */
4390
4391 #ifndef GL_KHR_debug
4392 #define GL_KHR_debug 1
4393 #endif /* GL_KHR_debug */
4394
4395 #ifndef GL_KHR_texture_compression_astc_hdr
4396 #define GL_KHR_texture_compression_astc_hdr 1
4397 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
4398 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
4399 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
4400 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
4401 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
4402 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
4403 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
4404 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
4405 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
4406 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
4407 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
4408 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
4409 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
4410 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
4411 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
4412 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
4413 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
4414 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
4415 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
4416 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
4417 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
4418 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
4419 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
4420 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
4421 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
4422 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
4423 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
4424 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
4425 #endif /* GL_KHR_texture_compression_astc_hdr */
4426
4427 #ifndef GL_KHR_texture_compression_astc_ldr
4428 #define GL_KHR_texture_compression_astc_ldr 1
4429 #endif /* GL_KHR_texture_compression_astc_ldr */
4430
4431 #ifndef GL_OES_byte_coordinates
4432 #define GL_OES_byte_coordinates 1
4433 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
4434 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
4435 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
4436 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
4437 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4438 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
4439 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4440 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
4441 typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
4442 typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
4443 typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
4444 typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
4445 typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
4446 typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
4447 typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4448 typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
4449 typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);
4450 typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
4451 typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);
4452 typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
4453 typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
4454 typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
4455 #ifdef GL_GLEXT_PROTOTYPES
4456 GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
4457 GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
4458 GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
4459 GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
4460 GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4461 GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
4462 GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4463 GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
4464 GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
4465 GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
4466 GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
4467 GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
4468 GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
4469 GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
4470 GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4471 GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
4472 GLAPI void APIENTRY glVertex2bOES (GLbyte x);
4473 GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
4474 GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);
4475 GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
4476 GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);
4477 GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
4478 #endif
4479 #endif /* GL_OES_byte_coordinates */
4480
4481 #ifndef GL_OES_compressed_paletted_texture
4482 #define GL_OES_compressed_paletted_texture 1
4483 #define GL_PALETTE4_RGB8_OES 0x8B90
4484 #define GL_PALETTE4_RGBA8_OES 0x8B91
4485 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
4486 #define GL_PALETTE4_RGBA4_OES 0x8B93
4487 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
4488 #define GL_PALETTE8_RGB8_OES 0x8B95
4489 #define GL_PALETTE8_RGBA8_OES 0x8B96
4490 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
4491 #define GL_PALETTE8_RGBA4_OES 0x8B98
4492 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
4493 #endif /* GL_OES_compressed_paletted_texture */
4494
4495 #ifndef GL_OES_fixed_point
4496 #define GL_OES_fixed_point 1
4497 typedef GLint GLfixed;
4498 #define GL_FIXED_OES 0x140C
4499 typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
4500 typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4501 typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
4502 typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
4503 typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4504 typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
4505 typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
4506 typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
4507 typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4508 typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
4509 typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
4510 typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4511 typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4512 typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
4513 typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
4514 typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
4515 typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
4516 typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
4517 typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
4518 typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4519 typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
4520 typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
4521 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4522 typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
4523 typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4524 typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
4525 typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
4526 typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
4527 typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4528 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);
4529 typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4530 typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4531 typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4532 typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4533 typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4534 typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4535 typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
4536 typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4537 typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4538 typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4539 typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
4540 typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
4541 typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
4542 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4543 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4544 typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
4545 typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
4546 typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
4547 typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
4548 typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
4549 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4550 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4551 typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
4552 typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
4553 typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4554 typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
4555 typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
4556 typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
4557 typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
4558 typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
4559 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4560 typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4561 typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4562 typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
4563 typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4564 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4565 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
4566 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
4567 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
4568 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
4569 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4570 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
4571 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
4572 typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
4573 typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
4574 typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
4575 typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
4576 typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
4577 typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
4578 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4579 typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
4580 typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
4581 typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4582 typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
4583 typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4584 typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
4585 typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4586 typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
4587 typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
4588 typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
4589 typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
4590 typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
4591 typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
4592 typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
4593 typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4594 typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
4595 typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
4596 typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
4597 typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
4598 typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
4599 typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
4600 typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
4601 typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4602 typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
4603 #ifdef GL_GLEXT_PROTOTYPES
4604 GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
4605 GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4606 GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
4607 GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
4608 GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4609 GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
4610 GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
4611 GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
4612 GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4613 GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
4614 GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
4615 GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
4616 GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4617 GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
4618 GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
4619 GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
4620 GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
4621 GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
4622 GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
4623 GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4624 GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
4625 GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
4626 GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4627 GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
4628 GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4629 GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
4630 GLAPI void APIENTRY glPointSizexOES (GLfixed size);
4631 GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
4632 GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4633 GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);
4634 GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
4635 GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
4636 GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
4637 GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
4638 GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4639 GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
4640 GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
4641 GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4642 GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4643 GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4644 GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
4645 GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
4646 GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
4647 GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
4648 GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4649 GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
4650 GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
4651 GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
4652 GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
4653 GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
4654 GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4655 GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4656 GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
4657 GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
4658 GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4659 GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
4660 GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
4661 GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
4662 GLAPI void APIENTRY glIndexxOES (GLfixed component);
4663 GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
4664 GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
4665 GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4666 GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4667 GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
4668 GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4669 GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
4670 GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
4671 GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
4672 GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
4673 GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
4674 GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4675 GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
4676 GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
4677 GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
4678 GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
4679 GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
4680 GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
4681 GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
4682 GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
4683 GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4684 GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
4685 GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
4686 GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
4687 GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
4688 GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4689 GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
4690 GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4691 GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
4692 GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
4693 GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
4694 GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
4695 GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
4696 GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
4697 GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
4698 GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4699 GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
4700 GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
4701 GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
4702 GLAPI void APIENTRY glVertex2xOES (GLfixed x);
4703 GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
4704 GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
4705 GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
4706 GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
4707 GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
4708 #endif
4709 #endif /* GL_OES_fixed_point */
4710
4711 #ifndef GL_OES_query_matrix
4712 #define GL_OES_query_matrix 1
4713 typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
4714 #ifdef GL_GLEXT_PROTOTYPES
4715 GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
4716 #endif
4717 #endif /* GL_OES_query_matrix */
4718
4719 #ifndef GL_OES_read_format
4720 #define GL_OES_read_format 1
4721 #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
4722 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
4723 #endif /* GL_OES_read_format */
4724
4725 #ifndef GL_OES_single_precision
4726 #define GL_OES_single_precision 1
4727 typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
4728 typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
4729 typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
4730 typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4731 typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
4732 typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4733 #ifdef GL_GLEXT_PROTOTYPES
4734 GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
4735 GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
4736 GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
4737 GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4738 GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
4739 GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4740 #endif
4741 #endif /* GL_OES_single_precision */
4742
4743 #ifndef GL_3DFX_multisample
4744 #define GL_3DFX_multisample 1
4745 #define GL_MULTISAMPLE_3DFX 0x86B2
4746 #define GL_SAMPLE_BUFFERS_3DFX 0x86B3
4747 #define GL_SAMPLES_3DFX 0x86B4
4748 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000
4749 #endif /* GL_3DFX_multisample */
4750
4751 #ifndef GL_3DFX_tbuffer
4752 #define GL_3DFX_tbuffer 1
4753 typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
4754 #ifdef GL_GLEXT_PROTOTYPES
4755 GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
4756 #endif
4757 #endif /* GL_3DFX_tbuffer */
4758
4759 #ifndef GL_3DFX_texture_compression_FXT1
4760 #define GL_3DFX_texture_compression_FXT1 1
4761 #define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
4762 #define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
4763 #endif /* GL_3DFX_texture_compression_FXT1 */
4764
4765 #ifndef GL_AMD_blend_minmax_factor
4766 #define GL_AMD_blend_minmax_factor 1
4767 #define GL_FACTOR_MIN_AMD 0x901C
4768 #define GL_FACTOR_MAX_AMD 0x901D
4769 #endif /* GL_AMD_blend_minmax_factor */
4770
4771 #ifndef GL_AMD_conservative_depth
4772 #define GL_AMD_conservative_depth 1
4773 #endif /* GL_AMD_conservative_depth */
4774
4775 #ifndef GL_AMD_debug_output
4776 #define GL_AMD_debug_output 1
4777 typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
4778 #define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
4779 #define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
4780 #define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
4781 #define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
4782 #define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
4783 #define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
4784 #define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
4785 #define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
4786 #define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
4787 #define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
4788 #define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
4789 #define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
4790 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
4791 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
4792 typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4793 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4794 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
4795 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4796 #ifdef GL_GLEXT_PROTOTYPES
4797 GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4798 GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4799 GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
4800 GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4801 #endif
4802 #endif /* GL_AMD_debug_output */
4803
4804 #ifndef GL_AMD_depth_clamp_separate
4805 #define GL_AMD_depth_clamp_separate 1
4806 #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
4807 #define GL_DEPTH_CLAMP_FAR_AMD 0x901F
4808 #endif /* GL_AMD_depth_clamp_separate */
4809
4810 #ifndef GL_AMD_draw_buffers_blend
4811 #define GL_AMD_draw_buffers_blend 1
4812 typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
4813 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4814 typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
4815 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4816 #ifdef GL_GLEXT_PROTOTYPES
4817 GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
4818 GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4819 GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
4820 GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4821 #endif
4822 #endif /* GL_AMD_draw_buffers_blend */
4823
4824 #ifndef GL_AMD_gcn_shader
4825 #define GL_AMD_gcn_shader 1
4826 #endif /* GL_AMD_gcn_shader */
4827
4828 #ifndef GL_AMD_gpu_shader_int64
4829 #define GL_AMD_gpu_shader_int64 1
4830 typedef int64_t GLint64EXT;
4831 #define GL_INT64_NV 0x140E
4832 #define GL_UNSIGNED_INT64_NV 0x140F
4833 #define GL_INT8_NV 0x8FE0
4834 #define GL_INT8_VEC2_NV 0x8FE1
4835 #define GL_INT8_VEC3_NV 0x8FE2
4836 #define GL_INT8_VEC4_NV 0x8FE3
4837 #define GL_INT16_NV 0x8FE4
4838 #define GL_INT16_VEC2_NV 0x8FE5
4839 #define GL_INT16_VEC3_NV 0x8FE6
4840 #define GL_INT16_VEC4_NV 0x8FE7
4841 #define GL_INT64_VEC2_NV 0x8FE9
4842 #define GL_INT64_VEC3_NV 0x8FEA
4843 #define GL_INT64_VEC4_NV 0x8FEB
4844 #define GL_UNSIGNED_INT8_NV 0x8FEC
4845 #define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
4846 #define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
4847 #define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
4848 #define GL_UNSIGNED_INT16_NV 0x8FF0
4849 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
4850 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
4851 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
4852 #define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
4853 #define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
4854 #define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
4855 #define GL_FLOAT16_NV 0x8FF8
4856 #define GL_FLOAT16_VEC2_NV 0x8FF9
4857 #define GL_FLOAT16_VEC3_NV 0x8FFA
4858 #define GL_FLOAT16_VEC4_NV 0x8FFB
4859 typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
4860 typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
4861 typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4862 typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4863 typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4864 typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4865 typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4866 typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4867 typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
4868 typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
4869 typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4870 typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4871 typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4872 typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4873 typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4874 typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4875 typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
4876 typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
4877 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
4878 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4879 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4880 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4881 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4882 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4883 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4884 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
4886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4893 #ifdef GL_GLEXT_PROTOTYPES
4894 GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
4895 GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
4896 GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4897 GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4898 GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4899 GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4900 GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4901 GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4902 GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
4903 GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
4904 GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4905 GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4906 GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4907 GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4908 GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4909 GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4910 GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
4911 GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
4912 GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
4913 GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4914 GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4915 GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4916 GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4917 GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4918 GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4919 GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4920 GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
4921 GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4922 GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4923 GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4924 GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4925 GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4926 GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4927 GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4928 #endif
4929 #endif /* GL_AMD_gpu_shader_int64 */
4930
4931 #ifndef GL_AMD_interleaved_elements
4932 #define GL_AMD_interleaved_elements 1
4933 #define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
4934 #define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
4935 typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
4936 #ifdef GL_GLEXT_PROTOTYPES
4937 GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
4938 #endif
4939 #endif /* GL_AMD_interleaved_elements */
4940
4941 #ifndef GL_AMD_multi_draw_indirect
4942 #define GL_AMD_multi_draw_indirect 1
4943 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4944 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4945 #ifdef GL_GLEXT_PROTOTYPES
4946 GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4947 GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4948 #endif
4949 #endif /* GL_AMD_multi_draw_indirect */
4950
4951 #ifndef GL_AMD_name_gen_delete
4952 #define GL_AMD_name_gen_delete 1
4953 #define GL_DATA_BUFFER_AMD 0x9151
4954 #define GL_PERFORMANCE_MONITOR_AMD 0x9152
4955 #define GL_QUERY_OBJECT_AMD 0x9153
4956 #define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
4957 #define GL_SAMPLER_OBJECT_AMD 0x9155
4958 typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
4959 typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
4960 typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
4961 #ifdef GL_GLEXT_PROTOTYPES
4962 GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
4963 GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
4964 GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
4965 #endif
4966 #endif /* GL_AMD_name_gen_delete */
4967
4968 #ifndef GL_AMD_occlusion_query_event
4969 #define GL_AMD_occlusion_query_event 1
4970 #define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
4971 #define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
4972 #define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
4973 #define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
4974 #define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
4975 #define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
4976 typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
4977 #ifdef GL_GLEXT_PROTOTYPES
4978 GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
4979 #endif
4980 #endif /* GL_AMD_occlusion_query_event */
4981
4982 #ifndef GL_AMD_performance_monitor
4983 #define GL_AMD_performance_monitor 1
4984 #define GL_COUNTER_TYPE_AMD 0x8BC0
4985 #define GL_COUNTER_RANGE_AMD 0x8BC1
4986 #define GL_UNSIGNED_INT64_AMD 0x8BC2
4987 #define GL_PERCENTAGE_AMD 0x8BC3
4988 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
4989 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
4990 #define GL_PERFMON_RESULT_AMD 0x8BC6
4991 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
4992 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
4993 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
4994 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
4995 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
4996 typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4997 typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4998 typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
4999 typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
5000 typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
5001 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5002 #ifdef GL_GLEXT_PROTOTYPES
5003 GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
5004 GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
5005 GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
5006 GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
5007 GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
5008 GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
5009 GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
5010 GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
5011 GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
5012 GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
5013 GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5014 #endif
5015 #endif /* GL_AMD_performance_monitor */
5016
5017 #ifndef GL_AMD_pinned_memory
5018 #define GL_AMD_pinned_memory 1
5019 #define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
5020 #endif /* GL_AMD_pinned_memory */
5021
5022 #ifndef GL_AMD_query_buffer_object
5023 #define GL_AMD_query_buffer_object 1
5024 #define GL_QUERY_BUFFER_AMD 0x9192
5025 #define GL_QUERY_BUFFER_BINDING_AMD 0x9193
5026 #define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
5027 #endif /* GL_AMD_query_buffer_object */
5028
5029 #ifndef GL_AMD_sample_positions
5030 #define GL_AMD_sample_positions 1
5031 #define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
5032 typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
5033 #ifdef GL_GLEXT_PROTOTYPES
5034 GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
5035 #endif
5036 #endif /* GL_AMD_sample_positions */
5037
5038 #ifndef GL_AMD_seamless_cubemap_per_texture
5039 #define GL_AMD_seamless_cubemap_per_texture 1
5040 #endif /* GL_AMD_seamless_cubemap_per_texture */
5041
5042 #ifndef GL_AMD_shader_atomic_counter_ops
5043 #define GL_AMD_shader_atomic_counter_ops 1
5044 #endif /* GL_AMD_shader_atomic_counter_ops */
5045
5046 #ifndef GL_AMD_shader_stencil_export
5047 #define GL_AMD_shader_stencil_export 1
5048 #endif /* GL_AMD_shader_stencil_export */
5049
5050 #ifndef GL_AMD_shader_trinary_minmax
5051 #define GL_AMD_shader_trinary_minmax 1
5052 #endif /* GL_AMD_shader_trinary_minmax */
5053
5054 #ifndef GL_AMD_sparse_texture
5055 #define GL_AMD_sparse_texture 1
5056 #define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
5057 #define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
5058 #define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
5059 #define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
5060 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
5061 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
5062 #define GL_MIN_SPARSE_LEVEL_AMD 0x919B
5063 #define GL_MIN_LOD_WARNING_AMD 0x919C
5064 #define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
5065 typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5066 typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5067 #ifdef GL_GLEXT_PROTOTYPES
5068 GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5069 GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5070 #endif
5071 #endif /* GL_AMD_sparse_texture */
5072
5073 #ifndef GL_AMD_stencil_operation_extended
5074 #define GL_AMD_stencil_operation_extended 1
5075 #define GL_SET_AMD 0x874A
5076 #define GL_REPLACE_VALUE_AMD 0x874B
5077 #define GL_STENCIL_OP_VALUE_AMD 0x874C
5078 #define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
5079 typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
5080 #ifdef GL_GLEXT_PROTOTYPES
5081 GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
5082 #endif
5083 #endif /* GL_AMD_stencil_operation_extended */
5084
5085 #ifndef GL_AMD_texture_texture4
5086 #define GL_AMD_texture_texture4 1
5087 #endif /* GL_AMD_texture_texture4 */
5088
5089 #ifndef GL_AMD_transform_feedback3_lines_triangles
5090 #define GL_AMD_transform_feedback3_lines_triangles 1
5091 #endif /* GL_AMD_transform_feedback3_lines_triangles */
5092
5093 #ifndef GL_AMD_transform_feedback4
5094 #define GL_AMD_transform_feedback4 1
5095 #define GL_STREAM_RASTERIZATION_AMD 0x91A0
5096 #endif /* GL_AMD_transform_feedback4 */
5097
5098 #ifndef GL_AMD_vertex_shader_layer
5099 #define GL_AMD_vertex_shader_layer 1
5100 #endif /* GL_AMD_vertex_shader_layer */
5101
5102 #ifndef GL_AMD_vertex_shader_tessellator
5103 #define GL_AMD_vertex_shader_tessellator 1
5104 #define GL_SAMPLER_BUFFER_AMD 0x9001
5105 #define GL_INT_SAMPLER_BUFFER_AMD 0x9002
5106 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
5107 #define GL_TESSELLATION_MODE_AMD 0x9004
5108 #define GL_TESSELLATION_FACTOR_AMD 0x9005
5109 #define GL_DISCRETE_AMD 0x9006
5110 #define GL_CONTINUOUS_AMD 0x9007
5111 typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
5112 typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
5113 #ifdef GL_GLEXT_PROTOTYPES
5114 GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
5115 GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
5116 #endif
5117 #endif /* GL_AMD_vertex_shader_tessellator */
5118
5119 #ifndef GL_AMD_vertex_shader_viewport_index
5120 #define GL_AMD_vertex_shader_viewport_index 1
5121 #endif /* GL_AMD_vertex_shader_viewport_index */
5122
5123 #ifndef GL_APPLE_aux_depth_stencil
5124 #define GL_APPLE_aux_depth_stencil 1
5125 #define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
5126 #endif /* GL_APPLE_aux_depth_stencil */
5127
5128 #ifndef GL_APPLE_client_storage
5129 #define GL_APPLE_client_storage 1
5130 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
5131 #endif /* GL_APPLE_client_storage */
5132
5133 #ifndef GL_APPLE_element_array
5134 #define GL_APPLE_element_array 1
5135 #define GL_ELEMENT_ARRAY_APPLE 0x8A0C
5136 #define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
5137 #define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
5138 typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
5139 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
5140 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5141 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5142 typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5143 #ifdef GL_GLEXT_PROTOTYPES
5144 GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
5145 GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
5146 GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5147 GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5148 GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5149 #endif
5150 #endif /* GL_APPLE_element_array */
5151
5152 #ifndef GL_APPLE_fence
5153 #define GL_APPLE_fence 1
5154 #define GL_DRAW_PIXELS_APPLE 0x8A0A
5155 #define GL_FENCE_APPLE 0x8A0B
5156 typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
5157 typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
5158 typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
5159 typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
5160 typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
5161 typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
5162 typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
5163 typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
5164 #ifdef GL_GLEXT_PROTOTYPES
5165 GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
5166 GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
5167 GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
5168 GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
5169 GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
5170 GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
5171 GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
5172 GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
5173 #endif
5174 #endif /* GL_APPLE_fence */
5175
5176 #ifndef GL_APPLE_float_pixels
5177 #define GL_APPLE_float_pixels 1
5178 #define GL_HALF_APPLE 0x140B
5179 #define GL_RGBA_FLOAT32_APPLE 0x8814
5180 #define GL_RGB_FLOAT32_APPLE 0x8815
5181 #define GL_ALPHA_FLOAT32_APPLE 0x8816
5182 #define GL_INTENSITY_FLOAT32_APPLE 0x8817
5183 #define GL_LUMINANCE_FLOAT32_APPLE 0x8818
5184 #define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
5185 #define GL_RGBA_FLOAT16_APPLE 0x881A
5186 #define GL_RGB_FLOAT16_APPLE 0x881B
5187 #define GL_ALPHA_FLOAT16_APPLE 0x881C
5188 #define GL_INTENSITY_FLOAT16_APPLE 0x881D
5189 #define GL_LUMINANCE_FLOAT16_APPLE 0x881E
5190 #define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
5191 #define GL_COLOR_FLOAT_APPLE 0x8A0F
5192 #endif /* GL_APPLE_float_pixels */
5193
5194 #ifndef GL_APPLE_flush_buffer_range
5195 #define GL_APPLE_flush_buffer_range 1
5196 #define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
5197 #define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
5198 typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
5199 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
5200 #ifdef GL_GLEXT_PROTOTYPES
5201 GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
5202 GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
5203 #endif
5204 #endif /* GL_APPLE_flush_buffer_range */
5205
5206 #ifndef GL_APPLE_object_purgeable
5207 #define GL_APPLE_object_purgeable 1
5208 #define GL_BUFFER_OBJECT_APPLE 0x85B3
5209 #define GL_RELEASED_APPLE 0x8A19
5210 #define GL_VOLATILE_APPLE 0x8A1A
5211 #define GL_RETAINED_APPLE 0x8A1B
5212 #define GL_UNDEFINED_APPLE 0x8A1C
5213 #define GL_PURGEABLE_APPLE 0x8A1D
5214 typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5215 typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5216 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5217 #ifdef GL_GLEXT_PROTOTYPES
5218 GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5219 GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5220 GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5221 #endif
5222 #endif /* GL_APPLE_object_purgeable */
5223
5224 #ifndef GL_APPLE_rgb_422
5225 #define GL_APPLE_rgb_422 1
5226 #define GL_RGB_422_APPLE 0x8A1F
5227 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
5228 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
5229 #define GL_RGB_RAW_422_APPLE 0x8A51
5230 #endif /* GL_APPLE_rgb_422 */
5231
5232 #ifndef GL_APPLE_row_bytes
5233 #define GL_APPLE_row_bytes 1
5234 #define GL_PACK_ROW_BYTES_APPLE 0x8A15
5235 #define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
5236 #endif /* GL_APPLE_row_bytes */
5237
5238 #ifndef GL_APPLE_specular_vector
5239 #define GL_APPLE_specular_vector 1
5240 #define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
5241 #endif /* GL_APPLE_specular_vector */
5242
5243 #ifndef GL_APPLE_texture_range
5244 #define GL_APPLE_texture_range 1
5245 #define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
5246 #define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
5247 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
5248 #define GL_STORAGE_PRIVATE_APPLE 0x85BD
5249 #define GL_STORAGE_CACHED_APPLE 0x85BE
5250 #define GL_STORAGE_SHARED_APPLE 0x85BF
5251 typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
5252 typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
5253 #ifdef GL_GLEXT_PROTOTYPES
5254 GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
5255 GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
5256 #endif
5257 #endif /* GL_APPLE_texture_range */
5258
5259 #ifndef GL_APPLE_transform_hint
5260 #define GL_APPLE_transform_hint 1
5261 #define GL_TRANSFORM_HINT_APPLE 0x85B1
5262 #endif /* GL_APPLE_transform_hint */
5263
5264 #ifndef GL_APPLE_vertex_array_object
5265 #define GL_APPLE_vertex_array_object 1
5266 #define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
5267 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
5268 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
5269 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
5270 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
5271 #ifdef GL_GLEXT_PROTOTYPES
5272 GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
5273 GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
5274 GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
5275 GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
5276 #endif
5277 #endif /* GL_APPLE_vertex_array_object */
5278
5279 #ifndef GL_APPLE_vertex_array_range
5280 #define GL_APPLE_vertex_array_range 1
5281 #define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
5282 #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
5283 #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
5284 #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
5285 #define GL_STORAGE_CLIENT_APPLE 0x85B4
5286 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5287 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5288 typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
5289 #ifdef GL_GLEXT_PROTOTYPES
5290 GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5291 GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5292 GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
5293 #endif
5294 #endif /* GL_APPLE_vertex_array_range */
5295
5296 #ifndef GL_APPLE_vertex_program_evaluators
5297 #define GL_APPLE_vertex_program_evaluators 1
5298 #define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
5299 #define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
5300 #define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
5301 #define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
5302 #define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
5303 #define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
5304 #define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
5305 #define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
5306 #define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
5307 #define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
5308 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5309 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5310 typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
5311 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5312 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5313 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5314 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5315 #ifdef GL_GLEXT_PROTOTYPES
5316 GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
5317 GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
5318 GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
5319 GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5320 GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5321 GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5322 GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5323 #endif
5324 #endif /* GL_APPLE_vertex_program_evaluators */
5325
5326 #ifndef GL_APPLE_ycbcr_422
5327 #define GL_APPLE_ycbcr_422 1
5328 #define GL_YCBCR_422_APPLE 0x85B9
5329 #endif /* GL_APPLE_ycbcr_422 */
5330
5331 #ifndef GL_ATI_draw_buffers
5332 #define GL_ATI_draw_buffers 1
5333 #define GL_MAX_DRAW_BUFFERS_ATI 0x8824
5334 #define GL_DRAW_BUFFER0_ATI 0x8825
5335 #define GL_DRAW_BUFFER1_ATI 0x8826
5336 #define GL_DRAW_BUFFER2_ATI 0x8827
5337 #define GL_DRAW_BUFFER3_ATI 0x8828
5338 #define GL_DRAW_BUFFER4_ATI 0x8829
5339 #define GL_DRAW_BUFFER5_ATI 0x882A
5340 #define GL_DRAW_BUFFER6_ATI 0x882B
5341 #define GL_DRAW_BUFFER7_ATI 0x882C
5342 #define GL_DRAW_BUFFER8_ATI 0x882D
5343 #define GL_DRAW_BUFFER9_ATI 0x882E
5344 #define GL_DRAW_BUFFER10_ATI 0x882F
5345 #define GL_DRAW_BUFFER11_ATI 0x8830
5346 #define GL_DRAW_BUFFER12_ATI 0x8831
5347 #define GL_DRAW_BUFFER13_ATI 0x8832
5348 #define GL_DRAW_BUFFER14_ATI 0x8833
5349 #define GL_DRAW_BUFFER15_ATI 0x8834
5350 typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
5351 #ifdef GL_GLEXT_PROTOTYPES
5352 GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
5353 #endif
5354 #endif /* GL_ATI_draw_buffers */
5355
5356 #ifndef GL_ATI_element_array
5357 #define GL_ATI_element_array 1
5358 #define GL_ELEMENT_ARRAY_ATI 0x8768
5359 #define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
5360 #define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
5361 typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
5362 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
5363 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
5364 #ifdef GL_GLEXT_PROTOTYPES
5365 GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
5366 GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
5367 GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
5368 #endif
5369 #endif /* GL_ATI_element_array */
5370
5371 #ifndef GL_ATI_envmap_bumpmap
5372 #define GL_ATI_envmap_bumpmap 1
5373 #define GL_BUMP_ROT_MATRIX_ATI 0x8775
5374 #define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
5375 #define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
5376 #define GL_BUMP_TEX_UNITS_ATI 0x8778
5377 #define GL_DUDV_ATI 0x8779
5378 #define GL_DU8DV8_ATI 0x877A
5379 #define GL_BUMP_ENVMAP_ATI 0x877B
5380 #define GL_BUMP_TARGET_ATI 0x877C
5381 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
5382 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
5383 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
5384 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
5385 #ifdef GL_GLEXT_PROTOTYPES
5386 GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
5387 GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
5388 GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
5389 GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
5390 #endif
5391 #endif /* GL_ATI_envmap_bumpmap */
5392
5393 #ifndef GL_ATI_fragment_shader
5394 #define GL_ATI_fragment_shader 1
5395 #define GL_FRAGMENT_SHADER_ATI 0x8920
5396 #define GL_REG_0_ATI 0x8921
5397 #define GL_REG_1_ATI 0x8922
5398 #define GL_REG_2_ATI 0x8923
5399 #define GL_REG_3_ATI 0x8924
5400 #define GL_REG_4_ATI 0x8925
5401 #define GL_REG_5_ATI 0x8926
5402 #define GL_REG_6_ATI 0x8927
5403 #define GL_REG_7_ATI 0x8928
5404 #define GL_REG_8_ATI 0x8929
5405 #define GL_REG_9_ATI 0x892A
5406 #define GL_REG_10_ATI 0x892B
5407 #define GL_REG_11_ATI 0x892C
5408 #define GL_REG_12_ATI 0x892D
5409 #define GL_REG_13_ATI 0x892E
5410 #define GL_REG_14_ATI 0x892F
5411 #define GL_REG_15_ATI 0x8930
5412 #define GL_REG_16_ATI 0x8931
5413 #define GL_REG_17_ATI 0x8932
5414 #define GL_REG_18_ATI 0x8933
5415 #define GL_REG_19_ATI 0x8934
5416 #define GL_REG_20_ATI 0x8935
5417 #define GL_REG_21_ATI 0x8936
5418 #define GL_REG_22_ATI 0x8937
5419 #define GL_REG_23_ATI 0x8938
5420 #define GL_REG_24_ATI 0x8939
5421 #define GL_REG_25_ATI 0x893A
5422 #define GL_REG_26_ATI 0x893B
5423 #define GL_REG_27_ATI 0x893C
5424 #define GL_REG_28_ATI 0x893D
5425 #define GL_REG_29_ATI 0x893E
5426 #define GL_REG_30_ATI 0x893F
5427 #define GL_REG_31_ATI 0x8940
5428 #define GL_CON_0_ATI 0x8941
5429 #define GL_CON_1_ATI 0x8942
5430 #define GL_CON_2_ATI 0x8943
5431 #define GL_CON_3_ATI 0x8944
5432 #define GL_CON_4_ATI 0x8945
5433 #define GL_CON_5_ATI 0x8946
5434 #define GL_CON_6_ATI 0x8947
5435 #define GL_CON_7_ATI 0x8948
5436 #define GL_CON_8_ATI 0x8949
5437 #define GL_CON_9_ATI 0x894A
5438 #define GL_CON_10_ATI 0x894B
5439 #define GL_CON_11_ATI 0x894C
5440 #define GL_CON_12_ATI 0x894D
5441 #define GL_CON_13_ATI 0x894E
5442 #define GL_CON_14_ATI 0x894F
5443 #define GL_CON_15_ATI 0x8950
5444 #define GL_CON_16_ATI 0x8951
5445 #define GL_CON_17_ATI 0x8952
5446 #define GL_CON_18_ATI 0x8953
5447 #define GL_CON_19_ATI 0x8954
5448 #define GL_CON_20_ATI 0x8955
5449 #define GL_CON_21_ATI 0x8956
5450 #define GL_CON_22_ATI 0x8957
5451 #define GL_CON_23_ATI 0x8958
5452 #define GL_CON_24_ATI 0x8959
5453 #define GL_CON_25_ATI 0x895A
5454 #define GL_CON_26_ATI 0x895B
5455 #define GL_CON_27_ATI 0x895C
5456 #define GL_CON_28_ATI 0x895D
5457 #define GL_CON_29_ATI 0x895E
5458 #define GL_CON_30_ATI 0x895F
5459 #define GL_CON_31_ATI 0x8960
5460 #define GL_MOV_ATI 0x8961
5461 #define GL_ADD_ATI 0x8963
5462 #define GL_MUL_ATI 0x8964
5463 #define GL_SUB_ATI 0x8965
5464 #define GL_DOT3_ATI 0x8966
5465 #define GL_DOT4_ATI 0x8967
5466 #define GL_MAD_ATI 0x8968
5467 #define GL_LERP_ATI 0x8969
5468 #define GL_CND_ATI 0x896A
5469 #define GL_CND0_ATI 0x896B
5470 #define GL_DOT2_ADD_ATI 0x896C
5471 #define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
5472 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
5473 #define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
5474 #define GL_NUM_PASSES_ATI 0x8970
5475 #define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
5476 #define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
5477 #define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
5478 #define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
5479 #define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
5480 #define GL_SWIZZLE_STR_ATI 0x8976
5481 #define GL_SWIZZLE_STQ_ATI 0x8977
5482 #define GL_SWIZZLE_STR_DR_ATI 0x8978
5483 #define GL_SWIZZLE_STQ_DQ_ATI 0x8979
5484 #define GL_SWIZZLE_STRQ_ATI 0x897A
5485 #define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
5486 #define GL_RED_BIT_ATI 0x00000001
5487 #define GL_GREEN_BIT_ATI 0x00000002
5488 #define GL_BLUE_BIT_ATI 0x00000004
5489 #define GL_2X_BIT_ATI 0x00000001
5490 #define GL_4X_BIT_ATI 0x00000002
5491 #define GL_8X_BIT_ATI 0x00000004
5492 #define GL_HALF_BIT_ATI 0x00000008
5493 #define GL_QUARTER_BIT_ATI 0x00000010
5494 #define GL_EIGHTH_BIT_ATI 0x00000020
5495 #define GL_SATURATE_BIT_ATI 0x00000040
5496 #define GL_COMP_BIT_ATI 0x00000002
5497 #define GL_NEGATE_BIT_ATI 0x00000004
5498 #define GL_BIAS_BIT_ATI 0x00000008
5499 typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
5500 typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
5501 typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
5502 typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
5503 typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
5504 typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
5505 typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
5506 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5507 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5508 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5509 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5510 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5511 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5512 typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
5513 #ifdef GL_GLEXT_PROTOTYPES
5514 GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
5515 GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
5516 GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
5517 GLAPI void APIENTRY glBeginFragmentShaderATI (void);
5518 GLAPI void APIENTRY glEndFragmentShaderATI (void);
5519 GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
5520 GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
5521 GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5522 GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5523 GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5524 GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5525 GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5526 GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5527 GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
5528 #endif
5529 #endif /* GL_ATI_fragment_shader */
5530
5531 #ifndef GL_ATI_map_object_buffer
5532 #define GL_ATI_map_object_buffer 1
5533 typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5534 typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5535 #ifdef GL_GLEXT_PROTOTYPES
5536 GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
5537 GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
5538 #endif
5539 #endif /* GL_ATI_map_object_buffer */
5540
5541 #ifndef GL_ATI_meminfo
5542 #define GL_ATI_meminfo 1
5543 #define GL_VBO_FREE_MEMORY_ATI 0x87FB
5544 #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
5545 #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
5546 #endif /* GL_ATI_meminfo */
5547
5548 #ifndef GL_ATI_pixel_format_float
5549 #define GL_ATI_pixel_format_float 1
5550 #define GL_RGBA_FLOAT_MODE_ATI 0x8820
5551 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
5552 #endif /* GL_ATI_pixel_format_float */
5553
5554 #ifndef GL_ATI_pn_triangles
5555 #define GL_ATI_pn_triangles 1
5556 #define GL_PN_TRIANGLES_ATI 0x87F0
5557 #define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
5558 #define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
5559 #define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
5560 #define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
5561 #define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
5562 #define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
5563 #define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
5564 #define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
5565 typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
5566 typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
5567 #ifdef GL_GLEXT_PROTOTYPES
5568 GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
5569 GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
5570 #endif
5571 #endif /* GL_ATI_pn_triangles */
5572
5573 #ifndef GL_ATI_separate_stencil
5574 #define GL_ATI_separate_stencil 1
5575 #define GL_STENCIL_BACK_FUNC_ATI 0x8800
5576 #define GL_STENCIL_BACK_FAIL_ATI 0x8801
5577 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
5578 #define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
5579 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5580 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5581 #ifdef GL_GLEXT_PROTOTYPES
5582 GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5583 GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5584 #endif
5585 #endif /* GL_ATI_separate_stencil */
5586
5587 #ifndef GL_ATI_text_fragment_shader
5588 #define GL_ATI_text_fragment_shader 1
5589 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
5590 #endif /* GL_ATI_text_fragment_shader */
5591
5592 #ifndef GL_ATI_texture_env_combine3
5593 #define GL_ATI_texture_env_combine3 1
5594 #define GL_MODULATE_ADD_ATI 0x8744
5595 #define GL_MODULATE_SIGNED_ADD_ATI 0x8745
5596 #define GL_MODULATE_SUBTRACT_ATI 0x8746
5597 #endif /* GL_ATI_texture_env_combine3 */
5598
5599 #ifndef GL_ATI_texture_float
5600 #define GL_ATI_texture_float 1
5601 #define GL_RGBA_FLOAT32_ATI 0x8814
5602 #define GL_RGB_FLOAT32_ATI 0x8815
5603 #define GL_ALPHA_FLOAT32_ATI 0x8816
5604 #define GL_INTENSITY_FLOAT32_ATI 0x8817
5605 #define GL_LUMINANCE_FLOAT32_ATI 0x8818
5606 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
5607 #define GL_RGBA_FLOAT16_ATI 0x881A
5608 #define GL_RGB_FLOAT16_ATI 0x881B
5609 #define GL_ALPHA_FLOAT16_ATI 0x881C
5610 #define GL_INTENSITY_FLOAT16_ATI 0x881D
5611 #define GL_LUMINANCE_FLOAT16_ATI 0x881E
5612 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
5613 #endif /* GL_ATI_texture_float */
5614
5615 #ifndef GL_ATI_texture_mirror_once
5616 #define GL_ATI_texture_mirror_once 1
5617 #define GL_MIRROR_CLAMP_ATI 0x8742
5618 #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
5619 #endif /* GL_ATI_texture_mirror_once */
5620
5621 #ifndef GL_ATI_vertex_array_object
5622 #define GL_ATI_vertex_array_object 1
5623 #define GL_STATIC_ATI 0x8760
5624 #define GL_DYNAMIC_ATI 0x8761
5625 #define GL_PRESERVE_ATI 0x8762
5626 #define GL_DISCARD_ATI 0x8763
5627 #define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
5628 #define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
5629 #define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
5630 #define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
5631 typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
5632 typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
5633 typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5634 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
5635 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
5636 typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
5637 typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5638 typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
5639 typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
5640 typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5641 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
5642 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
5643 #ifdef GL_GLEXT_PROTOTYPES
5644 GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
5645 GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
5646 GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5647 GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
5648 GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
5649 GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
5650 GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5651 GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
5652 GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
5653 GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5654 GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
5655 GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
5656 #endif
5657 #endif /* GL_ATI_vertex_array_object */
5658
5659 #ifndef GL_ATI_vertex_attrib_array_object
5660 #define GL_ATI_vertex_attrib_array_object 1
5661 typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5662 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
5663 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
5664 #ifdef GL_GLEXT_PROTOTYPES
5665 GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5666 GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
5667 GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
5668 #endif
5669 #endif /* GL_ATI_vertex_attrib_array_object */
5670
5671 #ifndef GL_ATI_vertex_streams
5672 #define GL_ATI_vertex_streams 1
5673 #define GL_MAX_VERTEX_STREAMS_ATI 0x876B
5674 #define GL_VERTEX_STREAM0_ATI 0x876C
5675 #define GL_VERTEX_STREAM1_ATI 0x876D
5676 #define GL_VERTEX_STREAM2_ATI 0x876E
5677 #define GL_VERTEX_STREAM3_ATI 0x876F
5678 #define GL_VERTEX_STREAM4_ATI 0x8770
5679 #define GL_VERTEX_STREAM5_ATI 0x8771
5680 #define GL_VERTEX_STREAM6_ATI 0x8772
5681 #define GL_VERTEX_STREAM7_ATI 0x8773
5682 #define GL_VERTEX_SOURCE_ATI 0x8774
5683 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
5684 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
5685 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
5686 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
5687 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
5688 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
5689 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
5690 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
5691 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
5692 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
5693 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
5694 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
5695 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
5696 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
5697 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
5698 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
5699 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
5700 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5701 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
5702 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5703 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5704 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5705 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5706 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5707 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5708 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
5709 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5710 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
5711 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5712 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
5713 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5714 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
5715 typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5716 typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
5717 typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5718 typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5719 typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
5720 typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5721 typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5722 typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5723 typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5724 typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5725 typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
5726 typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
5727 typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
5728 #ifdef GL_GLEXT_PROTOTYPES
5729 GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
5730 GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
5731 GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
5732 GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
5733 GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
5734 GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
5735 GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
5736 GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
5737 GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
5738 GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
5739 GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
5740 GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
5741 GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
5742 GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
5743 GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
5744 GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
5745 GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
5746 GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
5747 GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
5748 GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
5749 GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5750 GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
5751 GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5752 GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
5753 GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5754 GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
5755 GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5756 GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
5757 GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5758 GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
5759 GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5760 GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
5761 GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5762 GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
5763 GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5764 GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
5765 GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
5766 GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
5767 GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5768 GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
5769 GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5770 GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
5771 GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
5772 GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
5773 GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
5774 #endif
5775 #endif /* GL_ATI_vertex_streams */
5776
5777 #ifndef GL_EXT_422_pixels
5778 #define GL_EXT_422_pixels 1
5779 #define GL_422_EXT 0x80CC
5780 #define GL_422_REV_EXT 0x80CD
5781 #define GL_422_AVERAGE_EXT 0x80CE
5782 #define GL_422_REV_AVERAGE_EXT 0x80CF
5783 #endif /* GL_EXT_422_pixels */
5784
5785 #ifndef GL_EXT_abgr
5786 #define GL_EXT_abgr 1
5787 #define GL_ABGR_EXT 0x8000
5788 #endif /* GL_EXT_abgr */
5789
5790 #ifndef GL_EXT_bgra
5791 #define GL_EXT_bgra 1
5792 #define GL_BGR_EXT 0x80E0
5793 #define GL_BGRA_EXT 0x80E1
5794 #endif /* GL_EXT_bgra */
5795
5796 #ifndef GL_EXT_bindable_uniform
5797 #define GL_EXT_bindable_uniform 1
5798 #define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
5799 #define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
5800 #define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
5801 #define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
5802 #define GL_UNIFORM_BUFFER_EXT 0x8DEE
5803 #define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
5804 typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
5805 typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
5806 typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
5807 #ifdef GL_GLEXT_PROTOTYPES
5808 GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
5809 GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
5810 GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
5811 #endif
5812 #endif /* GL_EXT_bindable_uniform */
5813
5814 #ifndef GL_EXT_blend_color
5815 #define GL_EXT_blend_color 1
5816 #define GL_CONSTANT_COLOR_EXT 0x8001
5817 #define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
5818 #define GL_CONSTANT_ALPHA_EXT 0x8003
5819 #define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
5820 #define GL_BLEND_COLOR_EXT 0x8005
5821 typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5822 #ifdef GL_GLEXT_PROTOTYPES
5823 GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5824 #endif
5825 #endif /* GL_EXT_blend_color */
5826
5827 #ifndef GL_EXT_blend_equation_separate
5828 #define GL_EXT_blend_equation_separate 1
5829 #define GL_BLEND_EQUATION_RGB_EXT 0x8009
5830 #define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
5831 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
5832 #ifdef GL_GLEXT_PROTOTYPES
5833 GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
5834 #endif
5835 #endif /* GL_EXT_blend_equation_separate */
5836
5837 #ifndef GL_EXT_blend_func_separate
5838 #define GL_EXT_blend_func_separate 1
5839 #define GL_BLEND_DST_RGB_EXT 0x80C8
5840 #define GL_BLEND_SRC_RGB_EXT 0x80C9
5841 #define GL_BLEND_DST_ALPHA_EXT 0x80CA
5842 #define GL_BLEND_SRC_ALPHA_EXT 0x80CB
5843 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5844 #ifdef GL_GLEXT_PROTOTYPES
5845 GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5846 #endif
5847 #endif /* GL_EXT_blend_func_separate */
5848
5849 #ifndef GL_EXT_blend_logic_op
5850 #define GL_EXT_blend_logic_op 1
5851 #endif /* GL_EXT_blend_logic_op */
5852
5853 #ifndef GL_EXT_blend_minmax
5854 #define GL_EXT_blend_minmax 1
5855 #define GL_MIN_EXT 0x8007
5856 #define GL_MAX_EXT 0x8008
5857 #define GL_FUNC_ADD_EXT 0x8006
5858 #define GL_BLEND_EQUATION_EXT 0x8009
5859 typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
5860 #ifdef GL_GLEXT_PROTOTYPES
5861 GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
5862 #endif
5863 #endif /* GL_EXT_blend_minmax */
5864
5865 #ifndef GL_EXT_blend_subtract
5866 #define GL_EXT_blend_subtract 1
5867 #define GL_FUNC_SUBTRACT_EXT 0x800A
5868 #define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
5869 #endif /* GL_EXT_blend_subtract */
5870
5871 #ifndef GL_EXT_clip_volume_hint
5872 #define GL_EXT_clip_volume_hint 1
5873 #define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
5874 #endif /* GL_EXT_clip_volume_hint */
5875
5876 #ifndef GL_EXT_cmyka
5877 #define GL_EXT_cmyka 1
5878 #define GL_CMYK_EXT 0x800C
5879 #define GL_CMYKA_EXT 0x800D
5880 #define GL_PACK_CMYK_HINT_EXT 0x800E
5881 #define GL_UNPACK_CMYK_HINT_EXT 0x800F
5882 #endif /* GL_EXT_cmyka */
5883
5884 #ifndef GL_EXT_color_subtable
5885 #define GL_EXT_color_subtable 1
5886 typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5887 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5888 #ifdef GL_GLEXT_PROTOTYPES
5889 GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5890 GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5891 #endif
5892 #endif /* GL_EXT_color_subtable */
5893
5894 #ifndef GL_EXT_compiled_vertex_array
5895 #define GL_EXT_compiled_vertex_array 1
5896 #define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
5897 #define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
5898 typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
5899 typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
5900 #ifdef GL_GLEXT_PROTOTYPES
5901 GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
5902 GLAPI void APIENTRY glUnlockArraysEXT (void);
5903 #endif
5904 #endif /* GL_EXT_compiled_vertex_array */
5905
5906 #ifndef GL_EXT_convolution
5907 #define GL_EXT_convolution 1
5908 #define GL_CONVOLUTION_1D_EXT 0x8010
5909 #define GL_CONVOLUTION_2D_EXT 0x8011
5910 #define GL_SEPARABLE_2D_EXT 0x8012
5911 #define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
5912 #define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
5913 #define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
5914 #define GL_REDUCE_EXT 0x8016
5915 #define GL_CONVOLUTION_FORMAT_EXT 0x8017
5916 #define GL_CONVOLUTION_WIDTH_EXT 0x8018
5917 #define GL_CONVOLUTION_HEIGHT_EXT 0x8019
5918 #define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
5919 #define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
5920 #define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
5921 #define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
5922 #define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
5923 #define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
5924 #define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
5925 #define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
5926 #define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
5927 #define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
5928 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5929 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5930 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
5931 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
5932 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
5933 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
5934 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5935 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5936 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
5937 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
5938 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
5939 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5940 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5941 #ifdef GL_GLEXT_PROTOTYPES
5942 GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5943 GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5944 GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
5945 GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
5946 GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
5947 GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
5948 GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5949 GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5950 GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
5951 GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
5952 GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
5953 GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5954 GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5955 #endif
5956 #endif /* GL_EXT_convolution */
5957
5958 #ifndef GL_EXT_coordinate_frame
5959 #define GL_EXT_coordinate_frame 1
5960 #define GL_TANGENT_ARRAY_EXT 0x8439
5961 #define GL_BINORMAL_ARRAY_EXT 0x843A
5962 #define GL_CURRENT_TANGENT_EXT 0x843B
5963 #define GL_CURRENT_BINORMAL_EXT 0x843C
5964 #define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
5965 #define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
5966 #define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
5967 #define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
5968 #define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
5969 #define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
5970 #define GL_MAP1_TANGENT_EXT 0x8444
5971 #define GL_MAP2_TANGENT_EXT 0x8445
5972 #define GL_MAP1_BINORMAL_EXT 0x8446
5973 #define GL_MAP2_BINORMAL_EXT 0x8447
5974 typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
5975 typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
5976 typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
5977 typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
5978 typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
5979 typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
5980 typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
5981 typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
5982 typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
5983 typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
5984 typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
5985 typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
5986 typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
5987 typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
5988 typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
5989 typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
5990 typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
5991 typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
5992 typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
5993 typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
5994 typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5995 typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5996 #ifdef GL_GLEXT_PROTOTYPES
5997 GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
5998 GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
5999 GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
6000 GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
6001 GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
6002 GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
6003 GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
6004 GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
6005 GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
6006 GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
6007 GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
6008 GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
6009 GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
6010 GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
6011 GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
6012 GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
6013 GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
6014 GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
6015 GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
6016 GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
6017 GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6018 GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6019 #endif
6020 #endif /* GL_EXT_coordinate_frame */
6021
6022 #ifndef GL_EXT_copy_texture
6023 #define GL_EXT_copy_texture 1
6024 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6025 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6026 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6027 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6028 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6029 #ifdef GL_GLEXT_PROTOTYPES
6030 GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6031 GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6032 GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6033 GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6034 GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6035 #endif
6036 #endif /* GL_EXT_copy_texture */
6037
6038 #ifndef GL_EXT_cull_vertex
6039 #define GL_EXT_cull_vertex 1
6040 #define GL_CULL_VERTEX_EXT 0x81AA
6041 #define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
6042 #define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
6043 typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
6044 typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
6045 #ifdef GL_GLEXT_PROTOTYPES
6046 GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
6047 GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
6048 #endif
6049 #endif /* GL_EXT_cull_vertex */
6050
6051 #ifndef GL_EXT_debug_label
6052 #define GL_EXT_debug_label 1
6053 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
6054 #define GL_PROGRAM_OBJECT_EXT 0x8B40
6055 #define GL_SHADER_OBJECT_EXT 0x8B48
6056 #define GL_BUFFER_OBJECT_EXT 0x9151
6057 #define GL_QUERY_OBJECT_EXT 0x9153
6058 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
6059 typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6060 typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6061 #ifdef GL_GLEXT_PROTOTYPES
6062 GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6063 GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6064 #endif
6065 #endif /* GL_EXT_debug_label */
6066
6067 #ifndef GL_EXT_debug_marker
6068 #define GL_EXT_debug_marker 1
6069 typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6070 typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6071 typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
6072 #ifdef GL_GLEXT_PROTOTYPES
6073 GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
6074 GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
6075 GLAPI void APIENTRY glPopGroupMarkerEXT (void);
6076 #endif
6077 #endif /* GL_EXT_debug_marker */
6078
6079 #ifndef GL_EXT_depth_bounds_test
6080 #define GL_EXT_depth_bounds_test 1
6081 #define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
6082 #define GL_DEPTH_BOUNDS_EXT 0x8891
6083 typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
6084 #ifdef GL_GLEXT_PROTOTYPES
6085 GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
6086 #endif
6087 #endif /* GL_EXT_depth_bounds_test */
6088
6089 #ifndef GL_EXT_direct_state_access
6090 #define GL_EXT_direct_state_access 1
6091 #define GL_PROGRAM_MATRIX_EXT 0x8E2D
6092 #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
6093 #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
6094 typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
6095 typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
6096 typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
6097 typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
6098 typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
6099 typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6100 typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6101 typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6102 typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6103 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6104 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6105 typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6106 typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6107 typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
6108 typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
6109 typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6110 typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6111 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6112 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6113 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
6114 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6115 typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6116 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6117 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6118 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6119 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6120 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6121 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6122 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6123 typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6124 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6125 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6126 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6127 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6128 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6129 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6130 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6131 typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
6132 typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6133 typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6134 typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6135 typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6136 typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6137 typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6138 typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6139 typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6140 typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6141 typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6142 typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6143 typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6144 typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6145 typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6146 typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6147 typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6148 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6149 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6150 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6151 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6152 typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6153 typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6154 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6155 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6156 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6157 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6158 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6159 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6160 typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6161 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6162 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6163 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6164 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6165 typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6166 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6167 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6168 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6169 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6170 typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
6171 typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
6172 typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
6173 typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6174 typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6175 typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
6176 typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
6177 typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
6178 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6179 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6180 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6181 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6182 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6183 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6184 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
6185 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6186 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6187 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6188 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6189 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6190 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6191 typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
6192 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6193 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6194 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6195 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6196 typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6197 typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6198 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
6199 typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
6200 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
6201 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
6202 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6203 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
6204 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6205 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6206 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6207 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
6208 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
6209 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6210 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6211 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6212 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6213 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6214 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6215 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6216 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6217 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6218 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6219 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6220 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6221 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6222 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6223 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6224 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6225 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6226 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6227 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6228 typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6229 typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6230 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6231 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6232 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6233 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6234 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6235 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6236 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6237 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6238 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
6239 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
6240 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6241 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6242 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6243 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6244 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6245 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6246 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6247 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6248 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
6249 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6250 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6251 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
6252 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6253 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
6254 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
6255 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6256 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6257 typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
6258 typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
6259 typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
6260 typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6261 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6262 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6263 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6264 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6265 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
6266 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
6267 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
6268 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
6269 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6270 typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
6271 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6272 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6273 typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
6274 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6275 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6276 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6277 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6278 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6279 typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
6280 typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
6281 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6282 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6283 typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6284 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6285 typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6286 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6287 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6288 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6289 typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
6290 typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
6291 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6292 typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6293 typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6294 typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6295 typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6296 typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6297 typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6298 typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6299 typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6300 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6301 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6302 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6303 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6304 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6305 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6306 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
6307 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
6308 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6309 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
6310 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6311 typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
6312 typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6313 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6314 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6315 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
6316 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6317 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
6318 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
6319 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6320 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6321 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6322 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6323 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6324 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6325 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6326 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6327 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6328 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6329 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6330 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6331 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6332 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6333 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6334 typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6335 typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6336 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6337 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6338 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6339 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6340 typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6341 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6342 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6343 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6344 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6345 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6346 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6347 typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6348 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
6349 #ifdef GL_GLEXT_PROTOTYPES
6350 GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
6351 GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
6352 GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
6353 GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
6354 GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
6355 GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6356 GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6357 GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6358 GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6359 GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6360 GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6361 GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6362 GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6363 GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
6364 GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
6365 GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
6366 GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
6367 GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6368 GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6369 GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
6370 GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6371 GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6372 GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6373 GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6374 GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6375 GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6376 GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6377 GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6378 GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6379 GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6380 GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6381 GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6382 GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6383 GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6384 GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6385 GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6386 GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6387 GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
6388 GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6389 GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6390 GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6391 GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6392 GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6393 GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6394 GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6395 GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6396 GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6397 GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6398 GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6399 GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6400 GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6401 GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6402 GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6403 GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6404 GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6405 GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6406 GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6407 GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6408 GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6409 GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6410 GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6411 GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6412 GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6413 GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6414 GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6415 GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6416 GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6417 GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6418 GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6419 GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6420 GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6421 GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6422 GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6423 GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6424 GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
6425 GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
6426 GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
6427 GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
6428 GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
6429 GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
6430 GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
6431 GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
6432 GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
6433 GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
6434 GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6435 GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6436 GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6437 GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6438 GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6439 GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6440 GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
6441 GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6442 GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6443 GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6444 GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6445 GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6446 GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6447 GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
6448 GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
6449 GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
6450 GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
6451 GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
6452 GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6453 GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6454 GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
6455 GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
6456 GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
6457 GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
6458 GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6459 GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
6460 GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6461 GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6462 GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6463 GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
6464 GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
6465 GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6466 GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6467 GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6468 GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6469 GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6470 GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6471 GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6472 GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6473 GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6474 GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6475 GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6476 GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6477 GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6478 GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6479 GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6480 GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6481 GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6482 GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6483 GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6484 GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6485 GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6486 GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6487 GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6488 GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6489 GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6490 GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6491 GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6492 GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6493 GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6494 GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
6495 GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
6496 GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6497 GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6498 GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6499 GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6500 GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6501 GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6502 GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6503 GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6504 GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
6505 GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6506 GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6507 GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
6508 GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6509 GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
6510 GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
6511 GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
6512 GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
6513 GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
6514 GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
6515 GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
6516 GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6517 GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6518 GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6519 GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6520 GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6521 GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
6522 GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
6523 GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
6524 GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
6525 GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6526 GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
6527 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6528 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6529 GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
6530 GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6531 GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6532 GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6533 GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6534 GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6535 GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
6536 GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
6537 GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
6538 GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6539 GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
6540 GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6541 GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6542 GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6543 GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6544 GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6545 GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
6546 GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
6547 GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6548 GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6549 GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6550 GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6551 GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6552 GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6553 GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6554 GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6555 GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6556 GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6557 GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6558 GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
6559 GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
6560 GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6561 GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6562 GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
6563 GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
6564 GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6565 GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
6566 GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6567 GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
6568 GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6569 GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6570 GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6571 GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
6572 GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6573 GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
6574 GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
6575 GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6576 GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6577 GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6578 GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6579 GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6580 GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6581 GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6582 GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6583 GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6584 GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6585 GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6586 GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6587 GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6588 GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6589 GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6590 GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6591 GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6592 GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6593 GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6594 GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6595 GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6596 GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6597 GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6598 GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6599 GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6600 GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6601 GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6602 GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6603 GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6604 GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
6605 #endif
6606 #endif /* GL_EXT_direct_state_access */
6607
6608 #ifndef GL_EXT_draw_buffers2
6609 #define GL_EXT_draw_buffers2 1
6610 typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6611 #ifdef GL_GLEXT_PROTOTYPES
6612 GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6613 #endif
6614 #endif /* GL_EXT_draw_buffers2 */
6615
6616 #ifndef GL_EXT_draw_instanced
6617 #define GL_EXT_draw_instanced 1
6618 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6619 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6620 #ifdef GL_GLEXT_PROTOTYPES
6621 GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6622 GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6623 #endif
6624 #endif /* GL_EXT_draw_instanced */
6625
6626 #ifndef GL_EXT_draw_range_elements
6627 #define GL_EXT_draw_range_elements 1
6628 #define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
6629 #define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
6630 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6631 #ifdef GL_GLEXT_PROTOTYPES
6632 GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6633 #endif
6634 #endif /* GL_EXT_draw_range_elements */
6635
6636 #ifndef GL_EXT_fog_coord
6637 #define GL_EXT_fog_coord 1
6638 #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
6639 #define GL_FOG_COORDINATE_EXT 0x8451
6640 #define GL_FRAGMENT_DEPTH_EXT 0x8452
6641 #define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
6642 #define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
6643 #define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
6644 #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
6645 #define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
6646 typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
6647 typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
6648 typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
6649 typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
6650 typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
6651 #ifdef GL_GLEXT_PROTOTYPES
6652 GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
6653 GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
6654 GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
6655 GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
6656 GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6657 #endif
6658 #endif /* GL_EXT_fog_coord */
6659
6660 #ifndef GL_EXT_framebuffer_blit
6661 #define GL_EXT_framebuffer_blit 1
6662 #define GL_READ_FRAMEBUFFER_EXT 0x8CA8
6663 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
6664 #define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
6665 #define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
6666 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6667 #ifdef GL_GLEXT_PROTOTYPES
6668 GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6669 #endif
6670 #endif /* GL_EXT_framebuffer_blit */
6671
6672 #ifndef GL_EXT_framebuffer_multisample
6673 #define GL_EXT_framebuffer_multisample 1
6674 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
6675 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
6676 #define GL_MAX_SAMPLES_EXT 0x8D57
6677 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6678 #ifdef GL_GLEXT_PROTOTYPES
6679 GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6680 #endif
6681 #endif /* GL_EXT_framebuffer_multisample */
6682
6683 #ifndef GL_EXT_framebuffer_multisample_blit_scaled
6684 #define GL_EXT_framebuffer_multisample_blit_scaled 1
6685 #define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
6686 #define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
6687 #endif /* GL_EXT_framebuffer_multisample_blit_scaled */
6688
6689 #ifndef GL_EXT_framebuffer_object
6690 #define GL_EXT_framebuffer_object 1
6691 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
6692 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
6693 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
6694 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
6695 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
6696 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
6697 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
6698 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
6699 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
6700 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
6701 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
6702 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
6703 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
6704 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
6705 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
6706 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
6707 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
6708 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
6709 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
6710 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
6711 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
6712 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
6713 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
6714 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
6715 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
6716 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
6717 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
6718 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
6719 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
6720 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
6721 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
6722 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
6723 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
6724 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
6725 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00
6726 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20
6727 #define GL_FRAMEBUFFER_EXT 0x8D40
6728 #define GL_RENDERBUFFER_EXT 0x8D41
6729 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
6730 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
6731 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
6732 #define GL_STENCIL_INDEX1_EXT 0x8D46
6733 #define GL_STENCIL_INDEX4_EXT 0x8D47
6734 #define GL_STENCIL_INDEX8_EXT 0x8D48
6735 #define GL_STENCIL_INDEX16_EXT 0x8D49
6736 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
6737 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
6738 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
6739 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
6740 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
6741 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
6742 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
6743 typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
6744 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
6745 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
6746 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6747 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6748 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
6749 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
6750 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
6751 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
6752 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
6753 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6754 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6755 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6756 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6757 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6758 typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
6759 #ifdef GL_GLEXT_PROTOTYPES
6760 GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
6761 GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
6762 GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
6763 GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
6764 GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6765 GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
6766 GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
6767 GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
6768 GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
6769 GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
6770 GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
6771 GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6772 GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6773 GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6774 GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6775 GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6776 GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
6777 #endif
6778 #endif /* GL_EXT_framebuffer_object */
6779
6780 #ifndef GL_EXT_framebuffer_sRGB
6781 #define GL_EXT_framebuffer_sRGB 1
6782 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
6783 #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
6784 #endif /* GL_EXT_framebuffer_sRGB */
6785
6786 #ifndef GL_EXT_geometry_shader4
6787 #define GL_EXT_geometry_shader4 1
6788 #define GL_GEOMETRY_SHADER_EXT 0x8DD9
6789 #define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
6790 #define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
6791 #define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
6792 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
6793 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
6794 #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
6795 #define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
6796 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
6797 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
6798 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
6799 #define GL_LINES_ADJACENCY_EXT 0x000A
6800 #define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
6801 #define GL_TRIANGLES_ADJACENCY_EXT 0x000C
6802 #define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
6803 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
6804 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
6805 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
6806 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
6807 #define GL_PROGRAM_POINT_SIZE_EXT 0x8642
6808 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
6809 #ifdef GL_GLEXT_PROTOTYPES
6810 GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
6811 #endif
6812 #endif /* GL_EXT_geometry_shader4 */
6813
6814 #ifndef GL_EXT_gpu_program_parameters
6815 #define GL_EXT_gpu_program_parameters 1
6816 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6817 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6818 #ifdef GL_GLEXT_PROTOTYPES
6819 GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6820 GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6821 #endif
6822 #endif /* GL_EXT_gpu_program_parameters */
6823
6824 #ifndef GL_EXT_gpu_shader4
6825 #define GL_EXT_gpu_shader4 1
6826 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
6827 #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
6828 #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
6829 #define GL_SAMPLER_BUFFER_EXT 0x8DC2
6830 #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
6831 #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
6832 #define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
6833 #define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
6834 #define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
6835 #define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
6836 #define GL_INT_SAMPLER_1D_EXT 0x8DC9
6837 #define GL_INT_SAMPLER_2D_EXT 0x8DCA
6838 #define GL_INT_SAMPLER_3D_EXT 0x8DCB
6839 #define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
6840 #define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
6841 #define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
6842 #define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
6843 #define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
6844 #define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
6845 #define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
6846 #define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
6847 #define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
6848 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
6849 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
6850 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
6851 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
6852 #define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
6853 #define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
6854 typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
6855 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
6856 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
6857 typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
6858 typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
6859 typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
6860 typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6861 typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6862 typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6863 typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6864 typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6865 #ifdef GL_GLEXT_PROTOTYPES
6866 GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
6867 GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
6868 GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
6869 GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
6870 GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
6871 GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
6872 GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6873 GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
6874 GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
6875 GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
6876 GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
6877 #endif
6878 #endif /* GL_EXT_gpu_shader4 */
6879
6880 #ifndef GL_EXT_histogram
6881 #define GL_EXT_histogram 1
6882 #define GL_HISTOGRAM_EXT 0x8024
6883 #define GL_PROXY_HISTOGRAM_EXT 0x8025
6884 #define GL_HISTOGRAM_WIDTH_EXT 0x8026
6885 #define GL_HISTOGRAM_FORMAT_EXT 0x8027
6886 #define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
6887 #define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
6888 #define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
6889 #define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
6890 #define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
6891 #define GL_HISTOGRAM_SINK_EXT 0x802D
6892 #define GL_MINMAX_EXT 0x802E
6893 #define GL_MINMAX_FORMAT_EXT 0x802F
6894 #define GL_MINMAX_SINK_EXT 0x8030
6895 #define GL_TABLE_TOO_LARGE_EXT 0x8031
6896 typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6897 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6898 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6899 typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6900 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6901 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6902 typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6903 typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
6904 typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
6905 typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
6906 #ifdef GL_GLEXT_PROTOTYPES
6907 GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6908 GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6909 GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
6910 GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6911 GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6912 GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
6913 GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6914 GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
6915 GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
6916 GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
6917 #endif
6918 #endif /* GL_EXT_histogram */
6919
6920 #ifndef GL_EXT_index_array_formats
6921 #define GL_EXT_index_array_formats 1
6922 #define GL_IUI_V2F_EXT 0x81AD
6923 #define GL_IUI_V3F_EXT 0x81AE
6924 #define GL_IUI_N3F_V2F_EXT 0x81AF
6925 #define GL_IUI_N3F_V3F_EXT 0x81B0
6926 #define GL_T2F_IUI_V2F_EXT 0x81B1
6927 #define GL_T2F_IUI_V3F_EXT 0x81B2
6928 #define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
6929 #define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
6930 #endif /* GL_EXT_index_array_formats */
6931
6932 #ifndef GL_EXT_index_func
6933 #define GL_EXT_index_func 1
6934 #define GL_INDEX_TEST_EXT 0x81B5
6935 #define GL_INDEX_TEST_FUNC_EXT 0x81B6
6936 #define GL_INDEX_TEST_REF_EXT 0x81B7
6937 typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
6938 #ifdef GL_GLEXT_PROTOTYPES
6939 GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
6940 #endif
6941 #endif /* GL_EXT_index_func */
6942
6943 #ifndef GL_EXT_index_material
6944 #define GL_EXT_index_material 1
6945 #define GL_INDEX_MATERIAL_EXT 0x81B8
6946 #define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
6947 #define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
6948 typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
6949 #ifdef GL_GLEXT_PROTOTYPES
6950 GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
6951 #endif
6952 #endif /* GL_EXT_index_material */
6953
6954 #ifndef GL_EXT_index_texture
6955 #define GL_EXT_index_texture 1
6956 #endif /* GL_EXT_index_texture */
6957
6958 #ifndef GL_EXT_light_texture
6959 #define GL_EXT_light_texture 1
6960 #define GL_FRAGMENT_MATERIAL_EXT 0x8349
6961 #define GL_FRAGMENT_NORMAL_EXT 0x834A
6962 #define GL_FRAGMENT_COLOR_EXT 0x834C
6963 #define GL_ATTENUATION_EXT 0x834D
6964 #define GL_SHADOW_ATTENUATION_EXT 0x834E
6965 #define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
6966 #define GL_TEXTURE_LIGHT_EXT 0x8350
6967 #define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
6968 #define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
6969 typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
6970 typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
6971 typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
6972 #ifdef GL_GLEXT_PROTOTYPES
6973 GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
6974 GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
6975 GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
6976 #endif
6977 #endif /* GL_EXT_light_texture */
6978
6979 #ifndef GL_EXT_misc_attribute
6980 #define GL_EXT_misc_attribute 1
6981 #endif /* GL_EXT_misc_attribute */
6982
6983 #ifndef GL_EXT_multi_draw_arrays
6984 #define GL_EXT_multi_draw_arrays 1
6985 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6986 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6987 #ifdef GL_GLEXT_PROTOTYPES
6988 GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6989 GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6990 #endif
6991 #endif /* GL_EXT_multi_draw_arrays */
6992
6993 #ifndef GL_EXT_multisample
6994 #define GL_EXT_multisample 1
6995 #define GL_MULTISAMPLE_EXT 0x809D
6996 #define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
6997 #define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
6998 #define GL_SAMPLE_MASK_EXT 0x80A0
6999 #define GL_1PASS_EXT 0x80A1
7000 #define GL_2PASS_0_EXT 0x80A2
7001 #define GL_2PASS_1_EXT 0x80A3
7002 #define GL_4PASS_0_EXT 0x80A4
7003 #define GL_4PASS_1_EXT 0x80A5
7004 #define GL_4PASS_2_EXT 0x80A6
7005 #define GL_4PASS_3_EXT 0x80A7
7006 #define GL_SAMPLE_BUFFERS_EXT 0x80A8
7007 #define GL_SAMPLES_EXT 0x80A9
7008 #define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
7009 #define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
7010 #define GL_SAMPLE_PATTERN_EXT 0x80AC
7011 #define GL_MULTISAMPLE_BIT_EXT 0x20000000
7012 typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
7013 typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
7014 #ifdef GL_GLEXT_PROTOTYPES
7015 GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
7016 GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
7017 #endif
7018 #endif /* GL_EXT_multisample */
7019
7020 #ifndef GL_EXT_packed_depth_stencil
7021 #define GL_EXT_packed_depth_stencil 1
7022 #define GL_DEPTH_STENCIL_EXT 0x84F9
7023 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA
7024 #define GL_DEPTH24_STENCIL8_EXT 0x88F0
7025 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
7026 #endif /* GL_EXT_packed_depth_stencil */
7027
7028 #ifndef GL_EXT_packed_float
7029 #define GL_EXT_packed_float 1
7030 #define GL_R11F_G11F_B10F_EXT 0x8C3A
7031 #define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
7032 #define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
7033 #endif /* GL_EXT_packed_float */
7034
7035 #ifndef GL_EXT_packed_pixels
7036 #define GL_EXT_packed_pixels 1
7037 #define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
7038 #define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
7039 #define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
7040 #define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
7041 #define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
7042 #endif /* GL_EXT_packed_pixels */
7043
7044 #ifndef GL_EXT_paletted_texture
7045 #define GL_EXT_paletted_texture 1
7046 #define GL_COLOR_INDEX1_EXT 0x80E2
7047 #define GL_COLOR_INDEX2_EXT 0x80E3
7048 #define GL_COLOR_INDEX4_EXT 0x80E4
7049 #define GL_COLOR_INDEX8_EXT 0x80E5
7050 #define GL_COLOR_INDEX12_EXT 0x80E6
7051 #define GL_COLOR_INDEX16_EXT 0x80E7
7052 #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
7053 typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7054 typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
7055 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7056 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7057 #ifdef GL_GLEXT_PROTOTYPES
7058 GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7059 GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
7060 GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
7061 GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7062 #endif
7063 #endif /* GL_EXT_paletted_texture */
7064
7065 #ifndef GL_EXT_pixel_buffer_object
7066 #define GL_EXT_pixel_buffer_object 1
7067 #define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
7068 #define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
7069 #define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
7070 #define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
7071 #endif /* GL_EXT_pixel_buffer_object */
7072
7073 #ifndef GL_EXT_pixel_transform
7074 #define GL_EXT_pixel_transform 1
7075 #define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
7076 #define GL_PIXEL_MAG_FILTER_EXT 0x8331
7077 #define GL_PIXEL_MIN_FILTER_EXT 0x8332
7078 #define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
7079 #define GL_CUBIC_EXT 0x8334
7080 #define GL_AVERAGE_EXT 0x8335
7081 #define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
7082 #define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
7083 #define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
7084 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
7085 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
7086 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7087 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
7088 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7089 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7090 #ifdef GL_GLEXT_PROTOTYPES
7091 GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
7092 GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
7093 GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
7094 GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
7095 GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
7096 GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7097 #endif
7098 #endif /* GL_EXT_pixel_transform */
7099
7100 #ifndef GL_EXT_pixel_transform_color_table
7101 #define GL_EXT_pixel_transform_color_table 1
7102 #endif /* GL_EXT_pixel_transform_color_table */
7103
7104 #ifndef GL_EXT_point_parameters
7105 #define GL_EXT_point_parameters 1
7106 #define GL_POINT_SIZE_MIN_EXT 0x8126
7107 #define GL_POINT_SIZE_MAX_EXT 0x8127
7108 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
7109 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
7110 typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
7111 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
7112 #ifdef GL_GLEXT_PROTOTYPES
7113 GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
7114 GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
7115 #endif
7116 #endif /* GL_EXT_point_parameters */
7117
7118 #ifndef GL_EXT_polygon_offset
7119 #define GL_EXT_polygon_offset 1
7120 #define GL_POLYGON_OFFSET_EXT 0x8037
7121 #define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
7122 #define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
7123 typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
7124 #ifdef GL_GLEXT_PROTOTYPES
7125 GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
7126 #endif
7127 #endif /* GL_EXT_polygon_offset */
7128
7129 #ifndef GL_EXT_provoking_vertex
7130 #define GL_EXT_provoking_vertex 1
7131 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
7132 #define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
7133 #define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
7134 #define GL_PROVOKING_VERTEX_EXT 0x8E4F
7135 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
7136 #ifdef GL_GLEXT_PROTOTYPES
7137 GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
7138 #endif
7139 #endif /* GL_EXT_provoking_vertex */
7140
7141 #ifndef GL_EXT_rescale_normal
7142 #define GL_EXT_rescale_normal 1
7143 #define GL_RESCALE_NORMAL_EXT 0x803A
7144 #endif /* GL_EXT_rescale_normal */
7145
7146 #ifndef GL_EXT_secondary_color
7147 #define GL_EXT_secondary_color 1
7148 #define GL_COLOR_SUM_EXT 0x8458
7149 #define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
7150 #define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
7151 #define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
7152 #define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
7153 #define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
7154 #define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
7155 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
7156 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
7157 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
7158 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
7159 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
7160 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
7161 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
7162 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
7163 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
7164 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
7165 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
7166 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
7167 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
7168 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
7169 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
7170 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
7171 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
7172 #ifdef GL_GLEXT_PROTOTYPES
7173 GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
7174 GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
7175 GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
7176 GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
7177 GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
7178 GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
7179 GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
7180 GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
7181 GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
7182 GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
7183 GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
7184 GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
7185 GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
7186 GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
7187 GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
7188 GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
7189 GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
7190 #endif
7191 #endif /* GL_EXT_secondary_color */
7192
7193 #ifndef GL_EXT_separate_shader_objects
7194 #define GL_EXT_separate_shader_objects 1
7195 #define GL_ACTIVE_PROGRAM_EXT 0x8B8D
7196 typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
7197 typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
7198 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
7199 #ifdef GL_GLEXT_PROTOTYPES
7200 GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
7201 GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
7202 GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
7203 #endif
7204 #endif /* GL_EXT_separate_shader_objects */
7205
7206 #ifndef GL_EXT_separate_specular_color
7207 #define GL_EXT_separate_specular_color 1
7208 #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
7209 #define GL_SINGLE_COLOR_EXT 0x81F9
7210 #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
7211 #endif /* GL_EXT_separate_specular_color */
7212
7213 #ifndef GL_EXT_shader_image_load_formatted
7214 #define GL_EXT_shader_image_load_formatted 1
7215 #endif /* GL_EXT_shader_image_load_formatted */
7216
7217 #ifndef GL_EXT_shader_image_load_store
7218 #define GL_EXT_shader_image_load_store 1
7219 #define GL_MAX_IMAGE_UNITS_EXT 0x8F38
7220 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
7221 #define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
7222 #define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
7223 #define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
7224 #define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
7225 #define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
7226 #define GL_IMAGE_1D_EXT 0x904C
7227 #define GL_IMAGE_2D_EXT 0x904D
7228 #define GL_IMAGE_3D_EXT 0x904E
7229 #define GL_IMAGE_2D_RECT_EXT 0x904F
7230 #define GL_IMAGE_CUBE_EXT 0x9050
7231 #define GL_IMAGE_BUFFER_EXT 0x9051
7232 #define GL_IMAGE_1D_ARRAY_EXT 0x9052
7233 #define GL_IMAGE_2D_ARRAY_EXT 0x9053
7234 #define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
7235 #define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
7236 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
7237 #define GL_INT_IMAGE_1D_EXT 0x9057
7238 #define GL_INT_IMAGE_2D_EXT 0x9058
7239 #define GL_INT_IMAGE_3D_EXT 0x9059
7240 #define GL_INT_IMAGE_2D_RECT_EXT 0x905A
7241 #define GL_INT_IMAGE_CUBE_EXT 0x905B
7242 #define GL_INT_IMAGE_BUFFER_EXT 0x905C
7243 #define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
7244 #define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
7245 #define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
7246 #define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
7247 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
7248 #define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
7249 #define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
7250 #define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
7251 #define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
7252 #define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
7253 #define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
7254 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
7255 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
7256 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
7257 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
7258 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
7259 #define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
7260 #define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
7261 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
7262 #define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
7263 #define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
7264 #define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
7265 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
7266 #define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
7267 #define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
7268 #define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
7269 #define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
7270 #define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
7271 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
7272 #define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
7273 #define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
7274 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7275 typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
7276 #ifdef GL_GLEXT_PROTOTYPES
7277 GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7278 GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
7279 #endif
7280 #endif /* GL_EXT_shader_image_load_store */
7281
7282 #ifndef GL_EXT_shader_integer_mix
7283 #define GL_EXT_shader_integer_mix 1
7284 #endif /* GL_EXT_shader_integer_mix */
7285
7286 #ifndef GL_EXT_shadow_funcs
7287 #define GL_EXT_shadow_funcs 1
7288 #endif /* GL_EXT_shadow_funcs */
7289
7290 #ifndef GL_EXT_shared_texture_palette
7291 #define GL_EXT_shared_texture_palette 1
7292 #define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
7293 #endif /* GL_EXT_shared_texture_palette */
7294
7295 #ifndef GL_EXT_stencil_clear_tag
7296 #define GL_EXT_stencil_clear_tag 1
7297 #define GL_STENCIL_TAG_BITS_EXT 0x88F2
7298 #define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
7299 typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
7300 #ifdef GL_GLEXT_PROTOTYPES
7301 GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
7302 #endif
7303 #endif /* GL_EXT_stencil_clear_tag */
7304
7305 #ifndef GL_EXT_stencil_two_side
7306 #define GL_EXT_stencil_two_side 1
7307 #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
7308 #define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
7309 typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
7310 #ifdef GL_GLEXT_PROTOTYPES
7311 GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
7312 #endif
7313 #endif /* GL_EXT_stencil_two_side */
7314
7315 #ifndef GL_EXT_stencil_wrap
7316 #define GL_EXT_stencil_wrap 1
7317 #define GL_INCR_WRAP_EXT 0x8507
7318 #define GL_DECR_WRAP_EXT 0x8508
7319 #endif /* GL_EXT_stencil_wrap */
7320
7321 #ifndef GL_EXT_subtexture
7322 #define GL_EXT_subtexture 1
7323 typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7324 typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7325 #ifdef GL_GLEXT_PROTOTYPES
7326 GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7327 GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7328 #endif
7329 #endif /* GL_EXT_subtexture */
7330
7331 #ifndef GL_EXT_texture
7332 #define GL_EXT_texture 1
7333 #define GL_ALPHA4_EXT 0x803B
7334 #define GL_ALPHA8_EXT 0x803C
7335 #define GL_ALPHA12_EXT 0x803D
7336 #define GL_ALPHA16_EXT 0x803E
7337 #define GL_LUMINANCE4_EXT 0x803F
7338 #define GL_LUMINANCE8_EXT 0x8040
7339 #define GL_LUMINANCE12_EXT 0x8041
7340 #define GL_LUMINANCE16_EXT 0x8042
7341 #define GL_LUMINANCE4_ALPHA4_EXT 0x8043
7342 #define GL_LUMINANCE6_ALPHA2_EXT 0x8044
7343 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
7344 #define GL_LUMINANCE12_ALPHA4_EXT 0x8046
7345 #define GL_LUMINANCE12_ALPHA12_EXT 0x8047
7346 #define GL_LUMINANCE16_ALPHA16_EXT 0x8048
7347 #define GL_INTENSITY_EXT 0x8049
7348 #define GL_INTENSITY4_EXT 0x804A
7349 #define GL_INTENSITY8_EXT 0x804B
7350 #define GL_INTENSITY12_EXT 0x804C
7351 #define GL_INTENSITY16_EXT 0x804D
7352 #define GL_RGB2_EXT 0x804E
7353 #define GL_RGB4_EXT 0x804F
7354 #define GL_RGB5_EXT 0x8050
7355 #define GL_RGB8_EXT 0x8051
7356 #define GL_RGB10_EXT 0x8052
7357 #define GL_RGB12_EXT 0x8053
7358 #define GL_RGB16_EXT 0x8054
7359 #define GL_RGBA2_EXT 0x8055
7360 #define GL_RGBA4_EXT 0x8056
7361 #define GL_RGB5_A1_EXT 0x8057
7362 #define GL_RGBA8_EXT 0x8058
7363 #define GL_RGB10_A2_EXT 0x8059
7364 #define GL_RGBA12_EXT 0x805A
7365 #define GL_RGBA16_EXT 0x805B
7366 #define GL_TEXTURE_RED_SIZE_EXT 0x805C
7367 #define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
7368 #define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
7369 #define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
7370 #define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
7371 #define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
7372 #define GL_REPLACE_EXT 0x8062
7373 #define GL_PROXY_TEXTURE_1D_EXT 0x8063
7374 #define GL_PROXY_TEXTURE_2D_EXT 0x8064
7375 #define GL_TEXTURE_TOO_LARGE_EXT 0x8065
7376 #endif /* GL_EXT_texture */
7377
7378 #ifndef GL_EXT_texture3D
7379 #define GL_EXT_texture3D 1
7380 #define GL_PACK_SKIP_IMAGES_EXT 0x806B
7381 #define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
7382 #define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
7383 #define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
7384 #define GL_TEXTURE_3D_EXT 0x806F
7385 #define GL_PROXY_TEXTURE_3D_EXT 0x8070
7386 #define GL_TEXTURE_DEPTH_EXT 0x8071
7387 #define GL_TEXTURE_WRAP_R_EXT 0x8072
7388 #define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
7389 typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7390 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7391 #ifdef GL_GLEXT_PROTOTYPES
7392 GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7393 GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7394 #endif
7395 #endif /* GL_EXT_texture3D */
7396
7397 #ifndef GL_EXT_texture_array
7398 #define GL_EXT_texture_array 1
7399 #define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
7400 #define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
7401 #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
7402 #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
7403 #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
7404 #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
7405 #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
7406 #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
7407 #endif /* GL_EXT_texture_array */
7408
7409 #ifndef GL_EXT_texture_buffer_object
7410 #define GL_EXT_texture_buffer_object 1
7411 #define GL_TEXTURE_BUFFER_EXT 0x8C2A
7412 #define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
7413 #define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
7414 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
7415 #define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
7416 typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
7417 #ifdef GL_GLEXT_PROTOTYPES
7418 GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
7419 #endif
7420 #endif /* GL_EXT_texture_buffer_object */
7421
7422 #ifndef GL_EXT_texture_compression_latc
7423 #define GL_EXT_texture_compression_latc 1
7424 #define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
7425 #define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
7426 #define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
7427 #define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
7428 #endif /* GL_EXT_texture_compression_latc */
7429
7430 #ifndef GL_EXT_texture_compression_rgtc
7431 #define GL_EXT_texture_compression_rgtc 1
7432 #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
7433 #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
7434 #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
7435 #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
7436 #endif /* GL_EXT_texture_compression_rgtc */
7437
7438 #ifndef GL_EXT_texture_compression_s3tc
7439 #define GL_EXT_texture_compression_s3tc 1
7440 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
7441 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
7442 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
7443 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
7444 #endif /* GL_EXT_texture_compression_s3tc */
7445
7446 #ifndef GL_EXT_texture_cube_map
7447 #define GL_EXT_texture_cube_map 1
7448 #define GL_NORMAL_MAP_EXT 0x8511
7449 #define GL_REFLECTION_MAP_EXT 0x8512
7450 #define GL_TEXTURE_CUBE_MAP_EXT 0x8513
7451 #define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
7452 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
7453 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
7454 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
7455 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
7456 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
7457 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
7458 #define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
7459 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
7460 #endif /* GL_EXT_texture_cube_map */
7461
7462 #ifndef GL_EXT_texture_env_add
7463 #define GL_EXT_texture_env_add 1
7464 #endif /* GL_EXT_texture_env_add */
7465
7466 #ifndef GL_EXT_texture_env_combine
7467 #define GL_EXT_texture_env_combine 1
7468 #define GL_COMBINE_EXT 0x8570
7469 #define GL_COMBINE_RGB_EXT 0x8571
7470 #define GL_COMBINE_ALPHA_EXT 0x8572
7471 #define GL_RGB_SCALE_EXT 0x8573
7472 #define GL_ADD_SIGNED_EXT 0x8574
7473 #define GL_INTERPOLATE_EXT 0x8575
7474 #define GL_CONSTANT_EXT 0x8576
7475 #define GL_PRIMARY_COLOR_EXT 0x8577
7476 #define GL_PREVIOUS_EXT 0x8578
7477 #define GL_SOURCE0_RGB_EXT 0x8580
7478 #define GL_SOURCE1_RGB_EXT 0x8581
7479 #define GL_SOURCE2_RGB_EXT 0x8582
7480 #define GL_SOURCE0_ALPHA_EXT 0x8588
7481 #define GL_SOURCE1_ALPHA_EXT 0x8589
7482 #define GL_SOURCE2_ALPHA_EXT 0x858A
7483 #define GL_OPERAND0_RGB_EXT 0x8590
7484 #define GL_OPERAND1_RGB_EXT 0x8591
7485 #define GL_OPERAND2_RGB_EXT 0x8592
7486 #define GL_OPERAND0_ALPHA_EXT 0x8598
7487 #define GL_OPERAND1_ALPHA_EXT 0x8599
7488 #define GL_OPERAND2_ALPHA_EXT 0x859A
7489 #endif /* GL_EXT_texture_env_combine */
7490
7491 #ifndef GL_EXT_texture_env_dot3
7492 #define GL_EXT_texture_env_dot3 1
7493 #define GL_DOT3_RGB_EXT 0x8740
7494 #define GL_DOT3_RGBA_EXT 0x8741
7495 #endif /* GL_EXT_texture_env_dot3 */
7496
7497 #ifndef GL_EXT_texture_filter_anisotropic
7498 #define GL_EXT_texture_filter_anisotropic 1
7499 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
7500 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
7501 #endif /* GL_EXT_texture_filter_anisotropic */
7502
7503 #ifndef GL_EXT_texture_integer
7504 #define GL_EXT_texture_integer 1
7505 #define GL_RGBA32UI_EXT 0x8D70
7506 #define GL_RGB32UI_EXT 0x8D71
7507 #define GL_ALPHA32UI_EXT 0x8D72
7508 #define GL_INTENSITY32UI_EXT 0x8D73
7509 #define GL_LUMINANCE32UI_EXT 0x8D74
7510 #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
7511 #define GL_RGBA16UI_EXT 0x8D76
7512 #define GL_RGB16UI_EXT 0x8D77
7513 #define GL_ALPHA16UI_EXT 0x8D78
7514 #define GL_INTENSITY16UI_EXT 0x8D79
7515 #define GL_LUMINANCE16UI_EXT 0x8D7A
7516 #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
7517 #define GL_RGBA8UI_EXT 0x8D7C
7518 #define GL_RGB8UI_EXT 0x8D7D
7519 #define GL_ALPHA8UI_EXT 0x8D7E
7520 #define GL_INTENSITY8UI_EXT 0x8D7F
7521 #define GL_LUMINANCE8UI_EXT 0x8D80
7522 #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
7523 #define GL_RGBA32I_EXT 0x8D82
7524 #define GL_RGB32I_EXT 0x8D83
7525 #define GL_ALPHA32I_EXT 0x8D84
7526 #define GL_INTENSITY32I_EXT 0x8D85
7527 #define GL_LUMINANCE32I_EXT 0x8D86
7528 #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
7529 #define GL_RGBA16I_EXT 0x8D88
7530 #define GL_RGB16I_EXT 0x8D89
7531 #define GL_ALPHA16I_EXT 0x8D8A
7532 #define GL_INTENSITY16I_EXT 0x8D8B
7533 #define GL_LUMINANCE16I_EXT 0x8D8C
7534 #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
7535 #define GL_RGBA8I_EXT 0x8D8E
7536 #define GL_RGB8I_EXT 0x8D8F
7537 #define GL_ALPHA8I_EXT 0x8D90
7538 #define GL_INTENSITY8I_EXT 0x8D91
7539 #define GL_LUMINANCE8I_EXT 0x8D92
7540 #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
7541 #define GL_RED_INTEGER_EXT 0x8D94
7542 #define GL_GREEN_INTEGER_EXT 0x8D95
7543 #define GL_BLUE_INTEGER_EXT 0x8D96
7544 #define GL_ALPHA_INTEGER_EXT 0x8D97
7545 #define GL_RGB_INTEGER_EXT 0x8D98
7546 #define GL_RGBA_INTEGER_EXT 0x8D99
7547 #define GL_BGR_INTEGER_EXT 0x8D9A
7548 #define GL_BGRA_INTEGER_EXT 0x8D9B
7549 #define GL_LUMINANCE_INTEGER_EXT 0x8D9C
7550 #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
7551 #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
7552 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7553 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
7554 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7555 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
7556 typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
7557 typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7558 #ifdef GL_GLEXT_PROTOTYPES
7559 GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
7560 GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
7561 GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
7562 GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
7563 GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
7564 GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7565 #endif
7566 #endif /* GL_EXT_texture_integer */
7567
7568 #ifndef GL_EXT_texture_lod_bias
7569 #define GL_EXT_texture_lod_bias 1
7570 #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
7571 #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
7572 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501
7573 #endif /* GL_EXT_texture_lod_bias */
7574
7575 #ifndef GL_EXT_texture_mirror_clamp
7576 #define GL_EXT_texture_mirror_clamp 1
7577 #define GL_MIRROR_CLAMP_EXT 0x8742
7578 #define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
7579 #define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
7580 #endif /* GL_EXT_texture_mirror_clamp */
7581
7582 #ifndef GL_EXT_texture_object
7583 #define GL_EXT_texture_object 1
7584 #define GL_TEXTURE_PRIORITY_EXT 0x8066
7585 #define GL_TEXTURE_RESIDENT_EXT 0x8067
7586 #define GL_TEXTURE_1D_BINDING_EXT 0x8068
7587 #define GL_TEXTURE_2D_BINDING_EXT 0x8069
7588 #define GL_TEXTURE_3D_BINDING_EXT 0x806A
7589 typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
7590 typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
7591 typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
7592 typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
7593 typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
7594 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7595 #ifdef GL_GLEXT_PROTOTYPES
7596 GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
7597 GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
7598 GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
7599 GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
7600 GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
7601 GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7602 #endif
7603 #endif /* GL_EXT_texture_object */
7604
7605 #ifndef GL_EXT_texture_perturb_normal
7606 #define GL_EXT_texture_perturb_normal 1
7607 #define GL_PERTURB_EXT 0x85AE
7608 #define GL_TEXTURE_NORMAL_EXT 0x85AF
7609 typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
7610 #ifdef GL_GLEXT_PROTOTYPES
7611 GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
7612 #endif
7613 #endif /* GL_EXT_texture_perturb_normal */
7614
7615 #ifndef GL_EXT_texture_sRGB
7616 #define GL_EXT_texture_sRGB 1
7617 #define GL_SRGB_EXT 0x8C40
7618 #define GL_SRGB8_EXT 0x8C41
7619 #define GL_SRGB_ALPHA_EXT 0x8C42
7620 #define GL_SRGB8_ALPHA8_EXT 0x8C43
7621 #define GL_SLUMINANCE_ALPHA_EXT 0x8C44
7622 #define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
7623 #define GL_SLUMINANCE_EXT 0x8C46
7624 #define GL_SLUMINANCE8_EXT 0x8C47
7625 #define GL_COMPRESSED_SRGB_EXT 0x8C48
7626 #define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
7627 #define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
7628 #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
7629 #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
7630 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
7631 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
7632 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
7633 #endif /* GL_EXT_texture_sRGB */
7634
7635 #ifndef GL_EXT_texture_sRGB_decode
7636 #define GL_EXT_texture_sRGB_decode 1
7637 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
7638 #define GL_DECODE_EXT 0x8A49
7639 #define GL_SKIP_DECODE_EXT 0x8A4A
7640 #endif /* GL_EXT_texture_sRGB_decode */
7641
7642 #ifndef GL_EXT_texture_shared_exponent
7643 #define GL_EXT_texture_shared_exponent 1
7644 #define GL_RGB9_E5_EXT 0x8C3D
7645 #define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
7646 #define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
7647 #endif /* GL_EXT_texture_shared_exponent */
7648
7649 #ifndef GL_EXT_texture_snorm
7650 #define GL_EXT_texture_snorm 1
7651 #define GL_ALPHA_SNORM 0x9010
7652 #define GL_LUMINANCE_SNORM 0x9011
7653 #define GL_LUMINANCE_ALPHA_SNORM 0x9012
7654 #define GL_INTENSITY_SNORM 0x9013
7655 #define GL_ALPHA8_SNORM 0x9014
7656 #define GL_LUMINANCE8_SNORM 0x9015
7657 #define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
7658 #define GL_INTENSITY8_SNORM 0x9017
7659 #define GL_ALPHA16_SNORM 0x9018
7660 #define GL_LUMINANCE16_SNORM 0x9019
7661 #define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
7662 #define GL_INTENSITY16_SNORM 0x901B
7663 #define GL_RED_SNORM 0x8F90
7664 #define GL_RG_SNORM 0x8F91
7665 #define GL_RGB_SNORM 0x8F92
7666 #define GL_RGBA_SNORM 0x8F93
7667 #endif /* GL_EXT_texture_snorm */
7668
7669 #ifndef GL_EXT_texture_swizzle
7670 #define GL_EXT_texture_swizzle 1
7671 #define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
7672 #define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
7673 #define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
7674 #define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
7675 #define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
7676 #endif /* GL_EXT_texture_swizzle */
7677
7678 #ifndef GL_EXT_timer_query
7679 #define GL_EXT_timer_query 1
7680 #define GL_TIME_ELAPSED_EXT 0x88BF
7681 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
7682 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
7683 #ifdef GL_GLEXT_PROTOTYPES
7684 GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
7685 GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
7686 #endif
7687 #endif /* GL_EXT_timer_query */
7688
7689 #ifndef GL_EXT_transform_feedback
7690 #define GL_EXT_transform_feedback 1
7691 #define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
7692 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
7693 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
7694 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
7695 #define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
7696 #define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
7697 #define GL_PRIMITIVES_GENERATED_EXT 0x8C87
7698 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
7699 #define GL_RASTERIZER_DISCARD_EXT 0x8C89
7700 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
7701 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
7702 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
7703 #define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
7704 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
7705 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
7706 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
7707 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
7708 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7709 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7710 typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
7711 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7712 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7713 #ifdef GL_GLEXT_PROTOTYPES
7714 GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
7715 GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
7716 GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7717 GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7718 GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
7719 GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7720 GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7721 #endif
7722 #endif /* GL_EXT_transform_feedback */
7723
7724 #ifndef GL_EXT_vertex_array
7725 #define GL_EXT_vertex_array 1
7726 #define GL_VERTEX_ARRAY_EXT 0x8074
7727 #define GL_NORMAL_ARRAY_EXT 0x8075
7728 #define GL_COLOR_ARRAY_EXT 0x8076
7729 #define GL_INDEX_ARRAY_EXT 0x8077
7730 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
7731 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079
7732 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
7733 #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
7734 #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
7735 #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
7736 #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
7737 #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
7738 #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
7739 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081
7740 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082
7741 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
7742 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084
7743 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085
7744 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
7745 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087
7746 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
7747 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
7748 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
7749 #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
7750 #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
7751 #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
7752 #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
7753 #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
7754 #define GL_COLOR_ARRAY_POINTER_EXT 0x8090
7755 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091
7756 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
7757 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
7758 typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
7759 typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7760 typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
7761 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
7762 typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
7763 typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7764 typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7765 typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7766 typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7767 #ifdef GL_GLEXT_PROTOTYPES
7768 GLAPI void APIENTRY glArrayElementEXT (GLint i);
7769 GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7770 GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
7771 GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
7772 GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
7773 GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7774 GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7775 GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7776 GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7777 #endif
7778 #endif /* GL_EXT_vertex_array */
7779
7780 #ifndef GL_EXT_vertex_array_bgra
7781 #define GL_EXT_vertex_array_bgra 1
7782 #endif /* GL_EXT_vertex_array_bgra */
7783
7784 #ifndef GL_EXT_vertex_attrib_64bit
7785 #define GL_EXT_vertex_attrib_64bit 1
7786 #define GL_DOUBLE_VEC2_EXT 0x8FFC
7787 #define GL_DOUBLE_VEC3_EXT 0x8FFD
7788 #define GL_DOUBLE_VEC4_EXT 0x8FFE
7789 #define GL_DOUBLE_MAT2_EXT 0x8F46
7790 #define GL_DOUBLE_MAT3_EXT 0x8F47
7791 #define GL_DOUBLE_MAT4_EXT 0x8F48
7792 #define GL_DOUBLE_MAT2x3_EXT 0x8F49
7793 #define GL_DOUBLE_MAT2x4_EXT 0x8F4A
7794 #define GL_DOUBLE_MAT3x2_EXT 0x8F4B
7795 #define GL_DOUBLE_MAT3x4_EXT 0x8F4C
7796 #define GL_DOUBLE_MAT4x2_EXT 0x8F4D
7797 #define GL_DOUBLE_MAT4x3_EXT 0x8F4E
7798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
7799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
7800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
7803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
7804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
7805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
7806 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7807 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
7808 #ifdef GL_GLEXT_PROTOTYPES
7809 GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
7810 GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
7811 GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7812 GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7813 GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
7814 GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
7815 GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
7816 GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
7817 GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7818 GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
7819 #endif
7820 #endif /* GL_EXT_vertex_attrib_64bit */
7821
7822 #ifndef GL_EXT_vertex_shader
7823 #define GL_EXT_vertex_shader 1
7824 #define GL_VERTEX_SHADER_EXT 0x8780
7825 #define GL_VERTEX_SHADER_BINDING_EXT 0x8781
7826 #define GL_OP_INDEX_EXT 0x8782
7827 #define GL_OP_NEGATE_EXT 0x8783
7828 #define GL_OP_DOT3_EXT 0x8784
7829 #define GL_OP_DOT4_EXT 0x8785
7830 #define GL_OP_MUL_EXT 0x8786
7831 #define GL_OP_ADD_EXT 0x8787
7832 #define GL_OP_MADD_EXT 0x8788
7833 #define GL_OP_FRAC_EXT 0x8789
7834 #define GL_OP_MAX_EXT 0x878A
7835 #define GL_OP_MIN_EXT 0x878B
7836 #define GL_OP_SET_GE_EXT 0x878C
7837 #define GL_OP_SET_LT_EXT 0x878D
7838 #define GL_OP_CLAMP_EXT 0x878E
7839 #define GL_OP_FLOOR_EXT 0x878F
7840 #define GL_OP_ROUND_EXT 0x8790
7841 #define GL_OP_EXP_BASE_2_EXT 0x8791
7842 #define GL_OP_LOG_BASE_2_EXT 0x8792
7843 #define GL_OP_POWER_EXT 0x8793
7844 #define GL_OP_RECIP_EXT 0x8794
7845 #define GL_OP_RECIP_SQRT_EXT 0x8795
7846 #define GL_OP_SUB_EXT 0x8796
7847 #define GL_OP_CROSS_PRODUCT_EXT 0x8797
7848 #define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
7849 #define GL_OP_MOV_EXT 0x8799
7850 #define GL_OUTPUT_VERTEX_EXT 0x879A
7851 #define GL_OUTPUT_COLOR0_EXT 0x879B
7852 #define GL_OUTPUT_COLOR1_EXT 0x879C
7853 #define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
7854 #define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
7855 #define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
7856 #define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
7857 #define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
7858 #define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
7859 #define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
7860 #define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
7861 #define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
7862 #define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
7863 #define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
7864 #define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
7865 #define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
7866 #define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
7867 #define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
7868 #define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
7869 #define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
7870 #define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
7871 #define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
7872 #define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
7873 #define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
7874 #define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
7875 #define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
7876 #define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
7877 #define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
7878 #define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
7879 #define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
7880 #define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
7881 #define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
7882 #define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
7883 #define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
7884 #define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
7885 #define GL_OUTPUT_FOG_EXT 0x87BD
7886 #define GL_SCALAR_EXT 0x87BE
7887 #define GL_VECTOR_EXT 0x87BF
7888 #define GL_MATRIX_EXT 0x87C0
7889 #define GL_VARIANT_EXT 0x87C1
7890 #define GL_INVARIANT_EXT 0x87C2
7891 #define GL_LOCAL_CONSTANT_EXT 0x87C3
7892 #define GL_LOCAL_EXT 0x87C4
7893 #define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
7894 #define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
7895 #define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
7896 #define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
7897 #define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
7898 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
7899 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
7900 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
7901 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
7902 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
7903 #define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
7904 #define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
7905 #define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
7906 #define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
7907 #define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
7908 #define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
7909 #define GL_X_EXT 0x87D5
7910 #define GL_Y_EXT 0x87D6
7911 #define GL_Z_EXT 0x87D7
7912 #define GL_W_EXT 0x87D8
7913 #define GL_NEGATIVE_X_EXT 0x87D9
7914 #define GL_NEGATIVE_Y_EXT 0x87DA
7915 #define GL_NEGATIVE_Z_EXT 0x87DB
7916 #define GL_NEGATIVE_W_EXT 0x87DC
7917 #define GL_ZERO_EXT 0x87DD
7918 #define GL_ONE_EXT 0x87DE
7919 #define GL_NEGATIVE_ONE_EXT 0x87DF
7920 #define GL_NORMALIZED_RANGE_EXT 0x87E0
7921 #define GL_FULL_RANGE_EXT 0x87E1
7922 #define GL_CURRENT_VERTEX_EXT 0x87E2
7923 #define GL_MVP_MATRIX_EXT 0x87E3
7924 #define GL_VARIANT_VALUE_EXT 0x87E4
7925 #define GL_VARIANT_DATATYPE_EXT 0x87E5
7926 #define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
7927 #define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
7928 #define GL_VARIANT_ARRAY_EXT 0x87E8
7929 #define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
7930 #define GL_INVARIANT_VALUE_EXT 0x87EA
7931 #define GL_INVARIANT_DATATYPE_EXT 0x87EB
7932 #define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
7933 #define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
7934 typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
7935 typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
7936 typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
7937 typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
7938 typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
7939 typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
7940 typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7941 typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7942 typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7943 typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7944 typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7945 typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7946 typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7947 typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7948 typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7949 typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
7950 typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
7951 typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
7952 typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
7953 typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
7954 typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
7955 typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
7956 typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
7957 typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
7958 typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7959 typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7960 typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
7961 typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
7962 typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
7963 typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
7964 typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
7965 typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
7966 typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7967 typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7968 typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7969 typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
7970 typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7971 typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7972 typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7973 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7974 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7975 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7976 #ifdef GL_GLEXT_PROTOTYPES
7977 GLAPI void APIENTRY glBeginVertexShaderEXT (void);
7978 GLAPI void APIENTRY glEndVertexShaderEXT (void);
7979 GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
7980 GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
7981 GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
7982 GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
7983 GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7984 GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7985 GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7986 GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7987 GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
7988 GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
7989 GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7990 GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
7991 GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
7992 GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
7993 GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
7994 GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
7995 GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
7996 GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
7997 GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
7998 GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
7999 GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
8000 GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
8001 GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
8002 GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
8003 GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
8004 GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
8005 GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
8006 GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
8007 GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
8008 GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
8009 GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8010 GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8011 GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8012 GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
8013 GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8014 GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8015 GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8016 GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8017 GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
8018 GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8019 #endif
8020 #endif /* GL_EXT_vertex_shader */
8021
8022 #ifndef GL_EXT_vertex_weighting
8023 #define GL_EXT_vertex_weighting 1
8024 #define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
8025 #define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
8026 #define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
8027 #define GL_MODELVIEW1_MATRIX_EXT 0x8506
8028 #define GL_VERTEX_WEIGHTING_EXT 0x8509
8029 #define GL_MODELVIEW0_EXT 0x1700
8030 #define GL_MODELVIEW1_EXT 0x850A
8031 #define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
8032 #define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
8033 #define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
8034 #define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
8035 #define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
8036 #define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
8037 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
8038 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
8039 typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
8040 #ifdef GL_GLEXT_PROTOTYPES
8041 GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
8042 GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
8043 GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
8044 #endif
8045 #endif /* GL_EXT_vertex_weighting */
8046
8047 #ifndef GL_EXT_x11_sync_object
8048 #define GL_EXT_x11_sync_object 1
8049 #define GL_SYNC_X11_FENCE_EXT 0x90E1
8050 typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8051 #ifdef GL_GLEXT_PROTOTYPES
8052 GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8053 #endif
8054 #endif /* GL_EXT_x11_sync_object */
8055
8056 #ifndef GL_GREMEDY_frame_terminator
8057 #define GL_GREMEDY_frame_terminator 1
8058 typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
8059 #ifdef GL_GLEXT_PROTOTYPES
8060 GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
8061 #endif
8062 #endif /* GL_GREMEDY_frame_terminator */
8063
8064 #ifndef GL_GREMEDY_string_marker
8065 #define GL_GREMEDY_string_marker 1
8066 typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
8067 #ifdef GL_GLEXT_PROTOTYPES
8068 GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
8069 #endif
8070 #endif /* GL_GREMEDY_string_marker */
8071
8072 #ifndef GL_HP_convolution_border_modes
8073 #define GL_HP_convolution_border_modes 1
8074 #define GL_IGNORE_BORDER_HP 0x8150
8075 #define GL_CONSTANT_BORDER_HP 0x8151
8076 #define GL_REPLICATE_BORDER_HP 0x8153
8077 #define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
8078 #endif /* GL_HP_convolution_border_modes */
8079
8080 #ifndef GL_HP_image_transform
8081 #define GL_HP_image_transform 1
8082 #define GL_IMAGE_SCALE_X_HP 0x8155
8083 #define GL_IMAGE_SCALE_Y_HP 0x8156
8084 #define GL_IMAGE_TRANSLATE_X_HP 0x8157
8085 #define GL_IMAGE_TRANSLATE_Y_HP 0x8158
8086 #define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
8087 #define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
8088 #define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
8089 #define GL_IMAGE_MAG_FILTER_HP 0x815C
8090 #define GL_IMAGE_MIN_FILTER_HP 0x815D
8091 #define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
8092 #define GL_CUBIC_HP 0x815F
8093 #define GL_AVERAGE_HP 0x8160
8094 #define GL_IMAGE_TRANSFORM_2D_HP 0x8161
8095 #define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
8096 #define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
8097 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
8098 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
8099 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
8100 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
8101 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
8102 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
8103 #ifdef GL_GLEXT_PROTOTYPES
8104 GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
8105 GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
8106 GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
8107 GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
8108 GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
8109 GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
8110 #endif
8111 #endif /* GL_HP_image_transform */
8112
8113 #ifndef GL_HP_occlusion_test
8114 #define GL_HP_occlusion_test 1
8115 #define GL_OCCLUSION_TEST_HP 0x8165
8116 #define GL_OCCLUSION_TEST_RESULT_HP 0x8166
8117 #endif /* GL_HP_occlusion_test */
8118
8119 #ifndef GL_HP_texture_lighting
8120 #define GL_HP_texture_lighting 1
8121 #define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
8122 #define GL_TEXTURE_POST_SPECULAR_HP 0x8168
8123 #define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
8124 #endif /* GL_HP_texture_lighting */
8125
8126 #ifndef GL_IBM_cull_vertex
8127 #define GL_IBM_cull_vertex 1
8128 #define GL_CULL_VERTEX_IBM 103050
8129 #endif /* GL_IBM_cull_vertex */
8130
8131 #ifndef GL_IBM_multimode_draw_arrays
8132 #define GL_IBM_multimode_draw_arrays 1
8133 typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8134 typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8135 #ifdef GL_GLEXT_PROTOTYPES
8136 GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8137 GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8138 #endif
8139 #endif /* GL_IBM_multimode_draw_arrays */
8140
8141 #ifndef GL_IBM_rasterpos_clip
8142 #define GL_IBM_rasterpos_clip 1
8143 #define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
8144 #endif /* GL_IBM_rasterpos_clip */
8145
8146 #ifndef GL_IBM_static_data
8147 #define GL_IBM_static_data 1
8148 #define GL_ALL_STATIC_DATA_IBM 103060
8149 #define GL_STATIC_VERTEX_ARRAY_IBM 103061
8150 typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
8151 #ifdef GL_GLEXT_PROTOTYPES
8152 GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
8153 #endif
8154 #endif /* GL_IBM_static_data */
8155
8156 #ifndef GL_IBM_texture_mirrored_repeat
8157 #define GL_IBM_texture_mirrored_repeat 1
8158 #define GL_MIRRORED_REPEAT_IBM 0x8370
8159 #endif /* GL_IBM_texture_mirrored_repeat */
8160
8161 #ifndef GL_IBM_vertex_array_lists
8162 #define GL_IBM_vertex_array_lists 1
8163 #define GL_VERTEX_ARRAY_LIST_IBM 103070
8164 #define GL_NORMAL_ARRAY_LIST_IBM 103071
8165 #define GL_COLOR_ARRAY_LIST_IBM 103072
8166 #define GL_INDEX_ARRAY_LIST_IBM 103073
8167 #define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
8168 #define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
8169 #define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
8170 #define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
8171 #define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
8172 #define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
8173 #define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
8174 #define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
8175 #define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
8176 #define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
8177 #define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
8178 #define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
8179 typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8180 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8181 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
8182 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8183 typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8184 typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8185 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8186 typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8187 #ifdef GL_GLEXT_PROTOTYPES
8188 GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8189 GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8190 GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
8191 GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8192 GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8193 GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8194 GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8195 GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8196 #endif
8197 #endif /* GL_IBM_vertex_array_lists */
8198
8199 #ifndef GL_INGR_blend_func_separate
8200 #define GL_INGR_blend_func_separate 1
8201 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8202 #ifdef GL_GLEXT_PROTOTYPES
8203 GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8204 #endif
8205 #endif /* GL_INGR_blend_func_separate */
8206
8207 #ifndef GL_INGR_color_clamp
8208 #define GL_INGR_color_clamp 1
8209 #define GL_RED_MIN_CLAMP_INGR 0x8560
8210 #define GL_GREEN_MIN_CLAMP_INGR 0x8561
8211 #define GL_BLUE_MIN_CLAMP_INGR 0x8562
8212 #define GL_ALPHA_MIN_CLAMP_INGR 0x8563
8213 #define GL_RED_MAX_CLAMP_INGR 0x8564
8214 #define GL_GREEN_MAX_CLAMP_INGR 0x8565
8215 #define GL_BLUE_MAX_CLAMP_INGR 0x8566
8216 #define GL_ALPHA_MAX_CLAMP_INGR 0x8567
8217 #endif /* GL_INGR_color_clamp */
8218
8219 #ifndef GL_INGR_interlace_read
8220 #define GL_INGR_interlace_read 1
8221 #define GL_INTERLACE_READ_INGR 0x8568
8222 #endif /* GL_INGR_interlace_read */
8223
8224 #ifndef GL_INTEL_fragment_shader_ordering
8225 #define GL_INTEL_fragment_shader_ordering 1
8226 #endif /* GL_INTEL_fragment_shader_ordering */
8227
8228 #ifndef GL_INTEL_map_texture
8229 #define GL_INTEL_map_texture 1
8230 #define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
8231 #define GL_LAYOUT_DEFAULT_INTEL 0
8232 #define GL_LAYOUT_LINEAR_INTEL 1
8233 #define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
8234 typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
8235 typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
8236 typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8237 #ifdef GL_GLEXT_PROTOTYPES
8238 GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
8239 GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
8240 GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8241 #endif
8242 #endif /* GL_INTEL_map_texture */
8243
8244 #ifndef GL_INTEL_parallel_arrays
8245 #define GL_INTEL_parallel_arrays 1
8246 #define GL_PARALLEL_ARRAYS_INTEL 0x83F4
8247 #define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
8248 #define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
8249 #define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
8250 #define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
8251 typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8252 typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
8253 typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8254 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8255 #ifdef GL_GLEXT_PROTOTYPES
8256 GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
8257 GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
8258 GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
8259 GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
8260 #endif
8261 #endif /* GL_INTEL_parallel_arrays */
8262
8263 #ifndef GL_INTEL_performance_query
8264 #define GL_INTEL_performance_query 1
8265 #define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
8266 #define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
8267 #define GL_PERFQUERY_WAIT_INTEL 0x83FB
8268 #define GL_PERFQUERY_FLUSH_INTEL 0x83FA
8269 #define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
8270 #define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
8271 #define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
8272 #define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
8273 #define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
8274 #define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
8275 #define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
8276 #define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
8277 #define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
8278 #define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
8279 #define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
8280 #define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
8281 #define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
8282 #define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
8283 #define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
8284 #define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
8285 typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
8286 typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
8287 typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
8288 typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
8289 typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
8290 typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
8291 typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8292 typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8293 typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
8294 typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8295 #ifdef GL_GLEXT_PROTOTYPES
8296 GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
8297 GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
8298 GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
8299 GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
8300 GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
8301 GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
8302 GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8303 GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8304 GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
8305 GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8306 #endif
8307 #endif /* GL_INTEL_performance_query */
8308
8309 #ifndef GL_MESAX_texture_stack
8310 #define GL_MESAX_texture_stack 1
8311 #define GL_TEXTURE_1D_STACK_MESAX 0x8759
8312 #define GL_TEXTURE_2D_STACK_MESAX 0x875A
8313 #define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
8314 #define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
8315 #define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
8316 #define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
8317 #endif /* GL_MESAX_texture_stack */
8318
8319 #ifndef GL_MESA_pack_invert
8320 #define GL_MESA_pack_invert 1
8321 #define GL_PACK_INVERT_MESA 0x8758
8322 #endif /* GL_MESA_pack_invert */
8323
8324 #ifndef GL_MESA_resize_buffers
8325 #define GL_MESA_resize_buffers 1
8326 typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
8327 #ifdef GL_GLEXT_PROTOTYPES
8328 GLAPI void APIENTRY glResizeBuffersMESA (void);
8329 #endif
8330 #endif /* GL_MESA_resize_buffers */
8331
8332 #ifndef GL_MESA_window_pos
8333 #define GL_MESA_window_pos 1
8334 typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
8335 typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
8336 typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
8337 typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
8338 typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
8339 typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
8340 typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
8341 typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
8342 typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
8343 typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
8344 typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
8345 typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
8346 typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
8347 typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
8348 typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
8349 typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
8350 typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8351 typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
8352 typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8353 typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
8354 typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
8355 typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
8356 typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
8357 typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
8358 #ifdef GL_GLEXT_PROTOTYPES
8359 GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
8360 GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
8361 GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
8362 GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
8363 GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
8364 GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
8365 GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
8366 GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
8367 GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
8368 GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
8369 GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
8370 GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
8371 GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
8372 GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
8373 GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
8374 GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
8375 GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8376 GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
8377 GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8378 GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
8379 GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
8380 GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
8381 GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
8382 GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
8383 #endif
8384 #endif /* GL_MESA_window_pos */
8385
8386 #ifndef GL_MESA_ycbcr_texture
8387 #define GL_MESA_ycbcr_texture 1
8388 #define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
8389 #define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
8390 #define GL_YCBCR_MESA 0x8757
8391 #endif /* GL_MESA_ycbcr_texture */
8392
8393 #ifndef GL_NVX_conditional_render
8394 #define GL_NVX_conditional_render 1
8395 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
8396 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
8397 #ifdef GL_GLEXT_PROTOTYPES
8398 GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
8399 GLAPI void APIENTRY glEndConditionalRenderNVX (void);
8400 #endif
8401 #endif /* GL_NVX_conditional_render */
8402
8403 #ifndef GL_NVX_gpu_memory_info
8404 #define GL_NVX_gpu_memory_info 1
8405 #define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
8406 #define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
8407 #define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
8408 #define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
8409 #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
8410 #endif /* GL_NVX_gpu_memory_info */
8411
8412 #ifndef GL_NV_bindless_multi_draw_indirect
8413 #define GL_NV_bindless_multi_draw_indirect 1
8414 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8415 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8416 #ifdef GL_GLEXT_PROTOTYPES
8417 GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8418 GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8419 #endif
8420 #endif /* GL_NV_bindless_multi_draw_indirect */
8421
8422 #ifndef GL_NV_bindless_texture
8423 #define GL_NV_bindless_texture 1
8424 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
8425 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
8426 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8427 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8428 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8429 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
8430 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8431 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
8432 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
8433 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
8434 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8435 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8436 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
8437 #ifdef GL_GLEXT_PROTOTYPES
8438 GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
8439 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
8440 GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
8441 GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
8442 GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8443 GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
8444 GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
8445 GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
8446 GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
8447 GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
8448 GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8449 GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
8450 GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
8451 #endif
8452 #endif /* GL_NV_bindless_texture */
8453
8454 #ifndef GL_NV_blend_equation_advanced
8455 #define GL_NV_blend_equation_advanced 1
8456 #define GL_BLEND_OVERLAP_NV 0x9281
8457 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
8458 #define GL_BLUE_NV 0x1905
8459 #define GL_COLORBURN_NV 0x929A
8460 #define GL_COLORDODGE_NV 0x9299
8461 #define GL_CONJOINT_NV 0x9284
8462 #define GL_CONTRAST_NV 0x92A1
8463 #define GL_DARKEN_NV 0x9297
8464 #define GL_DIFFERENCE_NV 0x929E
8465 #define GL_DISJOINT_NV 0x9283
8466 #define GL_DST_ATOP_NV 0x928F
8467 #define GL_DST_IN_NV 0x928B
8468 #define GL_DST_NV 0x9287
8469 #define GL_DST_OUT_NV 0x928D
8470 #define GL_DST_OVER_NV 0x9289
8471 #define GL_EXCLUSION_NV 0x92A0
8472 #define GL_GREEN_NV 0x1904
8473 #define GL_HARDLIGHT_NV 0x929B
8474 #define GL_HARDMIX_NV 0x92A9
8475 #define GL_HSL_COLOR_NV 0x92AF
8476 #define GL_HSL_HUE_NV 0x92AD
8477 #define GL_HSL_LUMINOSITY_NV 0x92B0
8478 #define GL_HSL_SATURATION_NV 0x92AE
8479 #define GL_INVERT_OVG_NV 0x92B4
8480 #define GL_INVERT_RGB_NV 0x92A3
8481 #define GL_LIGHTEN_NV 0x9298
8482 #define GL_LINEARBURN_NV 0x92A5
8483 #define GL_LINEARDODGE_NV 0x92A4
8484 #define GL_LINEARLIGHT_NV 0x92A7
8485 #define GL_MINUS_CLAMPED_NV 0x92B3
8486 #define GL_MINUS_NV 0x929F
8487 #define GL_MULTIPLY_NV 0x9294
8488 #define GL_OVERLAY_NV 0x9296
8489 #define GL_PINLIGHT_NV 0x92A8
8490 #define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
8491 #define GL_PLUS_CLAMPED_NV 0x92B1
8492 #define GL_PLUS_DARKER_NV 0x9292
8493 #define GL_PLUS_NV 0x9291
8494 #define GL_RED_NV 0x1903
8495 #define GL_SCREEN_NV 0x9295
8496 #define GL_SOFTLIGHT_NV 0x929C
8497 #define GL_SRC_ATOP_NV 0x928E
8498 #define GL_SRC_IN_NV 0x928A
8499 #define GL_SRC_NV 0x9286
8500 #define GL_SRC_OUT_NV 0x928C
8501 #define GL_SRC_OVER_NV 0x9288
8502 #define GL_UNCORRELATED_NV 0x9282
8503 #define GL_VIVIDLIGHT_NV 0x92A6
8504 #define GL_XOR_NV 0x1506
8505 typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
8506 typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
8507 #ifdef GL_GLEXT_PROTOTYPES
8508 GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
8509 GLAPI void APIENTRY glBlendBarrierNV (void);
8510 #endif
8511 #endif /* GL_NV_blend_equation_advanced */
8512
8513 #ifndef GL_NV_blend_equation_advanced_coherent
8514 #define GL_NV_blend_equation_advanced_coherent 1
8515 #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
8516 #endif /* GL_NV_blend_equation_advanced_coherent */
8517
8518 #ifndef GL_NV_blend_square
8519 #define GL_NV_blend_square 1
8520 #endif /* GL_NV_blend_square */
8521
8522 #ifndef GL_NV_compute_program5
8523 #define GL_NV_compute_program5 1
8524 #define GL_COMPUTE_PROGRAM_NV 0x90FB
8525 #define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
8526 #endif /* GL_NV_compute_program5 */
8527
8528 #ifndef GL_NV_conditional_render
8529 #define GL_NV_conditional_render 1
8530 #define GL_QUERY_WAIT_NV 0x8E13
8531 #define GL_QUERY_NO_WAIT_NV 0x8E14
8532 #define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
8533 #define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
8534 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
8535 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
8536 #ifdef GL_GLEXT_PROTOTYPES
8537 GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
8538 GLAPI void APIENTRY glEndConditionalRenderNV (void);
8539 #endif
8540 #endif /* GL_NV_conditional_render */
8541
8542 #ifndef GL_NV_copy_depth_to_color
8543 #define GL_NV_copy_depth_to_color 1
8544 #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
8545 #define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
8546 #endif /* GL_NV_copy_depth_to_color */
8547
8548 #ifndef GL_NV_copy_image
8549 #define GL_NV_copy_image 1
8550 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8551 #ifdef GL_GLEXT_PROTOTYPES
8552 GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8553 #endif
8554 #endif /* GL_NV_copy_image */
8555
8556 #ifndef GL_NV_deep_texture3D
8557 #define GL_NV_deep_texture3D 1
8558 #define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
8559 #define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
8560 #endif /* GL_NV_deep_texture3D */
8561
8562 #ifndef GL_NV_depth_buffer_float
8563 #define GL_NV_depth_buffer_float 1
8564 #define GL_DEPTH_COMPONENT32F_NV 0x8DAB
8565 #define GL_DEPTH32F_STENCIL8_NV 0x8DAC
8566 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
8567 #define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
8568 typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
8569 typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
8570 typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
8571 #ifdef GL_GLEXT_PROTOTYPES
8572 GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
8573 GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
8574 GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
8575 #endif
8576 #endif /* GL_NV_depth_buffer_float */
8577
8578 #ifndef GL_NV_depth_clamp
8579 #define GL_NV_depth_clamp 1
8580 #define GL_DEPTH_CLAMP_NV 0x864F
8581 #endif /* GL_NV_depth_clamp */
8582
8583 #ifndef GL_NV_draw_texture
8584 #define GL_NV_draw_texture 1
8585 typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8586 #ifdef GL_GLEXT_PROTOTYPES
8587 GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8588 #endif
8589 #endif /* GL_NV_draw_texture */
8590
8591 #ifndef GL_NV_evaluators
8592 #define GL_NV_evaluators 1
8593 #define GL_EVAL_2D_NV 0x86C0
8594 #define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
8595 #define GL_MAP_TESSELLATION_NV 0x86C2
8596 #define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
8597 #define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
8598 #define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
8599 #define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
8600 #define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
8601 #define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
8602 #define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
8603 #define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
8604 #define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
8605 #define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
8606 #define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
8607 #define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
8608 #define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
8609 #define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
8610 #define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
8611 #define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
8612 #define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
8613 #define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
8614 #define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
8615 #define GL_MAX_MAP_TESSELLATION_NV 0x86D6
8616 #define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
8617 typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8618 typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
8619 typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
8620 typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8621 typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
8622 typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
8623 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
8624 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8625 typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
8626 #ifdef GL_GLEXT_PROTOTYPES
8627 GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8628 GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
8629 GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
8630 GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8631 GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
8632 GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
8633 GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
8634 GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8635 GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
8636 #endif
8637 #endif /* GL_NV_evaluators */
8638
8639 #ifndef GL_NV_explicit_multisample
8640 #define GL_NV_explicit_multisample 1
8641 #define GL_SAMPLE_POSITION_NV 0x8E50
8642 #define GL_SAMPLE_MASK_NV 0x8E51
8643 #define GL_SAMPLE_MASK_VALUE_NV 0x8E52
8644 #define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
8645 #define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
8646 #define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
8647 #define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
8648 #define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
8649 #define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
8650 #define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
8651 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
8652 typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
8653 typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
8654 #ifdef GL_GLEXT_PROTOTYPES
8655 GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
8656 GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
8657 GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
8658 #endif
8659 #endif /* GL_NV_explicit_multisample */
8660
8661 #ifndef GL_NV_fence
8662 #define GL_NV_fence 1
8663 #define GL_ALL_COMPLETED_NV 0x84F2
8664 #define GL_FENCE_STATUS_NV 0x84F3
8665 #define GL_FENCE_CONDITION_NV 0x84F4
8666 typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
8667 typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
8668 typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
8669 typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
8670 typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
8671 typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
8672 typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
8673 #ifdef GL_GLEXT_PROTOTYPES
8674 GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
8675 GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
8676 GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
8677 GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
8678 GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
8679 GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
8680 GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
8681 #endif
8682 #endif /* GL_NV_fence */
8683
8684 #ifndef GL_NV_float_buffer
8685 #define GL_NV_float_buffer 1
8686 #define GL_FLOAT_R_NV 0x8880
8687 #define GL_FLOAT_RG_NV 0x8881
8688 #define GL_FLOAT_RGB_NV 0x8882
8689 #define GL_FLOAT_RGBA_NV 0x8883
8690 #define GL_FLOAT_R16_NV 0x8884
8691 #define GL_FLOAT_R32_NV 0x8885
8692 #define GL_FLOAT_RG16_NV 0x8886
8693 #define GL_FLOAT_RG32_NV 0x8887
8694 #define GL_FLOAT_RGB16_NV 0x8888
8695 #define GL_FLOAT_RGB32_NV 0x8889
8696 #define GL_FLOAT_RGBA16_NV 0x888A
8697 #define GL_FLOAT_RGBA32_NV 0x888B
8698 #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
8699 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
8700 #define GL_FLOAT_RGBA_MODE_NV 0x888E
8701 #endif /* GL_NV_float_buffer */
8702
8703 #ifndef GL_NV_fog_distance
8704 #define GL_NV_fog_distance 1
8705 #define GL_FOG_DISTANCE_MODE_NV 0x855A
8706 #define GL_EYE_RADIAL_NV 0x855B
8707 #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
8708 #endif /* GL_NV_fog_distance */
8709
8710 #ifndef GL_NV_fragment_program
8711 #define GL_NV_fragment_program 1
8712 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
8713 #define GL_FRAGMENT_PROGRAM_NV 0x8870
8714 #define GL_MAX_TEXTURE_COORDS_NV 0x8871
8715 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
8716 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
8717 #define GL_PROGRAM_ERROR_STRING_NV 0x8874
8718 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8719 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8720 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8721 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8722 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8723 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8724 #ifdef GL_GLEXT_PROTOTYPES
8725 GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8726 GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8727 GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8728 GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8729 GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8730 GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8731 #endif
8732 #endif /* GL_NV_fragment_program */
8733
8734 #ifndef GL_NV_fragment_program2
8735 #define GL_NV_fragment_program2 1
8736 #define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
8737 #define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
8738 #define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
8739 #define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
8740 #define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
8741 #endif /* GL_NV_fragment_program2 */
8742
8743 #ifndef GL_NV_fragment_program4
8744 #define GL_NV_fragment_program4 1
8745 #endif /* GL_NV_fragment_program4 */
8746
8747 #ifndef GL_NV_fragment_program_option
8748 #define GL_NV_fragment_program_option 1
8749 #endif /* GL_NV_fragment_program_option */
8750
8751 #ifndef GL_NV_framebuffer_multisample_coverage
8752 #define GL_NV_framebuffer_multisample_coverage 1
8753 #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
8754 #define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
8755 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
8756 #define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
8757 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8758 #ifdef GL_GLEXT_PROTOTYPES
8759 GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8760 #endif
8761 #endif /* GL_NV_framebuffer_multisample_coverage */
8762
8763 #ifndef GL_NV_geometry_program4
8764 #define GL_NV_geometry_program4 1
8765 #define GL_GEOMETRY_PROGRAM_NV 0x8C26
8766 #define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
8767 #define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
8768 typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
8769 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
8770 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8771 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8772 #ifdef GL_GLEXT_PROTOTYPES
8773 GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
8774 GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
8775 GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8776 GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8777 #endif
8778 #endif /* GL_NV_geometry_program4 */
8779
8780 #ifndef GL_NV_geometry_shader4
8781 #define GL_NV_geometry_shader4 1
8782 #endif /* GL_NV_geometry_shader4 */
8783
8784 #ifndef GL_NV_gpu_program4
8785 #define GL_NV_gpu_program4 1
8786 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
8787 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
8788 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
8789 #define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
8790 #define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
8791 #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
8792 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
8793 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
8794 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8795 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8796 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8797 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8798 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8799 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8800 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8801 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8802 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8803 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8804 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8805 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8806 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8807 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8808 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8809 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8810 #ifdef GL_GLEXT_PROTOTYPES
8811 GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8812 GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8813 GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8814 GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8815 GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8816 GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8817 GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8818 GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8819 GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8820 GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8821 GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8822 GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8823 GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
8824 GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8825 GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
8826 GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8827 #endif
8828 #endif /* GL_NV_gpu_program4 */
8829
8830 #ifndef GL_NV_gpu_program5
8831 #define GL_NV_gpu_program5 1
8832 #define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
8833 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
8834 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
8835 #define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
8836 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
8837 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
8838 #define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
8839 #define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45
8840 typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
8841 typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
8842 #ifdef GL_GLEXT_PROTOTYPES
8843 GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
8844 GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
8845 #endif
8846 #endif /* GL_NV_gpu_program5 */
8847
8848 #ifndef GL_NV_gpu_program5_mem_extended
8849 #define GL_NV_gpu_program5_mem_extended 1
8850 #endif /* GL_NV_gpu_program5_mem_extended */
8851
8852 #ifndef GL_NV_gpu_shader5
8853 #define GL_NV_gpu_shader5 1
8854 #endif /* GL_NV_gpu_shader5 */
8855
8856 #ifndef GL_NV_half_float
8857 #define GL_NV_half_float 1
8858 typedef unsigned short GLhalfNV;
8859 #define GL_HALF_FLOAT_NV 0x140B
8860 typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
8861 typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
8862 typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8863 typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
8864 typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8865 typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
8866 typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8867 typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
8868 typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8869 typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
8870 typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8871 typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
8872 typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
8873 typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
8874 typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
8875 typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
8876 typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8877 typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
8878 typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8879 typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
8880 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
8881 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
8882 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
8883 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
8884 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8885 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
8886 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8887 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
8888 typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
8889 typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
8890 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8891 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
8892 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
8893 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
8894 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
8895 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
8896 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
8897 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
8898 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8899 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
8900 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8901 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
8902 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8903 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8904 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8905 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8906 #ifdef GL_GLEXT_PROTOTYPES
8907 GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
8908 GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
8909 GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8910 GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
8911 GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8912 GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
8913 GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8914 GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
8915 GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8916 GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
8917 GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8918 GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
8919 GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
8920 GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
8921 GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
8922 GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
8923 GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8924 GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
8925 GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8926 GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
8927 GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
8928 GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
8929 GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
8930 GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
8931 GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8932 GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
8933 GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8934 GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
8935 GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
8936 GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
8937 GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8938 GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
8939 GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
8940 GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
8941 GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
8942 GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
8943 GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
8944 GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
8945 GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8946 GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
8947 GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8948 GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
8949 GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8950 GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8951 GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8952 GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8953 #endif
8954 #endif /* GL_NV_half_float */
8955
8956 #ifndef GL_NV_light_max_exponent
8957 #define GL_NV_light_max_exponent 1
8958 #define GL_MAX_SHININESS_NV 0x8504
8959 #define GL_MAX_SPOT_EXPONENT_NV 0x8505
8960 #endif /* GL_NV_light_max_exponent */
8961
8962 #ifndef GL_NV_multisample_coverage
8963 #define GL_NV_multisample_coverage 1
8964 #define GL_COLOR_SAMPLES_NV 0x8E20
8965 #endif /* GL_NV_multisample_coverage */
8966
8967 #ifndef GL_NV_multisample_filter_hint
8968 #define GL_NV_multisample_filter_hint 1
8969 #define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
8970 #endif /* GL_NV_multisample_filter_hint */
8971
8972 #ifndef GL_NV_occlusion_query
8973 #define GL_NV_occlusion_query 1
8974 #define GL_PIXEL_COUNTER_BITS_NV 0x8864
8975 #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
8976 #define GL_PIXEL_COUNT_NV 0x8866
8977 #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
8978 typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
8979 typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
8980 typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
8981 typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
8982 typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
8983 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
8984 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
8985 #ifdef GL_GLEXT_PROTOTYPES
8986 GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
8987 GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
8988 GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
8989 GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
8990 GLAPI void APIENTRY glEndOcclusionQueryNV (void);
8991 GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
8992 GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
8993 #endif
8994 #endif /* GL_NV_occlusion_query */
8995
8996 #ifndef GL_NV_packed_depth_stencil
8997 #define GL_NV_packed_depth_stencil 1
8998 #define GL_DEPTH_STENCIL_NV 0x84F9
8999 #define GL_UNSIGNED_INT_24_8_NV 0x84FA
9000 #endif /* GL_NV_packed_depth_stencil */
9001
9002 #ifndef GL_NV_parameter_buffer_object
9003 #define GL_NV_parameter_buffer_object 1
9004 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
9005 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
9006 #define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
9007 #define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
9008 #define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
9009 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9010 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9011 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9012 #ifdef GL_GLEXT_PROTOTYPES
9013 GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9014 GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9015 GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9016 #endif
9017 #endif /* GL_NV_parameter_buffer_object */
9018
9019 #ifndef GL_NV_parameter_buffer_object2
9020 #define GL_NV_parameter_buffer_object2 1
9021 #endif /* GL_NV_parameter_buffer_object2 */
9022
9023 #ifndef GL_NV_path_rendering
9024 #define GL_NV_path_rendering 1
9025 #define GL_PATH_FORMAT_SVG_NV 0x9070
9026 #define GL_PATH_FORMAT_PS_NV 0x9071
9027 #define GL_STANDARD_FONT_NAME_NV 0x9072
9028 #define GL_SYSTEM_FONT_NAME_NV 0x9073
9029 #define GL_FILE_NAME_NV 0x9074
9030 #define GL_PATH_STROKE_WIDTH_NV 0x9075
9031 #define GL_PATH_END_CAPS_NV 0x9076
9032 #define GL_PATH_INITIAL_END_CAP_NV 0x9077
9033 #define GL_PATH_TERMINAL_END_CAP_NV 0x9078
9034 #define GL_PATH_JOIN_STYLE_NV 0x9079
9035 #define GL_PATH_MITER_LIMIT_NV 0x907A
9036 #define GL_PATH_DASH_CAPS_NV 0x907B
9037 #define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
9038 #define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
9039 #define GL_PATH_DASH_OFFSET_NV 0x907E
9040 #define GL_PATH_CLIENT_LENGTH_NV 0x907F
9041 #define GL_PATH_FILL_MODE_NV 0x9080
9042 #define GL_PATH_FILL_MASK_NV 0x9081
9043 #define GL_PATH_FILL_COVER_MODE_NV 0x9082
9044 #define GL_PATH_STROKE_COVER_MODE_NV 0x9083
9045 #define GL_PATH_STROKE_MASK_NV 0x9084
9046 #define GL_COUNT_UP_NV 0x9088
9047 #define GL_COUNT_DOWN_NV 0x9089
9048 #define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
9049 #define GL_CONVEX_HULL_NV 0x908B
9050 #define GL_BOUNDING_BOX_NV 0x908D
9051 #define GL_TRANSLATE_X_NV 0x908E
9052 #define GL_TRANSLATE_Y_NV 0x908F
9053 #define GL_TRANSLATE_2D_NV 0x9090
9054 #define GL_TRANSLATE_3D_NV 0x9091
9055 #define GL_AFFINE_2D_NV 0x9092
9056 #define GL_AFFINE_3D_NV 0x9094
9057 #define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
9058 #define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
9059 #define GL_UTF8_NV 0x909A
9060 #define GL_UTF16_NV 0x909B
9061 #define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
9062 #define GL_PATH_COMMAND_COUNT_NV 0x909D
9063 #define GL_PATH_COORD_COUNT_NV 0x909E
9064 #define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
9065 #define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
9066 #define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
9067 #define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
9068 #define GL_SQUARE_NV 0x90A3
9069 #define GL_ROUND_NV 0x90A4
9070 #define GL_TRIANGULAR_NV 0x90A5
9071 #define GL_BEVEL_NV 0x90A6
9072 #define GL_MITER_REVERT_NV 0x90A7
9073 #define GL_MITER_TRUNCATE_NV 0x90A8
9074 #define GL_SKIP_MISSING_GLYPH_NV 0x90A9
9075 #define GL_USE_MISSING_GLYPH_NV 0x90AA
9076 #define GL_PATH_ERROR_POSITION_NV 0x90AB
9077 #define GL_PATH_FOG_GEN_MODE_NV 0x90AC
9078 #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
9079 #define GL_ADJACENT_PAIRS_NV 0x90AE
9080 #define GL_FIRST_TO_REST_NV 0x90AF
9081 #define GL_PATH_GEN_MODE_NV 0x90B0
9082 #define GL_PATH_GEN_COEFF_NV 0x90B1
9083 #define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
9084 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3
9085 #define GL_PATH_STENCIL_FUNC_NV 0x90B7
9086 #define GL_PATH_STENCIL_REF_NV 0x90B8
9087 #define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
9088 #define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
9089 #define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
9090 #define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
9091 #define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
9092 #define GL_MOVE_TO_RESETS_NV 0x90B5
9093 #define GL_MOVE_TO_CONTINUES_NV 0x90B6
9094 #define GL_CLOSE_PATH_NV 0x00
9095 #define GL_MOVE_TO_NV 0x02
9096 #define GL_RELATIVE_MOVE_TO_NV 0x03
9097 #define GL_LINE_TO_NV 0x04
9098 #define GL_RELATIVE_LINE_TO_NV 0x05
9099 #define GL_HORIZONTAL_LINE_TO_NV 0x06
9100 #define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
9101 #define GL_VERTICAL_LINE_TO_NV 0x08
9102 #define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
9103 #define GL_QUADRATIC_CURVE_TO_NV 0x0A
9104 #define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
9105 #define GL_CUBIC_CURVE_TO_NV 0x0C
9106 #define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
9107 #define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
9108 #define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
9109 #define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
9110 #define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
9111 #define GL_SMALL_CCW_ARC_TO_NV 0x12
9112 #define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
9113 #define GL_SMALL_CW_ARC_TO_NV 0x14
9114 #define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
9115 #define GL_LARGE_CCW_ARC_TO_NV 0x16
9116 #define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
9117 #define GL_LARGE_CW_ARC_TO_NV 0x18
9118 #define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
9119 #define GL_RESTART_PATH_NV 0xF0
9120 #define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
9121 #define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
9122 #define GL_RECT_NV 0xF6
9123 #define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
9124 #define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
9125 #define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
9126 #define GL_ARC_TO_NV 0xFE
9127 #define GL_RELATIVE_ARC_TO_NV 0xFF
9128 #define GL_BOLD_BIT_NV 0x01
9129 #define GL_ITALIC_BIT_NV 0x02
9130 #define GL_GLYPH_WIDTH_BIT_NV 0x01
9131 #define GL_GLYPH_HEIGHT_BIT_NV 0x02
9132 #define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
9133 #define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
9134 #define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
9135 #define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
9136 #define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
9137 #define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
9138 #define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
9139 #define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
9140 #define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
9141 #define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
9142 #define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
9143 #define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
9144 #define GL_FONT_ASCENDER_BIT_NV 0x00200000
9145 #define GL_FONT_DESCENDER_BIT_NV 0x00400000
9146 #define GL_FONT_HEIGHT_BIT_NV 0x00800000
9147 #define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
9148 #define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
9149 #define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
9150 #define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
9151 #define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
9152 #define GL_PRIMARY_COLOR_NV 0x852C
9153 #define GL_SECONDARY_COLOR_NV 0x852D
9154 typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
9155 typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
9156 typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
9157 typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9158 typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9159 typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9160 typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9161 typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
9162 typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9163 typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9164 typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9165 typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
9166 typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9167 typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9168 typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
9169 typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
9170 typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
9171 typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
9172 typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9173 typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
9174 typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
9175 typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
9176 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
9177 typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9178 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9179 typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
9180 typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9181 typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9182 typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
9183 typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
9184 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
9185 typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9186 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9187 typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
9188 typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
9189 typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
9190 typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
9191 typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
9192 typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9193 typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9194 typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9195 typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
9196 typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
9197 typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
9198 typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
9199 typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9200 typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
9201 typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
9202 typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9203 #ifdef GL_GLEXT_PROTOTYPES
9204 GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
9205 GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
9206 GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
9207 GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9208 GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9209 GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9210 GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9211 GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
9212 GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9213 GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9214 GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9215 GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
9216 GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9217 GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9218 GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
9219 GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
9220 GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
9221 GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
9222 GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9223 GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
9224 GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
9225 GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
9226 GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
9227 GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9228 GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9229 GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
9230 GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9231 GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9232 GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
9233 GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
9234 GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
9235 GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9236 GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9237 GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
9238 GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
9239 GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
9240 GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
9241 GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
9242 GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9243 GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9244 GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9245 GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
9246 GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
9247 GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
9248 GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
9249 GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9250 GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
9251 GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
9252 GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9253 #endif
9254 #endif /* GL_NV_path_rendering */
9255
9256 #ifndef GL_NV_pixel_data_range
9257 #define GL_NV_pixel_data_range 1
9258 #define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
9259 #define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
9260 #define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
9261 #define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
9262 #define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
9263 #define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
9264 typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
9265 typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
9266 #ifdef GL_GLEXT_PROTOTYPES
9267 GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
9268 GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
9269 #endif
9270 #endif /* GL_NV_pixel_data_range */
9271
9272 #ifndef GL_NV_point_sprite
9273 #define GL_NV_point_sprite 1
9274 #define GL_POINT_SPRITE_NV 0x8861
9275 #define GL_COORD_REPLACE_NV 0x8862
9276 #define GL_POINT_SPRITE_R_MODE_NV 0x8863
9277 typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
9278 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9279 #ifdef GL_GLEXT_PROTOTYPES
9280 GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
9281 GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
9282 #endif
9283 #endif /* GL_NV_point_sprite */
9284
9285 #ifndef GL_NV_present_video
9286 #define GL_NV_present_video 1
9287 #define GL_FRAME_NV 0x8E26
9288 #define GL_FIELDS_NV 0x8E27
9289 #define GL_CURRENT_TIME_NV 0x8E28
9290 #define GL_NUM_FILL_STREAMS_NV 0x8E29
9291 #define GL_PRESENT_TIME_NV 0x8E2A
9292 #define GL_PRESENT_DURATION_NV 0x8E2B
9293 typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9294 typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9295 typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
9296 typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
9297 typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
9298 typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9299 #ifdef GL_GLEXT_PROTOTYPES
9300 GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9301 GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9302 GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
9303 GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
9304 GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
9305 GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9306 #endif
9307 #endif /* GL_NV_present_video */
9308
9309 #ifndef GL_NV_primitive_restart
9310 #define GL_NV_primitive_restart 1
9311 #define GL_PRIMITIVE_RESTART_NV 0x8558
9312 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
9313 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
9314 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
9315 #ifdef GL_GLEXT_PROTOTYPES
9316 GLAPI void APIENTRY glPrimitiveRestartNV (void);
9317 GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
9318 #endif
9319 #endif /* GL_NV_primitive_restart */
9320
9321 #ifndef GL_NV_register_combiners
9322 #define GL_NV_register_combiners 1
9323 #define GL_REGISTER_COMBINERS_NV 0x8522
9324 #define GL_VARIABLE_A_NV 0x8523
9325 #define GL_VARIABLE_B_NV 0x8524
9326 #define GL_VARIABLE_C_NV 0x8525
9327 #define GL_VARIABLE_D_NV 0x8526
9328 #define GL_VARIABLE_E_NV 0x8527
9329 #define GL_VARIABLE_F_NV 0x8528
9330 #define GL_VARIABLE_G_NV 0x8529
9331 #define GL_CONSTANT_COLOR0_NV 0x852A
9332 #define GL_CONSTANT_COLOR1_NV 0x852B
9333 #define GL_SPARE0_NV 0x852E
9334 #define GL_SPARE1_NV 0x852F
9335 #define GL_DISCARD_NV 0x8530
9336 #define GL_E_TIMES_F_NV 0x8531
9337 #define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
9338 #define GL_UNSIGNED_IDENTITY_NV 0x8536
9339 #define GL_UNSIGNED_INVERT_NV 0x8537
9340 #define GL_EXPAND_NORMAL_NV 0x8538
9341 #define GL_EXPAND_NEGATE_NV 0x8539
9342 #define GL_HALF_BIAS_NORMAL_NV 0x853A
9343 #define GL_HALF_BIAS_NEGATE_NV 0x853B
9344 #define GL_SIGNED_IDENTITY_NV 0x853C
9345 #define GL_SIGNED_NEGATE_NV 0x853D
9346 #define GL_SCALE_BY_TWO_NV 0x853E
9347 #define GL_SCALE_BY_FOUR_NV 0x853F
9348 #define GL_SCALE_BY_ONE_HALF_NV 0x8540
9349 #define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
9350 #define GL_COMBINER_INPUT_NV 0x8542
9351 #define GL_COMBINER_MAPPING_NV 0x8543
9352 #define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
9353 #define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
9354 #define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
9355 #define GL_COMBINER_MUX_SUM_NV 0x8547
9356 #define GL_COMBINER_SCALE_NV 0x8548
9357 #define GL_COMBINER_BIAS_NV 0x8549
9358 #define GL_COMBINER_AB_OUTPUT_NV 0x854A
9359 #define GL_COMBINER_CD_OUTPUT_NV 0x854B
9360 #define GL_COMBINER_SUM_OUTPUT_NV 0x854C
9361 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D
9362 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E
9363 #define GL_COLOR_SUM_CLAMP_NV 0x854F
9364 #define GL_COMBINER0_NV 0x8550
9365 #define GL_COMBINER1_NV 0x8551
9366 #define GL_COMBINER2_NV 0x8552
9367 #define GL_COMBINER3_NV 0x8553
9368 #define GL_COMBINER4_NV 0x8554
9369 #define GL_COMBINER5_NV 0x8555
9370 #define GL_COMBINER6_NV 0x8556
9371 #define GL_COMBINER7_NV 0x8557
9372 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
9373 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
9374 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9375 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
9376 typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9377 typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9378 typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9379 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9380 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9381 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9382 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9383 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
9384 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
9385 #ifdef GL_GLEXT_PROTOTYPES
9386 GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
9387 GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
9388 GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
9389 GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
9390 GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9391 GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9392 GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9393 GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9394 GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9395 GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9396 GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9397 GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
9398 GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
9399 #endif
9400 #endif /* GL_NV_register_combiners */
9401
9402 #ifndef GL_NV_register_combiners2
9403 #define GL_NV_register_combiners2 1
9404 #define GL_PER_STAGE_CONSTANTS_NV 0x8535
9405 typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
9406 typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
9407 #ifdef GL_GLEXT_PROTOTYPES
9408 GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
9409 GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
9410 #endif
9411 #endif /* GL_NV_register_combiners2 */
9412
9413 #ifndef GL_NV_shader_atomic_counters
9414 #define GL_NV_shader_atomic_counters 1
9415 #endif /* GL_NV_shader_atomic_counters */
9416
9417 #ifndef GL_NV_shader_atomic_float
9418 #define GL_NV_shader_atomic_float 1
9419 #endif /* GL_NV_shader_atomic_float */
9420
9421 #ifndef GL_NV_shader_buffer_load
9422 #define GL_NV_shader_buffer_load 1
9423 #define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
9424 #define GL_GPU_ADDRESS_NV 0x8F34
9425 #define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
9426 typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
9427 typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
9428 typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
9429 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
9430 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
9431 typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
9432 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
9433 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
9434 typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
9435 typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
9436 typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
9437 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
9438 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9439 #ifdef GL_GLEXT_PROTOTYPES
9440 GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
9441 GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
9442 GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
9443 GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
9444 GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
9445 GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
9446 GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
9447 GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
9448 GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
9449 GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
9450 GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
9451 GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
9452 GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9453 #endif
9454 #endif /* GL_NV_shader_buffer_load */
9455
9456 #ifndef GL_NV_shader_buffer_store
9457 #define GL_NV_shader_buffer_store 1
9458 #define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
9459 #endif /* GL_NV_shader_buffer_store */
9460
9461 #ifndef GL_NV_shader_storage_buffer_object
9462 #define GL_NV_shader_storage_buffer_object 1
9463 #endif /* GL_NV_shader_storage_buffer_object */
9464
9465 #ifndef GL_NV_shader_thread_group
9466 #define GL_NV_shader_thread_group 1
9467 #define GL_WARP_SIZE_NV 0x9339
9468 #define GL_WARPS_PER_SM_NV 0x933A
9469 #define GL_SM_COUNT_NV 0x933B
9470 #endif /* GL_NV_shader_thread_group */
9471
9472 #ifndef GL_NV_shader_thread_shuffle
9473 #define GL_NV_shader_thread_shuffle 1
9474 #endif /* GL_NV_shader_thread_shuffle */
9475
9476 #ifndef GL_NV_tessellation_program5
9477 #define GL_NV_tessellation_program5 1
9478 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
9479 #define GL_TESS_CONTROL_PROGRAM_NV 0x891E
9480 #define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
9481 #define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
9482 #define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
9483 #endif /* GL_NV_tessellation_program5 */
9484
9485 #ifndef GL_NV_texgen_emboss
9486 #define GL_NV_texgen_emboss 1
9487 #define GL_EMBOSS_LIGHT_NV 0x855D
9488 #define GL_EMBOSS_CONSTANT_NV 0x855E
9489 #define GL_EMBOSS_MAP_NV 0x855F
9490 #endif /* GL_NV_texgen_emboss */
9491
9492 #ifndef GL_NV_texgen_reflection
9493 #define GL_NV_texgen_reflection 1
9494 #define GL_NORMAL_MAP_NV 0x8511
9495 #define GL_REFLECTION_MAP_NV 0x8512
9496 #endif /* GL_NV_texgen_reflection */
9497
9498 #ifndef GL_NV_texture_barrier
9499 #define GL_NV_texture_barrier 1
9500 typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
9501 #ifdef GL_GLEXT_PROTOTYPES
9502 GLAPI void APIENTRY glTextureBarrierNV (void);
9503 #endif
9504 #endif /* GL_NV_texture_barrier */
9505
9506 #ifndef GL_NV_texture_compression_vtc
9507 #define GL_NV_texture_compression_vtc 1
9508 #endif /* GL_NV_texture_compression_vtc */
9509
9510 #ifndef GL_NV_texture_env_combine4
9511 #define GL_NV_texture_env_combine4 1
9512 #define GL_COMBINE4_NV 0x8503
9513 #define GL_SOURCE3_RGB_NV 0x8583
9514 #define GL_SOURCE3_ALPHA_NV 0x858B
9515 #define GL_OPERAND3_RGB_NV 0x8593
9516 #define GL_OPERAND3_ALPHA_NV 0x859B
9517 #endif /* GL_NV_texture_env_combine4 */
9518
9519 #ifndef GL_NV_texture_expand_normal
9520 #define GL_NV_texture_expand_normal 1
9521 #define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
9522 #endif /* GL_NV_texture_expand_normal */
9523
9524 #ifndef GL_NV_texture_multisample
9525 #define GL_NV_texture_multisample 1
9526 #define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
9527 #define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
9528 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9529 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9530 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9531 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9532 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9533 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9534 #ifdef GL_GLEXT_PROTOTYPES
9535 GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9536 GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9537 GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9538 GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9539 GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9540 GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9541 #endif
9542 #endif /* GL_NV_texture_multisample */
9543
9544 #ifndef GL_NV_texture_rectangle
9545 #define GL_NV_texture_rectangle 1
9546 #define GL_TEXTURE_RECTANGLE_NV 0x84F5
9547 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
9548 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
9549 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
9550 #endif /* GL_NV_texture_rectangle */
9551
9552 #ifndef GL_NV_texture_shader
9553 #define GL_NV_texture_shader 1
9554 #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
9555 #define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
9556 #define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
9557 #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
9558 #define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
9559 #define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
9560 #define GL_DSDT_MAG_INTENSITY_NV 0x86DC
9561 #define GL_SHADER_CONSISTENT_NV 0x86DD
9562 #define GL_TEXTURE_SHADER_NV 0x86DE
9563 #define GL_SHADER_OPERATION_NV 0x86DF
9564 #define GL_CULL_MODES_NV 0x86E0
9565 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
9566 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
9567 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
9568 #define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
9569 #define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
9570 #define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
9571 #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
9572 #define GL_CONST_EYE_NV 0x86E5
9573 #define GL_PASS_THROUGH_NV 0x86E6
9574 #define GL_CULL_FRAGMENT_NV 0x86E7
9575 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8
9576 #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
9577 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
9578 #define GL_DOT_PRODUCT_NV 0x86EC
9579 #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
9580 #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
9581 #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
9582 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
9583 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
9584 #define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
9585 #define GL_HILO_NV 0x86F4
9586 #define GL_DSDT_NV 0x86F5
9587 #define GL_DSDT_MAG_NV 0x86F6
9588 #define GL_DSDT_MAG_VIB_NV 0x86F7
9589 #define GL_HILO16_NV 0x86F8
9590 #define GL_SIGNED_HILO_NV 0x86F9
9591 #define GL_SIGNED_HILO16_NV 0x86FA
9592 #define GL_SIGNED_RGBA_NV 0x86FB
9593 #define GL_SIGNED_RGBA8_NV 0x86FC
9594 #define GL_SIGNED_RGB_NV 0x86FE
9595 #define GL_SIGNED_RGB8_NV 0x86FF
9596 #define GL_SIGNED_LUMINANCE_NV 0x8701
9597 #define GL_SIGNED_LUMINANCE8_NV 0x8702
9598 #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
9599 #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
9600 #define GL_SIGNED_ALPHA_NV 0x8705
9601 #define GL_SIGNED_ALPHA8_NV 0x8706
9602 #define GL_SIGNED_INTENSITY_NV 0x8707
9603 #define GL_SIGNED_INTENSITY8_NV 0x8708
9604 #define GL_DSDT8_NV 0x8709
9605 #define GL_DSDT8_MAG8_NV 0x870A
9606 #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
9607 #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
9608 #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
9609 #define GL_HI_SCALE_NV 0x870E
9610 #define GL_LO_SCALE_NV 0x870F
9611 #define GL_DS_SCALE_NV 0x8710
9612 #define GL_DT_SCALE_NV 0x8711
9613 #define GL_MAGNITUDE_SCALE_NV 0x8712
9614 #define GL_VIBRANCE_SCALE_NV 0x8713
9615 #define GL_HI_BIAS_NV 0x8714
9616 #define GL_LO_BIAS_NV 0x8715
9617 #define GL_DS_BIAS_NV 0x8716
9618 #define GL_DT_BIAS_NV 0x8717
9619 #define GL_MAGNITUDE_BIAS_NV 0x8718
9620 #define GL_VIBRANCE_BIAS_NV 0x8719
9621 #define GL_TEXTURE_BORDER_VALUES_NV 0x871A
9622 #define GL_TEXTURE_HI_SIZE_NV 0x871B
9623 #define GL_TEXTURE_LO_SIZE_NV 0x871C
9624 #define GL_TEXTURE_DS_SIZE_NV 0x871D
9625 #define GL_TEXTURE_DT_SIZE_NV 0x871E
9626 #define GL_TEXTURE_MAG_SIZE_NV 0x871F
9627 #endif /* GL_NV_texture_shader */
9628
9629 #ifndef GL_NV_texture_shader2
9630 #define GL_NV_texture_shader2 1
9631 #define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
9632 #endif /* GL_NV_texture_shader2 */
9633
9634 #ifndef GL_NV_texture_shader3
9635 #define GL_NV_texture_shader3 1
9636 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
9637 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
9638 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
9639 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
9640 #define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
9641 #define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
9642 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
9643 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
9644 #define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
9645 #define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
9646 #define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
9647 #define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
9648 #define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
9649 #define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
9650 #define GL_HILO8_NV 0x885E
9651 #define GL_SIGNED_HILO8_NV 0x885F
9652 #define GL_FORCE_BLUE_TO_ONE_NV 0x8860
9653 #endif /* GL_NV_texture_shader3 */
9654
9655 #ifndef GL_NV_transform_feedback
9656 #define GL_NV_transform_feedback 1
9657 #define GL_BACK_PRIMARY_COLOR_NV 0x8C77
9658 #define GL_BACK_SECONDARY_COLOR_NV 0x8C78
9659 #define GL_TEXTURE_COORD_NV 0x8C79
9660 #define GL_CLIP_DISTANCE_NV 0x8C7A
9661 #define GL_VERTEX_ID_NV 0x8C7B
9662 #define GL_PRIMITIVE_ID_NV 0x8C7C
9663 #define GL_GENERIC_ATTRIB_NV 0x8C7D
9664 #define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
9665 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
9666 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
9667 #define GL_ACTIVE_VARYINGS_NV 0x8C81
9668 #define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
9669 #define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
9670 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
9671 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
9672 #define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
9673 #define GL_PRIMITIVES_GENERATED_NV 0x8C87
9674 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
9675 #define GL_RASTERIZER_DISCARD_NV 0x8C89
9676 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
9677 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
9678 #define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
9679 #define GL_SEPARATE_ATTRIBS_NV 0x8C8D
9680 #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
9681 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
9682 #define GL_LAYER_NV 0x8DAA
9683 #define GL_NEXT_BUFFER_NV -2
9684 #define GL_SKIP_COMPONENTS4_NV -3
9685 #define GL_SKIP_COMPONENTS3_NV -4
9686 #define GL_SKIP_COMPONENTS2_NV -5
9687 #define GL_SKIP_COMPONENTS1_NV -6
9688 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
9689 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
9690 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
9691 typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9692 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9693 typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
9694 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9695 typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
9696 typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
9697 typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9698 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
9699 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9700 #ifdef GL_GLEXT_PROTOTYPES
9701 GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
9702 GLAPI void APIENTRY glEndTransformFeedbackNV (void);
9703 GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);
9704 GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9705 GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9706 GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
9707 GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9708 GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
9709 GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
9710 GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9711 GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
9712 GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9713 #endif
9714 #endif /* GL_NV_transform_feedback */
9715
9716 #ifndef GL_NV_transform_feedback2
9717 #define GL_NV_transform_feedback2 1
9718 #define GL_TRANSFORM_FEEDBACK_NV 0x8E22
9719 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
9720 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
9721 #define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
9722 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
9723 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
9724 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
9725 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
9726 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
9727 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
9728 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
9729 #ifdef GL_GLEXT_PROTOTYPES
9730 GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
9731 GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
9732 GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
9733 GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
9734 GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
9735 GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
9736 GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
9737 #endif
9738 #endif /* GL_NV_transform_feedback2 */
9739
9740 #ifndef GL_NV_vdpau_interop
9741 #define GL_NV_vdpau_interop 1
9742 typedef GLintptr GLvdpauSurfaceNV;
9743 #define GL_SURFACE_STATE_NV 0x86EB
9744 #define GL_SURFACE_REGISTERED_NV 0x86FD
9745 #define GL_SURFACE_MAPPED_NV 0x8700
9746 #define GL_WRITE_DISCARD_NV 0x88BE
9747 typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
9748 typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
9749 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9750 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9751 typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
9752 typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
9753 typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9754 typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
9755 typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9756 typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9757 #ifdef GL_GLEXT_PROTOTYPES
9758 GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
9759 GLAPI void APIENTRY glVDPAUFiniNV (void);
9760 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9761 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9762 GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
9763 GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
9764 GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9765 GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
9766 GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9767 GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9768 #endif
9769 #endif /* GL_NV_vdpau_interop */
9770
9771 #ifndef GL_NV_vertex_array_range
9772 #define GL_NV_vertex_array_range 1
9773 #define GL_VERTEX_ARRAY_RANGE_NV 0x851D
9774 #define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
9775 #define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
9776 #define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
9777 #define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
9778 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
9779 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
9780 #ifdef GL_GLEXT_PROTOTYPES
9781 GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
9782 GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
9783 #endif
9784 #endif /* GL_NV_vertex_array_range */
9785
9786 #ifndef GL_NV_vertex_array_range2
9787 #define GL_NV_vertex_array_range2 1
9788 #define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
9789 #endif /* GL_NV_vertex_array_range2 */
9790
9791 #ifndef GL_NV_vertex_attrib_integer_64bit
9792 #define GL_NV_vertex_attrib_integer_64bit 1
9793 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
9794 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
9795 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9796 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9797 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
9798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
9799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
9800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
9801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
9802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
9803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9806 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9807 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9808 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9809 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
9810 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
9811 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9812 #ifdef GL_GLEXT_PROTOTYPES
9813 GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
9814 GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
9815 GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9816 GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9817 GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
9818 GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
9819 GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
9820 GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
9821 GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
9822 GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
9823 GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9824 GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9825 GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
9826 GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
9827 GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
9828 GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
9829 GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
9830 GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
9831 GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9832 #endif
9833 #endif /* GL_NV_vertex_attrib_integer_64bit */
9834
9835 #ifndef GL_NV_vertex_buffer_unified_memory
9836 #define GL_NV_vertex_buffer_unified_memory 1
9837 #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
9838 #define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
9839 #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
9840 #define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
9841 #define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
9842 #define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
9843 #define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
9844 #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
9845 #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
9846 #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
9847 #define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
9848 #define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
9849 #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
9850 #define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
9851 #define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
9852 #define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
9853 #define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
9854 #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
9855 #define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
9856 #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
9857 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
9858 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
9859 #define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
9860 #define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
9861 #define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
9862 typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9863 typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9864 typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
9865 typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9866 typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
9867 typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9868 typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
9869 typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9870 typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
9871 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9872 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9873 typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
9874 #ifdef GL_GLEXT_PROTOTYPES
9875 GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9876 GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
9877 GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
9878 GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
9879 GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
9880 GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
9881 GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
9882 GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
9883 GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
9884 GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9885 GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9886 GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
9887 #endif
9888 #endif /* GL_NV_vertex_buffer_unified_memory */
9889
9890 #ifndef GL_NV_vertex_program
9891 #define GL_NV_vertex_program 1
9892 #define GL_VERTEX_PROGRAM_NV 0x8620
9893 #define GL_VERTEX_STATE_PROGRAM_NV 0x8621
9894 #define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
9895 #define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
9896 #define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
9897 #define GL_CURRENT_ATTRIB_NV 0x8626
9898 #define GL_PROGRAM_LENGTH_NV 0x8627
9899 #define GL_PROGRAM_STRING_NV 0x8628
9900 #define GL_MODELVIEW_PROJECTION_NV 0x8629
9901 #define GL_IDENTITY_NV 0x862A
9902 #define GL_INVERSE_NV 0x862B
9903 #define GL_TRANSPOSE_NV 0x862C
9904 #define GL_INVERSE_TRANSPOSE_NV 0x862D
9905 #define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
9906 #define GL_MAX_TRACK_MATRICES_NV 0x862F
9907 #define GL_MATRIX0_NV 0x8630
9908 #define GL_MATRIX1_NV 0x8631
9909 #define GL_MATRIX2_NV 0x8632
9910 #define GL_MATRIX3_NV 0x8633
9911 #define GL_MATRIX4_NV 0x8634
9912 #define GL_MATRIX5_NV 0x8635
9913 #define GL_MATRIX6_NV 0x8636
9914 #define GL_MATRIX7_NV 0x8637
9915 #define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
9916 #define GL_CURRENT_MATRIX_NV 0x8641
9917 #define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
9918 #define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
9919 #define GL_PROGRAM_PARAMETER_NV 0x8644
9920 #define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
9921 #define GL_PROGRAM_TARGET_NV 0x8646
9922 #define GL_PROGRAM_RESIDENT_NV 0x8647
9923 #define GL_TRACK_MATRIX_NV 0x8648
9924 #define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
9925 #define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
9926 #define GL_PROGRAM_ERROR_POSITION_NV 0x864B
9927 #define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
9928 #define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
9929 #define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
9930 #define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
9931 #define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
9932 #define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
9933 #define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
9934 #define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
9935 #define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
9936 #define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
9937 #define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
9938 #define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
9939 #define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
9940 #define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
9941 #define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
9942 #define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
9943 #define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
9944 #define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
9945 #define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
9946 #define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
9947 #define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
9948 #define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
9949 #define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
9950 #define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
9951 #define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
9952 #define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
9953 #define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
9954 #define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
9955 #define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
9956 #define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
9957 #define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
9958 #define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
9959 #define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
9960 #define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
9961 #define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
9962 #define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
9963 #define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
9964 #define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
9965 #define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
9966 #define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
9967 #define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
9968 #define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
9969 #define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
9970 #define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
9971 #define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
9972 #define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
9973 #define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
9974 #define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
9975 typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
9976 typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
9977 typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9978 typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
9979 typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
9980 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
9981 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
9982 typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
9983 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
9984 typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
9985 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
9986 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
9987 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
9988 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
9989 typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
9990 typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
9991 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9992 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
9993 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
9994 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
9995 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
9996 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
9997 typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9998 typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
9999 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10000 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
10001 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
10002 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
10003 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
10004 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
10005 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
10006 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
10007 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
10008 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
10009 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
10010 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
10011 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
10012 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10013 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
10014 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10015 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
10016 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
10017 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
10018 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10019 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
10020 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10021 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
10022 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10023 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
10024 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10025 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
10026 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10027 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10028 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10029 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10030 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10031 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10032 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10033 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10034 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10035 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10036 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10037 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10038 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
10039 #ifdef GL_GLEXT_PROTOTYPES
10040 GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
10041 GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
10042 GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
10043 GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
10044 GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
10045 GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
10046 GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
10047 GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
10048 GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
10049 GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
10050 GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
10051 GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
10052 GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
10053 GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
10054 GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
10055 GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
10056 GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10057 GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
10058 GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10059 GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
10060 GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
10061 GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
10062 GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
10063 GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
10064 GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10065 GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
10066 GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
10067 GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
10068 GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
10069 GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
10070 GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
10071 GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
10072 GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
10073 GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
10074 GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
10075 GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
10076 GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
10077 GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10078 GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
10079 GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10080 GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
10081 GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
10082 GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
10083 GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10084 GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
10085 GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10086 GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
10087 GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10088 GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
10089 GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10090 GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
10091 GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
10092 GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
10093 GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
10094 GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
10095 GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
10096 GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
10097 GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
10098 GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
10099 GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
10100 GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
10101 GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
10102 GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
10103 GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
10104 #endif
10105 #endif /* GL_NV_vertex_program */
10106
10107 #ifndef GL_NV_vertex_program1_1
10108 #define GL_NV_vertex_program1_1 1
10109 #endif /* GL_NV_vertex_program1_1 */
10110
10111 #ifndef GL_NV_vertex_program2
10112 #define GL_NV_vertex_program2 1
10113 #endif /* GL_NV_vertex_program2 */
10114
10115 #ifndef GL_NV_vertex_program2_option
10116 #define GL_NV_vertex_program2_option 1
10117 #endif /* GL_NV_vertex_program2_option */
10118
10119 #ifndef GL_NV_vertex_program3
10120 #define GL_NV_vertex_program3 1
10121 #endif /* GL_NV_vertex_program3 */
10122
10123 #ifndef GL_NV_vertex_program4
10124 #define GL_NV_vertex_program4 1
10125 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
10126 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
10127 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
10128 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
10129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
10130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
10131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
10132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
10133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
10135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
10136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
10137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
10138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
10139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
10140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
10141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
10142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
10143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
10144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
10145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
10146 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10147 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
10148 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
10149 #ifdef GL_GLEXT_PROTOTYPES
10150 GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
10151 GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
10152 GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
10153 GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
10154 GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
10155 GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
10156 GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
10157 GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10158 GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
10159 GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
10160 GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
10161 GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
10162 GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
10163 GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
10164 GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
10165 GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
10166 GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
10167 GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
10168 GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
10169 GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
10170 GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10171 GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
10172 GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
10173 #endif
10174 #endif /* GL_NV_vertex_program4 */
10175
10176 #ifndef GL_NV_video_capture
10177 #define GL_NV_video_capture 1
10178 #define GL_VIDEO_BUFFER_NV 0x9020
10179 #define GL_VIDEO_BUFFER_BINDING_NV 0x9021
10180 #define GL_FIELD_UPPER_NV 0x9022
10181 #define GL_FIELD_LOWER_NV 0x9023
10182 #define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
10183 #define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
10184 #define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
10185 #define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
10186 #define GL_VIDEO_BUFFER_PITCH_NV 0x9028
10187 #define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
10188 #define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
10189 #define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
10190 #define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
10191 #define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
10192 #define GL_PARTIAL_SUCCESS_NV 0x902E
10193 #define GL_SUCCESS_NV 0x902F
10194 #define GL_FAILURE_NV 0x9030
10195 #define GL_YCBYCR8_422_NV 0x9031
10196 #define GL_YCBAYCR8A_4224_NV 0x9032
10197 #define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
10198 #define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
10199 #define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
10200 #define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
10201 #define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
10202 #define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
10203 #define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
10204 #define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
10205 #define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
10206 #define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
10207 typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10208 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10209 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10210 typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10211 typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
10212 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10213 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10214 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10215 typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10216 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10217 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10218 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10219 #ifdef GL_GLEXT_PROTOTYPES
10220 GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
10221 GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10222 GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10223 GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
10224 GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
10225 GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10226 GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10227 GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10228 GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10229 GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10230 GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10231 GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10232 #endif
10233 #endif /* GL_NV_video_capture */
10234
10235 #ifndef GL_OML_interlace
10236 #define GL_OML_interlace 1
10237 #define GL_INTERLACE_OML 0x8980
10238 #define GL_INTERLACE_READ_OML 0x8981
10239 #endif /* GL_OML_interlace */
10240
10241 #ifndef GL_OML_resample
10242 #define GL_OML_resample 1
10243 #define GL_PACK_RESAMPLE_OML 0x8984
10244 #define GL_UNPACK_RESAMPLE_OML 0x8985
10245 #define GL_RESAMPLE_REPLICATE_OML 0x8986
10246 #define GL_RESAMPLE_ZERO_FILL_OML 0x8987
10247 #define GL_RESAMPLE_AVERAGE_OML 0x8988
10248 #define GL_RESAMPLE_DECIMATE_OML 0x8989
10249 #endif /* GL_OML_resample */
10250
10251 #ifndef GL_OML_subsample
10252 #define GL_OML_subsample 1
10253 #define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
10254 #define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
10255 #endif /* GL_OML_subsample */
10256
10257 #ifndef GL_PGI_misc_hints
10258 #define GL_PGI_misc_hints 1
10259 #define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
10260 #define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
10261 #define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
10262 #define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
10263 #define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
10264 #define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
10265 #define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
10266 #define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
10267 #define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
10268 #define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
10269 #define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
10270 #define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
10271 #define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
10272 #define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
10273 #define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
10274 #define GL_FULL_STIPPLE_HINT_PGI 0x1A219
10275 #define GL_CLIP_NEAR_HINT_PGI 0x1A220
10276 #define GL_CLIP_FAR_HINT_PGI 0x1A221
10277 #define GL_WIDE_LINE_HINT_PGI 0x1A222
10278 #define GL_BACK_NORMALS_HINT_PGI 0x1A223
10279 typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
10280 #ifdef GL_GLEXT_PROTOTYPES
10281 GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
10282 #endif
10283 #endif /* GL_PGI_misc_hints */
10284
10285 #ifndef GL_PGI_vertex_hints
10286 #define GL_PGI_vertex_hints 1
10287 #define GL_VERTEX_DATA_HINT_PGI 0x1A22A
10288 #define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
10289 #define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
10290 #define GL_MAX_VERTEX_HINT_PGI 0x1A22D
10291 #define GL_COLOR3_BIT_PGI 0x00010000
10292 #define GL_COLOR4_BIT_PGI 0x00020000
10293 #define GL_EDGEFLAG_BIT_PGI 0x00040000
10294 #define GL_INDEX_BIT_PGI 0x00080000
10295 #define GL_MAT_AMBIENT_BIT_PGI 0x00100000
10296 #define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
10297 #define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
10298 #define GL_MAT_EMISSION_BIT_PGI 0x00800000
10299 #define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
10300 #define GL_MAT_SHININESS_BIT_PGI 0x02000000
10301 #define GL_MAT_SPECULAR_BIT_PGI 0x04000000
10302 #define GL_NORMAL_BIT_PGI 0x08000000
10303 #define GL_TEXCOORD1_BIT_PGI 0x10000000
10304 #define GL_TEXCOORD2_BIT_PGI 0x20000000
10305 #define GL_TEXCOORD3_BIT_PGI 0x40000000
10306 #define GL_TEXCOORD4_BIT_PGI 0x80000000
10307 #define GL_VERTEX23_BIT_PGI 0x00000004
10308 #define GL_VERTEX4_BIT_PGI 0x00000008
10309 #endif /* GL_PGI_vertex_hints */
10310
10311 #ifndef GL_REND_screen_coordinates
10312 #define GL_REND_screen_coordinates 1
10313 #define GL_SCREEN_COORDINATES_REND 0x8490
10314 #define GL_INVERTED_SCREEN_W_REND 0x8491
10315 #endif /* GL_REND_screen_coordinates */
10316
10317 #ifndef GL_S3_s3tc
10318 #define GL_S3_s3tc 1
10319 #define GL_RGB_S3TC 0x83A0
10320 #define GL_RGB4_S3TC 0x83A1
10321 #define GL_RGBA_S3TC 0x83A2
10322 #define GL_RGBA4_S3TC 0x83A3
10323 #define GL_RGBA_DXT5_S3TC 0x83A4
10324 #define GL_RGBA4_DXT5_S3TC 0x83A5
10325 #endif /* GL_S3_s3tc */
10326
10327 #ifndef GL_SGIS_detail_texture
10328 #define GL_SGIS_detail_texture 1
10329 #define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
10330 #define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
10331 #define GL_LINEAR_DETAIL_SGIS 0x8097
10332 #define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
10333 #define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
10334 #define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
10335 #define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
10336 #define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
10337 typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10338 typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10339 #ifdef GL_GLEXT_PROTOTYPES
10340 GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10341 GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
10342 #endif
10343 #endif /* GL_SGIS_detail_texture */
10344
10345 #ifndef GL_SGIS_fog_function
10346 #define GL_SGIS_fog_function 1
10347 #define GL_FOG_FUNC_SGIS 0x812A
10348 #define GL_FOG_FUNC_POINTS_SGIS 0x812B
10349 #define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
10350 typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
10351 typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
10352 #ifdef GL_GLEXT_PROTOTYPES
10353 GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
10354 GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
10355 #endif
10356 #endif /* GL_SGIS_fog_function */
10357
10358 #ifndef GL_SGIS_generate_mipmap
10359 #define GL_SGIS_generate_mipmap 1
10360 #define GL_GENERATE_MIPMAP_SGIS 0x8191
10361 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
10362 #endif /* GL_SGIS_generate_mipmap */
10363
10364 #ifndef GL_SGIS_multisample
10365 #define GL_SGIS_multisample 1
10366 #define GL_MULTISAMPLE_SGIS 0x809D
10367 #define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
10368 #define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
10369 #define GL_SAMPLE_MASK_SGIS 0x80A0
10370 #define GL_1PASS_SGIS 0x80A1
10371 #define GL_2PASS_0_SGIS 0x80A2
10372 #define GL_2PASS_1_SGIS 0x80A3
10373 #define GL_4PASS_0_SGIS 0x80A4
10374 #define GL_4PASS_1_SGIS 0x80A5
10375 #define GL_4PASS_2_SGIS 0x80A6
10376 #define GL_4PASS_3_SGIS 0x80A7
10377 #define GL_SAMPLE_BUFFERS_SGIS 0x80A8
10378 #define GL_SAMPLES_SGIS 0x80A9
10379 #define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
10380 #define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
10381 #define GL_SAMPLE_PATTERN_SGIS 0x80AC
10382 typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
10383 typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
10384 #ifdef GL_GLEXT_PROTOTYPES
10385 GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
10386 GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
10387 #endif
10388 #endif /* GL_SGIS_multisample */
10389
10390 #ifndef GL_SGIS_pixel_texture
10391 #define GL_SGIS_pixel_texture 1
10392 #define GL_PIXEL_TEXTURE_SGIS 0x8353
10393 #define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
10394 #define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
10395 #define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
10396 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
10397 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
10398 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10399 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10400 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
10401 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
10402 #ifdef GL_GLEXT_PROTOTYPES
10403 GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
10404 GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
10405 GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
10406 GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
10407 GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
10408 GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
10409 #endif
10410 #endif /* GL_SGIS_pixel_texture */
10411
10412 #ifndef GL_SGIS_point_line_texgen
10413 #define GL_SGIS_point_line_texgen 1
10414 #define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
10415 #define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
10416 #define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
10417 #define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
10418 #define GL_EYE_POINT_SGIS 0x81F4
10419 #define GL_OBJECT_POINT_SGIS 0x81F5
10420 #define GL_EYE_LINE_SGIS 0x81F6
10421 #define GL_OBJECT_LINE_SGIS 0x81F7
10422 #endif /* GL_SGIS_point_line_texgen */
10423
10424 #ifndef GL_SGIS_point_parameters
10425 #define GL_SGIS_point_parameters 1
10426 #define GL_POINT_SIZE_MIN_SGIS 0x8126
10427 #define GL_POINT_SIZE_MAX_SGIS 0x8127
10428 #define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
10429 #define GL_DISTANCE_ATTENUATION_SGIS 0x8129
10430 typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10431 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10432 #ifdef GL_GLEXT_PROTOTYPES
10433 GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
10434 GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
10435 #endif
10436 #endif /* GL_SGIS_point_parameters */
10437
10438 #ifndef GL_SGIS_sharpen_texture
10439 #define GL_SGIS_sharpen_texture 1
10440 #define GL_LINEAR_SHARPEN_SGIS 0x80AD
10441 #define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
10442 #define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
10443 #define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
10444 typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10445 typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10446 #ifdef GL_GLEXT_PROTOTYPES
10447 GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10448 GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
10449 #endif
10450 #endif /* GL_SGIS_sharpen_texture */
10451
10452 #ifndef GL_SGIS_texture4D
10453 #define GL_SGIS_texture4D 1
10454 #define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
10455 #define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
10456 #define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
10457 #define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
10458 #define GL_TEXTURE_4D_SGIS 0x8134
10459 #define GL_PROXY_TEXTURE_4D_SGIS 0x8135
10460 #define GL_TEXTURE_4DSIZE_SGIS 0x8136
10461 #define GL_TEXTURE_WRAP_Q_SGIS 0x8137
10462 #define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
10463 #define GL_TEXTURE_4D_BINDING_SGIS 0x814F
10464 typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10465 typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10466 #ifdef GL_GLEXT_PROTOTYPES
10467 GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10468 GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10469 #endif
10470 #endif /* GL_SGIS_texture4D */
10471
10472 #ifndef GL_SGIS_texture_border_clamp
10473 #define GL_SGIS_texture_border_clamp 1
10474 #define GL_CLAMP_TO_BORDER_SGIS 0x812D
10475 #endif /* GL_SGIS_texture_border_clamp */
10476
10477 #ifndef GL_SGIS_texture_color_mask
10478 #define GL_SGIS_texture_color_mask 1
10479 #define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
10480 typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10481 #ifdef GL_GLEXT_PROTOTYPES
10482 GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10483 #endif
10484 #endif /* GL_SGIS_texture_color_mask */
10485
10486 #ifndef GL_SGIS_texture_edge_clamp
10487 #define GL_SGIS_texture_edge_clamp 1
10488 #define GL_CLAMP_TO_EDGE_SGIS 0x812F
10489 #endif /* GL_SGIS_texture_edge_clamp */
10490
10491 #ifndef GL_SGIS_texture_filter4
10492 #define GL_SGIS_texture_filter4 1
10493 #define GL_FILTER4_SGIS 0x8146
10494 #define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
10495 typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
10496 typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10497 #ifdef GL_GLEXT_PROTOTYPES
10498 GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
10499 GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10500 #endif
10501 #endif /* GL_SGIS_texture_filter4 */
10502
10503 #ifndef GL_SGIS_texture_lod
10504 #define GL_SGIS_texture_lod 1
10505 #define GL_TEXTURE_MIN_LOD_SGIS 0x813A
10506 #define GL_TEXTURE_MAX_LOD_SGIS 0x813B
10507 #define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
10508 #define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
10509 #endif /* GL_SGIS_texture_lod */
10510
10511 #ifndef GL_SGIS_texture_select
10512 #define GL_SGIS_texture_select 1
10513 #define GL_DUAL_ALPHA4_SGIS 0x8110
10514 #define GL_DUAL_ALPHA8_SGIS 0x8111
10515 #define GL_DUAL_ALPHA12_SGIS 0x8112
10516 #define GL_DUAL_ALPHA16_SGIS 0x8113
10517 #define GL_DUAL_LUMINANCE4_SGIS 0x8114
10518 #define GL_DUAL_LUMINANCE8_SGIS 0x8115
10519 #define GL_DUAL_LUMINANCE12_SGIS 0x8116
10520 #define GL_DUAL_LUMINANCE16_SGIS 0x8117
10521 #define GL_DUAL_INTENSITY4_SGIS 0x8118
10522 #define GL_DUAL_INTENSITY8_SGIS 0x8119
10523 #define GL_DUAL_INTENSITY12_SGIS 0x811A
10524 #define GL_DUAL_INTENSITY16_SGIS 0x811B
10525 #define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
10526 #define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
10527 #define GL_QUAD_ALPHA4_SGIS 0x811E
10528 #define GL_QUAD_ALPHA8_SGIS 0x811F
10529 #define GL_QUAD_LUMINANCE4_SGIS 0x8120
10530 #define GL_QUAD_LUMINANCE8_SGIS 0x8121
10531 #define GL_QUAD_INTENSITY4_SGIS 0x8122
10532 #define GL_QUAD_INTENSITY8_SGIS 0x8123
10533 #define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
10534 #define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
10535 #endif /* GL_SGIS_texture_select */
10536
10537 #ifndef GL_SGIX_async
10538 #define GL_SGIX_async 1
10539 #define GL_ASYNC_MARKER_SGIX 0x8329
10540 typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
10541 typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
10542 typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
10543 typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
10544 typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
10545 typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
10546 #ifdef GL_GLEXT_PROTOTYPES
10547 GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
10548 GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
10549 GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
10550 GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
10551 GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
10552 GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
10553 #endif
10554 #endif /* GL_SGIX_async */
10555
10556 #ifndef GL_SGIX_async_histogram
10557 #define GL_SGIX_async_histogram 1
10558 #define GL_ASYNC_HISTOGRAM_SGIX 0x832C
10559 #define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
10560 #endif /* GL_SGIX_async_histogram */
10561
10562 #ifndef GL_SGIX_async_pixel
10563 #define GL_SGIX_async_pixel 1
10564 #define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
10565 #define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
10566 #define GL_ASYNC_READ_PIXELS_SGIX 0x835E
10567 #define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
10568 #define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
10569 #define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
10570 #endif /* GL_SGIX_async_pixel */
10571
10572 #ifndef GL_SGIX_blend_alpha_minmax
10573 #define GL_SGIX_blend_alpha_minmax 1
10574 #define GL_ALPHA_MIN_SGIX 0x8320
10575 #define GL_ALPHA_MAX_SGIX 0x8321
10576 #endif /* GL_SGIX_blend_alpha_minmax */
10577
10578 #ifndef GL_SGIX_calligraphic_fragment
10579 #define GL_SGIX_calligraphic_fragment 1
10580 #define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
10581 #endif /* GL_SGIX_calligraphic_fragment */
10582
10583 #ifndef GL_SGIX_clipmap
10584 #define GL_SGIX_clipmap 1
10585 #define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
10586 #define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
10587 #define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
10588 #define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
10589 #define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
10590 #define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
10591 #define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
10592 #define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
10593 #define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
10594 #define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
10595 #define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
10596 #define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
10597 #endif /* GL_SGIX_clipmap */
10598
10599 #ifndef GL_SGIX_convolution_accuracy
10600 #define GL_SGIX_convolution_accuracy 1
10601 #define GL_CONVOLUTION_HINT_SGIX 0x8316
10602 #endif /* GL_SGIX_convolution_accuracy */
10603
10604 #ifndef GL_SGIX_depth_pass_instrument
10605 #define GL_SGIX_depth_pass_instrument 1
10606 #endif /* GL_SGIX_depth_pass_instrument */
10607
10608 #ifndef GL_SGIX_depth_texture
10609 #define GL_SGIX_depth_texture 1
10610 #define GL_DEPTH_COMPONENT16_SGIX 0x81A5
10611 #define GL_DEPTH_COMPONENT24_SGIX 0x81A6
10612 #define GL_DEPTH_COMPONENT32_SGIX 0x81A7
10613 #endif /* GL_SGIX_depth_texture */
10614
10615 #ifndef GL_SGIX_flush_raster
10616 #define GL_SGIX_flush_raster 1
10617 typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
10618 #ifdef GL_GLEXT_PROTOTYPES
10619 GLAPI void APIENTRY glFlushRasterSGIX (void);
10620 #endif
10621 #endif /* GL_SGIX_flush_raster */
10622
10623 #ifndef GL_SGIX_fog_offset
10624 #define GL_SGIX_fog_offset 1
10625 #define GL_FOG_OFFSET_SGIX 0x8198
10626 #define GL_FOG_OFFSET_VALUE_SGIX 0x8199
10627 #endif /* GL_SGIX_fog_offset */
10628
10629 #ifndef GL_SGIX_fragment_lighting
10630 #define GL_SGIX_fragment_lighting 1
10631 #define GL_FRAGMENT_LIGHTING_SGIX 0x8400
10632 #define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
10633 #define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
10634 #define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
10635 #define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
10636 #define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
10637 #define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
10638 #define GL_LIGHT_ENV_MODE_SGIX 0x8407
10639 #define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
10640 #define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
10641 #define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
10642 #define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
10643 #define GL_FRAGMENT_LIGHT0_SGIX 0x840C
10644 #define GL_FRAGMENT_LIGHT1_SGIX 0x840D
10645 #define GL_FRAGMENT_LIGHT2_SGIX 0x840E
10646 #define GL_FRAGMENT_LIGHT3_SGIX 0x840F
10647 #define GL_FRAGMENT_LIGHT4_SGIX 0x8410
10648 #define GL_FRAGMENT_LIGHT5_SGIX 0x8411
10649 #define GL_FRAGMENT_LIGHT6_SGIX 0x8412
10650 #define GL_FRAGMENT_LIGHT7_SGIX 0x8413
10651 typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
10652 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
10653 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
10654 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
10655 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
10656 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
10657 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
10658 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
10659 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
10660 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
10661 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
10662 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
10663 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
10664 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
10665 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
10666 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
10667 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
10668 typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
10669 #ifdef GL_GLEXT_PROTOTYPES
10670 GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
10671 GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
10672 GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
10673 GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
10674 GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
10675 GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
10676 GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
10677 GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
10678 GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
10679 GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
10680 GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
10681 GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
10682 GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
10683 GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
10684 GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
10685 GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
10686 GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
10687 GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
10688 #endif
10689 #endif /* GL_SGIX_fragment_lighting */
10690
10691 #ifndef GL_SGIX_framezoom
10692 #define GL_SGIX_framezoom 1
10693 #define GL_FRAMEZOOM_SGIX 0x818B
10694 #define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
10695 #define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
10696 typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
10697 #ifdef GL_GLEXT_PROTOTYPES
10698 GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
10699 #endif
10700 #endif /* GL_SGIX_framezoom */
10701
10702 #ifndef GL_SGIX_igloo_interface
10703 #define GL_SGIX_igloo_interface 1
10704 typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
10705 #ifdef GL_GLEXT_PROTOTYPES
10706 GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
10707 #endif
10708 #endif /* GL_SGIX_igloo_interface */
10709
10710 #ifndef GL_SGIX_instruments
10711 #define GL_SGIX_instruments 1
10712 #define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
10713 #define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
10714 typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
10715 typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
10716 typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
10717 typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
10718 typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
10719 typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
10720 #ifdef GL_GLEXT_PROTOTYPES
10721 GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
10722 GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
10723 GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
10724 GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
10725 GLAPI void APIENTRY glStartInstrumentsSGIX (void);
10726 GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
10727 #endif
10728 #endif /* GL_SGIX_instruments */
10729
10730 #ifndef GL_SGIX_interlace
10731 #define GL_SGIX_interlace 1
10732 #define GL_INTERLACE_SGIX 0x8094
10733 #endif /* GL_SGIX_interlace */
10734
10735 #ifndef GL_SGIX_ir_instrument1
10736 #define GL_SGIX_ir_instrument1 1
10737 #define GL_IR_INSTRUMENT1_SGIX 0x817F
10738 #endif /* GL_SGIX_ir_instrument1 */
10739
10740 #ifndef GL_SGIX_list_priority
10741 #define GL_SGIX_list_priority 1
10742 #define GL_LIST_PRIORITY_SGIX 0x8182
10743 typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
10744 typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
10745 typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
10746 typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
10747 typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
10748 typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
10749 #ifdef GL_GLEXT_PROTOTYPES
10750 GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
10751 GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
10752 GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
10753 GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
10754 GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
10755 GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
10756 #endif
10757 #endif /* GL_SGIX_list_priority */
10758
10759 #ifndef GL_SGIX_pixel_texture
10760 #define GL_SGIX_pixel_texture 1
10761 #define GL_PIXEL_TEX_GEN_SGIX 0x8139
10762 #define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
10763 typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
10764 #ifdef GL_GLEXT_PROTOTYPES
10765 GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
10766 #endif
10767 #endif /* GL_SGIX_pixel_texture */
10768
10769 #ifndef GL_SGIX_pixel_tiles
10770 #define GL_SGIX_pixel_tiles 1
10771 #define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
10772 #define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
10773 #define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
10774 #define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
10775 #define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
10776 #define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
10777 #define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
10778 #define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
10779 #endif /* GL_SGIX_pixel_tiles */
10780
10781 #ifndef GL_SGIX_polynomial_ffd
10782 #define GL_SGIX_polynomial_ffd 1
10783 #define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
10784 #define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
10785 #define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
10786 #define GL_TEXTURE_DEFORMATION_SGIX 0x8195
10787 #define GL_DEFORMATIONS_MASK_SGIX 0x8196
10788 #define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
10789 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10790 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10791 typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
10792 typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
10793 #ifdef GL_GLEXT_PROTOTYPES
10794 GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10795 GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10796 GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
10797 GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
10798 #endif
10799 #endif /* GL_SGIX_polynomial_ffd */
10800
10801 #ifndef GL_SGIX_reference_plane
10802 #define GL_SGIX_reference_plane 1
10803 #define GL_REFERENCE_PLANE_SGIX 0x817D
10804 #define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
10805 typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
10806 #ifdef GL_GLEXT_PROTOTYPES
10807 GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
10808 #endif
10809 #endif /* GL_SGIX_reference_plane */
10810
10811 #ifndef GL_SGIX_resample
10812 #define GL_SGIX_resample 1
10813 #define GL_PACK_RESAMPLE_SGIX 0x842C
10814 #define GL_UNPACK_RESAMPLE_SGIX 0x842D
10815 #define GL_RESAMPLE_REPLICATE_SGIX 0x842E
10816 #define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
10817 #define GL_RESAMPLE_DECIMATE_SGIX 0x8430
10818 #endif /* GL_SGIX_resample */
10819
10820 #ifndef GL_SGIX_scalebias_hint
10821 #define GL_SGIX_scalebias_hint 1
10822 #define GL_SCALEBIAS_HINT_SGIX 0x8322
10823 #endif /* GL_SGIX_scalebias_hint */
10824
10825 #ifndef GL_SGIX_shadow
10826 #define GL_SGIX_shadow 1
10827 #define GL_TEXTURE_COMPARE_SGIX 0x819A
10828 #define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
10829 #define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
10830 #define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
10831 #endif /* GL_SGIX_shadow */
10832
10833 #ifndef GL_SGIX_shadow_ambient
10834 #define GL_SGIX_shadow_ambient 1
10835 #define GL_SHADOW_AMBIENT_SGIX 0x80BF
10836 #endif /* GL_SGIX_shadow_ambient */
10837
10838 #ifndef GL_SGIX_sprite
10839 #define GL_SGIX_sprite 1
10840 #define GL_SPRITE_SGIX 0x8148
10841 #define GL_SPRITE_MODE_SGIX 0x8149
10842 #define GL_SPRITE_AXIS_SGIX 0x814A
10843 #define GL_SPRITE_TRANSLATION_SGIX 0x814B
10844 #define GL_SPRITE_AXIAL_SGIX 0x814C
10845 #define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
10846 #define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
10847 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
10848 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
10849 typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
10850 typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
10851 #ifdef GL_GLEXT_PROTOTYPES
10852 GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
10853 GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
10854 GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
10855 GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
10856 #endif
10857 #endif /* GL_SGIX_sprite */
10858
10859 #ifndef GL_SGIX_subsample
10860 #define GL_SGIX_subsample 1
10861 #define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
10862 #define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
10863 #define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
10864 #define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
10865 #define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
10866 #endif /* GL_SGIX_subsample */
10867
10868 #ifndef GL_SGIX_tag_sample_buffer
10869 #define GL_SGIX_tag_sample_buffer 1
10870 typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
10871 #ifdef GL_GLEXT_PROTOTYPES
10872 GLAPI void APIENTRY glTagSampleBufferSGIX (void);
10873 #endif
10874 #endif /* GL_SGIX_tag_sample_buffer */
10875
10876 #ifndef GL_SGIX_texture_add_env
10877 #define GL_SGIX_texture_add_env 1
10878 #define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
10879 #endif /* GL_SGIX_texture_add_env */
10880
10881 #ifndef GL_SGIX_texture_coordinate_clamp
10882 #define GL_SGIX_texture_coordinate_clamp 1
10883 #define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
10884 #define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
10885 #define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
10886 #endif /* GL_SGIX_texture_coordinate_clamp */
10887
10888 #ifndef GL_SGIX_texture_lod_bias
10889 #define GL_SGIX_texture_lod_bias 1
10890 #define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
10891 #define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
10892 #define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
10893 #endif /* GL_SGIX_texture_lod_bias */
10894
10895 #ifndef GL_SGIX_texture_multi_buffer
10896 #define GL_SGIX_texture_multi_buffer 1
10897 #define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
10898 #endif /* GL_SGIX_texture_multi_buffer */
10899
10900 #ifndef GL_SGIX_texture_scale_bias
10901 #define GL_SGIX_texture_scale_bias 1
10902 #define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
10903 #define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
10904 #define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
10905 #define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
10906 #endif /* GL_SGIX_texture_scale_bias */
10907
10908 #ifndef GL_SGIX_vertex_preclip
10909 #define GL_SGIX_vertex_preclip 1
10910 #define GL_VERTEX_PRECLIP_SGIX 0x83EE
10911 #define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
10912 #endif /* GL_SGIX_vertex_preclip */
10913
10914 #ifndef GL_SGIX_ycrcb
10915 #define GL_SGIX_ycrcb 1
10916 #define GL_YCRCB_422_SGIX 0x81BB
10917 #define GL_YCRCB_444_SGIX 0x81BC
10918 #endif /* GL_SGIX_ycrcb */
10919
10920 #ifndef GL_SGIX_ycrcb_subsample
10921 #define GL_SGIX_ycrcb_subsample 1
10922 #endif /* GL_SGIX_ycrcb_subsample */
10923
10924 #ifndef GL_SGIX_ycrcba
10925 #define GL_SGIX_ycrcba 1
10926 #define GL_YCRCB_SGIX 0x8318
10927 #define GL_YCRCBA_SGIX 0x8319
10928 #endif /* GL_SGIX_ycrcba */
10929
10930 #ifndef GL_SGI_color_matrix
10931 #define GL_SGI_color_matrix 1
10932 #define GL_COLOR_MATRIX_SGI 0x80B1
10933 #define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
10934 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
10935 #define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
10936 #define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
10937 #define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
10938 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
10939 #define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
10940 #define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
10941 #define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
10942 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
10943 #endif /* GL_SGI_color_matrix */
10944
10945 #ifndef GL_SGI_color_table
10946 #define GL_SGI_color_table 1
10947 #define GL_COLOR_TABLE_SGI 0x80D0
10948 #define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
10949 #define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
10950 #define GL_PROXY_COLOR_TABLE_SGI 0x80D3
10951 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
10952 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
10953 #define GL_COLOR_TABLE_SCALE_SGI 0x80D6
10954 #define GL_COLOR_TABLE_BIAS_SGI 0x80D7
10955 #define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
10956 #define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
10957 #define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
10958 #define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
10959 #define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
10960 #define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
10961 #define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
10962 #define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
10963 typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10964 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
10965 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
10966 typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10967 typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
10968 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
10969 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
10970 #ifdef GL_GLEXT_PROTOTYPES
10971 GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10972 GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
10973 GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
10974 GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10975 GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
10976 GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
10977 GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
10978 #endif
10979 #endif /* GL_SGI_color_table */
10980
10981 #ifndef GL_SGI_texture_color_table
10982 #define GL_SGI_texture_color_table 1
10983 #define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
10984 #define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
10985 #endif /* GL_SGI_texture_color_table */
10986
10987 #ifndef GL_SUNX_constant_data
10988 #define GL_SUNX_constant_data 1
10989 #define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
10990 #define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
10991 typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
10992 #ifdef GL_GLEXT_PROTOTYPES
10993 GLAPI void APIENTRY glFinishTextureSUNX (void);
10994 #endif
10995 #endif /* GL_SUNX_constant_data */
10996
10997 #ifndef GL_SUN_convolution_border_modes
10998 #define GL_SUN_convolution_border_modes 1
10999 #define GL_WRAP_BORDER_SUN 0x81D4
11000 #endif /* GL_SUN_convolution_border_modes */
11001
11002 #ifndef GL_SUN_global_alpha
11003 #define GL_SUN_global_alpha 1
11004 #define GL_GLOBAL_ALPHA_SUN 0x81D9
11005 #define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
11006 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
11007 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
11008 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
11009 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
11010 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
11011 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
11012 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
11013 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
11014 #ifdef GL_GLEXT_PROTOTYPES
11015 GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
11016 GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
11017 GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
11018 GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
11019 GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
11020 GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
11021 GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
11022 GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
11023 #endif
11024 #endif /* GL_SUN_global_alpha */
11025
11026 #ifndef GL_SUN_mesh_array
11027 #define GL_SUN_mesh_array 1
11028 #define GL_QUAD_MESH_SUN 0x8614
11029 #define GL_TRIANGLE_MESH_SUN 0x8615
11030 typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
11031 #ifdef GL_GLEXT_PROTOTYPES
11032 GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
11033 #endif
11034 #endif /* GL_SUN_mesh_array */
11035
11036 #ifndef GL_SUN_slice_accum
11037 #define GL_SUN_slice_accum 1
11038 #define GL_SLICE_ACCUM_SUN 0x85CC
11039 #endif /* GL_SUN_slice_accum */
11040
11041 #ifndef GL_SUN_triangle_list
11042 #define GL_SUN_triangle_list 1
11043 #define GL_RESTART_SUN 0x0001
11044 #define GL_REPLACE_MIDDLE_SUN 0x0002
11045 #define GL_REPLACE_OLDEST_SUN 0x0003
11046 #define GL_TRIANGLE_LIST_SUN 0x81D7
11047 #define GL_REPLACEMENT_CODE_SUN 0x81D8
11048 #define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
11049 #define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
11050 #define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
11051 #define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
11052 #define GL_R1UI_V3F_SUN 0x85C4
11053 #define GL_R1UI_C4UB_V3F_SUN 0x85C5
11054 #define GL_R1UI_C3F_V3F_SUN 0x85C6
11055 #define GL_R1UI_N3F_V3F_SUN 0x85C7
11056 #define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
11057 #define GL_R1UI_T2F_V3F_SUN 0x85C9
11058 #define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
11059 #define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
11060 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
11061 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
11062 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
11063 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
11064 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
11065 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
11066 typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
11067 #ifdef GL_GLEXT_PROTOTYPES
11068 GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
11069 GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
11070 GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
11071 GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
11072 GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
11073 GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
11074 GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
11075 #endif
11076 #endif /* GL_SUN_triangle_list */
11077
11078 #ifndef GL_SUN_vertex
11079 #define GL_SUN_vertex 1
11080 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11081 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11082 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11083 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11084 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11085 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
11086 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11087 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
11088 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11089 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11090 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11091 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11092 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11093 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11094 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11095 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11096 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11097 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11098 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11099 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11100 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11101 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11102 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11103 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11104 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11105 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
11106 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11107 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11108 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11109 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11110 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11111 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11112 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11113 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11114 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11115 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11116 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11117 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11118 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11119 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11120 #ifdef GL_GLEXT_PROTOTYPES
11121 GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11122 GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
11123 GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11124 GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
11125 GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11126 GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
11127 GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11128 GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
11129 GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11130 GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11131 GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11132 GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
11133 GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11134 GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
11135 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11136 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11137 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11138 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11139 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11140 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11141 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11142 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11143 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11144 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11145 GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11146 GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
11147 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11148 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11149 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11150 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11151 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11152 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11153 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11154 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11155 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11156 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11157 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11158 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11159 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11160 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11161 #endif
11162 #endif /* GL_SUN_vertex */
11163
11164 #ifndef GL_WIN_phong_shading
11165 #define GL_WIN_phong_shading 1
11166 #define GL_PHONG_WIN 0x80EA
11167 #define GL_PHONG_HINT_WIN 0x80EB
11168 #endif /* GL_WIN_phong_shading */
11169
11170 #ifndef GL_WIN_specular_fog
11171 #define GL_WIN_specular_fog 1
11172 #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
11173 #endif /* GL_WIN_specular_fog */
11174
11175 #ifdef __cplusplus
11176 }
11177 #endif
11178
11179 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #ifdef __IPHONEOS__
29 #include <OpenGLES/ES1/gl.h>
30 #include <OpenGLES/ES1/glext.h>
31 #else
32 #include <GLES/gl.h>
33 #include <GLES/glext.h>
34 #endif
35
36 #ifndef APIENTRY
37 #define APIENTRY
38 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles2.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
29
30 #ifdef __IPHONEOS__
31 #include <OpenGLES/ES2/gl.h>
32 #include <OpenGLES/ES2/glext.h>
33 #else
34 #include <GLES2/gl2platform.h>
35 #include <GLES2/gl2.h>
36 #include <GLES2/gl2ext.h>
37 #endif
38
39 #else /* _MSC_VER */
40
41 /* OpenGL ES2 headers for Visual Studio */
42 #include <SDL2/SDL_opengles2_khrplatform.h>
43 #include <SDL2/SDL_opengles2_gl2platform.h>
44 #include <SDL2/SDL_opengles2_gl2.h>
45 #include <SDL2/SDL_opengles2_gl2ext.h>
46
47 #endif /* _MSC_VER */
48
49 #ifndef APIENTRY
50 #define APIENTRY GL_APIENTRY
51 #endif
0 #ifndef __gl2_h_
1 #define __gl2_h_
2
3 /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
4
5 /*#include <GLES2/gl2platform.h>*/
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /*
12 * This document is licensed under the SGI Free Software B License Version
13 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
14 */
15
16 /*-------------------------------------------------------------------------
17 * Data type definitions
18 *-----------------------------------------------------------------------*/
19
20 typedef void GLvoid;
21 typedef char GLchar;
22 typedef unsigned int GLenum;
23 typedef unsigned char GLboolean;
24 typedef unsigned int GLbitfield;
25 typedef khronos_int8_t GLbyte;
26 typedef short GLshort;
27 typedef int GLint;
28 typedef int GLsizei;
29 typedef khronos_uint8_t GLubyte;
30 typedef unsigned short GLushort;
31 typedef unsigned int GLuint;
32 typedef khronos_float_t GLfloat;
33 typedef khronos_float_t GLclampf;
34 typedef khronos_int32_t GLfixed;
35
36 /* GL types for handling large vertex buffer objects */
37 typedef khronos_intptr_t GLintptr;
38 typedef khronos_ssize_t GLsizeiptr;
39
40 /* OpenGL ES core versions */
41 #define GL_ES_VERSION_2_0 1
42
43 /* ClearBufferMask */
44 #define GL_DEPTH_BUFFER_BIT 0x00000100
45 #define GL_STENCIL_BUFFER_BIT 0x00000400
46 #define GL_COLOR_BUFFER_BIT 0x00004000
47
48 /* Boolean */
49 #define GL_FALSE 0
50 #define GL_TRUE 1
51
52 /* BeginMode */
53 #define GL_POINTS 0x0000
54 #define GL_LINES 0x0001
55 #define GL_LINE_LOOP 0x0002
56 #define GL_LINE_STRIP 0x0003
57 #define GL_TRIANGLES 0x0004
58 #define GL_TRIANGLE_STRIP 0x0005
59 #define GL_TRIANGLE_FAN 0x0006
60
61 /* AlphaFunction (not supported in ES20) */
62 /* GL_NEVER */
63 /* GL_LESS */
64 /* GL_EQUAL */
65 /* GL_LEQUAL */
66 /* GL_GREATER */
67 /* GL_NOTEQUAL */
68 /* GL_GEQUAL */
69 /* GL_ALWAYS */
70
71 /* BlendingFactorDest */
72 #define GL_ZERO 0
73 #define GL_ONE 1
74 #define GL_SRC_COLOR 0x0300
75 #define GL_ONE_MINUS_SRC_COLOR 0x0301
76 #define GL_SRC_ALPHA 0x0302
77 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
78 #define GL_DST_ALPHA 0x0304
79 #define GL_ONE_MINUS_DST_ALPHA 0x0305
80
81 /* BlendingFactorSrc */
82 /* GL_ZERO */
83 /* GL_ONE */
84 #define GL_DST_COLOR 0x0306
85 #define GL_ONE_MINUS_DST_COLOR 0x0307
86 #define GL_SRC_ALPHA_SATURATE 0x0308
87 /* GL_SRC_ALPHA */
88 /* GL_ONE_MINUS_SRC_ALPHA */
89 /* GL_DST_ALPHA */
90 /* GL_ONE_MINUS_DST_ALPHA */
91
92 /* BlendEquationSeparate */
93 #define GL_FUNC_ADD 0x8006
94 #define GL_BLEND_EQUATION 0x8009
95 #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
96 #define GL_BLEND_EQUATION_ALPHA 0x883D
97
98 /* BlendSubtract */
99 #define GL_FUNC_SUBTRACT 0x800A
100 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
101
102 /* Separate Blend Functions */
103 #define GL_BLEND_DST_RGB 0x80C8
104 #define GL_BLEND_SRC_RGB 0x80C9
105 #define GL_BLEND_DST_ALPHA 0x80CA
106 #define GL_BLEND_SRC_ALPHA 0x80CB
107 #define GL_CONSTANT_COLOR 0x8001
108 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
109 #define GL_CONSTANT_ALPHA 0x8003
110 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
111 #define GL_BLEND_COLOR 0x8005
112
113 /* Buffer Objects */
114 #define GL_ARRAY_BUFFER 0x8892
115 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
116 #define GL_ARRAY_BUFFER_BINDING 0x8894
117 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
118
119 #define GL_STREAM_DRAW 0x88E0
120 #define GL_STATIC_DRAW 0x88E4
121 #define GL_DYNAMIC_DRAW 0x88E8
122
123 #define GL_BUFFER_SIZE 0x8764
124 #define GL_BUFFER_USAGE 0x8765
125
126 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
127
128 /* CullFaceMode */
129 #define GL_FRONT 0x0404
130 #define GL_BACK 0x0405
131 #define GL_FRONT_AND_BACK 0x0408
132
133 /* DepthFunction */
134 /* GL_NEVER */
135 /* GL_LESS */
136 /* GL_EQUAL */
137 /* GL_LEQUAL */
138 /* GL_GREATER */
139 /* GL_NOTEQUAL */
140 /* GL_GEQUAL */
141 /* GL_ALWAYS */
142
143 /* EnableCap */
144 #define GL_TEXTURE_2D 0x0DE1
145 #define GL_CULL_FACE 0x0B44
146 #define GL_BLEND 0x0BE2
147 #define GL_DITHER 0x0BD0
148 #define GL_STENCIL_TEST 0x0B90
149 #define GL_DEPTH_TEST 0x0B71
150 #define GL_SCISSOR_TEST 0x0C11
151 #define GL_POLYGON_OFFSET_FILL 0x8037
152 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
153 #define GL_SAMPLE_COVERAGE 0x80A0
154
155 /* ErrorCode */
156 #define GL_NO_ERROR 0
157 #define GL_INVALID_ENUM 0x0500
158 #define GL_INVALID_VALUE 0x0501
159 #define GL_INVALID_OPERATION 0x0502
160 #define GL_OUT_OF_MEMORY 0x0505
161
162 /* FrontFaceDirection */
163 #define GL_CW 0x0900
164 #define GL_CCW 0x0901
165
166 /* GetPName */
167 #define GL_LINE_WIDTH 0x0B21
168 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
169 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
170 #define GL_CULL_FACE_MODE 0x0B45
171 #define GL_FRONT_FACE 0x0B46
172 #define GL_DEPTH_RANGE 0x0B70
173 #define GL_DEPTH_WRITEMASK 0x0B72
174 #define GL_DEPTH_CLEAR_VALUE 0x0B73
175 #define GL_DEPTH_FUNC 0x0B74
176 #define GL_STENCIL_CLEAR_VALUE 0x0B91
177 #define GL_STENCIL_FUNC 0x0B92
178 #define GL_STENCIL_FAIL 0x0B94
179 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
180 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
181 #define GL_STENCIL_REF 0x0B97
182 #define GL_STENCIL_VALUE_MASK 0x0B93
183 #define GL_STENCIL_WRITEMASK 0x0B98
184 #define GL_STENCIL_BACK_FUNC 0x8800
185 #define GL_STENCIL_BACK_FAIL 0x8801
186 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
187 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
188 #define GL_STENCIL_BACK_REF 0x8CA3
189 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
190 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
191 #define GL_VIEWPORT 0x0BA2
192 #define GL_SCISSOR_BOX 0x0C10
193 /* GL_SCISSOR_TEST */
194 #define GL_COLOR_CLEAR_VALUE 0x0C22
195 #define GL_COLOR_WRITEMASK 0x0C23
196 #define GL_UNPACK_ALIGNMENT 0x0CF5
197 #define GL_PACK_ALIGNMENT 0x0D05
198 #define GL_MAX_TEXTURE_SIZE 0x0D33
199 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
200 #define GL_SUBPIXEL_BITS 0x0D50
201 #define GL_RED_BITS 0x0D52
202 #define GL_GREEN_BITS 0x0D53
203 #define GL_BLUE_BITS 0x0D54
204 #define GL_ALPHA_BITS 0x0D55
205 #define GL_DEPTH_BITS 0x0D56
206 #define GL_STENCIL_BITS 0x0D57
207 #define GL_POLYGON_OFFSET_UNITS 0x2A00
208 /* GL_POLYGON_OFFSET_FILL */
209 #define GL_POLYGON_OFFSET_FACTOR 0x8038
210 #define GL_TEXTURE_BINDING_2D 0x8069
211 #define GL_SAMPLE_BUFFERS 0x80A8
212 #define GL_SAMPLES 0x80A9
213 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
214 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
215
216 /* GetTextureParameter */
217 /* GL_TEXTURE_MAG_FILTER */
218 /* GL_TEXTURE_MIN_FILTER */
219 /* GL_TEXTURE_WRAP_S */
220 /* GL_TEXTURE_WRAP_T */
221
222 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
223 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
224
225 /* HintMode */
226 #define GL_DONT_CARE 0x1100
227 #define GL_FASTEST 0x1101
228 #define GL_NICEST 0x1102
229
230 /* HintTarget */
231 #define GL_GENERATE_MIPMAP_HINT 0x8192
232
233 /* DataType */
234 #define GL_BYTE 0x1400
235 #define GL_UNSIGNED_BYTE 0x1401
236 #define GL_SHORT 0x1402
237 #define GL_UNSIGNED_SHORT 0x1403
238 #define GL_INT 0x1404
239 #define GL_UNSIGNED_INT 0x1405
240 #define GL_FLOAT 0x1406
241 #define GL_FIXED 0x140C
242
243 /* PixelFormat */
244 #define GL_DEPTH_COMPONENT 0x1902
245 #define GL_ALPHA 0x1906
246 #define GL_RGB 0x1907
247 #define GL_RGBA 0x1908
248 #define GL_LUMINANCE 0x1909
249 #define GL_LUMINANCE_ALPHA 0x190A
250
251 /* PixelType */
252 /* GL_UNSIGNED_BYTE */
253 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
254 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
255 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
256
257 /* Shaders */
258 #define GL_FRAGMENT_SHADER 0x8B30
259 #define GL_VERTEX_SHADER 0x8B31
260 #define GL_MAX_VERTEX_ATTRIBS 0x8869
261 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
262 #define GL_MAX_VARYING_VECTORS 0x8DFC
263 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
264 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
265 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
266 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
267 #define GL_SHADER_TYPE 0x8B4F
268 #define GL_DELETE_STATUS 0x8B80
269 #define GL_LINK_STATUS 0x8B82
270 #define GL_VALIDATE_STATUS 0x8B83
271 #define GL_ATTACHED_SHADERS 0x8B85
272 #define GL_ACTIVE_UNIFORMS 0x8B86
273 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
274 #define GL_ACTIVE_ATTRIBUTES 0x8B89
275 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
276 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
277 #define GL_CURRENT_PROGRAM 0x8B8D
278
279 /* StencilFunction */
280 #define GL_NEVER 0x0200
281 #define GL_LESS 0x0201
282 #define GL_EQUAL 0x0202
283 #define GL_LEQUAL 0x0203
284 #define GL_GREATER 0x0204
285 #define GL_NOTEQUAL 0x0205
286 #define GL_GEQUAL 0x0206
287 #define GL_ALWAYS 0x0207
288
289 /* StencilOp */
290 /* GL_ZERO */
291 #define GL_KEEP 0x1E00
292 #define GL_REPLACE 0x1E01
293 #define GL_INCR 0x1E02
294 #define GL_DECR 0x1E03
295 #define GL_INVERT 0x150A
296 #define GL_INCR_WRAP 0x8507
297 #define GL_DECR_WRAP 0x8508
298
299 /* StringName */
300 #define GL_VENDOR 0x1F00
301 #define GL_RENDERER 0x1F01
302 #define GL_VERSION 0x1F02
303 #define GL_EXTENSIONS 0x1F03
304
305 /* TextureMagFilter */
306 #define GL_NEAREST 0x2600
307 #define GL_LINEAR 0x2601
308
309 /* TextureMinFilter */
310 /* GL_NEAREST */
311 /* GL_LINEAR */
312 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
313 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
314 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
315 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
316
317 /* TextureParameterName */
318 #define GL_TEXTURE_MAG_FILTER 0x2800
319 #define GL_TEXTURE_MIN_FILTER 0x2801
320 #define GL_TEXTURE_WRAP_S 0x2802
321 #define GL_TEXTURE_WRAP_T 0x2803
322
323 /* TextureTarget */
324 /* GL_TEXTURE_2D */
325 #define GL_TEXTURE 0x1702
326
327 #define GL_TEXTURE_CUBE_MAP 0x8513
328 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
329 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
330 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
331 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
332 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
333 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
334 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
335 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
336
337 /* TextureUnit */
338 #define GL_TEXTURE0 0x84C0
339 #define GL_TEXTURE1 0x84C1
340 #define GL_TEXTURE2 0x84C2
341 #define GL_TEXTURE3 0x84C3
342 #define GL_TEXTURE4 0x84C4
343 #define GL_TEXTURE5 0x84C5
344 #define GL_TEXTURE6 0x84C6
345 #define GL_TEXTURE7 0x84C7
346 #define GL_TEXTURE8 0x84C8
347 #define GL_TEXTURE9 0x84C9
348 #define GL_TEXTURE10 0x84CA
349 #define GL_TEXTURE11 0x84CB
350 #define GL_TEXTURE12 0x84CC
351 #define GL_TEXTURE13 0x84CD
352 #define GL_TEXTURE14 0x84CE
353 #define GL_TEXTURE15 0x84CF
354 #define GL_TEXTURE16 0x84D0
355 #define GL_TEXTURE17 0x84D1
356 #define GL_TEXTURE18 0x84D2
357 #define GL_TEXTURE19 0x84D3
358 #define GL_TEXTURE20 0x84D4
359 #define GL_TEXTURE21 0x84D5
360 #define GL_TEXTURE22 0x84D6
361 #define GL_TEXTURE23 0x84D7
362 #define GL_TEXTURE24 0x84D8
363 #define GL_TEXTURE25 0x84D9
364 #define GL_TEXTURE26 0x84DA
365 #define GL_TEXTURE27 0x84DB
366 #define GL_TEXTURE28 0x84DC
367 #define GL_TEXTURE29 0x84DD
368 #define GL_TEXTURE30 0x84DE
369 #define GL_TEXTURE31 0x84DF
370 #define GL_ACTIVE_TEXTURE 0x84E0
371
372 /* TextureWrapMode */
373 #define GL_REPEAT 0x2901
374 #define GL_CLAMP_TO_EDGE 0x812F
375 #define GL_MIRRORED_REPEAT 0x8370
376
377 /* Uniform Types */
378 #define GL_FLOAT_VEC2 0x8B50
379 #define GL_FLOAT_VEC3 0x8B51
380 #define GL_FLOAT_VEC4 0x8B52
381 #define GL_INT_VEC2 0x8B53
382 #define GL_INT_VEC3 0x8B54
383 #define GL_INT_VEC4 0x8B55
384 #define GL_BOOL 0x8B56
385 #define GL_BOOL_VEC2 0x8B57
386 #define GL_BOOL_VEC3 0x8B58
387 #define GL_BOOL_VEC4 0x8B59
388 #define GL_FLOAT_MAT2 0x8B5A
389 #define GL_FLOAT_MAT3 0x8B5B
390 #define GL_FLOAT_MAT4 0x8B5C
391 #define GL_SAMPLER_2D 0x8B5E
392 #define GL_SAMPLER_CUBE 0x8B60
393
394 /* Vertex Arrays */
395 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
396 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
397 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
398 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
399 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
400 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
401 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
402
403 /* Read Format */
404 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
405 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
406
407 /* Shader Source */
408 #define GL_COMPILE_STATUS 0x8B81
409 #define GL_INFO_LOG_LENGTH 0x8B84
410 #define GL_SHADER_SOURCE_LENGTH 0x8B88
411 #define GL_SHADER_COMPILER 0x8DFA
412
413 /* Shader Binary */
414 #define GL_SHADER_BINARY_FORMATS 0x8DF8
415 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
416
417 /* Shader Precision-Specified Types */
418 #define GL_LOW_FLOAT 0x8DF0
419 #define GL_MEDIUM_FLOAT 0x8DF1
420 #define GL_HIGH_FLOAT 0x8DF2
421 #define GL_LOW_INT 0x8DF3
422 #define GL_MEDIUM_INT 0x8DF4
423 #define GL_HIGH_INT 0x8DF5
424
425 /* Framebuffer Object. */
426 #define GL_FRAMEBUFFER 0x8D40
427 #define GL_RENDERBUFFER 0x8D41
428
429 #define GL_RGBA4 0x8056
430 #define GL_RGB5_A1 0x8057
431 #define GL_RGB565 0x8D62
432 #define GL_DEPTH_COMPONENT16 0x81A5
433 #define GL_STENCIL_INDEX8 0x8D48
434
435 #define GL_RENDERBUFFER_WIDTH 0x8D42
436 #define GL_RENDERBUFFER_HEIGHT 0x8D43
437 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
438 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
439 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
440 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
441 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
442 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
443 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
444
445 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
446 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
447 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
448 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
449
450 #define GL_COLOR_ATTACHMENT0 0x8CE0
451 #define GL_DEPTH_ATTACHMENT 0x8D00
452 #define GL_STENCIL_ATTACHMENT 0x8D20
453
454 #define GL_NONE 0
455
456 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
457 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
458 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
459 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
460 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
461
462 #define GL_FRAMEBUFFER_BINDING 0x8CA6
463 #define GL_RENDERBUFFER_BINDING 0x8CA7
464 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
465
466 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
467
468 /*-------------------------------------------------------------------------
469 * GL core functions.
470 *-----------------------------------------------------------------------*/
471
472 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
473 GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
474 GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
475 GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
476 GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
477 GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
478 GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
479 GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
480 GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
481 GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
482 GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
483 GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
484 GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
485 GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
486 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
487 GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
488 GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
489 GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
490 GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
491 GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
492 GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
493 GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
494 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);
495 GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
496 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
497 GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
498 GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
499 GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
500 GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
501 GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
502 GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
503 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
504 GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
505 GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
506 GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
507 GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
508 GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
509 GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
510 GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
511 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
512 GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
513 GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
514 GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
515 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
516 GL_APICALL void GL_APIENTRY glFinish (void);
517 GL_APICALL void GL_APIENTRY glFlush (void);
518 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
519 GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
520 GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
521 GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
522 GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
523 GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
524 GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
525 GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
526 GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
527 GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
528 GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
529 GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
530 GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
531 GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
532 GL_APICALL GLenum GL_APIENTRY glGetError (void);
533 GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
534 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
535 GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
536 GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
537 GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
538 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
539 GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
540 GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
541 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
542 GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
543 GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
544 GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
545 GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
546 GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
547 GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
548 GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
549 GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
550 GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
551 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
552 GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
553 GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
554 GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
555 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
556 GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
557 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
558 GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
559 GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
560 GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
561 GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
562 GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
563 GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
564 GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
565 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
566 GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
567 GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
568 GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
569 GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
570 GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
571 GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
572 GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
573 GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
574 GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
575 GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
576 GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
577 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);
578 GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
579 GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
580 GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
581 GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
582 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);
583 GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
584 GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
585 GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
586 GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
587 GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
588 GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
589 GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
590 GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
591 GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
592 GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
593 GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
594 GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
595 GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
596 GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
597 GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
598 GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
599 GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
600 GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
601 GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
602 GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
603 GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
604 GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
605 GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
606 GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
607 GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
608 GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
609 GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
610 GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
611 GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
612 GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
613 GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
614
615 #ifdef __cplusplus
616 }
617 #endif
618
619 #endif /* __gl2_h_ */
620
0 #ifndef __gl2ext_h_
1 #define __gl2ext_h_
2
3 /* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /*
10 * This document is licensed under the SGI Free Software B License Version
11 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
12 */
13
14 #ifndef GL_APIENTRYP
15 # define GL_APIENTRYP GL_APIENTRY*
16 #endif
17
18 /* New types shared by several extensions */
19
20 #ifndef __gl3_h_
21 /* These are defined with respect to <inttypes.h> in the
22 * Apple extension spec, but they are also used by non-APPLE
23 * extensions, and in the Khronos header we use the Khronos
24 * portable types in khrplatform.h, which must be defined.
25 */
26 typedef khronos_int64_t GLint64;
27 typedef khronos_uint64_t GLuint64;
28 typedef struct __GLsync *GLsync;
29 #endif
30
31
32 /*------------------------------------------------------------------------*
33 * OES extension tokens
34 *------------------------------------------------------------------------*/
35
36 /* GL_OES_compressed_ETC1_RGB8_texture */
37 #ifndef GL_OES_compressed_ETC1_RGB8_texture
38 #define GL_ETC1_RGB8_OES 0x8D64
39 #endif
40
41 /* GL_OES_compressed_paletted_texture */
42 #ifndef GL_OES_compressed_paletted_texture
43 #define GL_PALETTE4_RGB8_OES 0x8B90
44 #define GL_PALETTE4_RGBA8_OES 0x8B91
45 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
46 #define GL_PALETTE4_RGBA4_OES 0x8B93
47 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
48 #define GL_PALETTE8_RGB8_OES 0x8B95
49 #define GL_PALETTE8_RGBA8_OES 0x8B96
50 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
51 #define GL_PALETTE8_RGBA4_OES 0x8B98
52 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
53 #endif
54
55 /* GL_OES_depth24 */
56 #ifndef GL_OES_depth24
57 #define GL_DEPTH_COMPONENT24_OES 0x81A6
58 #endif
59
60 /* GL_OES_depth32 */
61 #ifndef GL_OES_depth32
62 #define GL_DEPTH_COMPONENT32_OES 0x81A7
63 #endif
64
65 /* GL_OES_depth_texture */
66 /* No new tokens introduced by this extension. */
67
68 /* GL_OES_EGL_image */
69 #ifndef GL_OES_EGL_image
70 typedef void* GLeglImageOES;
71 #endif
72
73 /* GL_OES_EGL_image_external */
74 #ifndef GL_OES_EGL_image_external
75 /* GLeglImageOES defined in GL_OES_EGL_image already. */
76 #define GL_TEXTURE_EXTERNAL_OES 0x8D65
77 #define GL_SAMPLER_EXTERNAL_OES 0x8D66
78 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
79 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
80 #endif
81
82 /* GL_OES_element_index_uint */
83 #ifndef GL_OES_element_index_uint
84 #define GL_UNSIGNED_INT 0x1405
85 #endif
86
87 /* GL_OES_get_program_binary */
88 #ifndef GL_OES_get_program_binary
89 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
90 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
91 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
92 #endif
93
94 /* GL_OES_mapbuffer */
95 #ifndef GL_OES_mapbuffer
96 #define GL_WRITE_ONLY_OES 0x88B9
97 #define GL_BUFFER_ACCESS_OES 0x88BB
98 #define GL_BUFFER_MAPPED_OES 0x88BC
99 #define GL_BUFFER_MAP_POINTER_OES 0x88BD
100 #endif
101
102 /* GL_OES_packed_depth_stencil */
103 #ifndef GL_OES_packed_depth_stencil
104 #define GL_DEPTH_STENCIL_OES 0x84F9
105 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
106 #define GL_DEPTH24_STENCIL8_OES 0x88F0
107 #endif
108
109 /* GL_OES_required_internalformat */
110 #ifndef GL_OES_required_internalformat
111 #define GL_ALPHA8_OES 0x803C
112 #define GL_DEPTH_COMPONENT16_OES 0x81A5
113 /* reuse GL_DEPTH_COMPONENT24_OES */
114 /* reuse GL_DEPTH24_STENCIL8_OES */
115 /* reuse GL_DEPTH_COMPONENT32_OES */
116 #define GL_LUMINANCE4_ALPHA4_OES 0x8043
117 #define GL_LUMINANCE8_ALPHA8_OES 0x8045
118 #define GL_LUMINANCE8_OES 0x8040
119 #define GL_RGBA4_OES 0x8056
120 #define GL_RGB5_A1_OES 0x8057
121 #define GL_RGB565_OES 0x8D62
122 /* reuse GL_RGB8_OES */
123 /* reuse GL_RGBA8_OES */
124 /* reuse GL_RGB10_EXT */
125 /* reuse GL_RGB10_A2_EXT */
126 #endif
127
128 /* GL_OES_rgb8_rgba8 */
129 #ifndef GL_OES_rgb8_rgba8
130 #define GL_RGB8_OES 0x8051
131 #define GL_RGBA8_OES 0x8058
132 #endif
133
134 /* GL_OES_standard_derivatives */
135 #ifndef GL_OES_standard_derivatives
136 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
137 #endif
138
139 /* GL_OES_stencil1 */
140 #ifndef GL_OES_stencil1
141 #define GL_STENCIL_INDEX1_OES 0x8D46
142 #endif
143
144 /* GL_OES_stencil4 */
145 #ifndef GL_OES_stencil4
146 #define GL_STENCIL_INDEX4_OES 0x8D47
147 #endif
148
149 #ifndef GL_OES_surfaceless_context
150 #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
151 #endif
152
153 /* GL_OES_texture_3D */
154 #ifndef GL_OES_texture_3D
155 #define GL_TEXTURE_WRAP_R_OES 0x8072
156 #define GL_TEXTURE_3D_OES 0x806F
157 #define GL_TEXTURE_BINDING_3D_OES 0x806A
158 #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
159 #define GL_SAMPLER_3D_OES 0x8B5F
160 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
161 #endif
162
163 /* GL_OES_texture_float */
164 /* No new tokens introduced by this extension. */
165
166 /* GL_OES_texture_float_linear */
167 /* No new tokens introduced by this extension. */
168
169 /* GL_OES_texture_half_float */
170 #ifndef GL_OES_texture_half_float
171 #define GL_HALF_FLOAT_OES 0x8D61
172 #endif
173
174 /* GL_OES_texture_half_float_linear */
175 /* No new tokens introduced by this extension. */
176
177 /* GL_OES_texture_npot */
178 /* No new tokens introduced by this extension. */
179
180 /* GL_OES_vertex_array_object */
181 #ifndef GL_OES_vertex_array_object
182 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
183 #endif
184
185 /* GL_OES_vertex_half_float */
186 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
187
188 /* GL_OES_vertex_type_10_10_10_2 */
189 #ifndef GL_OES_vertex_type_10_10_10_2
190 #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
191 #define GL_INT_10_10_10_2_OES 0x8DF7
192 #endif
193
194 /*------------------------------------------------------------------------*
195 * KHR extension tokens
196 *------------------------------------------------------------------------*/
197
198 #ifndef GL_KHR_debug
199 typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
200 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
201 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
202 #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
203 #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
204 #define GL_DEBUG_SOURCE_API_KHR 0x8246
205 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
206 #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
207 #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
208 #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
209 #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
210 #define GL_DEBUG_TYPE_ERROR_KHR 0x824C
211 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
212 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
213 #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
214 #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
215 #define GL_DEBUG_TYPE_OTHER_KHR 0x8251
216 #define GL_DEBUG_TYPE_MARKER_KHR 0x8268
217 #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
218 #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
219 #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
220 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
221 #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
222 #define GL_BUFFER_KHR 0x82E0
223 #define GL_SHADER_KHR 0x82E1
224 #define GL_PROGRAM_KHR 0x82E2
225 #define GL_QUERY_KHR 0x82E3
226 /* PROGRAM_PIPELINE only in GL */
227 #define GL_SAMPLER_KHR 0x82E6
228 /* DISPLAY_LIST only in GL */
229 #define GL_MAX_LABEL_LENGTH_KHR 0x82E8
230 #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
231 #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
232 #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
233 #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
234 #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
235 #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
236 #define GL_DEBUG_OUTPUT_KHR 0x92E0
237 #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
238 #define GL_STACK_OVERFLOW_KHR 0x0503
239 #define GL_STACK_UNDERFLOW_KHR 0x0504
240 #endif
241
242 #ifndef GL_KHR_texture_compression_astc_ldr
243 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
244 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
245 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
246 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
247 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
248 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
249 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
250 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
251 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
252 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
253 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
254 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
255 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
256 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
257 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
258 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
259 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
260 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
261 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
262 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
263 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
264 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
265 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
266 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
267 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
268 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
269 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
270 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
271 #endif
272
273 /*------------------------------------------------------------------------*
274 * AMD extension tokens
275 *------------------------------------------------------------------------*/
276
277 /* GL_AMD_compressed_3DC_texture */
278 #ifndef GL_AMD_compressed_3DC_texture
279 #define GL_3DC_X_AMD 0x87F9
280 #define GL_3DC_XY_AMD 0x87FA
281 #endif
282
283 /* GL_AMD_compressed_ATC_texture */
284 #ifndef GL_AMD_compressed_ATC_texture
285 #define GL_ATC_RGB_AMD 0x8C92
286 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
287 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
288 #endif
289
290 /* GL_AMD_performance_monitor */
291 #ifndef GL_AMD_performance_monitor
292 #define GL_COUNTER_TYPE_AMD 0x8BC0
293 #define GL_COUNTER_RANGE_AMD 0x8BC1
294 #define GL_UNSIGNED_INT64_AMD 0x8BC2
295 #define GL_PERCENTAGE_AMD 0x8BC3
296 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
297 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
298 #define GL_PERFMON_RESULT_AMD 0x8BC6
299 #endif
300
301 /* GL_AMD_program_binary_Z400 */
302 #ifndef GL_AMD_program_binary_Z400
303 #define GL_Z400_BINARY_AMD 0x8740
304 #endif
305
306 /*------------------------------------------------------------------------*
307 * ANGLE extension tokens
308 *------------------------------------------------------------------------*/
309
310 /* GL_ANGLE_depth_texture */
311 #ifndef GL_ANGLE_depth_texture
312 #define GL_DEPTH_COMPONENT 0x1902
313 #define GL_DEPTH_STENCIL_OES 0x84F9
314 #define GL_UNSIGNED_SHORT 0x1403
315 #define GL_UNSIGNED_INT 0x1405
316 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
317 #define GL_DEPTH_COMPONENT16 0x81A5
318 #define GL_DEPTH_COMPONENT32_OES 0x81A7
319 #define GL_DEPTH24_STENCIL8_OES 0x88F0
320 #endif
321
322 /* GL_ANGLE_framebuffer_blit */
323 #ifndef GL_ANGLE_framebuffer_blit
324 #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
325 #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
326 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
327 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
328 #endif
329
330 /* GL_ANGLE_framebuffer_multisample */
331 #ifndef GL_ANGLE_framebuffer_multisample
332 #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
333 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
334 #define GL_MAX_SAMPLES_ANGLE 0x8D57
335 #endif
336
337 /* GL_ANGLE_instanced_arrays */
338 #ifndef GL_ANGLE_instanced_arrays
339 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
340 #endif
341
342 /* GL_ANGLE_pack_reverse_row_order */
343 #ifndef GL_ANGLE_pack_reverse_row_order
344 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
345 #endif
346
347 /* GL_ANGLE_program_binary */
348 #ifndef GL_ANGLE_program_binary
349 #define GL_PROGRAM_BINARY_ANGLE 0x93A6
350 #endif
351
352 /* GL_ANGLE_texture_compression_dxt3 */
353 #ifndef GL_ANGLE_texture_compression_dxt3
354 #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
355 #endif
356
357 /* GL_ANGLE_texture_compression_dxt5 */
358 #ifndef GL_ANGLE_texture_compression_dxt5
359 #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
360 #endif
361
362 /* GL_ANGLE_texture_usage */
363 #ifndef GL_ANGLE_texture_usage
364 #define GL_TEXTURE_USAGE_ANGLE 0x93A2
365 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
366 #endif
367
368 /* GL_ANGLE_translated_shader_source */
369 #ifndef GL_ANGLE_translated_shader_source
370 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
371 #endif
372
373 /*------------------------------------------------------------------------*
374 * APPLE extension tokens
375 *------------------------------------------------------------------------*/
376
377 /* GL_APPLE_copy_texture_levels */
378 /* No new tokens introduced by this extension. */
379
380 /* GL_APPLE_framebuffer_multisample */
381 #ifndef GL_APPLE_framebuffer_multisample
382 #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
383 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
384 #define GL_MAX_SAMPLES_APPLE 0x8D57
385 #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
386 #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
387 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
388 #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
389 #endif
390
391 /* GL_APPLE_rgb_422 */
392 #ifndef GL_APPLE_rgb_422
393 #define GL_RGB_422_APPLE 0x8A1F
394 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
395 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
396 #endif
397
398 /* GL_APPLE_sync */
399 #ifndef GL_APPLE_sync
400
401 #define GL_SYNC_OBJECT_APPLE 0x8A53
402 #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
403 #define GL_OBJECT_TYPE_APPLE 0x9112
404 #define GL_SYNC_CONDITION_APPLE 0x9113
405 #define GL_SYNC_STATUS_APPLE 0x9114
406 #define GL_SYNC_FLAGS_APPLE 0x9115
407 #define GL_SYNC_FENCE_APPLE 0x9116
408 #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
409 #define GL_UNSIGNALED_APPLE 0x9118
410 #define GL_SIGNALED_APPLE 0x9119
411 #define GL_ALREADY_SIGNALED_APPLE 0x911A
412 #define GL_TIMEOUT_EXPIRED_APPLE 0x911B
413 #define GL_CONDITION_SATISFIED_APPLE 0x911C
414 #define GL_WAIT_FAILED_APPLE 0x911D
415 #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
416 #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
417 #endif
418
419 /* GL_APPLE_texture_format_BGRA8888 */
420 #ifndef GL_APPLE_texture_format_BGRA8888
421 #define GL_BGRA_EXT 0x80E1
422 #endif
423
424 /* GL_APPLE_texture_max_level */
425 #ifndef GL_APPLE_texture_max_level
426 #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
427 #endif
428
429 /*------------------------------------------------------------------------*
430 * ARM extension tokens
431 *------------------------------------------------------------------------*/
432
433 /* GL_ARM_mali_program_binary */
434 #ifndef GL_ARM_mali_program_binary
435 #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
436 #endif
437
438 /* GL_ARM_mali_shader_binary */
439 #ifndef GL_ARM_mali_shader_binary
440 #define GL_MALI_SHADER_BINARY_ARM 0x8F60
441 #endif
442
443 /* GL_ARM_rgba8 */
444 /* No new tokens introduced by this extension. */
445
446 /*------------------------------------------------------------------------*
447 * EXT extension tokens
448 *------------------------------------------------------------------------*/
449
450 /* GL_EXT_blend_minmax */
451 #ifndef GL_EXT_blend_minmax
452 #define GL_MIN_EXT 0x8007
453 #define GL_MAX_EXT 0x8008
454 #endif
455
456 /* GL_EXT_color_buffer_half_float */
457 #ifndef GL_EXT_color_buffer_half_float
458 #define GL_RGBA16F_EXT 0x881A
459 #define GL_RGB16F_EXT 0x881B
460 #define GL_RG16F_EXT 0x822F
461 #define GL_R16F_EXT 0x822D
462 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
463 #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
464 #endif
465
466 /* GL_EXT_debug_label */
467 #ifndef GL_EXT_debug_label
468 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
469 #define GL_PROGRAM_OBJECT_EXT 0x8B40
470 #define GL_SHADER_OBJECT_EXT 0x8B48
471 #define GL_BUFFER_OBJECT_EXT 0x9151
472 #define GL_QUERY_OBJECT_EXT 0x9153
473 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
474 #endif
475
476 /* GL_EXT_debug_marker */
477 /* No new tokens introduced by this extension. */
478
479 /* GL_EXT_discard_framebuffer */
480 #ifndef GL_EXT_discard_framebuffer
481 #define GL_COLOR_EXT 0x1800
482 #define GL_DEPTH_EXT 0x1801
483 #define GL_STENCIL_EXT 0x1802
484 #endif
485
486 #ifndef GL_EXT_disjoint_timer_query
487 #define GL_QUERY_COUNTER_BITS_EXT 0x8864
488 #define GL_CURRENT_QUERY_EXT 0x8865
489 #define GL_QUERY_RESULT_EXT 0x8866
490 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
491 #define GL_TIME_ELAPSED_EXT 0x88BF
492 #define GL_TIMESTAMP_EXT 0x8E28
493 #define GL_GPU_DISJOINT_EXT 0x8FBB
494 #endif
495
496 #ifndef GL_EXT_draw_buffers
497 #define GL_EXT_draw_buffers 1
498 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
499 #define GL_MAX_DRAW_BUFFERS_EXT 0x8824
500 #define GL_DRAW_BUFFER0_EXT 0x8825
501 #define GL_DRAW_BUFFER1_EXT 0x8826
502 #define GL_DRAW_BUFFER2_EXT 0x8827
503 #define GL_DRAW_BUFFER3_EXT 0x8828
504 #define GL_DRAW_BUFFER4_EXT 0x8829
505 #define GL_DRAW_BUFFER5_EXT 0x882A
506 #define GL_DRAW_BUFFER6_EXT 0x882B
507 #define GL_DRAW_BUFFER7_EXT 0x882C
508 #define GL_DRAW_BUFFER8_EXT 0x882D
509 #define GL_DRAW_BUFFER9_EXT 0x882E
510 #define GL_DRAW_BUFFER10_EXT 0x882F
511 #define GL_DRAW_BUFFER11_EXT 0x8830
512 #define GL_DRAW_BUFFER12_EXT 0x8831
513 #define GL_DRAW_BUFFER13_EXT 0x8832
514 #define GL_DRAW_BUFFER14_EXT 0x8833
515 #define GL_DRAW_BUFFER15_EXT 0x8834
516 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
517 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
518 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
519 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
520 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
521 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
522 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
523 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
524 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
525 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
526 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
527 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
528 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
529 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
530 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
531 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
532 #endif
533
534 /* GL_EXT_map_buffer_range */
535 #ifndef GL_EXT_map_buffer_range
536 #define GL_MAP_READ_BIT_EXT 0x0001
537 #define GL_MAP_WRITE_BIT_EXT 0x0002
538 #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
539 #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
540 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
541 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
542 #endif
543
544 /* GL_EXT_multisampled_render_to_texture */
545 #ifndef GL_EXT_multisampled_render_to_texture
546 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
547 /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
548 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
549 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
550 #define GL_MAX_SAMPLES_EXT 0x8D57
551 #endif
552
553 /* GL_EXT_multiview_draw_buffers */
554 #ifndef GL_EXT_multiview_draw_buffers
555 #define GL_COLOR_ATTACHMENT_EXT 0x90F0
556 #define GL_MULTIVIEW_EXT 0x90F1
557 #define GL_DRAW_BUFFER_EXT 0x0C01
558 #define GL_READ_BUFFER_EXT 0x0C02
559 #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
560 #endif
561
562 /* GL_EXT_multi_draw_arrays */
563 /* No new tokens introduced by this extension. */
564
565 /* GL_EXT_occlusion_query_boolean */
566 #ifndef GL_EXT_occlusion_query_boolean
567 #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
568 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
569 #define GL_CURRENT_QUERY_EXT 0x8865
570 #define GL_QUERY_RESULT_EXT 0x8866
571 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
572 #endif
573
574 /* GL_EXT_read_format_bgra */
575 #ifndef GL_EXT_read_format_bgra
576 #define GL_BGRA_EXT 0x80E1
577 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
578 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
579 #endif
580
581 /* GL_EXT_robustness */
582 #ifndef GL_EXT_robustness
583 /* reuse GL_NO_ERROR */
584 #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
585 #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
586 #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
587 #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
588 #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
589 #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
590 #define GL_NO_RESET_NOTIFICATION_EXT 0x8261
591 #endif
592
593 /* GL_EXT_separate_shader_objects */
594 #ifndef GL_EXT_separate_shader_objects
595 #define GL_VERTEX_SHADER_BIT_EXT 0x00000001
596 #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
597 #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
598 #define GL_PROGRAM_SEPARABLE_EXT 0x8258
599 #define GL_ACTIVE_PROGRAM_EXT 0x8259
600 #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
601 #endif
602
603 /* GL_EXT_shader_framebuffer_fetch */
604 #ifndef GL_EXT_shader_framebuffer_fetch
605 #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
606 #endif
607
608 /* GL_EXT_shader_texture_lod */
609 /* No new tokens introduced by this extension. */
610
611 /* GL_EXT_shadow_samplers */
612 #ifndef GL_EXT_shadow_samplers
613 #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
614 #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
615 #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
616 #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
617 #endif
618
619 /* GL_EXT_sRGB */
620 #ifndef GL_EXT_sRGB
621 #define GL_SRGB_EXT 0x8C40
622 #define GL_SRGB_ALPHA_EXT 0x8C42
623 #define GL_SRGB8_ALPHA8_EXT 0x8C43
624 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
625 #endif
626
627 /* GL_EXT_sRGB_write_control */
628 #ifndef GL_EXT_sRGB_write_control
629 #define GL_EXT_sRGB_write_control 1
630 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
631 #endif
632
633 /* GL_EXT_texture_compression_dxt1 */
634 #ifndef GL_EXT_texture_compression_dxt1
635 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
636 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
637 #endif
638
639 /* GL_EXT_texture_filter_anisotropic */
640 #ifndef GL_EXT_texture_filter_anisotropic
641 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
642 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
643 #endif
644
645 /* GL_EXT_texture_format_BGRA8888 */
646 #ifndef GL_EXT_texture_format_BGRA8888
647 #define GL_BGRA_EXT 0x80E1
648 #endif
649
650 /* GL_EXT_texture_rg */
651 #ifndef GL_EXT_texture_rg
652 #define GL_RED_EXT 0x1903
653 #define GL_RG_EXT 0x8227
654 #define GL_R8_EXT 0x8229
655 #define GL_RG8_EXT 0x822B
656 #endif
657
658 /* GL_EXT_texture_sRGB_decode */
659 #ifndef GL_EXT_texture_sRGB_decode
660 #define GL_EXT_texture_sRGB_decode 1
661 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
662 #define GL_DECODE_EXT 0x8A49
663 #define GL_SKIP_DECODE_EXT 0x8A4A
664 #endif
665
666 /* GL_EXT_texture_storage */
667 #ifndef GL_EXT_texture_storage
668 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
669 #define GL_ALPHA8_EXT 0x803C
670 #define GL_LUMINANCE8_EXT 0x8040
671 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
672 #define GL_RGBA32F_EXT 0x8814
673 #define GL_RGB32F_EXT 0x8815
674 #define GL_ALPHA32F_EXT 0x8816
675 #define GL_LUMINANCE32F_EXT 0x8818
676 #define GL_LUMINANCE_ALPHA32F_EXT 0x8819
677 /* reuse GL_RGBA16F_EXT */
678 /* reuse GL_RGB16F_EXT */
679 #define GL_ALPHA16F_EXT 0x881C
680 #define GL_LUMINANCE16F_EXT 0x881E
681 #define GL_LUMINANCE_ALPHA16F_EXT 0x881F
682 #define GL_RGB10_A2_EXT 0x8059
683 #define GL_RGB10_EXT 0x8052
684 #define GL_BGRA8_EXT 0x93A1
685 #define GL_R8_EXT 0x8229
686 #define GL_RG8_EXT 0x822B
687 #define GL_R32F_EXT 0x822E
688 #define GL_RG32F_EXT 0x8230
689 #define GL_R16F_EXT 0x822D
690 #define GL_RG16F_EXT 0x822F
691 #endif
692
693 /* GL_EXT_texture_type_2_10_10_10_REV */
694 #ifndef GL_EXT_texture_type_2_10_10_10_REV
695 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
696 #endif
697
698 /* GL_EXT_unpack_subimage */
699 #ifndef GL_EXT_unpack_subimage
700 #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
701 #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
702 #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
703 #endif
704
705 /*------------------------------------------------------------------------*
706 * DMP extension tokens
707 *------------------------------------------------------------------------*/
708
709 /* GL_DMP_shader_binary */
710 #ifndef GL_DMP_shader_binary
711 #define GL_SHADER_BINARY_DMP 0x9250
712 #endif
713
714 /*------------------------------------------------------------------------*
715 * FJ extension tokens
716 *------------------------------------------------------------------------*/
717
718 /* GL_FJ_shader_binary_GCCSO */
719 #ifndef GL_FJ_shader_binary_GCCSO
720 #define GL_GCCSO_SHADER_BINARY_FJ 0x9260
721 #endif
722
723 /*------------------------------------------------------------------------*
724 * IMG extension tokens
725 *------------------------------------------------------------------------*/
726
727 /* GL_IMG_program_binary */
728 #ifndef GL_IMG_program_binary
729 #define GL_SGX_PROGRAM_BINARY_IMG 0x9130
730 #endif
731
732 /* GL_IMG_read_format */
733 #ifndef GL_IMG_read_format
734 #define GL_BGRA_IMG 0x80E1
735 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
736 #endif
737
738 /* GL_IMG_shader_binary */
739 #ifndef GL_IMG_shader_binary
740 #define GL_SGX_BINARY_IMG 0x8C0A
741 #endif
742
743 /* GL_IMG_texture_compression_pvrtc */
744 #ifndef GL_IMG_texture_compression_pvrtc
745 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
746 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
747 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
748 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
749 #endif
750
751 /* GL_IMG_texture_compression_pvrtc2 */
752 #ifndef GL_IMG_texture_compression_pvrtc2
753 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
754 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
755 #endif
756
757 /* GL_IMG_multisampled_render_to_texture */
758 #ifndef GL_IMG_multisampled_render_to_texture
759 #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
760 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
761 #define GL_MAX_SAMPLES_IMG 0x9135
762 #define GL_TEXTURE_SAMPLES_IMG 0x9136
763 #endif
764
765 /*------------------------------------------------------------------------*
766 * NV extension tokens
767 *------------------------------------------------------------------------*/
768
769 /* GL_NV_coverage_sample */
770 #ifndef GL_NV_coverage_sample
771 #define GL_COVERAGE_COMPONENT_NV 0x8ED0
772 #define GL_COVERAGE_COMPONENT4_NV 0x8ED1
773 #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
774 #define GL_COVERAGE_BUFFERS_NV 0x8ED3
775 #define GL_COVERAGE_SAMPLES_NV 0x8ED4
776 #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
777 #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
778 #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
779 #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
780 #endif
781
782 /* GL_NV_depth_nonlinear */
783 #ifndef GL_NV_depth_nonlinear
784 #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
785 #endif
786
787 /* GL_NV_draw_buffers */
788 #ifndef GL_NV_draw_buffers
789 #define GL_MAX_DRAW_BUFFERS_NV 0x8824
790 #define GL_DRAW_BUFFER0_NV 0x8825
791 #define GL_DRAW_BUFFER1_NV 0x8826
792 #define GL_DRAW_BUFFER2_NV 0x8827
793 #define GL_DRAW_BUFFER3_NV 0x8828
794 #define GL_DRAW_BUFFER4_NV 0x8829
795 #define GL_DRAW_BUFFER5_NV 0x882A
796 #define GL_DRAW_BUFFER6_NV 0x882B
797 #define GL_DRAW_BUFFER7_NV 0x882C
798 #define GL_DRAW_BUFFER8_NV 0x882D
799 #define GL_DRAW_BUFFER9_NV 0x882E
800 #define GL_DRAW_BUFFER10_NV 0x882F
801 #define GL_DRAW_BUFFER11_NV 0x8830
802 #define GL_DRAW_BUFFER12_NV 0x8831
803 #define GL_DRAW_BUFFER13_NV 0x8832
804 #define GL_DRAW_BUFFER14_NV 0x8833
805 #define GL_DRAW_BUFFER15_NV 0x8834
806 #define GL_COLOR_ATTACHMENT0_NV 0x8CE0
807 #define GL_COLOR_ATTACHMENT1_NV 0x8CE1
808 #define GL_COLOR_ATTACHMENT2_NV 0x8CE2
809 #define GL_COLOR_ATTACHMENT3_NV 0x8CE3
810 #define GL_COLOR_ATTACHMENT4_NV 0x8CE4
811 #define GL_COLOR_ATTACHMENT5_NV 0x8CE5
812 #define GL_COLOR_ATTACHMENT6_NV 0x8CE6
813 #define GL_COLOR_ATTACHMENT7_NV 0x8CE7
814 #define GL_COLOR_ATTACHMENT8_NV 0x8CE8
815 #define GL_COLOR_ATTACHMENT9_NV 0x8CE9
816 #define GL_COLOR_ATTACHMENT10_NV 0x8CEA
817 #define GL_COLOR_ATTACHMENT11_NV 0x8CEB
818 #define GL_COLOR_ATTACHMENT12_NV 0x8CEC
819 #define GL_COLOR_ATTACHMENT13_NV 0x8CED
820 #define GL_COLOR_ATTACHMENT14_NV 0x8CEE
821 #define GL_COLOR_ATTACHMENT15_NV 0x8CEF
822 #endif
823
824 /* GL_NV_draw_instanced */
825 /* No new tokens introduced by this extension. */
826
827 /* GL_NV_fbo_color_attachments */
828 #ifndef GL_NV_fbo_color_attachments
829 #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
830 /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
831 #endif
832
833 /* GL_NV_fence */
834 #ifndef GL_NV_fence
835 #define GL_ALL_COMPLETED_NV 0x84F2
836 #define GL_FENCE_STATUS_NV 0x84F3
837 #define GL_FENCE_CONDITION_NV 0x84F4
838 #endif
839
840 /* GL_NV_framebuffer_blit */
841 #ifndef GL_NV_framebuffer_blit
842 #define GL_READ_FRAMEBUFFER_NV 0x8CA8
843 #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
844 #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
845 #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
846 #endif
847
848 /* GL_NV_framebuffer_multisample */
849 #ifndef GL_NV_framebuffer_multisample
850 #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
851 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
852 #define GL_MAX_SAMPLES_NV 0x8D57
853 #endif
854
855 /* GL_NV_generate_mipmap_sRGB */
856 /* No new tokens introduced by this extension. */
857
858 /* GL_NV_instanced_arrays */
859 #ifndef GL_NV_instanced_arrays
860 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
861 #endif
862
863 /* GL_NV_read_buffer */
864 #ifndef GL_NV_read_buffer
865 #define GL_READ_BUFFER_NV 0x0C02
866 #endif
867
868 /* GL_NV_read_buffer_front */
869 /* No new tokens introduced by this extension. */
870
871 /* GL_NV_read_depth */
872 /* No new tokens introduced by this extension. */
873
874 /* GL_NV_read_depth_stencil */
875 /* No new tokens introduced by this extension. */
876
877 /* GL_NV_read_stencil */
878 /* No new tokens introduced by this extension. */
879
880 /* GL_NV_shadow_samplers_array */
881 #ifndef GL_NV_shadow_samplers_array
882 #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
883 #endif
884
885 /* GL_NV_shadow_samplers_cube */
886 #ifndef GL_NV_shadow_samplers_cube
887 #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
888 #endif
889
890 /* GL_NV_sRGB_formats */
891 #ifndef GL_NV_sRGB_formats
892 #define GL_SLUMINANCE_NV 0x8C46
893 #define GL_SLUMINANCE_ALPHA_NV 0x8C44
894 #define GL_SRGB8_NV 0x8C41
895 #define GL_SLUMINANCE8_NV 0x8C47
896 #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
897 #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
898 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
899 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
900 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
901 #define GL_ETC1_SRGB8_NV 0x88EE
902 #endif
903
904 /* GL_NV_texture_border_clamp */
905 #ifndef GL_NV_texture_border_clamp
906 #define GL_TEXTURE_BORDER_COLOR_NV 0x1004
907 #define GL_CLAMP_TO_BORDER_NV 0x812D
908 #endif
909
910 /* GL_NV_texture_compression_s3tc_update */
911 /* No new tokens introduced by this extension. */
912
913 /* GL_NV_texture_npot_2D_mipmap */
914 /* No new tokens introduced by this extension. */
915
916 /*------------------------------------------------------------------------*
917 * QCOM extension tokens
918 *------------------------------------------------------------------------*/
919
920 /* GL_QCOM_alpha_test */
921 #ifndef GL_QCOM_alpha_test
922 #define GL_ALPHA_TEST_QCOM 0x0BC0
923 #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
924 #define GL_ALPHA_TEST_REF_QCOM 0x0BC2
925 #endif
926
927 /* GL_QCOM_binning_control */
928 #ifndef GL_QCOM_binning_control
929 #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
930 #define GL_CPU_OPTIMIZED_QCOM 0x8FB1
931 #define GL_GPU_OPTIMIZED_QCOM 0x8FB2
932 #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
933 #endif
934
935 /* GL_QCOM_driver_control */
936 /* No new tokens introduced by this extension. */
937
938 /* GL_QCOM_extended_get */
939 #ifndef GL_QCOM_extended_get
940 #define GL_TEXTURE_WIDTH_QCOM 0x8BD2
941 #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
942 #define GL_TEXTURE_DEPTH_QCOM 0x8BD4
943 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
944 #define GL_TEXTURE_FORMAT_QCOM 0x8BD6
945 #define GL_TEXTURE_TYPE_QCOM 0x8BD7
946 #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
947 #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
948 #define GL_TEXTURE_TARGET_QCOM 0x8BDA
949 #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
950 #define GL_STATE_RESTORE 0x8BDC
951 #endif
952
953 /* GL_QCOM_extended_get2 */
954 /* No new tokens introduced by this extension. */
955
956 /* GL_QCOM_perfmon_global_mode */
957 #ifndef GL_QCOM_perfmon_global_mode
958 #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
959 #endif
960
961 /* GL_QCOM_writeonly_rendering */
962 #ifndef GL_QCOM_writeonly_rendering
963 #define GL_WRITEONLY_RENDERING_QCOM 0x8823
964 #endif
965
966 /* GL_QCOM_tiled_rendering */
967 #ifndef GL_QCOM_tiled_rendering
968 #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
969 #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
970 #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
971 #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
972 #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
973 #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
974 #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
975 #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
976 #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
977 #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
978 #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
979 #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
980 #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
981 #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
982 #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
983 #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
984 #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
985 #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
986 #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
987 #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
988 #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
989 #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
990 #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
991 #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
992 #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
993 #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
994 #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
995 #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
996 #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
997 #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
998 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
999 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
1000 #endif
1001
1002 /*------------------------------------------------------------------------*
1003 * VIV extension tokens
1004 *------------------------------------------------------------------------*/
1005
1006 /* GL_VIV_shader_binary */
1007 #ifndef GL_VIV_shader_binary
1008 #define GL_SHADER_BINARY_VIV 0x8FC4
1009 #endif
1010
1011 /*------------------------------------------------------------------------*
1012 * End of extension tokens, start of corresponding extension functions
1013 *------------------------------------------------------------------------*/
1014
1015 /*------------------------------------------------------------------------*
1016 * OES extension functions
1017 *------------------------------------------------------------------------*/
1018
1019 /* GL_OES_compressed_ETC1_RGB8_texture */
1020 #ifndef GL_OES_compressed_ETC1_RGB8_texture
1021 #define GL_OES_compressed_ETC1_RGB8_texture 1
1022 #endif
1023
1024 /* GL_OES_compressed_paletted_texture */
1025 #ifndef GL_OES_compressed_paletted_texture
1026 #define GL_OES_compressed_paletted_texture 1
1027 #endif
1028
1029 /* GL_OES_depth24 */
1030 #ifndef GL_OES_depth24
1031 #define GL_OES_depth24 1
1032 #endif
1033
1034 /* GL_OES_depth32 */
1035 #ifndef GL_OES_depth32
1036 #define GL_OES_depth32 1
1037 #endif
1038
1039 /* GL_OES_depth_texture */
1040 #ifndef GL_OES_depth_texture
1041 #define GL_OES_depth_texture 1
1042 #endif
1043
1044 /* GL_OES_EGL_image */
1045 #ifndef GL_OES_EGL_image
1046 #define GL_OES_EGL_image 1
1047 #ifdef GL_GLEXT_PROTOTYPES
1048 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
1049 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
1050 #endif
1051 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
1052 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
1053 #endif
1054
1055 /* GL_OES_EGL_image_external */
1056 #ifndef GL_OES_EGL_image_external
1057 #define GL_OES_EGL_image_external 1
1058 /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
1059 #endif
1060
1061 /* GL_OES_element_index_uint */
1062 #ifndef GL_OES_element_index_uint
1063 #define GL_OES_element_index_uint 1
1064 #endif
1065
1066 /* GL_OES_fbo_render_mipmap */
1067 #ifndef GL_OES_fbo_render_mipmap
1068 #define GL_OES_fbo_render_mipmap 1
1069 #endif
1070
1071 /* GL_OES_fragment_precision_high */
1072 #ifndef GL_OES_fragment_precision_high
1073 #define GL_OES_fragment_precision_high 1
1074 #endif
1075
1076 /* GL_OES_get_program_binary */
1077 #ifndef GL_OES_get_program_binary
1078 #define GL_OES_get_program_binary 1
1079 #ifdef GL_GLEXT_PROTOTYPES
1080 GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1081 GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1082 #endif
1083 typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1084 typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1085 #endif
1086
1087 /* GL_OES_mapbuffer */
1088 #ifndef GL_OES_mapbuffer
1089 #define GL_OES_mapbuffer 1
1090 #ifdef GL_GLEXT_PROTOTYPES
1091 GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
1092 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
1093 GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);
1094 #endif
1095 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
1096 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
1097 typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);
1098 #endif
1099
1100 /* GL_OES_packed_depth_stencil */
1101 #ifndef GL_OES_packed_depth_stencil
1102 #define GL_OES_packed_depth_stencil 1
1103 #endif
1104
1105 /* GL_OES_required_internalformat */
1106 #ifndef GL_OES_required_internalformat
1107 #define GL_OES_required_internalformat 1
1108 #endif
1109
1110 /* GL_OES_rgb8_rgba8 */
1111 #ifndef GL_OES_rgb8_rgba8
1112 #define GL_OES_rgb8_rgba8 1
1113 #endif
1114
1115 /* GL_OES_standard_derivatives */
1116 #ifndef GL_OES_standard_derivatives
1117 #define GL_OES_standard_derivatives 1
1118 #endif
1119
1120 /* GL_OES_stencil1 */
1121 #ifndef GL_OES_stencil1
1122 #define GL_OES_stencil1 1
1123 #endif
1124
1125 /* GL_OES_stencil4 */
1126 #ifndef GL_OES_stencil4
1127 #define GL_OES_stencil4 1
1128 #endif
1129
1130 #ifndef GL_OES_surfaceless_context
1131 #define GL_OES_surfaceless_context 1
1132 #endif
1133
1134 /* GL_OES_texture_3D */
1135 #ifndef GL_OES_texture_3D
1136 #define GL_OES_texture_3D 1
1137 #ifdef GL_GLEXT_PROTOTYPES
1138 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);
1139 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);
1140 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1141 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);
1142 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);
1143 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1144 #endif
1145 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);
1146 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);
1147 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1148 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
1149 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);
1150 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1151 #endif
1152
1153 /* GL_OES_texture_float */
1154 #ifndef GL_OES_texture_float
1155 #define GL_OES_texture_float 1
1156 #endif
1157
1158 /* GL_OES_texture_float_linear */
1159 #ifndef GL_OES_texture_float_linear
1160 #define GL_OES_texture_float_linear 1
1161 #endif
1162
1163 /* GL_OES_texture_half_float */
1164 #ifndef GL_OES_texture_half_float
1165 #define GL_OES_texture_half_float 1
1166 #endif
1167
1168 /* GL_OES_texture_half_float_linear */
1169 #ifndef GL_OES_texture_half_float_linear
1170 #define GL_OES_texture_half_float_linear 1
1171 #endif
1172
1173 /* GL_OES_texture_npot */
1174 #ifndef GL_OES_texture_npot
1175 #define GL_OES_texture_npot 1
1176 #endif
1177
1178 /* GL_OES_vertex_array_object */
1179 #ifndef GL_OES_vertex_array_object
1180 #define GL_OES_vertex_array_object 1
1181 #ifdef GL_GLEXT_PROTOTYPES
1182 GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
1183 GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
1184 GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
1185 GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
1186 #endif
1187 typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
1188 typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
1189 typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
1190 typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
1191 #endif
1192
1193 /* GL_OES_vertex_half_float */
1194 #ifndef GL_OES_vertex_half_float
1195 #define GL_OES_vertex_half_float 1
1196 #endif
1197
1198 /* GL_OES_vertex_type_10_10_10_2 */
1199 #ifndef GL_OES_vertex_type_10_10_10_2
1200 #define GL_OES_vertex_type_10_10_10_2 1
1201 #endif
1202
1203 /*------------------------------------------------------------------------*
1204 * KHR extension functions
1205 *------------------------------------------------------------------------*/
1206
1207 #ifndef GL_KHR_debug
1208 #define GL_KHR_debug 1
1209 #ifdef GL_GLEXT_PROTOTYPES
1210 GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1211 GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1212 GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
1213 GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1214 GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1215 GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
1216 GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1217 GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1218 GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
1219 GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1220 GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);
1221 #endif
1222 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1223 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1224 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
1225 typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1226 typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1227 typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
1228 typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1229 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1230 typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
1231 typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1232 typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);
1233 #endif
1234
1235 #ifndef GL_KHR_texture_compression_astc_ldr
1236 #define GL_KHR_texture_compression_astc_ldr 1
1237 #endif
1238
1239
1240 /*------------------------------------------------------------------------*
1241 * AMD extension functions
1242 *------------------------------------------------------------------------*/
1243
1244 /* GL_AMD_compressed_3DC_texture */
1245 #ifndef GL_AMD_compressed_3DC_texture
1246 #define GL_AMD_compressed_3DC_texture 1
1247 #endif
1248
1249 /* GL_AMD_compressed_ATC_texture */
1250 #ifndef GL_AMD_compressed_ATC_texture
1251 #define GL_AMD_compressed_ATC_texture 1
1252 #endif
1253
1254 /* AMD_performance_monitor */
1255 #ifndef GL_AMD_performance_monitor
1256 #define GL_AMD_performance_monitor 1
1257 #ifdef GL_GLEXT_PROTOTYPES
1258 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1259 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1260 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1261 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1262 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1263 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
1264 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
1265 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1266 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
1267 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
1268 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1269 #endif
1270 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1271 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1272 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1273 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1274 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1275 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1276 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1277 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1278 typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
1279 typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
1280 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1281 #endif
1282
1283 /* GL_AMD_program_binary_Z400 */
1284 #ifndef GL_AMD_program_binary_Z400
1285 #define GL_AMD_program_binary_Z400 1
1286 #endif
1287
1288 /*------------------------------------------------------------------------*
1289 * ANGLE extension functions
1290 *------------------------------------------------------------------------*/
1291
1292 /* GL_ANGLE_depth_texture */
1293 #ifndef GL_ANGLE_depth_texture
1294 #define GL_ANGLE_depth_texture 1
1295 #endif
1296
1297 /* GL_ANGLE_framebuffer_blit */
1298 #ifndef GL_ANGLE_framebuffer_blit
1299 #define GL_ANGLE_framebuffer_blit 1
1300 #ifdef GL_GLEXT_PROTOTYPES
1301 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);
1302 #endif
1303 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);
1304 #endif
1305
1306 /* GL_ANGLE_framebuffer_multisample */
1307 #ifndef GL_ANGLE_framebuffer_multisample
1308 #define GL_ANGLE_framebuffer_multisample 1
1309 #ifdef GL_GLEXT_PROTOTYPES
1310 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1311 #endif
1312 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1313 #endif
1314
1315 #ifndef GL_ANGLE_instanced_arrays
1316 #define GL_ANGLE_instanced_arrays 1
1317 #ifdef GL_GLEXT_PROTOTYPES
1318 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1319 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1320 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
1321 #endif
1322 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1323 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1324 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
1325 #endif
1326
1327 /* GL_ANGLE_pack_reverse_row_order */
1328 #ifndef GL_ANGLE_pack_reverse_row_order
1329 #define GL_ANGLE_pack_reverse_row_order 1
1330 #endif
1331
1332 /* GL_ANGLE_program_binary */
1333 #ifndef GL_ANGLE_program_binary
1334 #define GL_ANGLE_program_binary 1
1335 #endif
1336
1337 /* GL_ANGLE_texture_compression_dxt3 */
1338 #ifndef GL_ANGLE_texture_compression_dxt3
1339 #define GL_ANGLE_texture_compression_dxt3 1
1340 #endif
1341
1342 /* GL_ANGLE_texture_compression_dxt5 */
1343 #ifndef GL_ANGLE_texture_compression_dxt5
1344 #define GL_ANGLE_texture_compression_dxt5 1
1345 #endif
1346
1347 /* GL_ANGLE_texture_usage */
1348 #ifndef GL_ANGLE_texture_usage
1349 #define GL_ANGLE_texture_usage 1
1350 #endif
1351
1352 #ifndef GL_ANGLE_translated_shader_source
1353 #define GL_ANGLE_translated_shader_source 1
1354 #ifdef GL_GLEXT_PROTOTYPES
1355 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1356 #endif
1357 typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1358 #endif
1359
1360 /*------------------------------------------------------------------------*
1361 * APPLE extension functions
1362 *------------------------------------------------------------------------*/
1363
1364 /* GL_APPLE_copy_texture_levels */
1365 #ifndef GL_APPLE_copy_texture_levels
1366 #define GL_APPLE_copy_texture_levels 1
1367 #ifdef GL_GLEXT_PROTOTYPES
1368 GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1369 #endif
1370 typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1371 #endif
1372
1373 /* GL_APPLE_framebuffer_multisample */
1374 #ifndef GL_APPLE_framebuffer_multisample
1375 #define GL_APPLE_framebuffer_multisample 1
1376 #ifdef GL_GLEXT_PROTOTYPES
1377 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1378 GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
1379 #endif /* GL_GLEXT_PROTOTYPES */
1380 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1381 typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
1382 #endif
1383
1384 /* GL_APPLE_rgb_422 */
1385 #ifndef GL_APPLE_rgb_422
1386 #define GL_APPLE_rgb_422 1
1387 #endif
1388
1389 /* GL_APPLE_sync */
1390 #ifndef GL_APPLE_sync
1391 #define GL_APPLE_sync 1
1392 #ifdef GL_GLEXT_PROTOTYPES
1393 GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
1394 GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
1395 GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
1396 GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1397 GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1398 GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
1399 GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1400 #endif
1401 typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
1402 typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
1403 typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
1404 typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1405 typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1406 typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
1407 typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1408 #endif
1409
1410 /* GL_APPLE_texture_format_BGRA8888 */
1411 #ifndef GL_APPLE_texture_format_BGRA8888
1412 #define GL_APPLE_texture_format_BGRA8888 1
1413 #endif
1414
1415 /* GL_APPLE_texture_max_level */
1416 #ifndef GL_APPLE_texture_max_level
1417 #define GL_APPLE_texture_max_level 1
1418 #endif
1419
1420 /*------------------------------------------------------------------------*
1421 * ARM extension functions
1422 *------------------------------------------------------------------------*/
1423
1424 /* GL_ARM_mali_program_binary */
1425 #ifndef GL_ARM_mali_program_binary
1426 #define GL_ARM_mali_program_binary 1
1427 #endif
1428
1429 /* GL_ARM_mali_shader_binary */
1430 #ifndef GL_ARM_mali_shader_binary
1431 #define GL_ARM_mali_shader_binary 1
1432 #endif
1433
1434 /* GL_ARM_rgba8 */
1435 #ifndef GL_ARM_rgba8
1436 #define GL_ARM_rgba8 1
1437 #endif
1438
1439 /*------------------------------------------------------------------------*
1440 * EXT extension functions
1441 *------------------------------------------------------------------------*/
1442
1443 /* GL_EXT_blend_minmax */
1444 #ifndef GL_EXT_blend_minmax
1445 #define GL_EXT_blend_minmax 1
1446 #endif
1447
1448 /* GL_EXT_color_buffer_half_float */
1449 #ifndef GL_EXT_color_buffer_half_float
1450 #define GL_EXT_color_buffer_half_float 1
1451 #endif
1452
1453 /* GL_EXT_debug_label */
1454 #ifndef GL_EXT_debug_label
1455 #define GL_EXT_debug_label 1
1456 #ifdef GL_GLEXT_PROTOTYPES
1457 GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1458 GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1459 #endif
1460 typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1461 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1462 #endif
1463
1464 /* GL_EXT_debug_marker */
1465 #ifndef GL_EXT_debug_marker
1466 #define GL_EXT_debug_marker 1
1467 #ifdef GL_GLEXT_PROTOTYPES
1468 GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
1469 GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
1470 GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
1471 #endif
1472 typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1473 typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1474 typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
1475 #endif
1476
1477 /* GL_EXT_discard_framebuffer */
1478 #ifndef GL_EXT_discard_framebuffer
1479 #define GL_EXT_discard_framebuffer 1
1480 #ifdef GL_GLEXT_PROTOTYPES
1481 GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1482 #endif
1483 typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1484 #endif
1485
1486 #ifndef GL_EXT_disjoint_timer_query
1487 #define GL_EXT_disjoint_timer_query 1
1488 #ifdef GL_GLEXT_PROTOTYPES
1489 GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
1490 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
1491 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
1492 GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
1493 GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
1494 GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
1495 GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
1496 GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
1497 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
1498 GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
1499 GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
1500 #endif
1501 typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
1502 typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
1503 typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
1504 typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
1505 typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
1506 typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
1507 typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
1508 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
1509 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
1510 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
1511 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
1512 #endif /* GL_EXT_disjoint_timer_query */
1513
1514 #ifndef GL_EXT_draw_buffers
1515 #define GL_EXT_draw_buffers 1
1516 #ifdef GL_GLEXT_PROTOTYPES
1517 GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
1518 #endif
1519 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
1520 #endif /* GL_EXT_draw_buffers */
1521
1522 /* GL_EXT_map_buffer_range */
1523 #ifndef GL_EXT_map_buffer_range
1524 #define GL_EXT_map_buffer_range 1
1525 #ifdef GL_GLEXT_PROTOTYPES
1526 GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1527 GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
1528 #endif
1529 typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1530 typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1531 #endif
1532
1533 /* GL_EXT_multisampled_render_to_texture */
1534 #ifndef GL_EXT_multisampled_render_to_texture
1535 #define GL_EXT_multisampled_render_to_texture 1
1536 #ifdef GL_GLEXT_PROTOTYPES
1537 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1538 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1539 #endif
1540 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1541 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1542 #endif
1543
1544 /* GL_EXT_multiview_draw_buffers */
1545 #ifndef GL_EXT_multiview_draw_buffers
1546 #define GL_EXT_multiview_draw_buffers 1
1547 #ifdef GL_GLEXT_PROTOTYPES
1548 GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
1549 GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
1550 GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
1551 #endif
1552 typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
1553 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
1554 typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
1555 #endif
1556
1557 #ifndef GL_EXT_multi_draw_arrays
1558 #define GL_EXT_multi_draw_arrays 1
1559 #ifdef GL_GLEXT_PROTOTYPES
1560 GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1561 GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1562 #endif /* GL_GLEXT_PROTOTYPES */
1563 typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1564 typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1565 #endif
1566
1567 /* GL_EXT_occlusion_query_boolean */
1568 #ifndef GL_EXT_occlusion_query_boolean
1569 #define GL_EXT_occlusion_query_boolean 1
1570 /* All entry points also exist in GL_EXT_disjoint_timer_query */
1571 #endif
1572
1573 /* GL_EXT_read_format_bgra */
1574 #ifndef GL_EXT_read_format_bgra
1575 #define GL_EXT_read_format_bgra 1
1576 #endif
1577
1578 /* GL_EXT_robustness */
1579 #ifndef GL_EXT_robustness
1580 #define GL_EXT_robustness 1
1581 #ifdef GL_GLEXT_PROTOTYPES
1582 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
1583 GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1584 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1585 GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1586 #endif
1587 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
1588 typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1589 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1590 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1591 #endif
1592
1593 /* GL_EXT_separate_shader_objects */
1594 #ifndef GL_EXT_separate_shader_objects
1595 #define GL_EXT_separate_shader_objects 1
1596 #ifdef GL_GLEXT_PROTOTYPES
1597 GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
1598 GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
1599 GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
1600 GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
1601 GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
1602 GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
1603 GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
1604 GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
1605 GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
1606 GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
1607 GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
1608 GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
1609 GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1610 GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
1611 GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
1612 GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1613 GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1614 GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1615 GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1616 GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1617 GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1618 GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1619 GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1620 GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1621 GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1622 GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1623 GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1624 GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1625 GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
1626 GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1627 #endif
1628 typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1629 typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
1630 typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
1631 typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1632 typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
1633 typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
1634 typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1635 typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
1636 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
1637 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
1638 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
1639 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
1640 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1641 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
1642 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
1643 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1644 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1645 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1646 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1647 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1648 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1649 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1650 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1651 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1652 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1653 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1654 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1655 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1656 typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1657 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1658 #endif
1659
1660 /* GL_EXT_shader_framebuffer_fetch */
1661 #ifndef GL_EXT_shader_framebuffer_fetch
1662 #define GL_EXT_shader_framebuffer_fetch 1
1663 #endif
1664
1665 /* GL_EXT_shader_texture_lod */
1666 #ifndef GL_EXT_shader_texture_lod
1667 #define GL_EXT_shader_texture_lod 1
1668 #endif
1669
1670 /* GL_EXT_shadow_samplers */
1671 #ifndef GL_EXT_shadow_samplers
1672 #define GL_EXT_shadow_samplers 1
1673 #endif
1674
1675 /* GL_EXT_sRGB */
1676 #ifndef GL_EXT_sRGB
1677 #define GL_EXT_sRGB 1
1678 #endif
1679
1680 /* GL_EXT_texture_compression_dxt1 */
1681 #ifndef GL_EXT_texture_compression_dxt1
1682 #define GL_EXT_texture_compression_dxt1 1
1683 #endif
1684
1685 /* GL_EXT_texture_filter_anisotropic */
1686 #ifndef GL_EXT_texture_filter_anisotropic
1687 #define GL_EXT_texture_filter_anisotropic 1
1688 #endif
1689
1690 /* GL_EXT_texture_format_BGRA8888 */
1691 #ifndef GL_EXT_texture_format_BGRA8888
1692 #define GL_EXT_texture_format_BGRA8888 1
1693 #endif
1694
1695 /* GL_EXT_texture_rg */
1696 #ifndef GL_EXT_texture_rg
1697 #define GL_EXT_texture_rg 1
1698 #endif
1699
1700 /* GL_EXT_texture_storage */
1701 #ifndef GL_EXT_texture_storage
1702 #define GL_EXT_texture_storage 1
1703 #ifdef GL_GLEXT_PROTOTYPES
1704 GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1705 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1706 GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1707 GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1708 GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1709 GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1710 #endif
1711 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1712 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1713 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1714 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1715 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1716 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1717 #endif
1718
1719 /* GL_EXT_texture_type_2_10_10_10_REV */
1720 #ifndef GL_EXT_texture_type_2_10_10_10_REV
1721 #define GL_EXT_texture_type_2_10_10_10_REV 1
1722 #endif
1723
1724 /* GL_EXT_unpack_subimage */
1725 #ifndef GL_EXT_unpack_subimage
1726 #define GL_EXT_unpack_subimage 1
1727 #endif
1728
1729 /*------------------------------------------------------------------------*
1730 * DMP extension functions
1731 *------------------------------------------------------------------------*/
1732
1733 /* GL_DMP_shader_binary */
1734 #ifndef GL_DMP_shader_binary
1735 #define GL_DMP_shader_binary 1
1736 #endif
1737
1738 /*------------------------------------------------------------------------*
1739 * FJ extension functions
1740 *------------------------------------------------------------------------*/
1741
1742 /* GL_FJ_shader_binary_GCCSO */
1743 #ifndef GL_FJ_shader_binary_GCCSO
1744 #define GL_FJ_shader_binary_GCCSO 1
1745 #endif
1746
1747 /*------------------------------------------------------------------------*
1748 * IMG extension functions
1749 *------------------------------------------------------------------------*/
1750
1751 /* GL_IMG_program_binary */
1752 #ifndef GL_IMG_program_binary
1753 #define GL_IMG_program_binary 1
1754 #endif
1755
1756 /* GL_IMG_read_format */
1757 #ifndef GL_IMG_read_format
1758 #define GL_IMG_read_format 1
1759 #endif
1760
1761 /* GL_IMG_shader_binary */
1762 #ifndef GL_IMG_shader_binary
1763 #define GL_IMG_shader_binary 1
1764 #endif
1765
1766 /* GL_IMG_texture_compression_pvrtc */
1767 #ifndef GL_IMG_texture_compression_pvrtc
1768 #define GL_IMG_texture_compression_pvrtc 1
1769 #endif
1770
1771 /* GL_IMG_texture_compression_pvrtc2 */
1772 #ifndef GL_IMG_texture_compression_pvrtc2
1773 #define GL_IMG_texture_compression_pvrtc2 1
1774 #endif
1775
1776 /* GL_IMG_multisampled_render_to_texture */
1777 #ifndef GL_IMG_multisampled_render_to_texture
1778 #define GL_IMG_multisampled_render_to_texture 1
1779 #ifdef GL_GLEXT_PROTOTYPES
1780 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1781 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1782 #endif
1783 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1784 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1785 #endif
1786
1787 /*------------------------------------------------------------------------*
1788 * NV extension functions
1789 *------------------------------------------------------------------------*/
1790
1791 /* GL_NV_coverage_sample */
1792 #ifndef GL_NV_coverage_sample
1793 #define GL_NV_coverage_sample 1
1794 #ifdef GL_GLEXT_PROTOTYPES
1795 GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
1796 GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
1797 #endif
1798 typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
1799 typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
1800 #endif
1801
1802 /* GL_NV_depth_nonlinear */
1803 #ifndef GL_NV_depth_nonlinear
1804 #define GL_NV_depth_nonlinear 1
1805 #endif
1806
1807 /* GL_NV_draw_buffers */
1808 #ifndef GL_NV_draw_buffers
1809 #define GL_NV_draw_buffers 1
1810 #ifdef GL_GLEXT_PROTOTYPES
1811 GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
1812 #endif
1813 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
1814 #endif
1815
1816 /* GL_NV_draw_instanced */
1817 #ifndef GL_NV_draw_instanced
1818 #define GL_NV_draw_instanced 1
1819 #ifdef GL_GLEXT_PROTOTYPES
1820 GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1821 GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1822 #endif
1823 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1824 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1825 #endif
1826
1827 /* GL_NV_fbo_color_attachments */
1828 #ifndef GL_NV_fbo_color_attachments
1829 #define GL_NV_fbo_color_attachments 1
1830 #endif
1831
1832 /* GL_NV_fence */
1833 #ifndef GL_NV_fence
1834 #define GL_NV_fence 1
1835 #ifdef GL_GLEXT_PROTOTYPES
1836 GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
1837 GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
1838 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
1839 GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
1840 GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
1841 GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
1842 GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
1843 #endif
1844 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
1845 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
1846 typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
1847 typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
1848 typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
1849 typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
1850 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
1851 #endif
1852
1853 /* GL_NV_framebuffer_blit */
1854 #ifndef GL_NV_framebuffer_blit
1855 #define GL_NV_framebuffer_blit 1
1856 #ifdef GL_GLEXT_PROTOTYPES
1857 GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1858 #endif
1859 typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1860 #endif
1861
1862 /* GL_NV_framebuffer_multisample */
1863 #ifndef GL_NV_framebuffer_multisample
1864 #define GL_NV_framebuffer_multisample 1
1865 #ifdef GL_GLEXT_PROTOTYPES
1866 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1867 #endif
1868 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1869 #endif
1870
1871 /* GL_NV_generate_mipmap_sRGB */
1872 #ifndef GL_NV_generate_mipmap_sRGB
1873 #define GL_NV_generate_mipmap_sRGB 1
1874 #endif
1875
1876 /* GL_NV_instanced_arrays */
1877 #ifndef GL_NV_instanced_arrays
1878 #define GL_NV_instanced_arrays 1
1879 #ifdef GL_GLEXT_PROTOTYPES
1880 GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
1881 #endif
1882 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
1883 #endif
1884
1885 /* GL_NV_read_buffer */
1886 #ifndef GL_NV_read_buffer
1887 #define GL_NV_read_buffer 1
1888 #ifdef GL_GLEXT_PROTOTYPES
1889 GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
1890 #endif
1891 typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
1892 #endif
1893
1894 /* GL_NV_read_buffer_front */
1895 #ifndef GL_NV_read_buffer_front
1896 #define GL_NV_read_buffer_front 1
1897 #endif
1898
1899 /* GL_NV_read_depth */
1900 #ifndef GL_NV_read_depth
1901 #define GL_NV_read_depth 1
1902 #endif
1903
1904 /* GL_NV_read_depth_stencil */
1905 #ifndef GL_NV_read_depth_stencil
1906 #define GL_NV_read_depth_stencil 1
1907 #endif
1908
1909 /* GL_NV_read_stencil */
1910 #ifndef GL_NV_read_stencil
1911 #define GL_NV_read_stencil 1
1912 #endif
1913
1914 /* GL_NV_shadow_samplers_array */
1915 #ifndef GL_NV_shadow_samplers_array
1916 #define GL_NV_shadow_samplers_array 1
1917 #endif
1918
1919 /* GL_NV_shadow_samplers_cube */
1920 #ifndef GL_NV_shadow_samplers_cube
1921 #define GL_NV_shadow_samplers_cube 1
1922 #endif
1923
1924 /* GL_NV_sRGB_formats */
1925 #ifndef GL_NV_sRGB_formats
1926 #define GL_NV_sRGB_formats 1
1927 #endif
1928
1929 /* GL_NV_texture_border_clamp */
1930 #ifndef GL_NV_texture_border_clamp
1931 #define GL_NV_texture_border_clamp 1
1932 #endif
1933
1934 /* GL_NV_texture_compression_s3tc_update */
1935 #ifndef GL_NV_texture_compression_s3tc_update
1936 #define GL_NV_texture_compression_s3tc_update 1
1937 #endif
1938
1939 /* GL_NV_texture_npot_2D_mipmap */
1940 #ifndef GL_NV_texture_npot_2D_mipmap
1941 #define GL_NV_texture_npot_2D_mipmap 1
1942 #endif
1943
1944 /*------------------------------------------------------------------------*
1945 * QCOM extension functions
1946 *------------------------------------------------------------------------*/
1947
1948 /* GL_QCOM_alpha_test */
1949 #ifndef GL_QCOM_alpha_test
1950 #define GL_QCOM_alpha_test 1
1951 #ifdef GL_GLEXT_PROTOTYPES
1952 GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
1953 #endif
1954 typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
1955 #endif
1956
1957 /* GL_QCOM_binning_control */
1958 #ifndef GL_QCOM_binning_control
1959 #define GL_QCOM_binning_control 1
1960 #endif
1961
1962 /* GL_QCOM_driver_control */
1963 #ifndef GL_QCOM_driver_control
1964 #define GL_QCOM_driver_control 1
1965 #ifdef GL_GLEXT_PROTOTYPES
1966 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
1967 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1968 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
1969 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
1970 #endif
1971 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
1972 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1973 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1974 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1975 #endif
1976
1977 /* GL_QCOM_extended_get */
1978 #ifndef GL_QCOM_extended_get
1979 #define GL_QCOM_extended_get 1
1980 #ifdef GL_GLEXT_PROTOTYPES
1981 GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
1982 GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1983 GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1984 GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1985 GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1986 GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
1987 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);
1988 GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
1989 #endif
1990 typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
1991 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1992 typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1993 typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1994 typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1995 typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
1996 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);
1997 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
1998 #endif
1999
2000 /* GL_QCOM_extended_get2 */
2001 #ifndef GL_QCOM_extended_get2
2002 #define GL_QCOM_extended_get2 1
2003 #ifdef GL_GLEXT_PROTOTYPES
2004 GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2005 GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2006 GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
2007 GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2008 #endif
2009 typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2010 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2011 typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
2012 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2013 #endif
2014
2015 /* GL_QCOM_perfmon_global_mode */
2016 #ifndef GL_QCOM_perfmon_global_mode
2017 #define GL_QCOM_perfmon_global_mode 1
2018 #endif
2019
2020 /* GL_QCOM_writeonly_rendering */
2021 #ifndef GL_QCOM_writeonly_rendering
2022 #define GL_QCOM_writeonly_rendering 1
2023 #endif
2024
2025 /* GL_QCOM_tiled_rendering */
2026 #ifndef GL_QCOM_tiled_rendering
2027 #define GL_QCOM_tiled_rendering 1
2028 #ifdef GL_GLEXT_PROTOTYPES
2029 GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2030 GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
2031 #endif
2032 typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2033 typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
2034 #endif
2035
2036 /*------------------------------------------------------------------------*
2037 * VIV extension tokens
2038 *------------------------------------------------------------------------*/
2039
2040 /* GL_VIV_shader_binary */
2041 #ifndef GL_VIV_shader_binary
2042 #define GL_VIV_shader_binary 1
2043 #endif
2044
2045 #ifdef __cplusplus
2046 }
2047 #endif
2048
2049 #endif /* __gl2ext_h_ */
0 #ifndef __gl2platform_h_
1 #define __gl2platform_h_
2
3 /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
4
5 /*
6 * This document is licensed under the SGI Free Software B License Version
7 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
8 */
9
10 /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
11 *
12 * Adopters may modify khrplatform.h and this file to suit their platform.
13 * You are encouraged to submit all modifications to the Khronos group so that
14 * they can be included in future versions of this file. Please submit changes
15 * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
16 * by filing a bug against product "OpenGL-ES" component "Registry".
17 */
18
19 /*#include <KHR/khrplatform.h>*/
20
21 #ifndef GL_APICALL
22 #define GL_APICALL KHRONOS_APICALL
23 #endif
24
25 #ifndef GL_APIENTRY
26 #define GL_APIENTRY KHRONOS_APIENTRY
27 #endif
28
29 #endif /* __gl2platform_h_ */
0 #ifndef __khrplatform_h_
1 #define __khrplatform_h_
2
3 /*
4 ** Copyright (c) 2008-2009 The Khronos Group Inc.
5 **
6 ** Permission is hereby granted, free of charge, to any person obtaining a
7 ** copy of this software and/or associated documentation files (the
8 ** "Materials"), to deal in the Materials without restriction, including
9 ** without limitation the rights to use, copy, modify, merge, publish,
10 ** distribute, sublicense, and/or sell copies of the Materials, and to
11 ** permit persons to whom the Materials are furnished to do so, subject to
12 ** the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included
15 ** in all copies or substantial portions of the Materials.
16 **
17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25
26 /* Khronos platform-specific types and definitions.
27 *
28 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
29 *
30 * Adopters may modify this file to suit their platform. Adopters are
31 * encouraged to submit platform specific modifications to the Khronos
32 * group so that they can be included in future versions of this file.
33 * Please submit changes by sending them to the public Khronos Bugzilla
34 * (http://khronos.org/bugzilla) by filing a bug against product
35 * "Khronos (general)" component "Registry".
36 *
37 * A predefined template which fills in some of the bug fields can be
38 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
39 * must create a Bugzilla login first.
40 *
41 *
42 * See the Implementer's Guidelines for information about where this file
43 * should be located on your system and for more details of its use:
44 * http://www.khronos.org/registry/implementers_guide.pdf
45 *
46 * This file should be included as
47 * #include <KHR/khrplatform.h>
48 * by Khronos client API header files that use its types and defines.
49 *
50 * The types in khrplatform.h should only be used to define API-specific types.
51 *
52 * Types defined in khrplatform.h:
53 * khronos_int8_t signed 8 bit
54 * khronos_uint8_t unsigned 8 bit
55 * khronos_int16_t signed 16 bit
56 * khronos_uint16_t unsigned 16 bit
57 * khronos_int32_t signed 32 bit
58 * khronos_uint32_t unsigned 32 bit
59 * khronos_int64_t signed 64 bit
60 * khronos_uint64_t unsigned 64 bit
61 * khronos_intptr_t signed same number of bits as a pointer
62 * khronos_uintptr_t unsigned same number of bits as a pointer
63 * khronos_ssize_t signed size
64 * khronos_usize_t unsigned size
65 * khronos_float_t signed 32 bit floating point
66 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
67 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
68 * nanoseconds
69 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
70 * khronos_boolean_enum_t enumerated boolean type. This should
71 * only be used as a base type when a client API's boolean type is
72 * an enum. Client APIs which use an integer or other type for
73 * booleans cannot use this as the base type for their boolean.
74 *
75 * Tokens defined in khrplatform.h:
76 *
77 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
78 *
79 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
80 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
81 *
82 * Calling convention macros defined in this file:
83 * KHRONOS_APICALL
84 * KHRONOS_APIENTRY
85 * KHRONOS_APIATTRIBUTES
86 *
87 * These may be used in function prototypes as:
88 *
89 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
90 * int arg1,
91 * int arg2) KHRONOS_APIATTRIBUTES;
92 */
93
94 /*-------------------------------------------------------------------------
95 * Definition of KHRONOS_APICALL
96 *-------------------------------------------------------------------------
97 * This precedes the return type of the function in the function prototype.
98 */
99 #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
100 # define KHRONOS_APICALL __declspec(dllimport)
101 #elif defined (__SYMBIAN32__)
102 # define KHRONOS_APICALL IMPORT_C
103 #else
104 # define KHRONOS_APICALL
105 #endif
106
107 /*-------------------------------------------------------------------------
108 * Definition of KHRONOS_APIENTRY
109 *-------------------------------------------------------------------------
110 * This follows the return type of the function and precedes the function
111 * name in the function prototype.
112 */
113 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
114 /* Win32 but not WinCE */
115 # define KHRONOS_APIENTRY __stdcall
116 #else
117 # define KHRONOS_APIENTRY
118 #endif
119
120 /*-------------------------------------------------------------------------
121 * Definition of KHRONOS_APIATTRIBUTES
122 *-------------------------------------------------------------------------
123 * This follows the closing parenthesis of the function prototype arguments.
124 */
125 #if defined (__ARMCC_2__)
126 #define KHRONOS_APIATTRIBUTES __softfp
127 #else
128 #define KHRONOS_APIATTRIBUTES
129 #endif
130
131 /*-------------------------------------------------------------------------
132 * basic type definitions
133 *-----------------------------------------------------------------------*/
134 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
135
136
137 /*
138 * Using <stdint.h>
139 */
140 #include <stdint.h>
141 typedef int32_t khronos_int32_t;
142 typedef uint32_t khronos_uint32_t;
143 typedef int64_t khronos_int64_t;
144 typedef uint64_t khronos_uint64_t;
145 #define KHRONOS_SUPPORT_INT64 1
146 #define KHRONOS_SUPPORT_FLOAT 1
147
148 #elif defined(__VMS ) || defined(__sgi)
149
150 /*
151 * Using <inttypes.h>
152 */
153 #include <inttypes.h>
154 typedef int32_t khronos_int32_t;
155 typedef uint32_t khronos_uint32_t;
156 typedef int64_t khronos_int64_t;
157 typedef uint64_t khronos_uint64_t;
158 #define KHRONOS_SUPPORT_INT64 1
159 #define KHRONOS_SUPPORT_FLOAT 1
160
161 #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
162
163 /*
164 * Win32
165 */
166 typedef __int32 khronos_int32_t;
167 typedef unsigned __int32 khronos_uint32_t;
168 typedef __int64 khronos_int64_t;
169 typedef unsigned __int64 khronos_uint64_t;
170 #define KHRONOS_SUPPORT_INT64 1
171 #define KHRONOS_SUPPORT_FLOAT 1
172
173 #elif defined(__sun__) || defined(__digital__)
174
175 /*
176 * Sun or Digital
177 */
178 typedef int khronos_int32_t;
179 typedef unsigned int khronos_uint32_t;
180 #if defined(__arch64__) || defined(_LP64)
181 typedef long int khronos_int64_t;
182 typedef unsigned long int khronos_uint64_t;
183 #else
184 typedef long long int khronos_int64_t;
185 typedef unsigned long long int khronos_uint64_t;
186 #endif /* __arch64__ */
187 #define KHRONOS_SUPPORT_INT64 1
188 #define KHRONOS_SUPPORT_FLOAT 1
189
190 #elif 0
191
192 /*
193 * Hypothetical platform with no float or int64 support
194 */
195 typedef int khronos_int32_t;
196 typedef unsigned int khronos_uint32_t;
197 #define KHRONOS_SUPPORT_INT64 0
198 #define KHRONOS_SUPPORT_FLOAT 0
199
200 #else
201
202 /*
203 * Generic fallback
204 */
205 #include <stdint.h>
206 typedef int32_t khronos_int32_t;
207 typedef uint32_t khronos_uint32_t;
208 typedef int64_t khronos_int64_t;
209 typedef uint64_t khronos_uint64_t;
210 #define KHRONOS_SUPPORT_INT64 1
211 #define KHRONOS_SUPPORT_FLOAT 1
212
213 #endif
214
215
216 /*
217 * Types that are (so far) the same on all platforms
218 */
219 typedef signed char khronos_int8_t;
220 typedef unsigned char khronos_uint8_t;
221 typedef signed short int khronos_int16_t;
222 typedef unsigned short int khronos_uint16_t;
223
224 /*
225 * Types that differ between LLP64 and LP64 architectures - in LLP64,
226 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
227 * to be the only LLP64 architecture in current use.
228 */
229 #ifdef _WIN64
230 typedef signed long long int khronos_intptr_t;
231 typedef unsigned long long int khronos_uintptr_t;
232 typedef signed long long int khronos_ssize_t;
233 typedef unsigned long long int khronos_usize_t;
234 #else
235 typedef signed long int khronos_intptr_t;
236 typedef unsigned long int khronos_uintptr_t;
237 typedef signed long int khronos_ssize_t;
238 typedef unsigned long int khronos_usize_t;
239 #endif
240
241 #if KHRONOS_SUPPORT_FLOAT
242 /*
243 * Float type
244 */
245 typedef float khronos_float_t;
246 #endif
247
248 #if KHRONOS_SUPPORT_INT64
249 /* Time types
250 *
251 * These types can be used to represent a time interval in nanoseconds or
252 * an absolute Unadjusted System Time. Unadjusted System Time is the number
253 * of nanoseconds since some arbitrary system event (e.g. since the last
254 * time the system booted). The Unadjusted System Time is an unsigned
255 * 64 bit value that wraps back to 0 every 584 years. Time intervals
256 * may be either signed or unsigned.
257 */
258 typedef khronos_uint64_t khronos_utime_nanoseconds_t;
259 typedef khronos_int64_t khronos_stime_nanoseconds_t;
260 #endif
261
262 /*
263 * Dummy value used to pad enum types to 32 bits.
264 */
265 #ifndef KHRONOS_MAX_ENUM
266 #define KHRONOS_MAX_ENUM 0x7FFFFFFF
267 #endif
268
269 /*
270 * Enumerated boolean type
271 *
272 * Values other than zero should be considered to be true. Therefore
273 * comparisons should not be made against KHRONOS_TRUE.
274 */
275 typedef enum {
276 KHRONOS_FALSE = 0,
277 KHRONOS_TRUE = 1,
278 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
279 } khronos_boolean_enum_t;
280
281 #endif /* __khrplatform_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_pixels.h
23 *
24 * Header for the enumerated pixel format definitions.
25 */
26
27 #ifndef SDL_pixels_h_
28 #define SDL_pixels_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_endian.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * \name Transparency definitions
41 *
42 * These define alpha as the opacity of a surface.
43 */
44 /* @{ */
45 #define SDL_ALPHA_OPAQUE 255
46 #define SDL_ALPHA_TRANSPARENT 0
47 /* @} */
48
49 /** Pixel type. */
50 typedef enum
51 {
52 SDL_PIXELTYPE_UNKNOWN,
53 SDL_PIXELTYPE_INDEX1,
54 SDL_PIXELTYPE_INDEX4,
55 SDL_PIXELTYPE_INDEX8,
56 SDL_PIXELTYPE_PACKED8,
57 SDL_PIXELTYPE_PACKED16,
58 SDL_PIXELTYPE_PACKED32,
59 SDL_PIXELTYPE_ARRAYU8,
60 SDL_PIXELTYPE_ARRAYU16,
61 SDL_PIXELTYPE_ARRAYU32,
62 SDL_PIXELTYPE_ARRAYF16,
63 SDL_PIXELTYPE_ARRAYF32
64 } SDL_PixelType;
65
66 /** Bitmap pixel order, high bit -> low bit. */
67 typedef enum
68 {
69 SDL_BITMAPORDER_NONE,
70 SDL_BITMAPORDER_4321,
71 SDL_BITMAPORDER_1234
72 } SDL_BitmapOrder;
73
74 /** Packed component order, high bit -> low bit. */
75 typedef enum
76 {
77 SDL_PACKEDORDER_NONE,
78 SDL_PACKEDORDER_XRGB,
79 SDL_PACKEDORDER_RGBX,
80 SDL_PACKEDORDER_ARGB,
81 SDL_PACKEDORDER_RGBA,
82 SDL_PACKEDORDER_XBGR,
83 SDL_PACKEDORDER_BGRX,
84 SDL_PACKEDORDER_ABGR,
85 SDL_PACKEDORDER_BGRA
86 } SDL_PackedOrder;
87
88 /** Array component order, low byte -> high byte. */
89 /* !!! FIXME: in 2.1, make these not overlap differently with
90 !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
91 typedef enum
92 {
93 SDL_ARRAYORDER_NONE,
94 SDL_ARRAYORDER_RGB,
95 SDL_ARRAYORDER_RGBA,
96 SDL_ARRAYORDER_ARGB,
97 SDL_ARRAYORDER_BGR,
98 SDL_ARRAYORDER_BGRA,
99 SDL_ARRAYORDER_ABGR
100 } SDL_ArrayOrder;
101
102 /** Packed component layout. */
103 typedef enum
104 {
105 SDL_PACKEDLAYOUT_NONE,
106 SDL_PACKEDLAYOUT_332,
107 SDL_PACKEDLAYOUT_4444,
108 SDL_PACKEDLAYOUT_1555,
109 SDL_PACKEDLAYOUT_5551,
110 SDL_PACKEDLAYOUT_565,
111 SDL_PACKEDLAYOUT_8888,
112 SDL_PACKEDLAYOUT_2101010,
113 SDL_PACKEDLAYOUT_1010102
114 } SDL_PackedLayout;
115
116 #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
117
118 #define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
119 ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
120 ((bits) << 8) | ((bytes) << 0))
121
122 #define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F)
123 #define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F)
124 #define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F)
125 #define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F)
126 #define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
127 #define SDL_BYTESPERPIXEL(X) \
128 (SDL_ISPIXELFORMAT_FOURCC(X) ? \
129 ((((X) == SDL_PIXELFORMAT_YUY2) || \
130 ((X) == SDL_PIXELFORMAT_UYVY) || \
131 ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
132
133 #define SDL_ISPIXELFORMAT_INDEXED(format) \
134 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
135 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
136 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
137 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
138
139 #define SDL_ISPIXELFORMAT_PACKED(format) \
140 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
141 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
142 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
143 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
144
145 #define SDL_ISPIXELFORMAT_ARRAY(format) \
146 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
147 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
148 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
149 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
150 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
151 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
152
153 #define SDL_ISPIXELFORMAT_ALPHA(format) \
154 ((SDL_ISPIXELFORMAT_PACKED(format) && \
155 ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
156 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
157 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
158 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
159 (SDL_ISPIXELFORMAT_ARRAY(format) && \
160 ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
161 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
162 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
163 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
164
165 /* The flag is set to 1 because 0x1? is not in the printable ASCII range */
166 #define SDL_ISPIXELFORMAT_FOURCC(format) \
167 ((format) && (SDL_PIXELFLAG(format) != 1))
168
169 /* Note: If you modify this list, update SDL_GetPixelFormatName() */
170 typedef enum
171 {
172 SDL_PIXELFORMAT_UNKNOWN,
173 SDL_PIXELFORMAT_INDEX1LSB =
174 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
175 1, 0),
176 SDL_PIXELFORMAT_INDEX1MSB =
177 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
178 1, 0),
179 SDL_PIXELFORMAT_INDEX4LSB =
180 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
181 4, 0),
182 SDL_PIXELFORMAT_INDEX4MSB =
183 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
184 4, 0),
185 SDL_PIXELFORMAT_INDEX8 =
186 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
187 SDL_PIXELFORMAT_RGB332 =
188 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
189 SDL_PACKEDLAYOUT_332, 8, 1),
190 SDL_PIXELFORMAT_XRGB4444 =
191 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
192 SDL_PACKEDLAYOUT_4444, 12, 2),
193 SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
194 SDL_PIXELFORMAT_XBGR4444 =
195 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
196 SDL_PACKEDLAYOUT_4444, 12, 2),
197 SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
198 SDL_PIXELFORMAT_XRGB1555 =
199 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
200 SDL_PACKEDLAYOUT_1555, 15, 2),
201 SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
202 SDL_PIXELFORMAT_XBGR1555 =
203 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
204 SDL_PACKEDLAYOUT_1555, 15, 2),
205 SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
206 SDL_PIXELFORMAT_ARGB4444 =
207 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
208 SDL_PACKEDLAYOUT_4444, 16, 2),
209 SDL_PIXELFORMAT_RGBA4444 =
210 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
211 SDL_PACKEDLAYOUT_4444, 16, 2),
212 SDL_PIXELFORMAT_ABGR4444 =
213 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
214 SDL_PACKEDLAYOUT_4444, 16, 2),
215 SDL_PIXELFORMAT_BGRA4444 =
216 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
217 SDL_PACKEDLAYOUT_4444, 16, 2),
218 SDL_PIXELFORMAT_ARGB1555 =
219 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
220 SDL_PACKEDLAYOUT_1555, 16, 2),
221 SDL_PIXELFORMAT_RGBA5551 =
222 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
223 SDL_PACKEDLAYOUT_5551, 16, 2),
224 SDL_PIXELFORMAT_ABGR1555 =
225 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
226 SDL_PACKEDLAYOUT_1555, 16, 2),
227 SDL_PIXELFORMAT_BGRA5551 =
228 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
229 SDL_PACKEDLAYOUT_5551, 16, 2),
230 SDL_PIXELFORMAT_RGB565 =
231 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
232 SDL_PACKEDLAYOUT_565, 16, 2),
233 SDL_PIXELFORMAT_BGR565 =
234 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
235 SDL_PACKEDLAYOUT_565, 16, 2),
236 SDL_PIXELFORMAT_RGB24 =
237 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
238 24, 3),
239 SDL_PIXELFORMAT_BGR24 =
240 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
241 24, 3),
242 SDL_PIXELFORMAT_XRGB8888 =
243 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
244 SDL_PACKEDLAYOUT_8888, 24, 4),
245 SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
246 SDL_PIXELFORMAT_RGBX8888 =
247 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
248 SDL_PACKEDLAYOUT_8888, 24, 4),
249 SDL_PIXELFORMAT_XBGR8888 =
250 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
251 SDL_PACKEDLAYOUT_8888, 24, 4),
252 SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
253 SDL_PIXELFORMAT_BGRX8888 =
254 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
255 SDL_PACKEDLAYOUT_8888, 24, 4),
256 SDL_PIXELFORMAT_ARGB8888 =
257 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
258 SDL_PACKEDLAYOUT_8888, 32, 4),
259 SDL_PIXELFORMAT_RGBA8888 =
260 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
261 SDL_PACKEDLAYOUT_8888, 32, 4),
262 SDL_PIXELFORMAT_ABGR8888 =
263 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
264 SDL_PACKEDLAYOUT_8888, 32, 4),
265 SDL_PIXELFORMAT_BGRA8888 =
266 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
267 SDL_PACKEDLAYOUT_8888, 32, 4),
268 SDL_PIXELFORMAT_ARGB2101010 =
269 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
270 SDL_PACKEDLAYOUT_2101010, 32, 4),
271
272 /* Aliases for RGBA byte arrays of color data, for the current platform */
273 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
274 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
275 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
276 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
277 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
278 #else
279 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
280 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
281 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
282 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
283 #endif
284
285 SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
286 SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
287 SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
288 SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
289 SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
290 SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
291 SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
292 SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
293 SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
294 SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
295 SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
296 SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
297 SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
298 SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
299 SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
300 SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
301 } SDL_PixelFormatEnum;
302
303 /**
304 * The bits of this structure can be directly reinterpreted as an integer-packed
305 * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888
306 * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
307 */
308 typedef struct SDL_Color
309 {
310 Uint8 r;
311 Uint8 g;
312 Uint8 b;
313 Uint8 a;
314 } SDL_Color;
315 #define SDL_Colour SDL_Color
316
317 typedef struct SDL_Palette
318 {
319 int ncolors;
320 SDL_Color *colors;
321 Uint32 version;
322 int refcount;
323 } SDL_Palette;
324
325 /**
326 * \note Everything in the pixel format structure is read-only.
327 */
328 typedef struct SDL_PixelFormat
329 {
330 Uint32 format;
331 SDL_Palette *palette;
332 Uint8 BitsPerPixel;
333 Uint8 BytesPerPixel;
334 Uint8 padding[2];
335 Uint32 Rmask;
336 Uint32 Gmask;
337 Uint32 Bmask;
338 Uint32 Amask;
339 Uint8 Rloss;
340 Uint8 Gloss;
341 Uint8 Bloss;
342 Uint8 Aloss;
343 Uint8 Rshift;
344 Uint8 Gshift;
345 Uint8 Bshift;
346 Uint8 Ashift;
347 int refcount;
348 struct SDL_PixelFormat *next;
349 } SDL_PixelFormat;
350
351 /**
352 * Get the human readable name of a pixel format.
353 *
354 * \param format the pixel format to query
355 * \returns the human readable name of the specified pixel format or
356 * `SDL_PIXELFORMAT_UNKNOWN` if the format isn't recognized.
357 *
358 * \since This function is available since SDL 2.0.0.
359 */
360 extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
361
362 /**
363 * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
364 *
365 * \param format one of the SDL_PixelFormatEnum values
366 * \param bpp a bits per pixel value; usually 15, 16, or 32
367 * \param Rmask a pointer filled in with the red mask for the format
368 * \param Gmask a pointer filled in with the green mask for the format
369 * \param Bmask a pointer filled in with the blue mask for the format
370 * \param Amask a pointer filled in with the alpha mask for the format
371 * \returns SDL_TRUE on success or SDL_FALSE if the conversion wasn't
372 * possible; call SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_MasksToPixelFormatEnum
377 */
378 extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
379 int *bpp,
380 Uint32 * Rmask,
381 Uint32 * Gmask,
382 Uint32 * Bmask,
383 Uint32 * Amask);
384
385 /**
386 * Convert a bpp value and RGBA masks to an enumerated pixel format.
387 *
388 * This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't
389 * possible.
390 *
391 * \param bpp a bits per pixel value; usually 15, 16, or 32
392 * \param Rmask the red mask for the format
393 * \param Gmask the green mask for the format
394 * \param Bmask the blue mask for the format
395 * \param Amask the alpha mask for the format
396 * \returns one of the SDL_PixelFormatEnum values
397 *
398 * \since This function is available since SDL 2.0.0.
399 *
400 * \sa SDL_PixelFormatEnumToMasks
401 */
402 extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
403 Uint32 Rmask,
404 Uint32 Gmask,
405 Uint32 Bmask,
406 Uint32 Amask);
407
408 /**
409 * Create an SDL_PixelFormat structure corresponding to a pixel format.
410 *
411 * Returned structure may come from a shared global cache (i.e. not newly
412 * allocated), and hence should not be modified, especially the palette. Weird
413 * errors such as `Blit combination not supported` may occur.
414 *
415 * \param pixel_format one of the SDL_PixelFormatEnum values
416 * \returns the new SDL_PixelFormat structure or NULL on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_FreeFormat
422 */
423 extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
424
425 /**
426 * Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
427 *
428 * \param format the SDL_PixelFormat structure to free
429 *
430 * \since This function is available since SDL 2.0.0.
431 *
432 * \sa SDL_AllocFormat
433 */
434 extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
435
436 /**
437 * Create a palette structure with the specified number of color entries.
438 *
439 * The palette entries are initialized to white.
440 *
441 * \param ncolors represents the number of color entries in the color palette
442 * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
443 * there wasn't enough memory); call SDL_GetError() for more
444 * information.
445 *
446 * \since This function is available since SDL 2.0.0.
447 *
448 * \sa SDL_FreePalette
449 */
450 extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
451
452 /**
453 * Set the palette for a pixel format structure.
454 *
455 * \param format the SDL_PixelFormat structure that will use the palette
456 * \param palette the SDL_Palette structure that will be used
457 * \returns 0 on success or a negative error code on failure; call
458 * SDL_GetError() for more information.
459 *
460 * \since This function is available since SDL 2.0.0.
461 *
462 * \sa SDL_AllocPalette
463 * \sa SDL_FreePalette
464 */
465 extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
466 SDL_Palette *palette);
467
468 /**
469 * Set a range of colors in a palette.
470 *
471 * \param palette the SDL_Palette structure to modify
472 * \param colors an array of SDL_Color structures to copy into the palette
473 * \param firstcolor the index of the first palette entry to modify
474 * \param ncolors the number of entries to modify
475 * \returns 0 on success or a negative error code if not all of the colors
476 * could be set; call SDL_GetError() for more information.
477 *
478 * \since This function is available since SDL 2.0.0.
479 *
480 * \sa SDL_AllocPalette
481 * \sa SDL_CreateRGBSurface
482 */
483 extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
484 const SDL_Color * colors,
485 int firstcolor, int ncolors);
486
487 /**
488 * Free a palette created with SDL_AllocPalette().
489 *
490 * \param palette the SDL_Palette structure to be freed
491 *
492 * \since This function is available since SDL 2.0.0.
493 *
494 * \sa SDL_AllocPalette
495 */
496 extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
497
498 /**
499 * Map an RGB triple to an opaque pixel value for a given pixel format.
500 *
501 * This function maps the RGB color value to the specified pixel format and
502 * returns the pixel value best approximating the given RGB color value for
503 * the given pixel format.
504 *
505 * If the format has a palette (8-bit) the index of the closest matching color
506 * in the palette will be returned.
507 *
508 * If the specified pixel format has an alpha component it will be returned as
509 * all 1 bits (fully opaque).
510 *
511 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
512 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
513 * format the return value can be assigned to a Uint16, and similarly a Uint8
514 * for an 8-bpp format).
515 *
516 * \param format an SDL_PixelFormat structure describing the pixel format
517 * \param r the red component of the pixel in the range 0-255
518 * \param g the green component of the pixel in the range 0-255
519 * \param b the blue component of the pixel in the range 0-255
520 * \returns a pixel value
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_GetRGB
525 * \sa SDL_GetRGBA
526 * \sa SDL_MapRGBA
527 */
528 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
529 Uint8 r, Uint8 g, Uint8 b);
530
531 /**
532 * Map an RGBA quadruple to a pixel value for a given pixel format.
533 *
534 * This function maps the RGBA color value to the specified pixel format and
535 * returns the pixel value best approximating the given RGBA color value for
536 * the given pixel format.
537 *
538 * If the specified pixel format has no alpha component the alpha value will
539 * be ignored (as it will be in formats with a palette).
540 *
541 * If the format has a palette (8-bit) the index of the closest matching color
542 * in the palette will be returned.
543 *
544 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
545 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
546 * format the return value can be assigned to a Uint16, and similarly a Uint8
547 * for an 8-bpp format).
548 *
549 * \param format an SDL_PixelFormat structure describing the format of the
550 * pixel
551 * \param r the red component of the pixel in the range 0-255
552 * \param g the green component of the pixel in the range 0-255
553 * \param b the blue component of the pixel in the range 0-255
554 * \param a the alpha component of the pixel in the range 0-255
555 * \returns a pixel value
556 *
557 * \since This function is available since SDL 2.0.0.
558 *
559 * \sa SDL_GetRGB
560 * \sa SDL_GetRGBA
561 * \sa SDL_MapRGB
562 */
563 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
564 Uint8 r, Uint8 g, Uint8 b,
565 Uint8 a);
566
567 /**
568 * Get RGB values from a pixel in the specified format.
569 *
570 * This function uses the entire 8-bit [0..255] range when converting color
571 * components from pixel formats with less than 8-bits per RGB component
572 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
573 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
574 *
575 * \param pixel a pixel value
576 * \param format an SDL_PixelFormat structure describing the format of the
577 * pixel
578 * \param r a pointer filled in with the red component
579 * \param g a pointer filled in with the green component
580 * \param b a pointer filled in with the blue component
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetRGBA
585 * \sa SDL_MapRGB
586 * \sa SDL_MapRGBA
587 */
588 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
589 const SDL_PixelFormat * format,
590 Uint8 * r, Uint8 * g, Uint8 * b);
591
592 /**
593 * Get RGBA values from a pixel in the specified format.
594 *
595 * This function uses the entire 8-bit [0..255] range when converting color
596 * components from pixel formats with less than 8-bits per RGB component
597 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
598 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
599 *
600 * If the surface has no alpha component, the alpha will be returned as 0xff
601 * (100% opaque).
602 *
603 * \param pixel a pixel value
604 * \param format an SDL_PixelFormat structure describing the format of the
605 * pixel
606 * \param r a pointer filled in with the red component
607 * \param g a pointer filled in with the green component
608 * \param b a pointer filled in with the blue component
609 * \param a a pointer filled in with the alpha component
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_GetRGB
614 * \sa SDL_MapRGB
615 * \sa SDL_MapRGBA
616 */
617 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
618 const SDL_PixelFormat * format,
619 Uint8 * r, Uint8 * g, Uint8 * b,
620 Uint8 * a);
621
622 /**
623 * Calculate a 256 entry gamma ramp for a gamma value.
624 *
625 * \param gamma a gamma value where 0.0 is black and 1.0 is identity
626 * \param ramp an array of 256 values filled in with the gamma ramp
627 *
628 * \since This function is available since SDL 2.0.0.
629 *
630 * \sa SDL_SetWindowGammaRamp
631 */
632 extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
633
634
635 /* Ends C function definitions when using C++ */
636 #ifdef __cplusplus
637 }
638 #endif
639 #include <SDL2/close_code.h>
640
641 #endif /* SDL_pixels_h_ */
642
643 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_platform.h
23 *
24 * Try to get a standard set of platform defines.
25 */
26
27 #ifndef SDL_platform_h_
28 #define SDL_platform_h_
29
30 #if defined(_AIX)
31 #undef __AIX__
32 #define __AIX__ 1
33 #endif
34 #if defined(__HAIKU__)
35 #undef __HAIKU__
36 #define __HAIKU__ 1
37 #endif
38 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
39 #undef __BSDI__
40 #define __BSDI__ 1
41 #endif
42 #if defined(_arch_dreamcast)
43 #undef __DREAMCAST__
44 #define __DREAMCAST__ 1
45 #endif
46 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
47 #undef __FREEBSD__
48 #define __FREEBSD__ 1
49 #endif
50 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
51 #undef __HPUX__
52 #define __HPUX__ 1
53 #endif
54 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
55 #undef __IRIX__
56 #define __IRIX__ 1
57 #endif
58 #if (defined(linux) || defined(__linux) || defined(__linux__))
59 #undef __LINUX__
60 #define __LINUX__ 1
61 #endif
62 #if defined(ANDROID) || defined(__ANDROID__)
63 #undef __ANDROID__
64 #undef __LINUX__ /* do we need to do this? */
65 #define __ANDROID__ 1
66 #endif
67
68 #if defined(__APPLE__)
69 /* lets us know what version of Mac OS X we're compiling on */
70 #include <AvailabilityMacros.h>
71 #include <TargetConditionals.h>
72
73 /* Fix building with older SDKs that don't define these
74 See this for more information:
75 https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
76 */
77 #ifndef TARGET_OS_MACCATALYST
78 #define TARGET_OS_MACCATALYST 0
79 #endif
80 #ifndef TARGET_OS_IOS
81 #define TARGET_OS_IOS 0
82 #endif
83 #ifndef TARGET_OS_IPHONE
84 #define TARGET_OS_IPHONE 0
85 #endif
86 #ifndef TARGET_OS_TV
87 #define TARGET_OS_TV 0
88 #endif
89 #ifndef TARGET_OS_SIMULATOR
90 #define TARGET_OS_SIMULATOR 0
91 #endif
92
93 #if TARGET_OS_TV
94 #undef __TVOS__
95 #define __TVOS__ 1
96 #endif
97 #if TARGET_OS_IPHONE
98 /* if compiling for iOS */
99 #undef __IPHONEOS__
100 #define __IPHONEOS__ 1
101 #undef __MACOSX__
102 #else
103 /* if not compiling for iOS */
104 #undef __MACOSX__
105 #define __MACOSX__ 1
106 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
107 # error SDL for Mac OS X only supports deploying on 10.6 and above.
108 #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
109 #endif /* TARGET_OS_IPHONE */
110 #endif /* defined(__APPLE__) */
111
112 #if defined(__NetBSD__)
113 #undef __NETBSD__
114 #define __NETBSD__ 1
115 #endif
116 #if defined(__OpenBSD__)
117 #undef __OPENBSD__
118 #define __OPENBSD__ 1
119 #endif
120 #if defined(__OS2__) || defined(__EMX__)
121 #undef __OS2__
122 #define __OS2__ 1
123 #endif
124 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
125 #undef __OSF__
126 #define __OSF__ 1
127 #endif
128 #if defined(__QNXNTO__)
129 #undef __QNXNTO__
130 #define __QNXNTO__ 1
131 #endif
132 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
133 #undef __RISCOS__
134 #define __RISCOS__ 1
135 #endif
136 #if defined(__sun) && defined(__SVR4)
137 #undef __SOLARIS__
138 #define __SOLARIS__ 1
139 #endif
140
141 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
142 /* Try to find out if we're compiling for WinRT or non-WinRT */
143 #if defined(_MSC_VER) && defined(__has_include)
144 #if __has_include(<winapifamily.h>)
145 #define HAVE_WINAPIFAMILY_H 1
146 #else
147 #define HAVE_WINAPIFAMILY_H 0
148 #endif
149
150 /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
151 #elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
152 #define HAVE_WINAPIFAMILY_H 1
153 #else
154 #define HAVE_WINAPIFAMILY_H 0
155 #endif
156
157 #if HAVE_WINAPIFAMILY_H
158 #include <winapifamily.h>
159 #define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
160 #else
161 #define WINAPI_FAMILY_WINRT 0
162 #endif /* HAVE_WINAPIFAMILY_H */
163
164 #if WINAPI_FAMILY_WINRT
165 #undef __WINRT__
166 #define __WINRT__ 1
167 #else
168 #undef __WINDOWS__
169 #define __WINDOWS__ 1
170 #endif
171 #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
172
173 #if defined(__WINDOWS__)
174 #undef __WIN32__
175 #define __WIN32__ 1
176 #endif
177 #if defined(__PSP__)
178 #undef __PSP__
179 #define __PSP__ 1
180 #endif
181
182 /* The NACL compiler defines __native_client__ and __pnacl__
183 * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
184 */
185 #if defined(__native_client__)
186 #undef __LINUX__
187 #undef __NACL__
188 #define __NACL__ 1
189 #endif
190 #if defined(__pnacl__)
191 #undef __LINUX__
192 #undef __PNACL__
193 #define __PNACL__ 1
194 /* PNACL with newlib supports static linking only */
195 #define __SDL_NOGETPROCADDR__
196 #endif
197
198 #if defined(__vita__)
199 #define __VITA__ 1
200 #endif
201
202 #include <SDL2/begin_code.h>
203 /* Set up for C function definitions, even when using C++ */
204 #ifdef __cplusplus
205 extern "C" {
206 #endif
207
208 /**
209 * Get the name of the platform.
210 *
211 * Here are the names returned for some (but not all) supported platforms:
212 *
213 * - "Windows"
214 * - "Mac OS X"
215 * - "Linux"
216 * - "iOS"
217 * - "Android"
218 *
219 * \returns the name of the platform. If the correct platform name is not
220 * available, returns a string beginning with the text "Unknown".
221 *
222 * \since This function is available since SDL 2.0.0.
223 */
224 extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
225
226 /* Ends C function definitions when using C++ */
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_platform_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_power_h_
22 #define SDL_power_h_
23
24 /**
25 * \file SDL_power.h
26 *
27 * Header for the SDL power management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * The basic state for the system's power supply.
40 */
41 typedef enum
42 {
43 SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
44 SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
45 SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
46 SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
47 SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
48 } SDL_PowerState;
49
50
51 /**
52 * Get the current power supply details.
53 *
54 * You should never take a battery status as absolute truth. Batteries
55 * (especially failing batteries) are delicate hardware, and the values
56 * reported here are best estimates based on what that hardware reports. It's
57 * not uncommon for older batteries to lose stored power much faster than it
58 * reports, or completely drain when reporting it has 20 percent left, etc.
59 *
60 * Battery status can change at any time; if you are concerned with power
61 * state, you should call this function frequently, and perhaps ignore changes
62 * until they seem to be stable for a few seconds.
63 *
64 * It's possible a platform can only report battery percentage or time left
65 * but not both.
66 *
67 * \param secs seconds of battery life left, you can pass a NULL here if you
68 * don't care, will return -1 if we can't determine a value, or
69 * we're not running on a battery
70 * \param pct percentage of battery life left, between 0 and 100, you can pass
71 * a NULL here if you don't care, will return -1 if we can't
72 * determine a value, or we're not running on a battery
73 * \returns an SDL_PowerState enum representing the current battery state.
74 *
75 * \since This function is available since SDL 2.0.0.
76 */
77 extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
78
79 /* Ends C function definitions when using C++ */
80 #ifdef __cplusplus
81 }
82 #endif
83 #include <SDL2/close_code.h>
84
85 #endif /* SDL_power_h_ */
86
87 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_quit.h
23 *
24 * Include file for SDL quit event handling.
25 */
26
27 #ifndef SDL_quit_h_
28 #define SDL_quit_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /**
34 * \file SDL_quit.h
35 *
36 * An ::SDL_QUIT event is generated when the user tries to close the application
37 * window. If it is ignored or filtered out, the window will remain open.
38 * If it is not ignored or filtered, it is queued normally and the window
39 * is allowed to close. When the window is closed, screen updates will
40 * complete, but have no effect.
41 *
42 * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
43 * and SIGTERM (system termination request), if handlers do not already
44 * exist, that generate ::SDL_QUIT events as well. There is no way
45 * to determine the cause of an ::SDL_QUIT event, but setting a signal
46 * handler in your application will override the default generation of
47 * quit events for that signal.
48 *
49 * \sa SDL_Quit()
50 */
51
52 /* There are no functions directly affecting the quit event */
53
54 #define SDL_QuitRequested() \
55 (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
56
57 #endif /* SDL_quit_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rect.h
23 *
24 * Header file for SDL_rect definition and management functions.
25 */
26
27 #ifndef SDL_rect_h_
28 #define SDL_rect_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_pixels.h>
33 #include <SDL2/SDL_rwops.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * The structure that defines a point (integer)
43 *
44 * \sa SDL_EnclosePoints
45 * \sa SDL_PointInRect
46 */
47 typedef struct SDL_Point
48 {
49 int x;
50 int y;
51 } SDL_Point;
52
53 /**
54 * The structure that defines a point (floating point)
55 *
56 * \sa SDL_EncloseFPoints
57 * \sa SDL_PointInFRect
58 */
59 typedef struct SDL_FPoint
60 {
61 float x;
62 float y;
63 } SDL_FPoint;
64
65
66 /**
67 * A rectangle, with the origin at the upper left (integer).
68 *
69 * \sa SDL_RectEmpty
70 * \sa SDL_RectEquals
71 * \sa SDL_HasIntersection
72 * \sa SDL_IntersectRect
73 * \sa SDL_IntersectRectAndLine
74 * \sa SDL_UnionRect
75 * \sa SDL_EnclosePoints
76 */
77 typedef struct SDL_Rect
78 {
79 int x, y;
80 int w, h;
81 } SDL_Rect;
82
83
84 /**
85 * A rectangle, with the origin at the upper left (floating point).
86 *
87 * \sa SDL_FRectEmpty
88 * \sa SDL_FRectEquals
89 * \sa SDL_FRectEqualsEpsilon
90 * \sa SDL_HasIntersectionF
91 * \sa SDL_IntersectFRect
92 * \sa SDL_IntersectFRectAndLine
93 * \sa SDL_UnionFRect
94 * \sa SDL_EncloseFPoints
95 * \sa SDL_PointInFRect
96 */
97 typedef struct SDL_FRect
98 {
99 float x;
100 float y;
101 float w;
102 float h;
103 } SDL_FRect;
104
105
106 /**
107 * Returns true if point resides inside a rectangle.
108 */
109 SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
110 {
111 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
112 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
113 }
114
115 /**
116 * Returns true if the rectangle has no area.
117 */
118 SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
119 {
120 return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
121 }
122
123 /**
124 * Returns true if the two rectangles are equal.
125 */
126 SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
127 {
128 return (a && b && (a->x == b->x) && (a->y == b->y) &&
129 (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
130 }
131
132 /**
133 * Determine whether two rectangles intersect.
134 *
135 * If either pointer is NULL the function will return SDL_FALSE.
136 *
137 * \param A an SDL_Rect structure representing the first rectangle
138 * \param B an SDL_Rect structure representing the second rectangle
139 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_IntersectRect
144 */
145 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
146 const SDL_Rect * B);
147
148 /**
149 * Calculate the intersection of two rectangles.
150 *
151 * If `result` is NULL then this function will return SDL_FALSE.
152 *
153 * \param A an SDL_Rect structure representing the first rectangle
154 * \param B an SDL_Rect structure representing the second rectangle
155 * \param result an SDL_Rect structure filled in with the intersection of
156 * rectangles `A` and `B`
157 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
158 *
159 * \since This function is available since SDL 2.0.0.
160 *
161 * \sa SDL_HasIntersection
162 */
163 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
164 const SDL_Rect * B,
165 SDL_Rect * result);
166
167 /**
168 * Calculate the union of two rectangles.
169 *
170 * \param A an SDL_Rect structure representing the first rectangle
171 * \param B an SDL_Rect structure representing the second rectangle
172 * \param result an SDL_Rect structure filled in with the union of rectangles
173 * `A` and `B`
174 *
175 * \since This function is available since SDL 2.0.0.
176 */
177 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
178 const SDL_Rect * B,
179 SDL_Rect * result);
180
181 /**
182 * Calculate a minimal rectangle enclosing a set of points.
183 *
184 * If `clip` is not NULL then only points inside of the clipping rectangle are
185 * considered.
186 *
187 * \param points an array of SDL_Point structures representing points to be
188 * enclosed
189 * \param count the number of structures in the `points` array
190 * \param clip an SDL_Rect used for clipping or NULL to enclose all points
191 * \param result an SDL_Rect structure filled in with the minimal enclosing
192 * rectangle
193 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
194 * points were outside of the clipping rectangle.
195 *
196 * \since This function is available since SDL 2.0.0.
197 */
198 extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
199 int count,
200 const SDL_Rect * clip,
201 SDL_Rect * result);
202
203 /**
204 * Calculate the intersection of a rectangle and line segment.
205 *
206 * This function is used to clip a line segment to a rectangle. A line segment
207 * contained entirely within the rectangle or that does not intersect will
208 * remain unchanged. A line segment that crosses the rectangle at either or
209 * both ends will be clipped to the boundary of the rectangle and the new
210 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
211 *
212 * \param rect an SDL_Rect structure representing the rectangle to intersect
213 * \param X1 a pointer to the starting X-coordinate of the line
214 * \param Y1 a pointer to the starting Y-coordinate of the line
215 * \param X2 a pointer to the ending X-coordinate of the line
216 * \param Y2 a pointer to the ending Y-coordinate of the line
217 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
218 *
219 * \since This function is available since SDL 2.0.0.
220 */
221 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
222 rect, int *X1,
223 int *Y1, int *X2,
224 int *Y2);
225
226
227 /* SDL_FRect versions... */
228
229 /**
230 * Returns true if point resides inside a rectangle.
231 */
232 SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
233 {
234 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
235 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
236 }
237
238 /**
239 * Returns true if the rectangle has no area.
240 */
241 SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
242 {
243 return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
244 }
245
246 /**
247 * Returns true if the two rectangles are equal, within some given epsilon.
248 *
249 * \since This function is available since SDL 2.0.22.
250 */
251 SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
252 {
253 return (a && b && ((a == b) ||
254 ((SDL_fabs(a->x - b->x) <= epsilon) &&
255 (SDL_fabs(a->y - b->y) <= epsilon) &&
256 (SDL_fabs(a->w - b->w) <= epsilon) &&
257 (SDL_fabs(a->h - b->h) <= epsilon))))
258 ? SDL_TRUE : SDL_FALSE;
259 }
260
261 /**
262 * Returns true if the two rectangles are equal, using a default epsilon.
263 *
264 * \since This function is available since SDL 2.0.22.
265 */
266 SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
267 {
268 return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
269 }
270
271 /**
272 * Determine whether two rectangles intersect with float precision.
273 *
274 * If either pointer is NULL the function will return SDL_FALSE.
275 *
276 * \param A an SDL_FRect structure representing the first rectangle
277 * \param B an SDL_FRect structure representing the second rectangle
278 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
279 *
280 * \since This function is available since SDL 2.0.22.
281 *
282 * \sa SDL_IntersectRect
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
285 const SDL_FRect * B);
286
287 /**
288 * Calculate the intersection of two rectangles with float precision.
289 *
290 * If `result` is NULL then this function will return SDL_FALSE.
291 *
292 * \param A an SDL_FRect structure representing the first rectangle
293 * \param B an SDL_FRect structure representing the second rectangle
294 * \param result an SDL_FRect structure filled in with the intersection of
295 * rectangles `A` and `B`
296 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
297 *
298 * \since This function is available since SDL 2.0.22.
299 *
300 * \sa SDL_HasIntersectionF
301 */
302 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
303 const SDL_FRect * B,
304 SDL_FRect * result);
305
306 /**
307 * Calculate the union of two rectangles with float precision.
308 *
309 * \param A an SDL_FRect structure representing the first rectangle
310 * \param B an SDL_FRect structure representing the second rectangle
311 * \param result an SDL_FRect structure filled in with the union of rectangles
312 * `A` and `B`
313 *
314 * \since This function is available since SDL 2.0.22.
315 */
316 extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
317 const SDL_FRect * B,
318 SDL_FRect * result);
319
320 /**
321 * Calculate a minimal rectangle enclosing a set of points with float
322 * precision.
323 *
324 * If `clip` is not NULL then only points inside of the clipping rectangle are
325 * considered.
326 *
327 * \param points an array of SDL_FPoint structures representing points to be
328 * enclosed
329 * \param count the number of structures in the `points` array
330 * \param clip an SDL_FRect used for clipping or NULL to enclose all points
331 * \param result an SDL_FRect structure filled in with the minimal enclosing
332 * rectangle
333 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
334 * points were outside of the clipping rectangle.
335 *
336 * \since This function is available since SDL 2.0.22.
337 */
338 extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
339 int count,
340 const SDL_FRect * clip,
341 SDL_FRect * result);
342
343 /**
344 * Calculate the intersection of a rectangle and line segment with float
345 * precision.
346 *
347 * This function is used to clip a line segment to a rectangle. A line segment
348 * contained entirely within the rectangle or that does not intersect will
349 * remain unchanged. A line segment that crosses the rectangle at either or
350 * both ends will be clipped to the boundary of the rectangle and the new
351 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
352 *
353 * \param rect an SDL_FRect structure representing the rectangle to intersect
354 * \param X1 a pointer to the starting X-coordinate of the line
355 * \param Y1 a pointer to the starting Y-coordinate of the line
356 * \param X2 a pointer to the ending X-coordinate of the line
357 * \param Y2 a pointer to the ending Y-coordinate of the line
358 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
359 *
360 * \since This function is available since SDL 2.0.22.
361 */
362 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
363 rect, float *X1,
364 float *Y1, float *X2,
365 float *Y2);
366
367 /* Ends C function definitions when using C++ */
368 #ifdef __cplusplus
369 }
370 #endif
371 #include <SDL2/close_code.h>
372
373 #endif /* SDL_rect_h_ */
374
375 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_render.h
23 *
24 * Header file for SDL 2D rendering functions.
25 *
26 * This API supports the following features:
27 * * single pixel points
28 * * single pixel lines
29 * * filled rectangles
30 * * texture images
31 *
32 * The primitives may be drawn in opaque, blended, or additive modes.
33 *
34 * The texture images may be drawn in opaque, blended, or additive modes.
35 * They can have an additional color tint or alpha modulation applied to
36 * them, and may also be stretched with linear interpolation.
37 *
38 * This API is designed to accelerate simple 2D operations. You may
39 * want more functionality such as polygons and particle effects and
40 * in that case you should use SDL's OpenGL/Direct3D support or one
41 * of the many good 3D engines.
42 *
43 * These functions must be called from the main thread.
44 * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
45 */
46
47 #ifndef SDL_render_h_
48 #define SDL_render_h_
49
50 #include <SDL2/SDL_stdinc.h>
51 #include <SDL2/SDL_rect.h>
52 #include <SDL2/SDL_video.h>
53
54 #include <SDL2/begin_code.h>
55 /* Set up for C function definitions, even when using C++ */
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 /**
61 * Flags used when creating a rendering context
62 */
63 typedef enum
64 {
65 SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */
66 SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware
67 acceleration */
68 SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized
69 with the refresh rate */
70 SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports
71 rendering to texture */
72 } SDL_RendererFlags;
73
74 /**
75 * Information on the capabilities of a render driver or context.
76 */
77 typedef struct SDL_RendererInfo
78 {
79 const char *name; /**< The name of the renderer */
80 Uint32 flags; /**< Supported ::SDL_RendererFlags */
81 Uint32 num_texture_formats; /**< The number of available texture formats */
82 Uint32 texture_formats[16]; /**< The available texture formats */
83 int max_texture_width; /**< The maximum texture width */
84 int max_texture_height; /**< The maximum texture height */
85 } SDL_RendererInfo;
86
87 /**
88 * Vertex structure
89 */
90 typedef struct SDL_Vertex
91 {
92 SDL_FPoint position; /**< Vertex position, in SDL_Renderer coordinates */
93 SDL_Color color; /**< Vertex color */
94 SDL_FPoint tex_coord; /**< Normalized texture coordinates, if needed */
95 } SDL_Vertex;
96
97 /**
98 * The scaling mode for a texture.
99 */
100 typedef enum
101 {
102 SDL_ScaleModeNearest, /**< nearest pixel sampling */
103 SDL_ScaleModeLinear, /**< linear filtering */
104 SDL_ScaleModeBest /**< anisotropic filtering */
105 } SDL_ScaleMode;
106
107 /**
108 * The access pattern allowed for a texture.
109 */
110 typedef enum
111 {
112 SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
113 SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
114 SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
115 } SDL_TextureAccess;
116
117 /**
118 * The texture channel modulation used in SDL_RenderCopy().
119 */
120 typedef enum
121 {
122 SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */
123 SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */
124 SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */
125 } SDL_TextureModulate;
126
127 /**
128 * Flip constants for SDL_RenderCopyEx
129 */
130 typedef enum
131 {
132 SDL_FLIP_NONE = 0x00000000, /**< Do not flip */
133 SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */
134 SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */
135 } SDL_RendererFlip;
136
137 /**
138 * A structure representing rendering state
139 */
140 struct SDL_Renderer;
141 typedef struct SDL_Renderer SDL_Renderer;
142
143 /**
144 * An efficient driver-specific representation of pixel data
145 */
146 struct SDL_Texture;
147 typedef struct SDL_Texture SDL_Texture;
148
149 /* Function prototypes */
150
151 /**
152 * Get the number of 2D rendering drivers available for the current display.
153 *
154 * A render driver is a set of code that handles rendering and texture
155 * management on a particular display. Normally there is only one, but some
156 * drivers may have several available with different capabilities.
157 *
158 * There may be none if SDL was compiled without render support.
159 *
160 * \returns a number >= 0 on success or a negative error code on failure; call
161 * SDL_GetError() for more information.
162 *
163 * \since This function is available since SDL 2.0.0.
164 *
165 * \sa SDL_CreateRenderer
166 * \sa SDL_GetRenderDriverInfo
167 */
168 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
169
170 /**
171 * Get info about a specific 2D rendering driver for the current display.
172 *
173 * \param index the index of the driver to query information about
174 * \param info an SDL_RendererInfo structure to be filled with information on
175 * the rendering driver
176 * \returns 0 on success or a negative error code on failure; call
177 * SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.0.
180 *
181 * \sa SDL_CreateRenderer
182 * \sa SDL_GetNumRenderDrivers
183 */
184 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
185 SDL_RendererInfo * info);
186
187 /**
188 * Create a window and default renderer.
189 *
190 * \param width the width of the window
191 * \param height the height of the window
192 * \param window_flags the flags used to create the window (see
193 * SDL_CreateWindow())
194 * \param window a pointer filled with the window, or NULL on error
195 * \param renderer a pointer filled with the renderer, or NULL on error
196 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
197 * information.
198 *
199 * \since This function is available since SDL 2.0.0.
200 *
201 * \sa SDL_CreateRenderer
202 * \sa SDL_CreateWindow
203 */
204 extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
205 int width, int height, Uint32 window_flags,
206 SDL_Window **window, SDL_Renderer **renderer);
207
208
209 /**
210 * Create a 2D rendering context for a window.
211 *
212 * \param window the window where rendering is displayed
213 * \param index the index of the rendering driver to initialize, or -1 to
214 * initialize the first one supporting the requested flags
215 * \param flags 0, or one or more SDL_RendererFlags OR'd together
216 * \returns a valid rendering context or NULL if there was an error; call
217 * SDL_GetError() for more information.
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_CreateSoftwareRenderer
222 * \sa SDL_DestroyRenderer
223 * \sa SDL_GetNumRenderDrivers
224 * \sa SDL_GetRendererInfo
225 */
226 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
227 int index, Uint32 flags);
228
229 /**
230 * Create a 2D software rendering context for a surface.
231 *
232 * Two other API which can be used to create SDL_Renderer:
233 * SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
234 * create a software renderer, but they are intended to be used with an
235 * SDL_Window as the final destination and not an SDL_Surface.
236 *
237 * \param surface the SDL_Surface structure representing the surface where
238 * rendering is done
239 * \returns a valid rendering context or NULL if there was an error; call
240 * SDL_GetError() for more information.
241 *
242 * \since This function is available since SDL 2.0.0.
243 *
244 * \sa SDL_CreateRenderer
245 * \sa SDL_CreateWindowRenderer
246 * \sa SDL_DestroyRenderer
247 */
248 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
249
250 /**
251 * Get the renderer associated with a window.
252 *
253 * \param window the window to query
254 * \returns the rendering context on success or NULL on failure; call
255 * SDL_GetError() for more information.
256 *
257 * \since This function is available since SDL 2.0.0.
258 *
259 * \sa SDL_CreateRenderer
260 */
261 extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
262
263 /**
264 * Get the window associated with a renderer.
265 *
266 * \param renderer the renderer to query
267 * \returns the window on success or NULL on failure; call SDL_GetError() for
268 * more information.
269 *
270 * \since This function is available since SDL 2.0.22.
271 */
272 extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
273
274 /**
275 * Get information about a rendering context.
276 *
277 * \param renderer the rendering context
278 * \param info an SDL_RendererInfo structure filled with information about the
279 * current renderer
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateRenderer
286 */
287 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
288 SDL_RendererInfo * info);
289
290 /**
291 * Get the output size in pixels of a rendering context.
292 *
293 * Due to high-dpi displays, you might end up with a rendering context that
294 * has more pixels than the window that contains it, so use this instead of
295 * SDL_GetWindowSize() to decide how much drawing area you have.
296 *
297 * \param renderer the rendering context
298 * \param w an int filled with the width
299 * \param h an int filled with the height
300 * \returns 0 on success or a negative error code on failure; call
301 * SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetRenderer
306 */
307 extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
308 int *w, int *h);
309
310 /**
311 * Create a texture for a rendering context.
312 *
313 * You can set the texture scaling method by setting
314 * `SDL_HINT_RENDER_SCALE_QUALITY` before creating the texture.
315 *
316 * \param renderer the rendering context
317 * \param format one of the enumerated values in SDL_PixelFormatEnum
318 * \param access one of the enumerated values in SDL_TextureAccess
319 * \param w the width of the texture in pixels
320 * \param h the height of the texture in pixels
321 * \returns a pointer to the created texture or NULL if no rendering context
322 * was active, the format was unsupported, or the width or height
323 * were out of range; call SDL_GetError() for more information.
324 *
325 * \since This function is available since SDL 2.0.0.
326 *
327 * \sa SDL_CreateTextureFromSurface
328 * \sa SDL_DestroyTexture
329 * \sa SDL_QueryTexture
330 * \sa SDL_UpdateTexture
331 */
332 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
333 Uint32 format,
334 int access, int w,
335 int h);
336
337 /**
338 * Create a texture from an existing surface.
339 *
340 * The surface is not modified or freed by this function.
341 *
342 * The SDL_TextureAccess hint for the created texture is
343 * `SDL_TEXTUREACCESS_STATIC`.
344 *
345 * The pixel format of the created texture may be different from the pixel
346 * format of the surface. Use SDL_QueryTexture() to query the pixel format of
347 * the texture.
348 *
349 * \param renderer the rendering context
350 * \param surface the SDL_Surface structure containing pixel data used to fill
351 * the texture
352 * \returns the created texture or NULL on failure; call SDL_GetError() for
353 * more information.
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateTexture
358 * \sa SDL_DestroyTexture
359 * \sa SDL_QueryTexture
360 */
361 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
362
363 /**
364 * Query the attributes of a texture.
365 *
366 * \param texture the texture to query
367 * \param format a pointer filled in with the raw format of the texture; the
368 * actual format may differ, but pixel transfers will use this
369 * format (one of the SDL_PixelFormatEnum values). This argument
370 * can be NULL if you don't need this information.
371 * \param access a pointer filled in with the actual access to the texture
372 * (one of the SDL_TextureAccess values). This argument can be
373 * NULL if you don't need this information.
374 * \param w a pointer filled in with the width of the texture in pixels. This
375 * argument can be NULL if you don't need this information.
376 * \param h a pointer filled in with the height of the texture in pixels. This
377 * argument can be NULL if you don't need this information.
378 * \returns 0 on success or a negative error code on failure; call
379 * SDL_GetError() for more information.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_CreateTexture
384 */
385 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
386 Uint32 * format, int *access,
387 int *w, int *h);
388
389 /**
390 * Set an additional color value multiplied into render copy operations.
391 *
392 * When this texture is rendered, during the copy operation each source color
393 * channel is modulated by the appropriate color value according to the
394 * following formula:
395 *
396 * `srcC = srcC * (color / 255)`
397 *
398 * Color modulation is not always supported by the renderer; it will return -1
399 * if color modulation is not supported.
400 *
401 * \param texture the texture to update
402 * \param r the red color value multiplied into copy operations
403 * \param g the green color value multiplied into copy operations
404 * \param b the blue color value multiplied into copy operations
405 * \returns 0 on success or a negative error code on failure; call
406 * SDL_GetError() for more information.
407 *
408 * \since This function is available since SDL 2.0.0.
409 *
410 * \sa SDL_GetTextureColorMod
411 * \sa SDL_SetTextureAlphaMod
412 */
413 extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
414 Uint8 r, Uint8 g, Uint8 b);
415
416
417 /**
418 * Get the additional color value multiplied into render copy operations.
419 *
420 * \param texture the texture to query
421 * \param r a pointer filled in with the current red color value
422 * \param g a pointer filled in with the current green color value
423 * \param b a pointer filled in with the current blue color value
424 * \returns 0 on success or a negative error code on failure; call
425 * SDL_GetError() for more information.
426 *
427 * \since This function is available since SDL 2.0.0.
428 *
429 * \sa SDL_GetTextureAlphaMod
430 * \sa SDL_SetTextureColorMod
431 */
432 extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
433 Uint8 * r, Uint8 * g,
434 Uint8 * b);
435
436 /**
437 * Set an additional alpha value multiplied into render copy operations.
438 *
439 * When this texture is rendered, during the copy operation the source alpha
440 * value is modulated by this alpha value according to the following formula:
441 *
442 * `srcA = srcA * (alpha / 255)`
443 *
444 * Alpha modulation is not always supported by the renderer; it will return -1
445 * if alpha modulation is not supported.
446 *
447 * \param texture the texture to update
448 * \param alpha the source alpha value multiplied into copy operations
449 * \returns 0 on success or a negative error code on failure; call
450 * SDL_GetError() for more information.
451 *
452 * \since This function is available since SDL 2.0.0.
453 *
454 * \sa SDL_GetTextureAlphaMod
455 * \sa SDL_SetTextureColorMod
456 */
457 extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
458 Uint8 alpha);
459
460 /**
461 * Get the additional alpha value multiplied into render copy operations.
462 *
463 * \param texture the texture to query
464 * \param alpha a pointer filled in with the current alpha value
465 * \returns 0 on success or a negative error code on failure; call
466 * SDL_GetError() for more information.
467 *
468 * \since This function is available since SDL 2.0.0.
469 *
470 * \sa SDL_GetTextureColorMod
471 * \sa SDL_SetTextureAlphaMod
472 */
473 extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
474 Uint8 * alpha);
475
476 /**
477 * Set the blend mode for a texture, used by SDL_RenderCopy().
478 *
479 * If the blend mode is not supported, the closest supported mode is chosen
480 * and this function returns -1.
481 *
482 * \param texture the texture to update
483 * \param blendMode the SDL_BlendMode to use for texture blending
484 * \returns 0 on success or a negative error code on failure; call
485 * SDL_GetError() for more information.
486 *
487 * \since This function is available since SDL 2.0.0.
488 *
489 * \sa SDL_GetTextureBlendMode
490 * \sa SDL_RenderCopy
491 */
492 extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
493 SDL_BlendMode blendMode);
494
495 /**
496 * Get the blend mode used for texture copy operations.
497 *
498 * \param texture the texture to query
499 * \param blendMode a pointer filled in with the current SDL_BlendMode
500 * \returns 0 on success or a negative error code on failure; call
501 * SDL_GetError() for more information.
502 *
503 * \since This function is available since SDL 2.0.0.
504 *
505 * \sa SDL_SetTextureBlendMode
506 */
507 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
508 SDL_BlendMode *blendMode);
509
510 /**
511 * Set the scale mode used for texture scale operations.
512 *
513 * If the scale mode is not supported, the closest supported mode is chosen.
514 *
515 * \param texture The texture to update.
516 * \param scaleMode the SDL_ScaleMode to use for texture scaling.
517 * \returns 0 on success, or -1 if the texture is not valid.
518 *
519 * \since This function is available since SDL 2.0.12.
520 *
521 * \sa SDL_GetTextureScaleMode
522 */
523 extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
524 SDL_ScaleMode scaleMode);
525
526 /**
527 * Get the scale mode used for texture scale operations.
528 *
529 * \param texture the texture to query.
530 * \param scaleMode a pointer filled in with the current scale mode.
531 * \return 0 on success, or -1 if the texture is not valid.
532 *
533 * \since This function is available since SDL 2.0.12.
534 *
535 * \sa SDL_SetTextureScaleMode
536 */
537 extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
538 SDL_ScaleMode *scaleMode);
539
540 /**
541 * Associate a user-specified pointer with a texture.
542 *
543 * \param texture the texture to update.
544 * \param userdata the pointer to associate with the texture.
545 * \returns 0 on success, or -1 if the texture is not valid.
546 *
547 * \since This function is available since SDL 2.0.18.
548 *
549 * \sa SDL_GetTextureUserData
550 */
551 extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture,
552 void *userdata);
553
554 /**
555 * Get the user-specified pointer associated with a texture
556 *
557 * \param texture the texture to query.
558 * \return the pointer associated with the texture, or NULL if the texture is
559 * not valid.
560 *
561 * \since This function is available since SDL 2.0.18.
562 *
563 * \sa SDL_SetTextureUserData
564 */
565 extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture);
566
567 /**
568 * Update the given texture rectangle with new pixel data.
569 *
570 * The pixel data must be in the pixel format of the texture. Use
571 * SDL_QueryTexture() to query the pixel format of the texture.
572 *
573 * This is a fairly slow function, intended for use with static textures that
574 * do not change often.
575 *
576 * If the texture is intended to be updated often, it is preferred to create
577 * the texture as streaming and use the locking functions referenced below.
578 * While this function will work with streaming textures, for optimization
579 * reasons you may not get the pixels back if you lock the texture afterward.
580 *
581 * \param texture the texture to update
582 * \param rect an SDL_Rect structure representing the area to update, or NULL
583 * to update the entire texture
584 * \param pixels the raw pixel data in the format of the texture
585 * \param pitch the number of bytes in a row of pixel data, including padding
586 * between lines
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_CreateTexture
593 * \sa SDL_LockTexture
594 * \sa SDL_UnlockTexture
595 */
596 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
597 const SDL_Rect * rect,
598 const void *pixels, int pitch);
599
600 /**
601 * Update a rectangle within a planar YV12 or IYUV texture with new pixel
602 * data.
603 *
604 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
605 * block of Y and U/V planes in the proper order, but this function is
606 * available if your pixel data is not contiguous.
607 *
608 * \param texture the texture to update
609 * \param rect a pointer to the rectangle of pixels to update, or NULL to
610 * update the entire texture
611 * \param Yplane the raw pixel data for the Y plane
612 * \param Ypitch the number of bytes between rows of pixel data for the Y
613 * plane
614 * \param Uplane the raw pixel data for the U plane
615 * \param Upitch the number of bytes between rows of pixel data for the U
616 * plane
617 * \param Vplane the raw pixel data for the V plane
618 * \param Vpitch the number of bytes between rows of pixel data for the V
619 * plane
620 * \returns 0 on success or -1 if the texture is not valid; call
621 * SDL_GetError() for more information.
622 *
623 * \since This function is available since SDL 2.0.1.
624 *
625 * \sa SDL_UpdateTexture
626 */
627 extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
628 const SDL_Rect * rect,
629 const Uint8 *Yplane, int Ypitch,
630 const Uint8 *Uplane, int Upitch,
631 const Uint8 *Vplane, int Vpitch);
632
633 /**
634 * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
635 *
636 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
637 * block of NV12/21 planes in the proper order, but this function is available
638 * if your pixel data is not contiguous.
639 *
640 * \param texture the texture to update
641 * \param rect a pointer to the rectangle of pixels to update, or NULL to
642 * update the entire texture.
643 * \param Yplane the raw pixel data for the Y plane.
644 * \param Ypitch the number of bytes between rows of pixel data for the Y
645 * plane.
646 * \param UVplane the raw pixel data for the UV plane.
647 * \param UVpitch the number of bytes between rows of pixel data for the UV
648 * plane.
649 * \return 0 on success, or -1 if the texture is not valid.
650 *
651 * \since This function is available since SDL 2.0.16.
652 */
653 extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture,
654 const SDL_Rect * rect,
655 const Uint8 *Yplane, int Ypitch,
656 const Uint8 *UVplane, int UVpitch);
657
658 /**
659 * Lock a portion of the texture for **write-only** pixel access.
660 *
661 * As an optimization, the pixels made available for editing don't necessarily
662 * contain the old texture data. This is a write-only operation, and if you
663 * need to keep a copy of the texture data you should do that at the
664 * application level.
665 *
666 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
667 * changes.
668 *
669 * \param texture the texture to lock for access, which was created with
670 * `SDL_TEXTUREACCESS_STREAMING`
671 * \param rect an SDL_Rect structure representing the area to lock for access;
672 * NULL to lock the entire texture
673 * \param pixels this is filled in with a pointer to the locked pixels,
674 * appropriately offset by the locked area
675 * \param pitch this is filled in with the pitch of the locked pixels; the
676 * pitch is the length of one row in bytes
677 * \returns 0 on success or a negative error code if the texture is not valid
678 * or was not created with `SDL_TEXTUREACCESS_STREAMING`; call
679 * SDL_GetError() for more information.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_UnlockTexture
684 */
685 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
686 const SDL_Rect * rect,
687 void **pixels, int *pitch);
688
689 /**
690 * Lock a portion of the texture for **write-only** pixel access, and expose
691 * it as a SDL surface.
692 *
693 * Besides providing an SDL_Surface instead of raw pixel data, this function
694 * operates like SDL_LockTexture.
695 *
696 * As an optimization, the pixels made available for editing don't necessarily
697 * contain the old texture data. This is a write-only operation, and if you
698 * need to keep a copy of the texture data you should do that at the
699 * application level.
700 *
701 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
702 * changes.
703 *
704 * The returned surface is freed internally after calling SDL_UnlockTexture()
705 * or SDL_DestroyTexture(). The caller should not free it.
706 *
707 * \param texture the texture to lock for access, which was created with
708 * `SDL_TEXTUREACCESS_STREAMING`
709 * \param rect a pointer to the rectangle to lock for access. If the rect is
710 * NULL, the entire texture will be locked
711 * \param surface this is filled in with an SDL surface representing the
712 * locked area
713 * \returns 0 on success, or -1 if the texture is not valid or was not created
714 * with `SDL_TEXTUREACCESS_STREAMING`
715 *
716 * \since This function is available since SDL 2.0.12.
717 *
718 * \sa SDL_LockTexture
719 * \sa SDL_UnlockTexture
720 */
721 extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
722 const SDL_Rect *rect,
723 SDL_Surface **surface);
724
725 /**
726 * Unlock a texture, uploading the changes to video memory, if needed.
727 *
728 * **Warning**: Please note that SDL_LockTexture() is intended to be
729 * write-only; it will not guarantee the previous contents of the texture will
730 * be provided. You must fully initialize any area of a texture that you lock
731 * before unlocking it, as the pixels might otherwise be uninitialized memory.
732 *
733 * Which is to say: locking and immediately unlocking a texture can result in
734 * corrupted textures, depending on the renderer in use.
735 *
736 * \param texture a texture locked by SDL_LockTexture()
737 *
738 * \since This function is available since SDL 2.0.0.
739 *
740 * \sa SDL_LockTexture
741 */
742 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
743
744 /**
745 * Determine whether a renderer supports the use of render targets.
746 *
747 * \param renderer the renderer that will be checked
748 * \returns SDL_TRUE if supported or SDL_FALSE if not.
749 *
750 * \since This function is available since SDL 2.0.0.
751 *
752 * \sa SDL_SetRenderTarget
753 */
754 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
755
756 /**
757 * Set a texture as the current rendering target.
758 *
759 * Before using this function, you should check the
760 * `SDL_RENDERER_TARGETTEXTURE` bit in the flags of SDL_RendererInfo to see if
761 * render targets are supported.
762 *
763 * The default render target is the window for which the renderer was created.
764 * To stop rendering to a texture and render to the window again, call this
765 * function with a NULL `texture`.
766 *
767 * \param renderer the rendering context
768 * \param texture the targeted texture, which must be created with the
769 * `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
770 * window instead of a texture.
771 * \returns 0 on success or a negative error code on failure; call
772 * SDL_GetError() for more information.
773 *
774 * \since This function is available since SDL 2.0.0.
775 *
776 * \sa SDL_GetRenderTarget
777 */
778 extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
779 SDL_Texture *texture);
780
781 /**
782 * Get the current render target.
783 *
784 * The default render target is the window for which the renderer was created,
785 * and is reported a NULL here.
786 *
787 * \param renderer the rendering context
788 * \returns the current render target or NULL for the default render target.
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_SetRenderTarget
793 */
794 extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
795
796 /**
797 * Set a device independent resolution for rendering.
798 *
799 * This function uses the viewport and scaling functionality to allow a fixed
800 * logical resolution for rendering, regardless of the actual output
801 * resolution. If the actual output resolution doesn't have the same aspect
802 * ratio the output rendering will be centered within the output display.
803 *
804 * If the output display is a window, mouse and touch events in the window
805 * will be filtered and scaled so they seem to arrive within the logical
806 * resolution. The SDL_HINT_MOUSE_RELATIVE_SCALING hint controls whether
807 * relative motion events are also scaled.
808 *
809 * If this function results in scaling or subpixel drawing by the rendering
810 * backend, it will be handled using the appropriate quality hints.
811 *
812 * \param renderer the renderer for which resolution should be set
813 * \param w the width of the logical resolution
814 * \param h the height of the logical resolution
815 * \returns 0 on success or a negative error code on failure; call
816 * SDL_GetError() for more information.
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_RenderGetLogicalSize
821 */
822 extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
823
824 /**
825 * Get device independent resolution for rendering.
826 *
827 * This may return 0 for `w` and `h` if the SDL_Renderer has never had its
828 * logical size set by SDL_RenderSetLogicalSize() and never had a render
829 * target set.
830 *
831 * \param renderer a rendering context
832 * \param w an int to be filled with the width
833 * \param h an int to be filled with the height
834 *
835 * \since This function is available since SDL 2.0.0.
836 *
837 * \sa SDL_RenderSetLogicalSize
838 */
839 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
840
841 /**
842 * Set whether to force integer scales for resolution-independent rendering.
843 *
844 * This function restricts the logical viewport to integer values - that is,
845 * when a resolution is between two multiples of a logical size, the viewport
846 * size is rounded down to the lower multiple.
847 *
848 * \param renderer the renderer for which integer scaling should be set
849 * \param enable enable or disable the integer scaling for rendering
850 * \returns 0 on success or a negative error code on failure; call
851 * SDL_GetError() for more information.
852 *
853 * \since This function is available since SDL 2.0.5.
854 *
855 * \sa SDL_RenderGetIntegerScale
856 * \sa SDL_RenderSetLogicalSize
857 */
858 extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
859 SDL_bool enable);
860
861 /**
862 * Get whether integer scales are forced for resolution-independent rendering.
863 *
864 * \param renderer the renderer from which integer scaling should be queried
865 * \returns SDL_TRUE if integer scales are forced or SDL_FALSE if not and on
866 * failure; call SDL_GetError() for more information.
867 *
868 * \since This function is available since SDL 2.0.5.
869 *
870 * \sa SDL_RenderSetIntegerScale
871 */
872 extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
873
874 /**
875 * Set the drawing area for rendering on the current target.
876 *
877 * When the window is resized, the viewport is reset to fill the entire new
878 * window size.
879 *
880 * \param renderer the rendering context
881 * \param rect the SDL_Rect structure representing the drawing area, or NULL
882 * to set the viewport to the entire target
883 * \returns 0 on success or a negative error code on failure; call
884 * SDL_GetError() for more information.
885 *
886 * \since This function is available since SDL 2.0.0.
887 *
888 * \sa SDL_RenderGetViewport
889 */
890 extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
891 const SDL_Rect * rect);
892
893 /**
894 * Get the drawing area for the current target.
895 *
896 * \param renderer the rendering context
897 * \param rect an SDL_Rect structure filled in with the current drawing area
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_RenderSetViewport
902 */
903 extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
904 SDL_Rect * rect);
905
906 /**
907 * Set the clip rectangle for rendering on the specified target.
908 *
909 * \param renderer the rendering context for which clip rectangle should be
910 * set
911 * \param rect an SDL_Rect structure representing the clip area, relative to
912 * the viewport, or NULL to disable clipping
913 * \returns 0 on success or a negative error code on failure; call
914 * SDL_GetError() for more information.
915 *
916 * \since This function is available since SDL 2.0.0.
917 *
918 * \sa SDL_RenderGetClipRect
919 * \sa SDL_RenderIsClipEnabled
920 */
921 extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
922 const SDL_Rect * rect);
923
924 /**
925 * Get the clip rectangle for the current target.
926 *
927 * \param renderer the rendering context from which clip rectangle should be
928 * queried
929 * \param rect an SDL_Rect structure filled in with the current clipping area
930 * or an empty rectangle if clipping is disabled
931 *
932 * \since This function is available since SDL 2.0.0.
933 *
934 * \sa SDL_RenderIsClipEnabled
935 * \sa SDL_RenderSetClipRect
936 */
937 extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
938 SDL_Rect * rect);
939
940 /**
941 * Get whether clipping is enabled on the given renderer.
942 *
943 * \param renderer the renderer from which clip state should be queried
944 * \returns SDL_TRUE if clipping is enabled or SDL_FALSE if not; call
945 * SDL_GetError() for more information.
946 *
947 * \since This function is available since SDL 2.0.4.
948 *
949 * \sa SDL_RenderGetClipRect
950 * \sa SDL_RenderSetClipRect
951 */
952 extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
953
954
955 /**
956 * Set the drawing scale for rendering on the current target.
957 *
958 * The drawing coordinates are scaled by the x/y scaling factors before they
959 * are used by the renderer. This allows resolution independent drawing with a
960 * single coordinate system.
961 *
962 * If this results in scaling or subpixel drawing by the rendering backend, it
963 * will be handled using the appropriate quality hints. For best results use
964 * integer scaling factors.
965 *
966 * \param renderer a rendering context
967 * \param scaleX the horizontal scaling factor
968 * \param scaleY the vertical scaling factor
969 * \returns 0 on success or a negative error code on failure; call
970 * SDL_GetError() for more information.
971 *
972 * \since This function is available since SDL 2.0.0.
973 *
974 * \sa SDL_RenderGetScale
975 * \sa SDL_RenderSetLogicalSize
976 */
977 extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
978 float scaleX, float scaleY);
979
980 /**
981 * Get the drawing scale for the current target.
982 *
983 * \param renderer the renderer from which drawing scale should be queried
984 * \param scaleX a pointer filled in with the horizontal scaling factor
985 * \param scaleY a pointer filled in with the vertical scaling factor
986 *
987 * \since This function is available since SDL 2.0.0.
988 *
989 * \sa SDL_RenderSetScale
990 */
991 extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
992 float *scaleX, float *scaleY);
993
994 /**
995 * Get logical coordinates of point in renderer when given real coordinates of
996 * point in window.
997 *
998 * Logical coordinates will differ from real coordinates when render is scaled
999 * and logical renderer size set
1000 *
1001 * \param renderer the renderer from which the logical coordinates should be
1002 * calcualted
1003 * \param windowX the real X coordinate in the window
1004 * \param windowY the real Y coordinate in the window
1005 * \param logicalX the pointer filled with the logical x coordinate
1006 * \param logicalY the pointer filled with the logical y coordinate
1007 *
1008 * \since This function is available since SDL 2.0.18.
1009 *
1010 * \sa SDL_RenderGetScale
1011 * \sa SDL_RenderSetScale
1012 * \sa SDL_RenderGetLogicalSize
1013 * \sa SDL_RenderSetLogicalSize
1014 */
1015 extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
1016 int windowX, int windowY,
1017 float *logicalX, float *logicalY);
1018
1019 /**
1020 * Get real coordinates of point in window when given logical coordinates of point in renderer.
1021 * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
1022 *
1023 * \param renderer the renderer from which the window coordinates should be calculated
1024 * \param logicalX the logical x coordinate
1025 * \param logicalY the logical y coordinate
1026 * \param windowX the pointer filled with the real X coordinate in the window
1027 * \param windowY the pointer filled with the real Y coordinate in the window
1028
1029 *
1030 * \since This function is available since SDL 2.0.18.
1031 *
1032 * \sa SDL_RenderGetScale
1033 * \sa SDL_RenderSetScale
1034 * \sa SDL_RenderGetLogicalSize
1035 * \sa SDL_RenderSetLogicalSize
1036 */
1037 extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
1038 float logicalX, float logicalY,
1039 int *windowX, int *windowY);
1040
1041 /**
1042 * Set the color used for drawing operations (Rect, Line and Clear).
1043 *
1044 * Set the color for drawing or filling rectangles, lines, and points, and for
1045 * SDL_RenderClear().
1046 *
1047 * \param renderer the rendering context
1048 * \param r the red value used to draw on the rendering target
1049 * \param g the green value used to draw on the rendering target
1050 * \param b the blue value used to draw on the rendering target
1051 * \param a the alpha value used to draw on the rendering target; usually
1052 * `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
1053 * specify how the alpha channel is used
1054 * \returns 0 on success or a negative error code on failure; call
1055 * SDL_GetError() for more information.
1056 *
1057 * \since This function is available since SDL 2.0.0.
1058 *
1059 * \sa SDL_GetRenderDrawColor
1060 * \sa SDL_RenderClear
1061 * \sa SDL_RenderDrawLine
1062 * \sa SDL_RenderDrawLines
1063 * \sa SDL_RenderDrawPoint
1064 * \sa SDL_RenderDrawPoints
1065 * \sa SDL_RenderDrawRect
1066 * \sa SDL_RenderDrawRects
1067 * \sa SDL_RenderFillRect
1068 * \sa SDL_RenderFillRects
1069 */
1070 extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
1071 Uint8 r, Uint8 g, Uint8 b,
1072 Uint8 a);
1073
1074 /**
1075 * Get the color used for drawing operations (Rect, Line and Clear).
1076 *
1077 * \param renderer the rendering context
1078 * \param r a pointer filled in with the red value used to draw on the
1079 * rendering target
1080 * \param g a pointer filled in with the green value used to draw on the
1081 * rendering target
1082 * \param b a pointer filled in with the blue value used to draw on the
1083 * rendering target
1084 * \param a a pointer filled in with the alpha value used to draw on the
1085 * rendering target; usually `SDL_ALPHA_OPAQUE` (255)
1086 * \returns 0 on success or a negative error code on failure; call
1087 * SDL_GetError() for more information.
1088 *
1089 * \since This function is available since SDL 2.0.0.
1090 *
1091 * \sa SDL_SetRenderDrawColor
1092 */
1093 extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
1094 Uint8 * r, Uint8 * g, Uint8 * b,
1095 Uint8 * a);
1096
1097 /**
1098 * Set the blend mode used for drawing operations (Fill and Line).
1099 *
1100 * If the blend mode is not supported, the closest supported mode is chosen.
1101 *
1102 * \param renderer the rendering context
1103 * \param blendMode the SDL_BlendMode to use for blending
1104 * \returns 0 on success or a negative error code on failure; call
1105 * SDL_GetError() for more information.
1106 *
1107 * \since This function is available since SDL 2.0.0.
1108 *
1109 * \sa SDL_GetRenderDrawBlendMode
1110 * \sa SDL_RenderDrawLine
1111 * \sa SDL_RenderDrawLines
1112 * \sa SDL_RenderDrawPoint
1113 * \sa SDL_RenderDrawPoints
1114 * \sa SDL_RenderDrawRect
1115 * \sa SDL_RenderDrawRects
1116 * \sa SDL_RenderFillRect
1117 * \sa SDL_RenderFillRects
1118 */
1119 extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
1120 SDL_BlendMode blendMode);
1121
1122 /**
1123 * Get the blend mode used for drawing operations.
1124 *
1125 * \param renderer the rendering context
1126 * \param blendMode a pointer filled in with the current SDL_BlendMode
1127 * \returns 0 on success or a negative error code on failure; call
1128 * SDL_GetError() for more information.
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_SetRenderDrawBlendMode
1133 */
1134 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
1135 SDL_BlendMode *blendMode);
1136
1137 /**
1138 * Clear the current rendering target with the drawing color.
1139 *
1140 * This function clears the entire rendering target, ignoring the viewport and
1141 * the clip rectangle.
1142 *
1143 * \param renderer the rendering context
1144 * \returns 0 on success or a negative error code on failure; call
1145 * SDL_GetError() for more information.
1146 *
1147 * \since This function is available since SDL 2.0.0.
1148 *
1149 * \sa SDL_SetRenderDrawColor
1150 */
1151 extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
1152
1153 /**
1154 * Draw a point on the current rendering target.
1155 *
1156 * SDL_RenderDrawPoint() draws a single point. If you want to draw multiple,
1157 * use SDL_RenderDrawPoints() instead.
1158 *
1159 * \param renderer the rendering context
1160 * \param x the x coordinate of the point
1161 * \param y the y coordinate of the point
1162 * \returns 0 on success or a negative error code on failure; call
1163 * SDL_GetError() for more information.
1164 *
1165 * \since This function is available since SDL 2.0.0.
1166 *
1167 * \sa SDL_RenderDrawLine
1168 * \sa SDL_RenderDrawLines
1169 * \sa SDL_RenderDrawPoints
1170 * \sa SDL_RenderDrawRect
1171 * \sa SDL_RenderDrawRects
1172 * \sa SDL_RenderFillRect
1173 * \sa SDL_RenderFillRects
1174 * \sa SDL_RenderPresent
1175 * \sa SDL_SetRenderDrawBlendMode
1176 * \sa SDL_SetRenderDrawColor
1177 */
1178 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
1179 int x, int y);
1180
1181 /**
1182 * Draw multiple points on the current rendering target.
1183 *
1184 * \param renderer the rendering context
1185 * \param points an array of SDL_Point structures that represent the points to
1186 * draw
1187 * \param count the number of points to draw
1188 * \returns 0 on success or a negative error code on failure; call
1189 * SDL_GetError() for more information.
1190 *
1191 * \since This function is available since SDL 2.0.0.
1192 *
1193 * \sa SDL_RenderDrawLine
1194 * \sa SDL_RenderDrawLines
1195 * \sa SDL_RenderDrawPoint
1196 * \sa SDL_RenderDrawRect
1197 * \sa SDL_RenderDrawRects
1198 * \sa SDL_RenderFillRect
1199 * \sa SDL_RenderFillRects
1200 * \sa SDL_RenderPresent
1201 * \sa SDL_SetRenderDrawBlendMode
1202 * \sa SDL_SetRenderDrawColor
1203 */
1204 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
1205 const SDL_Point * points,
1206 int count);
1207
1208 /**
1209 * Draw a line on the current rendering target.
1210 *
1211 * SDL_RenderDrawLine() draws the line to include both end points. If you want
1212 * to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
1213 *
1214 * \param renderer the rendering context
1215 * \param x1 the x coordinate of the start point
1216 * \param y1 the y coordinate of the start point
1217 * \param x2 the x coordinate of the end point
1218 * \param y2 the y coordinate of the end point
1219 * \returns 0 on success or a negative error code on failure; call
1220 * SDL_GetError() for more information.
1221 *
1222 * \since This function is available since SDL 2.0.0.
1223 *
1224 * \sa SDL_RenderDrawLines
1225 * \sa SDL_RenderDrawPoint
1226 * \sa SDL_RenderDrawPoints
1227 * \sa SDL_RenderDrawRect
1228 * \sa SDL_RenderDrawRects
1229 * \sa SDL_RenderFillRect
1230 * \sa SDL_RenderFillRects
1231 * \sa SDL_RenderPresent
1232 * \sa SDL_SetRenderDrawBlendMode
1233 * \sa SDL_SetRenderDrawColor
1234 */
1235 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
1236 int x1, int y1, int x2, int y2);
1237
1238 /**
1239 * Draw a series of connected lines on the current rendering target.
1240 *
1241 * \param renderer the rendering context
1242 * \param points an array of SDL_Point structures representing points along
1243 * the lines
1244 * \param count the number of points, drawing count-1 lines
1245 * \returns 0 on success or a negative error code on failure; call
1246 * SDL_GetError() for more information.
1247 *
1248 * \since This function is available since SDL 2.0.0.
1249 *
1250 * \sa SDL_RenderDrawLine
1251 * \sa SDL_RenderDrawPoint
1252 * \sa SDL_RenderDrawPoints
1253 * \sa SDL_RenderDrawRect
1254 * \sa SDL_RenderDrawRects
1255 * \sa SDL_RenderFillRect
1256 * \sa SDL_RenderFillRects
1257 * \sa SDL_RenderPresent
1258 * \sa SDL_SetRenderDrawBlendMode
1259 * \sa SDL_SetRenderDrawColor
1260 */
1261 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
1262 const SDL_Point * points,
1263 int count);
1264
1265 /**
1266 * Draw a rectangle on the current rendering target.
1267 *
1268 * \param renderer the rendering context
1269 * \param rect an SDL_Rect structure representing the rectangle to draw, or
1270 * NULL to outline the entire rendering target
1271 * \returns 0 on success or a negative error code on failure; call
1272 * SDL_GetError() for more information.
1273 *
1274 * \since This function is available since SDL 2.0.0.
1275 *
1276 * \sa SDL_RenderDrawLine
1277 * \sa SDL_RenderDrawLines
1278 * \sa SDL_RenderDrawPoint
1279 * \sa SDL_RenderDrawPoints
1280 * \sa SDL_RenderDrawRects
1281 * \sa SDL_RenderFillRect
1282 * \sa SDL_RenderFillRects
1283 * \sa SDL_RenderPresent
1284 * \sa SDL_SetRenderDrawBlendMode
1285 * \sa SDL_SetRenderDrawColor
1286 */
1287 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
1288 const SDL_Rect * rect);
1289
1290 /**
1291 * Draw some number of rectangles on the current rendering target.
1292 *
1293 * \param renderer the rendering context
1294 * \param rects an array of SDL_Rect structures representing the rectangles to
1295 * be drawn
1296 * \param count the number of rectangles
1297 * \returns 0 on success or a negative error code on failure; call
1298 * SDL_GetError() for more information.
1299 *
1300 * \since This function is available since SDL 2.0.0.
1301 *
1302 * \sa SDL_RenderDrawLine
1303 * \sa SDL_RenderDrawLines
1304 * \sa SDL_RenderDrawPoint
1305 * \sa SDL_RenderDrawPoints
1306 * \sa SDL_RenderDrawRect
1307 * \sa SDL_RenderFillRect
1308 * \sa SDL_RenderFillRects
1309 * \sa SDL_RenderPresent
1310 * \sa SDL_SetRenderDrawBlendMode
1311 * \sa SDL_SetRenderDrawColor
1312 */
1313 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
1314 const SDL_Rect * rects,
1315 int count);
1316
1317 /**
1318 * Fill a rectangle on the current rendering target with the drawing color.
1319 *
1320 * The current drawing color is set by SDL_SetRenderDrawColor(), and the
1321 * color's alpha value is ignored unless blending is enabled with the
1322 * appropriate call to SDL_SetRenderDrawBlendMode().
1323 *
1324 * \param renderer the rendering context
1325 * \param rect the SDL_Rect structure representing the rectangle to fill, or
1326 * NULL for the entire rendering target
1327 * \returns 0 on success or a negative error code on failure; call
1328 * SDL_GetError() for more information.
1329 *
1330 * \since This function is available since SDL 2.0.0.
1331 *
1332 * \sa SDL_RenderDrawLine
1333 * \sa SDL_RenderDrawLines
1334 * \sa SDL_RenderDrawPoint
1335 * \sa SDL_RenderDrawPoints
1336 * \sa SDL_RenderDrawRect
1337 * \sa SDL_RenderDrawRects
1338 * \sa SDL_RenderFillRects
1339 * \sa SDL_RenderPresent
1340 * \sa SDL_SetRenderDrawBlendMode
1341 * \sa SDL_SetRenderDrawColor
1342 */
1343 extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
1344 const SDL_Rect * rect);
1345
1346 /**
1347 * Fill some number of rectangles on the current rendering target with the
1348 * drawing color.
1349 *
1350 * \param renderer the rendering context
1351 * \param rects an array of SDL_Rect structures representing the rectangles to
1352 * be filled
1353 * \param count the number of rectangles
1354 * \returns 0 on success or a negative error code on failure; call
1355 * SDL_GetError() for more information.
1356 *
1357 * \since This function is available since SDL 2.0.0.
1358 *
1359 * \sa SDL_RenderDrawLine
1360 * \sa SDL_RenderDrawLines
1361 * \sa SDL_RenderDrawPoint
1362 * \sa SDL_RenderDrawPoints
1363 * \sa SDL_RenderDrawRect
1364 * \sa SDL_RenderDrawRects
1365 * \sa SDL_RenderFillRect
1366 * \sa SDL_RenderPresent
1367 */
1368 extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
1369 const SDL_Rect * rects,
1370 int count);
1371
1372 /**
1373 * Copy a portion of the texture to the current rendering target.
1374 *
1375 * The texture is blended with the destination based on its blend mode set
1376 * with SDL_SetTextureBlendMode().
1377 *
1378 * The texture color is affected based on its color modulation set by
1379 * SDL_SetTextureColorMod().
1380 *
1381 * The texture alpha is affected based on its alpha modulation set by
1382 * SDL_SetTextureAlphaMod().
1383 *
1384 * \param renderer the rendering context
1385 * \param texture the source texture
1386 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1387 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1388 * rendering target; the texture will be stretched to fill the
1389 * given rectangle
1390 * \returns 0 on success or a negative error code on failure; call
1391 * SDL_GetError() for more information.
1392 *
1393 * \since This function is available since SDL 2.0.0.
1394 *
1395 * \sa SDL_RenderCopyEx
1396 * \sa SDL_SetTextureAlphaMod
1397 * \sa SDL_SetTextureBlendMode
1398 * \sa SDL_SetTextureColorMod
1399 */
1400 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
1401 SDL_Texture * texture,
1402 const SDL_Rect * srcrect,
1403 const SDL_Rect * dstrect);
1404
1405 /**
1406 * Copy a portion of the texture to the current rendering, with optional
1407 * rotation and flipping.
1408 *
1409 * Copy a portion of the texture to the current rendering target, optionally
1410 * rotating it by angle around the given center and also flipping it
1411 * top-bottom and/or left-right.
1412 *
1413 * The texture is blended with the destination based on its blend mode set
1414 * with SDL_SetTextureBlendMode().
1415 *
1416 * The texture color is affected based on its color modulation set by
1417 * SDL_SetTextureColorMod().
1418 *
1419 * The texture alpha is affected based on its alpha modulation set by
1420 * SDL_SetTextureAlphaMod().
1421 *
1422 * \param renderer the rendering context
1423 * \param texture the source texture
1424 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1425 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1426 * rendering target
1427 * \param angle an angle in degrees that indicates the rotation that will be
1428 * applied to dstrect, rotating it in a clockwise direction
1429 * \param center a pointer to a point indicating the point around which
1430 * dstrect will be rotated (if NULL, rotation will be done
1431 * around `dstrect.w / 2`, `dstrect.h / 2`)
1432 * \param flip a SDL_RendererFlip value stating which flipping actions should
1433 * be performed on the texture
1434 * \returns 0 on success or a negative error code on failure; call
1435 * SDL_GetError() for more information.
1436 *
1437 * \since This function is available since SDL 2.0.0.
1438 *
1439 * \sa SDL_RenderCopy
1440 * \sa SDL_SetTextureAlphaMod
1441 * \sa SDL_SetTextureBlendMode
1442 * \sa SDL_SetTextureColorMod
1443 */
1444 extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
1445 SDL_Texture * texture,
1446 const SDL_Rect * srcrect,
1447 const SDL_Rect * dstrect,
1448 const double angle,
1449 const SDL_Point *center,
1450 const SDL_RendererFlip flip);
1451
1452
1453 /**
1454 * Draw a point on the current rendering target at subpixel precision.
1455 *
1456 * \param renderer The renderer which should draw a point.
1457 * \param x The x coordinate of the point.
1458 * \param y The y coordinate of the point.
1459 * \return 0 on success, or -1 on error
1460 *
1461 * \since This function is available since SDL 2.0.10.
1462 */
1463 extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
1464 float x, float y);
1465
1466 /**
1467 * Draw multiple points on the current rendering target at subpixel precision.
1468 *
1469 * \param renderer The renderer which should draw multiple points.
1470 * \param points The points to draw
1471 * \param count The number of points to draw
1472 * \return 0 on success, or -1 on error
1473 *
1474 * \since This function is available since SDL 2.0.10.
1475 */
1476 extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
1477 const SDL_FPoint * points,
1478 int count);
1479
1480 /**
1481 * Draw a line on the current rendering target at subpixel precision.
1482 *
1483 * \param renderer The renderer which should draw a line.
1484 * \param x1 The x coordinate of the start point.
1485 * \param y1 The y coordinate of the start point.
1486 * \param x2 The x coordinate of the end point.
1487 * \param y2 The y coordinate of the end point.
1488 * \return 0 on success, or -1 on error
1489 *
1490 * \since This function is available since SDL 2.0.10.
1491 */
1492 extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
1493 float x1, float y1, float x2, float y2);
1494
1495 /**
1496 * Draw a series of connected lines on the current rendering target at
1497 * subpixel precision.
1498 *
1499 * \param renderer The renderer which should draw multiple lines.
1500 * \param points The points along the lines
1501 * \param count The number of points, drawing count-1 lines
1502 * \return 0 on success, or -1 on error
1503 *
1504 * \since This function is available since SDL 2.0.10.
1505 */
1506 extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
1507 const SDL_FPoint * points,
1508 int count);
1509
1510 /**
1511 * Draw a rectangle on the current rendering target at subpixel precision.
1512 *
1513 * \param renderer The renderer which should draw a rectangle.
1514 * \param rect A pointer to the destination rectangle, or NULL to outline the
1515 * entire rendering target.
1516 * \return 0 on success, or -1 on error
1517 *
1518 * \since This function is available since SDL 2.0.10.
1519 */
1520 extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
1521 const SDL_FRect * rect);
1522
1523 /**
1524 * Draw some number of rectangles on the current rendering target at subpixel
1525 * precision.
1526 *
1527 * \param renderer The renderer which should draw multiple rectangles.
1528 * \param rects A pointer to an array of destination rectangles.
1529 * \param count The number of rectangles.
1530 * \return 0 on success, or -1 on error
1531 *
1532 * \since This function is available since SDL 2.0.10.
1533 */
1534 extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
1535 const SDL_FRect * rects,
1536 int count);
1537
1538 /**
1539 * Fill a rectangle on the current rendering target with the drawing color at
1540 * subpixel precision.
1541 *
1542 * \param renderer The renderer which should fill a rectangle.
1543 * \param rect A pointer to the destination rectangle, or NULL for the entire
1544 * rendering target.
1545 * \return 0 on success, or -1 on error
1546 *
1547 * \since This function is available since SDL 2.0.10.
1548 */
1549 extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
1550 const SDL_FRect * rect);
1551
1552 /**
1553 * Fill some number of rectangles on the current rendering target with the
1554 * drawing color at subpixel precision.
1555 *
1556 * \param renderer The renderer which should fill multiple rectangles.
1557 * \param rects A pointer to an array of destination rectangles.
1558 * \param count The number of rectangles.
1559 * \return 0 on success, or -1 on error
1560 *
1561 * \since This function is available since SDL 2.0.10.
1562 */
1563 extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
1564 const SDL_FRect * rects,
1565 int count);
1566
1567 /**
1568 * Copy a portion of the texture to the current rendering target at subpixel
1569 * precision.
1570 *
1571 * \param renderer The renderer which should copy parts of a texture.
1572 * \param texture The source texture.
1573 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1574 * texture.
1575 * \param dstrect A pointer to the destination rectangle, or NULL for the
1576 * entire rendering target.
1577 * \return 0 on success, or -1 on error
1578 *
1579 * \since This function is available since SDL 2.0.10.
1580 */
1581 extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
1582 SDL_Texture * texture,
1583 const SDL_Rect * srcrect,
1584 const SDL_FRect * dstrect);
1585
1586 /**
1587 * Copy a portion of the source texture to the current rendering target, with
1588 * rotation and flipping, at subpixel precision.
1589 *
1590 * \param renderer The renderer which should copy parts of a texture.
1591 * \param texture The source texture.
1592 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1593 * texture.
1594 * \param dstrect A pointer to the destination rectangle, or NULL for the
1595 * entire rendering target.
1596 * \param angle An angle in degrees that indicates the rotation that will be
1597 * applied to dstrect, rotating it in a clockwise direction
1598 * \param center A pointer to a point indicating the point around which
1599 * dstrect will be rotated (if NULL, rotation will be done
1600 * around dstrect.w/2, dstrect.h/2).
1601 * \param flip An SDL_RendererFlip value stating which flipping actions should
1602 * be performed on the texture
1603 * \return 0 on success, or -1 on error
1604 *
1605 * \since This function is available since SDL 2.0.10.
1606 */
1607 extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
1608 SDL_Texture * texture,
1609 const SDL_Rect * srcrect,
1610 const SDL_FRect * dstrect,
1611 const double angle,
1612 const SDL_FPoint *center,
1613 const SDL_RendererFlip flip);
1614
1615 /**
1616 * Render a list of triangles, optionally using a texture and indices into the
1617 * vertex array Color and alpha modulation is done per vertex
1618 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1619 *
1620 * \param renderer The rendering context.
1621 * \param texture (optional) The SDL texture to use.
1622 * \param vertices Vertices.
1623 * \param num_vertices Number of vertices.
1624 * \param indices (optional) An array of integer indices into the 'vertices'
1625 * array, if NULL all vertices will be rendered in sequential
1626 * order.
1627 * \param num_indices Number of indices.
1628 * \return 0 on success, or -1 if the operation is not supported
1629 *
1630 * \since This function is available since SDL 2.0.18.
1631 *
1632 * \sa SDL_RenderGeometryRaw
1633 * \sa SDL_Vertex
1634 */
1635 extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
1636 SDL_Texture *texture,
1637 const SDL_Vertex *vertices, int num_vertices,
1638 const int *indices, int num_indices);
1639
1640 /**
1641 * Render a list of triangles, optionally using a texture and indices into the
1642 * vertex arrays Color and alpha modulation is done per vertex
1643 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1644 *
1645 * \param renderer The rendering context.
1646 * \param texture (optional) The SDL texture to use.
1647 * \param xy Vertex positions
1648 * \param xy_stride Byte size to move from one element to the next element
1649 * \param color Vertex colors (as SDL_Color)
1650 * \param color_stride Byte size to move from one element to the next element
1651 * \param uv Vertex normalized texture coordinates
1652 * \param uv_stride Byte size to move from one element to the next element
1653 * \param num_vertices Number of vertices.
1654 * \param indices (optional) An array of indices into the 'vertices' arrays,
1655 * if NULL all vertices will be rendered in sequential order.
1656 * \param num_indices Number of indices.
1657 * \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
1658 * \return 0 on success, or -1 if the operation is not supported
1659 *
1660 * \since This function is available since SDL 2.0.18.
1661 *
1662 * \sa SDL_RenderGeometry
1663 * \sa SDL_Vertex
1664 */
1665 extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
1666 SDL_Texture *texture,
1667 const float *xy, int xy_stride,
1668 const SDL_Color *color, int color_stride,
1669 const float *uv, int uv_stride,
1670 int num_vertices,
1671 const void *indices, int num_indices, int size_indices);
1672
1673 /**
1674 * Read pixels from the current rendering target to an array of pixels.
1675 *
1676 * **WARNING**: This is a very slow operation, and should not be used
1677 * frequently. If you're using this on the main rendering target, it should be
1678 * called after rendering and before SDL_RenderPresent().
1679 *
1680 * `pitch` specifies the number of bytes between rows in the destination
1681 * `pixels` data. This allows you to write to a subrectangle or have padded
1682 * rows in the destination. Generally, `pitch` should equal the number of
1683 * pixels per row in the `pixels` data times the number of bytes per pixel,
1684 * but it might contain additional padding (for example, 24bit RGB Windows
1685 * Bitmap data pads all rows to multiples of 4 bytes).
1686 *
1687 * \param renderer the rendering context
1688 * \param rect an SDL_Rect structure representing the area to read, or NULL
1689 * for the entire render target
1690 * \param format an SDL_PixelFormatEnum value of the desired format of the
1691 * pixel data, or 0 to use the format of the rendering target
1692 * \param pixels a pointer to the pixel data to copy into
1693 * \param pitch the pitch of the `pixels` parameter
1694 * \returns 0 on success or a negative error code on failure; call
1695 * SDL_GetError() for more information.
1696 *
1697 * \since This function is available since SDL 2.0.0.
1698 */
1699 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
1700 const SDL_Rect * rect,
1701 Uint32 format,
1702 void *pixels, int pitch);
1703
1704 /**
1705 * Update the screen with any rendering performed since the previous call.
1706 *
1707 * SDL's rendering functions operate on a backbuffer; that is, calling a
1708 * rendering function such as SDL_RenderDrawLine() does not directly put a
1709 * line on the screen, but rather updates the backbuffer. As such, you compose
1710 * your entire scene and *present* the composed backbuffer to the screen as a
1711 * complete picture.
1712 *
1713 * Therefore, when using SDL's rendering API, one does all drawing intended
1714 * for the frame, and then calls this function once per frame to present the
1715 * final drawing to the user.
1716 *
1717 * The backbuffer should be considered invalidated after each present; do not
1718 * assume that previous contents will exist between frames. You are strongly
1719 * encouraged to call SDL_RenderClear() to initialize the backbuffer before
1720 * starting each new frame's drawing, even if you plan to overwrite every
1721 * pixel.
1722 *
1723 * \param renderer the rendering context
1724 *
1725 * \since This function is available since SDL 2.0.0.
1726 *
1727 * \sa SDL_RenderClear
1728 * \sa SDL_RenderDrawLine
1729 * \sa SDL_RenderDrawLines
1730 * \sa SDL_RenderDrawPoint
1731 * \sa SDL_RenderDrawPoints
1732 * \sa SDL_RenderDrawRect
1733 * \sa SDL_RenderDrawRects
1734 * \sa SDL_RenderFillRect
1735 * \sa SDL_RenderFillRects
1736 * \sa SDL_SetRenderDrawBlendMode
1737 * \sa SDL_SetRenderDrawColor
1738 */
1739 extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
1740
1741 /**
1742 * Destroy the specified texture.
1743 *
1744 * Passing NULL or an otherwise invalid texture will set the SDL error message
1745 * to "Invalid texture".
1746 *
1747 * \param texture the texture to destroy
1748 *
1749 * \since This function is available since SDL 2.0.0.
1750 *
1751 * \sa SDL_CreateTexture
1752 * \sa SDL_CreateTextureFromSurface
1753 */
1754 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
1755
1756 /**
1757 * Destroy the rendering context for a window and free associated textures.
1758 *
1759 * \param renderer the rendering context
1760 *
1761 * \since This function is available since SDL 2.0.0.
1762 *
1763 * \sa SDL_CreateRenderer
1764 */
1765 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
1766
1767 /**
1768 * Force the rendering context to flush any pending commands to the underlying
1769 * rendering API.
1770 *
1771 * You do not need to (and in fact, shouldn't) call this function unless you
1772 * are planning to call into OpenGL/Direct3D/Metal/whatever directly in
1773 * addition to using an SDL_Renderer.
1774 *
1775 * This is for a very-specific case: if you are using SDL's render API, you
1776 * asked for a specific renderer backend (OpenGL, Direct3D, etc), you set
1777 * SDL_HINT_RENDER_BATCHING to "1", and you plan to make OpenGL/D3D/whatever
1778 * calls in addition to SDL render API calls. If all of this applies, you
1779 * should call SDL_RenderFlush() between calls to SDL's render API and the
1780 * low-level API you're using in cooperation.
1781 *
1782 * In all other cases, you can ignore this function. This is only here to get
1783 * maximum performance out of a specific situation. In all other cases, SDL
1784 * will do the right thing, perhaps at a performance loss.
1785 *
1786 * This function is first available in SDL 2.0.10, and is not needed in 2.0.9
1787 * and earlier, as earlier versions did not queue rendering commands at all,
1788 * instead flushing them to the OS immediately.
1789 *
1790 * \param renderer the rendering context
1791 * \returns 0 on success or a negative error code on failure; call
1792 * SDL_GetError() for more information.
1793 *
1794 * \since This function is available since SDL 2.0.10.
1795 */
1796 extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
1797
1798
1799 /**
1800 * Bind an OpenGL/ES/ES2 texture to the current context.
1801 *
1802 * This is for use with OpenGL instructions when rendering OpenGL primitives
1803 * directly.
1804 *
1805 * If not NULL, `texw` and `texh` will be filled with the width and height
1806 * values suitable for the provided texture. In most cases, both will be 1.0,
1807 * however, on systems that support the GL_ARB_texture_rectangle extension,
1808 * these values will actually be the pixel width and height used to create the
1809 * texture, so this factor needs to be taken into account when providing
1810 * texture coordinates to OpenGL.
1811 *
1812 * You need a renderer to create an SDL_Texture, therefore you can only use
1813 * this function with an implicit OpenGL context from SDL_CreateRenderer(),
1814 * not with your own OpenGL context. If you need control over your OpenGL
1815 * context, you need to write your own texture-loading methods.
1816 *
1817 * Also note that SDL may upload RGB textures as BGR (or vice-versa), and
1818 * re-order the color channels in the shaders phase, so the uploaded texture
1819 * may have swapped color channels.
1820 *
1821 * \param texture the texture to bind to the current OpenGL/ES/ES2 context
1822 * \param texw a pointer to a float value which will be filled with the
1823 * texture width or NULL if you don't need that value
1824 * \param texh a pointer to a float value which will be filled with the
1825 * texture height or NULL if you don't need that value
1826 * \returns 0 on success, or -1 if the operation is not supported; call
1827 * SDL_GetError() for more information.
1828 *
1829 * \since This function is available since SDL 2.0.0.
1830 *
1831 * \sa SDL_GL_MakeCurrent
1832 * \sa SDL_GL_UnbindTexture
1833 */
1834 extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
1835
1836 /**
1837 * Unbind an OpenGL/ES/ES2 texture from the current context.
1838 *
1839 * See SDL_GL_BindTexture() for examples on how to use these functions
1840 *
1841 * \param texture the texture to unbind from the current OpenGL/ES/ES2 context
1842 * \returns 0 on success, or -1 if the operation is not supported
1843 *
1844 * \since This function is available since SDL 2.0.0.
1845 *
1846 * \sa SDL_GL_BindTexture
1847 * \sa SDL_GL_MakeCurrent
1848 */
1849 extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
1850
1851 /**
1852 * Get the CAMetalLayer associated with the given Metal renderer.
1853 *
1854 * This function returns `void *`, so SDL doesn't have to include Metal's
1855 * headers, but it can be safely cast to a `CAMetalLayer *`.
1856 *
1857 * \param renderer The renderer to query
1858 * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
1859 * Metal renderer
1860 *
1861 * \since This function is available since SDL 2.0.8.
1862 *
1863 * \sa SDL_RenderGetMetalCommandEncoder
1864 */
1865 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
1866
1867 /**
1868 * Get the Metal command encoder for the current frame
1869 *
1870 * This function returns `void *`, so SDL doesn't have to include Metal's
1871 * headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.
1872 *
1873 * Note that as of SDL 2.0.18, this will return NULL if Metal refuses to give
1874 * SDL a drawable to render to, which might happen if the window is
1875 * hidden/minimized/offscreen. This doesn't apply to command encoders for
1876 * render targets, just the window's backbacker. Check your return values!
1877 *
1878 * \param renderer The renderer to query
1879 * \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
1880 * renderer isn't a Metal renderer or there was an error.
1881 *
1882 * \since This function is available since SDL 2.0.8.
1883 *
1884 * \sa SDL_RenderGetMetalLayer
1885 */
1886 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
1887
1888 /**
1889 * Toggle VSync of the given renderer.
1890 *
1891 * \param renderer The renderer to toggle
1892 * \param vsync 1 for on, 0 for off. All other values are reserved
1893 * \returns a 0 int on success, or non-zero on failure
1894 *
1895 * \since This function is available since SDL 2.0.18.
1896 */
1897 extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
1898
1899 /* Ends C function definitions when using C++ */
1900 #ifdef __cplusplus
1901 }
1902 #endif
1903 #include <SDL2/close_code.h>
1904
1905 #endif /* SDL_render_h_ */
1906
1907 /* vi: set ts=4 sw=4 expandtab: */
0 #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1"
1 #define SDL_REVISION_NUMBER 0
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rwops.h
23 *
24 * This file provides a general interface for SDL to read and write
25 * data streams. It can easily be extended to files, memory, etc.
26 */
27
28 #ifndef SDL_rwops_h_
29 #define SDL_rwops_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* RWops Types */
41 #define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
42 #define SDL_RWOPS_WINFILE 1U /**< Win32 file */
43 #define SDL_RWOPS_STDFILE 2U /**< Stdio file */
44 #define SDL_RWOPS_JNIFILE 3U /**< Android asset */
45 #define SDL_RWOPS_MEMORY 4U /**< Memory stream */
46 #define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
47 #if defined(__VITA__)
48 #define SDL_RWOPS_VITAFILE 6U /**< Vita file */
49 #endif
50
51 /**
52 * This is the read/write operation structure -- very basic.
53 */
54 typedef struct SDL_RWops
55 {
56 /**
57 * Return the size of the file in this rwops, or -1 if unknown
58 */
59 Sint64 (SDLCALL * size) (struct SDL_RWops * context);
60
61 /**
62 * Seek to \c offset relative to \c whence, one of stdio's whence values:
63 * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
64 *
65 * \return the final offset in the data stream, or -1 on error.
66 */
67 Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
68 int whence);
69
70 /**
71 * Read up to \c maxnum objects each of size \c size from the data
72 * stream to the area pointed at by \c ptr.
73 *
74 * \return the number of objects read, or 0 at error or end of file.
75 */
76 size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
77 size_t size, size_t maxnum);
78
79 /**
80 * Write exactly \c num objects each of size \c size from the area
81 * pointed at by \c ptr to data stream.
82 *
83 * \return the number of objects written, or 0 at error or end of file.
84 */
85 size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
86 size_t size, size_t num);
87
88 /**
89 * Close and free an allocated SDL_RWops structure.
90 *
91 * \return 0 if successful or -1 on write error when flushing data.
92 */
93 int (SDLCALL * close) (struct SDL_RWops * context);
94
95 Uint32 type;
96 union
97 {
98 #if defined(__ANDROID__)
99 struct
100 {
101 void *asset;
102 } androidio;
103 #elif defined(__WIN32__)
104 struct
105 {
106 SDL_bool append;
107 void *h;
108 struct
109 {
110 void *data;
111 size_t size;
112 size_t left;
113 } buffer;
114 } windowsio;
115 #elif defined(__VITA__)
116 struct
117 {
118 int h;
119 struct
120 {
121 void *data;
122 size_t size;
123 size_t left;
124 } buffer;
125 } vitaio;
126 #endif
127
128 #ifdef HAVE_STDIO_H
129 struct
130 {
131 SDL_bool autoclose;
132 FILE *fp;
133 } stdio;
134 #endif
135 struct
136 {
137 Uint8 *base;
138 Uint8 *here;
139 Uint8 *stop;
140 } mem;
141 struct
142 {
143 void *data1;
144 void *data2;
145 } unknown;
146 } hidden;
147
148 } SDL_RWops;
149
150
151 /**
152 * \name RWFrom functions
153 *
154 * Functions to create SDL_RWops structures from various data streams.
155 */
156 /* @{ */
157
158 /**
159 * Use this function to create a new SDL_RWops structure for reading from
160 * and/or writing to a named file.
161 *
162 * The `mode` string is treated roughly the same as in a call to the C
163 * library's fopen(), even if SDL doesn't happen to use fopen() behind the
164 * scenes.
165 *
166 * Available `mode` strings:
167 *
168 * - "r": Open a file for reading. The file must exist.
169 * - "w": Create an empty file for writing. If a file with the same name
170 * already exists its content is erased and the file is treated as a new
171 * empty file.
172 * - "a": Append to a file. Writing operations append data at the end of the
173 * file. The file is created if it does not exist.
174 * - "r+": Open a file for update both reading and writing. The file must
175 * exist.
176 * - "w+": Create an empty file for both reading and writing. If a file with
177 * the same name already exists its content is erased and the file is
178 * treated as a new empty file.
179 * - "a+": Open a file for reading and appending. All writing operations are
180 * performed at the end of the file, protecting the previous content to be
181 * overwritten. You can reposition (fseek, rewind) the internal pointer to
182 * anywhere in the file for reading, but writing operations will move it
183 * back to the end of file. The file is created if it does not exist.
184 *
185 * **NOTE**: In order to open a file as a binary file, a "b" character has to
186 * be included in the `mode` string. This additional "b" character can either
187 * be appended at the end of the string (thus making the following compound
188 * modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
189 * letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
190 * Additional characters may follow the sequence, although they should have no
191 * effect. For example, "t" is sometimes appended to make explicit the file is
192 * a text file.
193 *
194 * This function supports Unicode filenames, but they must be encoded in UTF-8
195 * format, regardless of the underlying operating system.
196 *
197 * As a fallback, SDL_RWFromFile() will transparently open a matching filename
198 * in an Android app's `assets`.
199 *
200 * Closing the SDL_RWops will close the file handle SDL is holding internally.
201 *
202 * \param file a UTF-8 string representing the filename to open
203 * \param mode an ASCII string representing the mode to be used for opening
204 * the file.
205 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
206 * failure; call SDL_GetError() for more information.
207 *
208 * \since This function is available since SDL 2.0.0.
209 *
210 * \sa SDL_RWclose
211 * \sa SDL_RWFromConstMem
212 * \sa SDL_RWFromFP
213 * \sa SDL_RWFromMem
214 * \sa SDL_RWread
215 * \sa SDL_RWseek
216 * \sa SDL_RWtell
217 * \sa SDL_RWwrite
218 */
219 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
220 const char *mode);
221
222 #ifdef HAVE_STDIO_H
223
224 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose);
225
226 #else
227
228 /**
229 * Use this function to create an SDL_RWops structure from a standard I/O file
230 * pointer (stdio.h's `FILE*`).
231 *
232 * This function is not available on Windows, since files opened in an
233 * application on that platform cannot be used by a dynamically linked
234 * library.
235 *
236 * On some platforms, the first parameter is a `void*`, on others, it's a
237 * `FILE*`, depending on what system headers are available to SDL. It is
238 * always intended to be the `FILE*` type from the C runtime's stdio.h.
239 *
240 * \param fp the `FILE*` that feeds the SDL_RWops stream
241 * \param autoclose SDL_TRUE to close the `FILE*` when closing the SDL_RWops,
242 * SDL_FALSE to leave the `FILE*` open when the RWops is
243 * closed
244 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
245 * failure; call SDL_GetError() for more information.
246 *
247 * \since This function is available since SDL 2.0.0.
248 *
249 * \sa SDL_RWclose
250 * \sa SDL_RWFromConstMem
251 * \sa SDL_RWFromFile
252 * \sa SDL_RWFromMem
253 * \sa SDL_RWread
254 * \sa SDL_RWseek
255 * \sa SDL_RWtell
256 * \sa SDL_RWwrite
257 */
258 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
259 SDL_bool autoclose);
260 #endif
261
262 /**
263 * Use this function to prepare a read-write memory buffer for use with
264 * SDL_RWops.
265 *
266 * This function sets up an SDL_RWops struct based on a memory area of a
267 * certain size, for both read and write access.
268 *
269 * This memory buffer is not copied by the RWops; the pointer you provide must
270 * remain valid until you close the stream. Closing the stream will not free
271 * the original buffer.
272 *
273 * If you need to make sure the RWops never writes to the memory buffer, you
274 * should use SDL_RWFromConstMem() with a read-only buffer of memory instead.
275 *
276 * \param mem a pointer to a buffer to feed an SDL_RWops stream
277 * \param size the buffer size, in bytes
278 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
279 * SDL_GetError() for more information.
280 *
281 * \since This function is available since SDL 2.0.0.
282 *
283 * \sa SDL_RWclose
284 * \sa SDL_RWFromConstMem
285 * \sa SDL_RWFromFile
286 * \sa SDL_RWFromFP
287 * \sa SDL_RWFromMem
288 * \sa SDL_RWread
289 * \sa SDL_RWseek
290 * \sa SDL_RWtell
291 * \sa SDL_RWwrite
292 */
293 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
294
295 /**
296 * Use this function to prepare a read-only memory buffer for use with RWops.
297 *
298 * This function sets up an SDL_RWops struct based on a memory area of a
299 * certain size. It assumes the memory area is not writable.
300 *
301 * Attempting to write to this RWops stream will report an error without
302 * writing to the memory buffer.
303 *
304 * This memory buffer is not copied by the RWops; the pointer you provide must
305 * remain valid until you close the stream. Closing the stream will not free
306 * the original buffer.
307 *
308 * If you need to write to a memory buffer, you should use SDL_RWFromMem()
309 * with a writable buffer of memory instead.
310 *
311 * \param mem a pointer to a read-only buffer to feed an SDL_RWops stream
312 * \param size the buffer size, in bytes
313 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
314 * SDL_GetError() for more information.
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_RWclose
319 * \sa SDL_RWFromConstMem
320 * \sa SDL_RWFromFile
321 * \sa SDL_RWFromFP
322 * \sa SDL_RWFromMem
323 * \sa SDL_RWread
324 * \sa SDL_RWseek
325 * \sa SDL_RWtell
326 */
327 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
328 int size);
329
330 /* @} *//* RWFrom functions */
331
332
333 /**
334 * Use this function to allocate an empty, unpopulated SDL_RWops structure.
335 *
336 * Applications do not need to use this function unless they are providing
337 * their own SDL_RWops implementation. If you just need a SDL_RWops to
338 * read/write a common data source, you should use the built-in
339 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc.
340 *
341 * You must free the returned pointer with SDL_FreeRW(). Depending on your
342 * operating system and compiler, there may be a difference between the
343 * malloc() and free() your program uses and the versions SDL calls
344 * internally. Trying to mix the two can cause crashing such as segmentation
345 * faults. Since all SDL_RWops must free themselves when their **close**
346 * method is called, all SDL_RWops must be allocated through this function, so
347 * they can all be freed correctly with SDL_FreeRW().
348 *
349 * \returns a pointer to the allocated memory on success, or NULL on failure;
350 * call SDL_GetError() for more information.
351 *
352 * \since This function is available since SDL 2.0.0.
353 *
354 * \sa SDL_FreeRW
355 */
356 extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
357
358 /**
359 * Use this function to free an SDL_RWops structure allocated by
360 * SDL_AllocRW().
361 *
362 * Applications do not need to use this function unless they are providing
363 * their own SDL_RWops implementation. If you just need a SDL_RWops to
364 * read/write a common data source, you should use the built-in
365 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and
366 * call the **close** method on those SDL_RWops pointers when you are done
367 * with them.
368 *
369 * Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is
370 * invalid as soon as this function returns. Any extra memory allocated during
371 * creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must
372 * be responsible for managing that memory in their **close** method.
373 *
374 * \param area the SDL_RWops structure to be freed
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_AllocRW
379 */
380 extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
381
382 #define RW_SEEK_SET 0 /**< Seek from the beginning of data */
383 #define RW_SEEK_CUR 1 /**< Seek relative to current read point */
384 #define RW_SEEK_END 2 /**< Seek relative to the end of data */
385
386 /**
387 * Use this function to get the size of the data stream in an SDL_RWops.
388 *
389 * Prior to SDL 2.0.10, this function was a macro.
390 *
391 * \param context the SDL_RWops to get the size of the data stream from
392 * \returns the size of the data stream in the SDL_RWops on success, -1 if
393 * unknown or a negative error code on failure; call SDL_GetError()
394 * for more information.
395 *
396 * \since This function is available since SDL 2.0.10.
397 */
398 extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
399
400 /**
401 * Seek within an SDL_RWops data stream.
402 *
403 * This function seeks to byte `offset`, relative to `whence`.
404 *
405 * `whence` may be any of the following values:
406 *
407 * - `RW_SEEK_SET`: seek from the beginning of data
408 * - `RW_SEEK_CUR`: seek relative to current read point
409 * - `RW_SEEK_END`: seek relative to the end of data
410 *
411 * If this stream can not seek, it will return -1.
412 *
413 * SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
414 * `seek` method appropriately, to simplify application development.
415 *
416 * Prior to SDL 2.0.10, this function was a macro.
417 *
418 * \param context a pointer to an SDL_RWops structure
419 * \param offset an offset in bytes, relative to **whence** location; can be
420 * negative
421 * \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
422 * \returns the final offset in the data stream after the seek or -1 on error.
423 *
424 * \since This function is available since SDL 2.0.10.
425 *
426 * \sa SDL_RWclose
427 * \sa SDL_RWFromConstMem
428 * \sa SDL_RWFromFile
429 * \sa SDL_RWFromFP
430 * \sa SDL_RWFromMem
431 * \sa SDL_RWread
432 * \sa SDL_RWtell
433 * \sa SDL_RWwrite
434 */
435 extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
436 Sint64 offset, int whence);
437
438 /**
439 * Determine the current read/write offset in an SDL_RWops data stream.
440 *
441 * SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
442 * method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
443 * application development.
444 *
445 * Prior to SDL 2.0.10, this function was a macro.
446 *
447 * \param context a SDL_RWops data stream object from which to get the current
448 * offset
449 * \returns the current offset in the stream, or -1 if the information can not
450 * be determined.
451 *
452 * \since This function is available since SDL 2.0.10.
453 *
454 * \sa SDL_RWclose
455 * \sa SDL_RWFromConstMem
456 * \sa SDL_RWFromFile
457 * \sa SDL_RWFromFP
458 * \sa SDL_RWFromMem
459 * \sa SDL_RWread
460 * \sa SDL_RWseek
461 * \sa SDL_RWwrite
462 */
463 extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
464
465 /**
466 * Read from a data source.
467 *
468 * This function reads up to `maxnum` objects each of size `size` from the
469 * data source to the area pointed at by `ptr`. This function may read less
470 * objects than requested. It will return zero when there has been an error or
471 * the data stream is completely read.
472 *
473 * SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
474 * `read` method appropriately, to simplify application development.
475 *
476 * Prior to SDL 2.0.10, this function was a macro.
477 *
478 * \param context a pointer to an SDL_RWops structure
479 * \param ptr a pointer to a buffer to read data into
480 * \param size the size of each object to read, in bytes
481 * \param maxnum the maximum number of objects to be read
482 * \returns the number of objects read, or 0 at error or end of file; call
483 * SDL_GetError() for more information.
484 *
485 * \since This function is available since SDL 2.0.10.
486 *
487 * \sa SDL_RWclose
488 * \sa SDL_RWFromConstMem
489 * \sa SDL_RWFromFile
490 * \sa SDL_RWFromFP
491 * \sa SDL_RWFromMem
492 * \sa SDL_RWseek
493 * \sa SDL_RWwrite
494 */
495 extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
496 void *ptr, size_t size,
497 size_t maxnum);
498
499 /**
500 * Write to an SDL_RWops data stream.
501 *
502 * This function writes exactly `num` objects each of size `size` from the
503 * area pointed at by `ptr` to the stream. If this fails for any reason, it'll
504 * return less than `num` to demonstrate how far the write progressed. On
505 * success, it returns `num`.
506 *
507 * SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
508 * `write` method appropriately, to simplify application development.
509 *
510 * Prior to SDL 2.0.10, this function was a macro.
511 *
512 * \param context a pointer to an SDL_RWops structure
513 * \param ptr a pointer to a buffer containing data to write
514 * \param size the size of an object to write, in bytes
515 * \param num the number of objects to write
516 * \returns the number of objects written, which will be less than **num** on
517 * error; call SDL_GetError() for more information.
518 *
519 * \since This function is available since SDL 2.0.10.
520 *
521 * \sa SDL_RWclose
522 * \sa SDL_RWFromConstMem
523 * \sa SDL_RWFromFile
524 * \sa SDL_RWFromFP
525 * \sa SDL_RWFromMem
526 * \sa SDL_RWread
527 * \sa SDL_RWseek
528 */
529 extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
530 const void *ptr, size_t size,
531 size_t num);
532
533 /**
534 * Close and free an allocated SDL_RWops structure.
535 *
536 * SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
537 * resources used by the stream and frees the SDL_RWops itself with
538 * SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
539 * flush to its output (e.g. to disk).
540 *
541 * Note that if this fails to flush the stream to disk, this function reports
542 * an error, but the SDL_RWops is still invalid once this function returns.
543 *
544 * Prior to SDL 2.0.10, this function was a macro.
545 *
546 * \param context SDL_RWops structure to close
547 * \returns 0 on success or a negative error code on failure; call
548 * SDL_GetError() for more information.
549 *
550 * \since This function is available since SDL 2.0.10.
551 *
552 * \sa SDL_RWFromConstMem
553 * \sa SDL_RWFromFile
554 * \sa SDL_RWFromFP
555 * \sa SDL_RWFromMem
556 * \sa SDL_RWread
557 * \sa SDL_RWseek
558 * \sa SDL_RWwrite
559 */
560 extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
561
562 /**
563 * Load all the data from an SDL data stream.
564 *
565 * The data is allocated with a zero byte at the end (null terminated) for
566 * convenience. This extra byte is not included in the value reported via
567 * `datasize`.
568 *
569 * The data should be freed with SDL_free().
570 *
571 * \param src the SDL_RWops to read all available data from
572 * \param datasize if not NULL, will store the number of bytes read
573 * \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
574 * \returns the data, or NULL if there was an error.
575 *
576 * \since This function is available since SDL 2.0.6.
577 */
578 extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
579 size_t *datasize,
580 int freesrc);
581
582 /**
583 * Load all the data from a file path.
584 *
585 * The data is allocated with a zero byte at the end (null terminated) for
586 * convenience. This extra byte is not included in the value reported via
587 * `datasize`.
588 *
589 * The data should be freed with SDL_free().
590 *
591 * Prior to SDL 2.0.10, this function was a macro wrapping around
592 * SDL_LoadFile_RW.
593 *
594 * \param file the path to read all available data from
595 * \param datasize if not NULL, will store the number of bytes read
596 * \returns the data, or NULL if there was an error.
597 *
598 * \since This function is available since SDL 2.0.10.
599 */
600 extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
601
602 /**
603 * \name Read endian functions
604 *
605 * Read an item of the specified endianness and return in native format.
606 */
607 /* @{ */
608
609 /**
610 * Use this function to read a byte from an SDL_RWops.
611 *
612 * \param src the SDL_RWops to read from
613 * \returns the read byte on success or 0 on failure; call SDL_GetError() for
614 * more information.
615 *
616 * \since This function is available since SDL 2.0.0.
617 *
618 * \sa SDL_WriteU8
619 */
620 extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
621
622 /**
623 * Use this function to read 16 bits of little-endian data from an SDL_RWops
624 * and return in native format.
625 *
626 * SDL byteswaps the data only if necessary, so the data returned will be in
627 * the native byte order.
628 *
629 * \param src the stream from which to read data
630 * \returns 16 bits of data in the native byte order of the platform.
631 *
632 * \since This function is available since SDL 2.0.0.
633 *
634 * \sa SDL_ReadBE16
635 */
636 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
637
638 /**
639 * Use this function to read 16 bits of big-endian data from an SDL_RWops and
640 * return in native format.
641 *
642 * SDL byteswaps the data only if necessary, so the data returned will be in
643 * the native byte order.
644 *
645 * \param src the stream from which to read data
646 * \returns 16 bits of data in the native byte order of the platform.
647 *
648 * \since This function is available since SDL 2.0.0.
649 *
650 * \sa SDL_ReadLE16
651 */
652 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
653
654 /**
655 * Use this function to read 32 bits of little-endian data from an SDL_RWops
656 * and return in native format.
657 *
658 * SDL byteswaps the data only if necessary, so the data returned will be in
659 * the native byte order.
660 *
661 * \param src the stream from which to read data
662 * \returns 32 bits of data in the native byte order of the platform.
663 *
664 * \since This function is available since SDL 2.0.0.
665 *
666 * \sa SDL_ReadBE32
667 */
668 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
669
670 /**
671 * Use this function to read 32 bits of big-endian data from an SDL_RWops and
672 * return in native format.
673 *
674 * SDL byteswaps the data only if necessary, so the data returned will be in
675 * the native byte order.
676 *
677 * \param src the stream from which to read data
678 * \returns 32 bits of data in the native byte order of the platform.
679 *
680 * \since This function is available since SDL 2.0.0.
681 *
682 * \sa SDL_ReadLE32
683 */
684 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
685
686 /**
687 * Use this function to read 64 bits of little-endian data from an SDL_RWops
688 * and return in native format.
689 *
690 * SDL byteswaps the data only if necessary, so the data returned will be in
691 * the native byte order.
692 *
693 * \param src the stream from which to read data
694 * \returns 64 bits of data in the native byte order of the platform.
695 *
696 * \since This function is available since SDL 2.0.0.
697 *
698 * \sa SDL_ReadBE64
699 */
700 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
701
702 /**
703 * Use this function to read 64 bits of big-endian data from an SDL_RWops and
704 * return in native format.
705 *
706 * SDL byteswaps the data only if necessary, so the data returned will be in
707 * the native byte order.
708 *
709 * \param src the stream from which to read data
710 * \returns 64 bits of data in the native byte order of the platform.
711 *
712 * \since This function is available since SDL 2.0.0.
713 *
714 * \sa SDL_ReadLE64
715 */
716 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
717 /* @} *//* Read endian functions */
718
719 /**
720 * \name Write endian functions
721 *
722 * Write an item of native format to the specified endianness.
723 */
724 /* @{ */
725
726 /**
727 * Use this function to write a byte to an SDL_RWops.
728 *
729 * \param dst the SDL_RWops to write to
730 * \param value the byte value to write
731 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
732 * information.
733 *
734 * \since This function is available since SDL 2.0.0.
735 *
736 * \sa SDL_ReadU8
737 */
738 extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
739
740 /**
741 * Use this function to write 16 bits in native format to a SDL_RWops as
742 * little-endian data.
743 *
744 * SDL byteswaps the data only if necessary, so the application always
745 * specifies native format, and the data written will be in little-endian
746 * format.
747 *
748 * \param dst the stream to which data will be written
749 * \param value the data to be written, in native format
750 * \returns 1 on successful write, 0 on error.
751 *
752 * \since This function is available since SDL 2.0.0.
753 *
754 * \sa SDL_WriteBE16
755 */
756 extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
757
758 /**
759 * Use this function to write 16 bits in native format to a SDL_RWops as
760 * big-endian data.
761 *
762 * SDL byteswaps the data only if necessary, so the application always
763 * specifies native format, and the data written will be in big-endian format.
764 *
765 * \param dst the stream to which data will be written
766 * \param value the data to be written, in native format
767 * \returns 1 on successful write, 0 on error.
768 *
769 * \since This function is available since SDL 2.0.0.
770 *
771 * \sa SDL_WriteLE16
772 */
773 extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
774
775 /**
776 * Use this function to write 32 bits in native format to a SDL_RWops as
777 * little-endian data.
778 *
779 * SDL byteswaps the data only if necessary, so the application always
780 * specifies native format, and the data written will be in little-endian
781 * format.
782 *
783 * \param dst the stream to which data will be written
784 * \param value the data to be written, in native format
785 * \returns 1 on successful write, 0 on error.
786 *
787 * \since This function is available since SDL 2.0.0.
788 *
789 * \sa SDL_WriteBE32
790 */
791 extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
792
793 /**
794 * Use this function to write 32 bits in native format to a SDL_RWops as
795 * big-endian data.
796 *
797 * SDL byteswaps the data only if necessary, so the application always
798 * specifies native format, and the data written will be in big-endian format.
799 *
800 * \param dst the stream to which data will be written
801 * \param value the data to be written, in native format
802 * \returns 1 on successful write, 0 on error.
803 *
804 * \since This function is available since SDL 2.0.0.
805 *
806 * \sa SDL_WriteLE32
807 */
808 extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
809
810 /**
811 * Use this function to write 64 bits in native format to a SDL_RWops as
812 * little-endian data.
813 *
814 * SDL byteswaps the data only if necessary, so the application always
815 * specifies native format, and the data written will be in little-endian
816 * format.
817 *
818 * \param dst the stream to which data will be written
819 * \param value the data to be written, in native format
820 * \returns 1 on successful write, 0 on error.
821 *
822 * \since This function is available since SDL 2.0.0.
823 *
824 * \sa SDL_WriteBE64
825 */
826 extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
827
828 /**
829 * Use this function to write 64 bits in native format to a SDL_RWops as
830 * big-endian data.
831 *
832 * SDL byteswaps the data only if necessary, so the application always
833 * specifies native format, and the data written will be in big-endian format.
834 *
835 * \param dst the stream to which data will be written
836 * \param value the data to be written, in native format
837 * \returns 1 on successful write, 0 on error.
838 *
839 * \since This function is available since SDL 2.0.0.
840 *
841 * \sa SDL_WriteLE64
842 */
843 extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
844 /* @} *//* Write endian functions */
845
846 /* Ends C function definitions when using C++ */
847 #ifdef __cplusplus
848 }
849 #endif
850 #include <SDL2/close_code.h>
851
852 #endif /* SDL_rwops_h_ */
853
854 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_scancode.h
23 *
24 * Defines keyboard scancodes.
25 */
26
27 #ifndef SDL_scancode_h_
28 #define SDL_scancode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /**
33 * \brief The SDL keyboard scancode representation.
34 *
35 * Values of this type are used to represent keyboard keys, among other places
36 * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
37 * SDL_Event structure.
38 *
39 * The values in this enumeration are based on the USB usage page standard:
40 * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
41 */
42 typedef enum
43 {
44 SDL_SCANCODE_UNKNOWN = 0,
45
46 /**
47 * \name Usage page 0x07
48 *
49 * These values are from usage page 0x07 (USB keyboard page).
50 */
51 /* @{ */
52
53 SDL_SCANCODE_A = 4,
54 SDL_SCANCODE_B = 5,
55 SDL_SCANCODE_C = 6,
56 SDL_SCANCODE_D = 7,
57 SDL_SCANCODE_E = 8,
58 SDL_SCANCODE_F = 9,
59 SDL_SCANCODE_G = 10,
60 SDL_SCANCODE_H = 11,
61 SDL_SCANCODE_I = 12,
62 SDL_SCANCODE_J = 13,
63 SDL_SCANCODE_K = 14,
64 SDL_SCANCODE_L = 15,
65 SDL_SCANCODE_M = 16,
66 SDL_SCANCODE_N = 17,
67 SDL_SCANCODE_O = 18,
68 SDL_SCANCODE_P = 19,
69 SDL_SCANCODE_Q = 20,
70 SDL_SCANCODE_R = 21,
71 SDL_SCANCODE_S = 22,
72 SDL_SCANCODE_T = 23,
73 SDL_SCANCODE_U = 24,
74 SDL_SCANCODE_V = 25,
75 SDL_SCANCODE_W = 26,
76 SDL_SCANCODE_X = 27,
77 SDL_SCANCODE_Y = 28,
78 SDL_SCANCODE_Z = 29,
79
80 SDL_SCANCODE_1 = 30,
81 SDL_SCANCODE_2 = 31,
82 SDL_SCANCODE_3 = 32,
83 SDL_SCANCODE_4 = 33,
84 SDL_SCANCODE_5 = 34,
85 SDL_SCANCODE_6 = 35,
86 SDL_SCANCODE_7 = 36,
87 SDL_SCANCODE_8 = 37,
88 SDL_SCANCODE_9 = 38,
89 SDL_SCANCODE_0 = 39,
90
91 SDL_SCANCODE_RETURN = 40,
92 SDL_SCANCODE_ESCAPE = 41,
93 SDL_SCANCODE_BACKSPACE = 42,
94 SDL_SCANCODE_TAB = 43,
95 SDL_SCANCODE_SPACE = 44,
96
97 SDL_SCANCODE_MINUS = 45,
98 SDL_SCANCODE_EQUALS = 46,
99 SDL_SCANCODE_LEFTBRACKET = 47,
100 SDL_SCANCODE_RIGHTBRACKET = 48,
101 SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
102 * key on ISO keyboards and at the right end
103 * of the QWERTY row on ANSI keyboards.
104 * Produces REVERSE SOLIDUS (backslash) and
105 * VERTICAL LINE in a US layout, REVERSE
106 * SOLIDUS and VERTICAL LINE in a UK Mac
107 * layout, NUMBER SIGN and TILDE in a UK
108 * Windows layout, DOLLAR SIGN and POUND SIGN
109 * in a Swiss German layout, NUMBER SIGN and
110 * APOSTROPHE in a German layout, GRAVE
111 * ACCENT and POUND SIGN in a French Mac
112 * layout, and ASTERISK and MICRO SIGN in a
113 * French Windows layout.
114 */
115 SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
116 * instead of 49 for the same key, but all
117 * OSes I've seen treat the two codes
118 * identically. So, as an implementor, unless
119 * your keyboard generates both of those
120 * codes and your OS treats them differently,
121 * you should generate SDL_SCANCODE_BACKSLASH
122 * instead of this code. As a user, you
123 * should not rely on this code because SDL
124 * will never generate it with most (all?)
125 * keyboards.
126 */
127 SDL_SCANCODE_SEMICOLON = 51,
128 SDL_SCANCODE_APOSTROPHE = 52,
129 SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
130 * and ISO keyboards). Produces GRAVE ACCENT and
131 * TILDE in a US Windows layout and in US and UK
132 * Mac layouts on ANSI keyboards, GRAVE ACCENT
133 * and NOT SIGN in a UK Windows layout, SECTION
134 * SIGN and PLUS-MINUS SIGN in US and UK Mac
135 * layouts on ISO keyboards, SECTION SIGN and
136 * DEGREE SIGN in a Swiss German layout (Mac:
137 * only on ISO keyboards), CIRCUMFLEX ACCENT and
138 * DEGREE SIGN in a German layout (Mac: only on
139 * ISO keyboards), SUPERSCRIPT TWO and TILDE in a
140 * French Windows layout, COMMERCIAL AT and
141 * NUMBER SIGN in a French Mac layout on ISO
142 * keyboards, and LESS-THAN SIGN and GREATER-THAN
143 * SIGN in a Swiss German, German, or French Mac
144 * layout on ANSI keyboards.
145 */
146 SDL_SCANCODE_COMMA = 54,
147 SDL_SCANCODE_PERIOD = 55,
148 SDL_SCANCODE_SLASH = 56,
149
150 SDL_SCANCODE_CAPSLOCK = 57,
151
152 SDL_SCANCODE_F1 = 58,
153 SDL_SCANCODE_F2 = 59,
154 SDL_SCANCODE_F3 = 60,
155 SDL_SCANCODE_F4 = 61,
156 SDL_SCANCODE_F5 = 62,
157 SDL_SCANCODE_F6 = 63,
158 SDL_SCANCODE_F7 = 64,
159 SDL_SCANCODE_F8 = 65,
160 SDL_SCANCODE_F9 = 66,
161 SDL_SCANCODE_F10 = 67,
162 SDL_SCANCODE_F11 = 68,
163 SDL_SCANCODE_F12 = 69,
164
165 SDL_SCANCODE_PRINTSCREEN = 70,
166 SDL_SCANCODE_SCROLLLOCK = 71,
167 SDL_SCANCODE_PAUSE = 72,
168 SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
169 does send code 73, not 117) */
170 SDL_SCANCODE_HOME = 74,
171 SDL_SCANCODE_PAGEUP = 75,
172 SDL_SCANCODE_DELETE = 76,
173 SDL_SCANCODE_END = 77,
174 SDL_SCANCODE_PAGEDOWN = 78,
175 SDL_SCANCODE_RIGHT = 79,
176 SDL_SCANCODE_LEFT = 80,
177 SDL_SCANCODE_DOWN = 81,
178 SDL_SCANCODE_UP = 82,
179
180 SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
181 */
182 SDL_SCANCODE_KP_DIVIDE = 84,
183 SDL_SCANCODE_KP_MULTIPLY = 85,
184 SDL_SCANCODE_KP_MINUS = 86,
185 SDL_SCANCODE_KP_PLUS = 87,
186 SDL_SCANCODE_KP_ENTER = 88,
187 SDL_SCANCODE_KP_1 = 89,
188 SDL_SCANCODE_KP_2 = 90,
189 SDL_SCANCODE_KP_3 = 91,
190 SDL_SCANCODE_KP_4 = 92,
191 SDL_SCANCODE_KP_5 = 93,
192 SDL_SCANCODE_KP_6 = 94,
193 SDL_SCANCODE_KP_7 = 95,
194 SDL_SCANCODE_KP_8 = 96,
195 SDL_SCANCODE_KP_9 = 97,
196 SDL_SCANCODE_KP_0 = 98,
197 SDL_SCANCODE_KP_PERIOD = 99,
198
199 SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
200 * keyboards have over ANSI ones,
201 * located between left shift and Y.
202 * Produces GRAVE ACCENT and TILDE in a
203 * US or UK Mac layout, REVERSE SOLIDUS
204 * (backslash) and VERTICAL LINE in a
205 * US or UK Windows layout, and
206 * LESS-THAN SIGN and GREATER-THAN SIGN
207 * in a Swiss German, German, or French
208 * layout. */
209 SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
210 SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
211 * not a physical key - but some Mac keyboards
212 * do have a power key. */
213 SDL_SCANCODE_KP_EQUALS = 103,
214 SDL_SCANCODE_F13 = 104,
215 SDL_SCANCODE_F14 = 105,
216 SDL_SCANCODE_F15 = 106,
217 SDL_SCANCODE_F16 = 107,
218 SDL_SCANCODE_F17 = 108,
219 SDL_SCANCODE_F18 = 109,
220 SDL_SCANCODE_F19 = 110,
221 SDL_SCANCODE_F20 = 111,
222 SDL_SCANCODE_F21 = 112,
223 SDL_SCANCODE_F22 = 113,
224 SDL_SCANCODE_F23 = 114,
225 SDL_SCANCODE_F24 = 115,
226 SDL_SCANCODE_EXECUTE = 116,
227 SDL_SCANCODE_HELP = 117,
228 SDL_SCANCODE_MENU = 118,
229 SDL_SCANCODE_SELECT = 119,
230 SDL_SCANCODE_STOP = 120,
231 SDL_SCANCODE_AGAIN = 121, /**< redo */
232 SDL_SCANCODE_UNDO = 122,
233 SDL_SCANCODE_CUT = 123,
234 SDL_SCANCODE_COPY = 124,
235 SDL_SCANCODE_PASTE = 125,
236 SDL_SCANCODE_FIND = 126,
237 SDL_SCANCODE_MUTE = 127,
238 SDL_SCANCODE_VOLUMEUP = 128,
239 SDL_SCANCODE_VOLUMEDOWN = 129,
240 /* not sure whether there's a reason to enable these */
241 /* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
242 /* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
243 /* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
244 SDL_SCANCODE_KP_COMMA = 133,
245 SDL_SCANCODE_KP_EQUALSAS400 = 134,
246
247 SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
248 footnotes in USB doc */
249 SDL_SCANCODE_INTERNATIONAL2 = 136,
250 SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
251 SDL_SCANCODE_INTERNATIONAL4 = 138,
252 SDL_SCANCODE_INTERNATIONAL5 = 139,
253 SDL_SCANCODE_INTERNATIONAL6 = 140,
254 SDL_SCANCODE_INTERNATIONAL7 = 141,
255 SDL_SCANCODE_INTERNATIONAL8 = 142,
256 SDL_SCANCODE_INTERNATIONAL9 = 143,
257 SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
258 SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
259 SDL_SCANCODE_LANG3 = 146, /**< Katakana */
260 SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
261 SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
262 SDL_SCANCODE_LANG6 = 149, /**< reserved */
263 SDL_SCANCODE_LANG7 = 150, /**< reserved */
264 SDL_SCANCODE_LANG8 = 151, /**< reserved */
265 SDL_SCANCODE_LANG9 = 152, /**< reserved */
266
267 SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
268 SDL_SCANCODE_SYSREQ = 154,
269 SDL_SCANCODE_CANCEL = 155,
270 SDL_SCANCODE_CLEAR = 156,
271 SDL_SCANCODE_PRIOR = 157,
272 SDL_SCANCODE_RETURN2 = 158,
273 SDL_SCANCODE_SEPARATOR = 159,
274 SDL_SCANCODE_OUT = 160,
275 SDL_SCANCODE_OPER = 161,
276 SDL_SCANCODE_CLEARAGAIN = 162,
277 SDL_SCANCODE_CRSEL = 163,
278 SDL_SCANCODE_EXSEL = 164,
279
280 SDL_SCANCODE_KP_00 = 176,
281 SDL_SCANCODE_KP_000 = 177,
282 SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
283 SDL_SCANCODE_DECIMALSEPARATOR = 179,
284 SDL_SCANCODE_CURRENCYUNIT = 180,
285 SDL_SCANCODE_CURRENCYSUBUNIT = 181,
286 SDL_SCANCODE_KP_LEFTPAREN = 182,
287 SDL_SCANCODE_KP_RIGHTPAREN = 183,
288 SDL_SCANCODE_KP_LEFTBRACE = 184,
289 SDL_SCANCODE_KP_RIGHTBRACE = 185,
290 SDL_SCANCODE_KP_TAB = 186,
291 SDL_SCANCODE_KP_BACKSPACE = 187,
292 SDL_SCANCODE_KP_A = 188,
293 SDL_SCANCODE_KP_B = 189,
294 SDL_SCANCODE_KP_C = 190,
295 SDL_SCANCODE_KP_D = 191,
296 SDL_SCANCODE_KP_E = 192,
297 SDL_SCANCODE_KP_F = 193,
298 SDL_SCANCODE_KP_XOR = 194,
299 SDL_SCANCODE_KP_POWER = 195,
300 SDL_SCANCODE_KP_PERCENT = 196,
301 SDL_SCANCODE_KP_LESS = 197,
302 SDL_SCANCODE_KP_GREATER = 198,
303 SDL_SCANCODE_KP_AMPERSAND = 199,
304 SDL_SCANCODE_KP_DBLAMPERSAND = 200,
305 SDL_SCANCODE_KP_VERTICALBAR = 201,
306 SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
307 SDL_SCANCODE_KP_COLON = 203,
308 SDL_SCANCODE_KP_HASH = 204,
309 SDL_SCANCODE_KP_SPACE = 205,
310 SDL_SCANCODE_KP_AT = 206,
311 SDL_SCANCODE_KP_EXCLAM = 207,
312 SDL_SCANCODE_KP_MEMSTORE = 208,
313 SDL_SCANCODE_KP_MEMRECALL = 209,
314 SDL_SCANCODE_KP_MEMCLEAR = 210,
315 SDL_SCANCODE_KP_MEMADD = 211,
316 SDL_SCANCODE_KP_MEMSUBTRACT = 212,
317 SDL_SCANCODE_KP_MEMMULTIPLY = 213,
318 SDL_SCANCODE_KP_MEMDIVIDE = 214,
319 SDL_SCANCODE_KP_PLUSMINUS = 215,
320 SDL_SCANCODE_KP_CLEAR = 216,
321 SDL_SCANCODE_KP_CLEARENTRY = 217,
322 SDL_SCANCODE_KP_BINARY = 218,
323 SDL_SCANCODE_KP_OCTAL = 219,
324 SDL_SCANCODE_KP_DECIMAL = 220,
325 SDL_SCANCODE_KP_HEXADECIMAL = 221,
326
327 SDL_SCANCODE_LCTRL = 224,
328 SDL_SCANCODE_LSHIFT = 225,
329 SDL_SCANCODE_LALT = 226, /**< alt, option */
330 SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
331 SDL_SCANCODE_RCTRL = 228,
332 SDL_SCANCODE_RSHIFT = 229,
333 SDL_SCANCODE_RALT = 230, /**< alt gr, option */
334 SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
335
336 SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
337 * by any of the above, but since there's a
338 * special KMOD_MODE for it I'm adding it here
339 */
340
341 /* @} *//* Usage page 0x07 */
342
343 /**
344 * \name Usage page 0x0C
345 *
346 * These values are mapped from usage page 0x0C (USB consumer page).
347 */
348 /* @{ */
349
350 SDL_SCANCODE_AUDIONEXT = 258,
351 SDL_SCANCODE_AUDIOPREV = 259,
352 SDL_SCANCODE_AUDIOSTOP = 260,
353 SDL_SCANCODE_AUDIOPLAY = 261,
354 SDL_SCANCODE_AUDIOMUTE = 262,
355 SDL_SCANCODE_MEDIASELECT = 263,
356 SDL_SCANCODE_WWW = 264,
357 SDL_SCANCODE_MAIL = 265,
358 SDL_SCANCODE_CALCULATOR = 266,
359 SDL_SCANCODE_COMPUTER = 267,
360 SDL_SCANCODE_AC_SEARCH = 268,
361 SDL_SCANCODE_AC_HOME = 269,
362 SDL_SCANCODE_AC_BACK = 270,
363 SDL_SCANCODE_AC_FORWARD = 271,
364 SDL_SCANCODE_AC_STOP = 272,
365 SDL_SCANCODE_AC_REFRESH = 273,
366 SDL_SCANCODE_AC_BOOKMARKS = 274,
367
368 /* @} *//* Usage page 0x0C */
369
370 /**
371 * \name Walther keys
372 *
373 * These are values that Christian Walther added (for mac keyboard?).
374 */
375 /* @{ */
376
377 SDL_SCANCODE_BRIGHTNESSDOWN = 275,
378 SDL_SCANCODE_BRIGHTNESSUP = 276,
379 SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
380 switch, video mode switch */
381 SDL_SCANCODE_KBDILLUMTOGGLE = 278,
382 SDL_SCANCODE_KBDILLUMDOWN = 279,
383 SDL_SCANCODE_KBDILLUMUP = 280,
384 SDL_SCANCODE_EJECT = 281,
385 SDL_SCANCODE_SLEEP = 282,
386
387 SDL_SCANCODE_APP1 = 283,
388 SDL_SCANCODE_APP2 = 284,
389
390 /* @} *//* Walther keys */
391
392 /**
393 * \name Usage page 0x0C (additional media keys)
394 *
395 * These values are mapped from usage page 0x0C (USB consumer page).
396 */
397 /* @{ */
398
399 SDL_SCANCODE_AUDIOREWIND = 285,
400 SDL_SCANCODE_AUDIOFASTFORWARD = 286,
401
402 /* @} *//* Usage page 0x0C (additional media keys) */
403
404 /* Add any other keys here. */
405
406 SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
407 for array bounds */
408 } SDL_Scancode;
409
410 #endif /* SDL_scancode_h_ */
411
412 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_sensor.h
23 *
24 * Include file for SDL sensor event handling
25 *
26 */
27
28 #ifndef SDL_sensor_h_
29 #define SDL_sensor_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 /* *INDENT-OFF* */
38 extern "C" {
39 /* *INDENT-ON* */
40 #endif
41
42 /**
43 * \brief SDL_sensor.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
47 * for sensors, and load appropriate drivers.
48 */
49
50 struct _SDL_Sensor;
51 typedef struct _SDL_Sensor SDL_Sensor;
52
53 /**
54 * This is a unique ID for a sensor for the time it is connected to the system,
55 * and is never reused for the lifetime of the application.
56 *
57 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
58 */
59 typedef Sint32 SDL_SensorID;
60
61 /* The different sensors defined by SDL
62 *
63 * Additional sensors may be available, using platform dependent semantics.
64 *
65 * Hare are the additional Android sensors:
66 * https://developer.android.com/reference/android/hardware/SensorEvent.html#values
67 */
68 typedef enum
69 {
70 SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
71 SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
72 SDL_SENSOR_ACCEL, /**< Accelerometer */
73 SDL_SENSOR_GYRO /**< Gyroscope */
74 } SDL_SensorType;
75
76 /**
77 * Accelerometer sensor
78 *
79 * The accelerometer returns the current acceleration in SI meters per
80 * second squared. This measurement includes the force of gravity, so
81 * a device at rest will have an value of SDL_STANDARD_GRAVITY away
82 * from the center of the earth.
83 *
84 * values[0]: Acceleration on the x axis
85 * values[1]: Acceleration on the y axis
86 * values[2]: Acceleration on the z axis
87 *
88 * For phones held in portrait mode and game controllers held in front of you,
89 * the axes are defined as follows:
90 * -X ... +X : left ... right
91 * -Y ... +Y : bottom ... top
92 * -Z ... +Z : farther ... closer
93 *
94 * The axis data is not changed when the phone is rotated.
95 *
96 * \sa SDL_GetDisplayOrientation()
97 */
98 #define SDL_STANDARD_GRAVITY 9.80665f
99
100 /**
101 * Gyroscope sensor
102 *
103 * The gyroscope returns the current rate of rotation in radians per second.
104 * The rotation is positive in the counter-clockwise direction. That is,
105 * an observer looking from a positive location on one of the axes would
106 * see positive rotation on that axis when it appeared to be rotating
107 * counter-clockwise.
108 *
109 * values[0]: Angular speed around the x axis (pitch)
110 * values[1]: Angular speed around the y axis (yaw)
111 * values[2]: Angular speed around the z axis (roll)
112 *
113 * For phones held in portrait mode and game controllers held in front of you,
114 * the axes are defined as follows:
115 * -X ... +X : left ... right
116 * -Y ... +Y : bottom ... top
117 * -Z ... +Z : farther ... closer
118 *
119 * The axis data is not changed when the phone or controller is rotated.
120 *
121 * \sa SDL_GetDisplayOrientation()
122 */
123
124 /* Function prototypes */
125
126 /**
127 * Locking for multi-threaded access to the sensor API
128 *
129 * If you are using the sensor API or handling events from multiple threads
130 * you should use these locking functions to protect access to the sensors.
131 *
132 * In particular, you are guaranteed that the sensor list won't change, so the
133 * API functions that take a sensor index will be valid, and sensor events
134 * will not be delivered.
135 *
136 * \since This function is available since SDL 2.0.14.
137 */
138 extern DECLSPEC void SDLCALL SDL_LockSensors(void);
139 extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
140
141 /**
142 * Count the number of sensors attached to the system right now.
143 *
144 * \returns the number of sensors detected.
145 *
146 * \since This function is available since SDL 2.0.9.
147 */
148 extern DECLSPEC int SDLCALL SDL_NumSensors(void);
149
150 /**
151 * Get the implementation dependent name of a sensor.
152 *
153 * \param device_index The sensor to obtain name from
154 * \returns the sensor name, or NULL if `device_index` is out of range.
155 *
156 * \since This function is available since SDL 2.0.9.
157 */
158 extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
159
160 /**
161 * Get the type of a sensor.
162 *
163 * \param device_index The sensor to get the type from
164 * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is
165 * out of range.
166 *
167 * \since This function is available since SDL 2.0.9.
168 */
169 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
170
171 /**
172 * Get the platform dependent type of a sensor.
173 *
174 * \param device_index The sensor to check
175 * \returns the sensor platform dependent type, or -1 if `device_index` is out
176 * of range.
177 *
178 * \since This function is available since SDL 2.0.9.
179 */
180 extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
181
182 /**
183 * Get the instance ID of a sensor.
184 *
185 * \param device_index The sensor to get instance id from
186 * \returns the sensor instance ID, or -1 if `device_index` is out of range.
187 *
188 * \since This function is available since SDL 2.0.9.
189 */
190 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
191
192 /**
193 * Open a sensor for use.
194 *
195 * \param device_index The sensor to open
196 * \returns an SDL_Sensor sensor object, or NULL if an error occurred.
197 *
198 * \since This function is available since SDL 2.0.9.
199 */
200 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
201
202 /**
203 * Return the SDL_Sensor associated with an instance id.
204 *
205 * \param instance_id The sensor from instance id
206 * \returns an SDL_Sensor object.
207 *
208 * \since This function is available since SDL 2.0.9.
209 */
210 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
211
212 /**
213 * Get the implementation dependent name of a sensor
214 *
215 * \param sensor The SDL_Sensor object
216 * \returns the sensor name, or NULL if `sensor` is NULL.
217 *
218 * \since This function is available since SDL 2.0.9.
219 */
220 extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
221
222 /**
223 * Get the type of a sensor.
224 *
225 * \param sensor The SDL_Sensor object to inspect
226 * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
227 * NULL.
228 *
229 * \since This function is available since SDL 2.0.9.
230 */
231 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
232
233 /**
234 * Get the platform dependent type of a sensor.
235 *
236 * \param sensor The SDL_Sensor object to inspect
237 * \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
238 *
239 * \since This function is available since SDL 2.0.9.
240 */
241 extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
242
243 /**
244 * Get the instance ID of a sensor.
245 *
246 * \param sensor The SDL_Sensor object to inspect
247 * \returns the sensor instance ID, or -1 if `sensor` is NULL.
248 *
249 * \since This function is available since SDL 2.0.9.
250 */
251 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
252
253 /**
254 * Get the current state of an opened sensor.
255 *
256 * The number of values and interpretation of the data is sensor dependent.
257 *
258 * \param sensor The SDL_Sensor object to query
259 * \param data A pointer filled with the current sensor state
260 * \param num_values The number of values to write to data
261 * \returns 0 or -1 if an error occurred.
262 *
263 * \since This function is available since SDL 2.0.9.
264 */
265 extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
266
267 /**
268 * Close a sensor previously opened with SDL_SensorOpen().
269 *
270 * \param sensor The SDL_Sensor object to close
271 *
272 * \since This function is available since SDL 2.0.9.
273 */
274 extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
275
276 /**
277 * Update the current state of the open sensors.
278 *
279 * This is called automatically by the event loop if sensor events are
280 * enabled.
281 *
282 * This needs to be called from the thread that initialized the sensor
283 * subsystem.
284 *
285 * \since This function is available since SDL 2.0.9.
286 */
287 extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
288
289
290 /* Ends C function definitions when using C++ */
291 #ifdef __cplusplus
292 /* *INDENT-OFF* */
293 }
294 /* *INDENT-ON* */
295 #endif
296 #include <SDL2/close_code.h>
297
298 #endif /* SDL_sensor_h_ */
299
300 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_shape_h_
22 #define SDL_shape_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_pixels.h>
26 #include <SDL2/SDL_rect.h>
27 #include <SDL2/SDL_surface.h>
28 #include <SDL2/SDL_video.h>
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /** \file SDL_shape.h
37 *
38 * Header file for the shaped window API.
39 */
40
41 #define SDL_NONSHAPEABLE_WINDOW -1
42 #define SDL_INVALID_SHAPE_ARGUMENT -2
43 #define SDL_WINDOW_LACKS_SHAPE -3
44
45 /**
46 * Create a window that can be shaped with the specified position, dimensions,
47 * and flags.
48 *
49 * \param title The title of the window, in UTF-8 encoding.
50 * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
51 * ::SDL_WINDOWPOS_UNDEFINED.
52 * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
53 * ::SDL_WINDOWPOS_UNDEFINED.
54 * \param w The width of the window.
55 * \param h The height of the window.
56 * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with
57 * any of the following: ::SDL_WINDOW_OPENGL,
58 * ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
59 * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
60 * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
61 * and ::SDL_WINDOW_FULLSCREEN is always unset.
62 * \return the window created, or NULL if window creation failed.
63 *
64 * \since This function is available since SDL 2.0.0.
65 *
66 * \sa SDL_DestroyWindow
67 */
68 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
69
70 /**
71 * Return whether the given window is a shaped window.
72 *
73 * \param window The window to query for being shaped.
74 * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if
75 * the window is unshaped or NULL.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_CreateShapedWindow
80 */
81 extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
82
83 /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
84 typedef enum {
85 /** \brief The default mode, a binarized alpha cutoff of 1. */
86 ShapeModeDefault,
87 /** \brief A binarized alpha cutoff with a given integer value. */
88 ShapeModeBinarizeAlpha,
89 /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
90 ShapeModeReverseBinarizeAlpha,
91 /** \brief A color key is applied. */
92 ShapeModeColorKey
93 } WindowShapeMode;
94
95 #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
96
97 /** \brief A union containing parameters for shaped windows. */
98 typedef union {
99 /** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
100 Uint8 binarizationCutoff;
101 SDL_Color colorKey;
102 } SDL_WindowShapeParams;
103
104 /** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
105 typedef struct SDL_WindowShapeMode {
106 /** \brief The mode of these window-shape parameters. */
107 WindowShapeMode mode;
108 /** \brief Window-shape parameters. */
109 SDL_WindowShapeParams parameters;
110 } SDL_WindowShapeMode;
111
112 /**
113 * Set the shape and parameters of a shaped window.
114 *
115 * \param window The shaped window whose parameters should be set.
116 * \param shape A surface encoding the desired shape for the window.
117 * \param shape_mode The parameters to set for the shaped window.
118 * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape
119 * argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does
120 * not reference a valid shaped window.
121 *
122 * \since This function is available since SDL 2.0.0.
123 *
124 * \sa SDL_WindowShapeMode
125 * \sa SDL_GetShapedWindowMode
126 */
127 extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
128
129 /**
130 * Get the shape parameters of a shaped window.
131 *
132 * \param window The shaped window whose parameters should be retrieved.
133 * \param shape_mode An empty shape-mode structure to fill, or NULL to check
134 * whether the window has a shape.
135 * \return 0 if the window has a shape and, provided shape_mode was not NULL,
136 * shape_mode has been filled with the mode data,
137 * SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped
138 * window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a
139 * shapeable window currently lacking a shape.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_WindowShapeMode
144 * \sa SDL_SetWindowShape
145 */
146 extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
147
148 /* Ends C function definitions when using C++ */
149 #ifdef __cplusplus
150 }
151 #endif
152 #include <SDL2/close_code.h>
153
154 #endif /* SDL_shape_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_stdinc.h
23 *
24 * This is a general header that includes C language support.
25 */
26
27 #ifndef SDL_stdinc_h_
28 #define SDL_stdinc_h_
29
30 #include <SDL2/SDL_config.h>
31
32 #ifdef __APPLE__
33 #ifndef _DARWIN_C_SOURCE
34 #define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
35 #endif
36 #endif
37
38 #ifdef HAVE_SYS_TYPES_H
39 #include <sys/types.h>
40 #endif
41 #ifdef HAVE_STDIO_H
42 #include <stdio.h>
43 #endif
44 #if defined(STDC_HEADERS)
45 # include <stdlib.h>
46 # include <stddef.h>
47 # include <stdarg.h>
48 #else
49 # if defined(HAVE_STDLIB_H)
50 # include <stdlib.h>
51 # elif defined(HAVE_MALLOC_H)
52 # include <malloc.h>
53 # endif
54 # if defined(HAVE_STDDEF_H)
55 # include <stddef.h>
56 # endif
57 # if defined(HAVE_STDARG_H)
58 # include <stdarg.h>
59 # endif
60 #endif
61 #ifdef HAVE_STRING_H
62 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
63 # include <memory.h>
64 # endif
65 # include <string.h>
66 #endif
67 #ifdef HAVE_STRINGS_H
68 # include <strings.h>
69 #endif
70 #ifdef HAVE_WCHAR_H
71 # include <wchar.h>
72 #endif
73 #if defined(HAVE_INTTYPES_H)
74 # include <inttypes.h>
75 #elif defined(HAVE_STDINT_H)
76 # include <stdint.h>
77 #endif
78 #ifdef HAVE_CTYPE_H
79 # include <ctype.h>
80 #endif
81 #ifdef HAVE_MATH_H
82 # if defined(__WINRT__)
83 /* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
84 WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
85 for more information.
86 */
87 # define _USE_MATH_DEFINES
88 # endif
89 # include <math.h>
90 #endif
91 #ifdef HAVE_FLOAT_H
92 # include <float.h>
93 #endif
94 #if defined(HAVE_ALLOCA) && !defined(alloca)
95 # if defined(HAVE_ALLOCA_H)
96 # include <alloca.h>
97 # elif defined(__GNUC__)
98 # define alloca __builtin_alloca
99 # elif defined(_MSC_VER)
100 # include <malloc.h>
101 # define alloca _alloca
102 # elif defined(__WATCOMC__)
103 # include <malloc.h>
104 # elif defined(__BORLANDC__)
105 # include <malloc.h>
106 # elif defined(__DMC__)
107 # include <stdlib.h>
108 # elif defined(__AIX__)
109 #pragma alloca
110 # elif defined(__MRC__)
111 void *alloca(unsigned);
112 # else
113 char *alloca();
114 # endif
115 #endif
116
117 /**
118 * Check if the compiler supports a given builtin.
119 * Supported by virtually all clang versions and recent gcc. Use this
120 * instead of checking the clang version if possible.
121 */
122 #ifdef __has_builtin
123 #define _SDL_HAS_BUILTIN(x) __has_builtin(x)
124 #else
125 #define _SDL_HAS_BUILTIN(x) 0
126 #endif
127
128 /**
129 * The number of elements in an array.
130 */
131 #define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
132 #define SDL_TABLESIZE(table) SDL_arraysize(table)
133
134 /**
135 * Macro useful for building other macros with strings in them
136 *
137 * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
138 */
139 #define SDL_STRINGIFY_ARG(arg) #arg
140
141 /**
142 * \name Cast operators
143 *
144 * Use proper C++ casts when compiled as C++ to be compatible with the option
145 * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
146 */
147 /* @{ */
148 #ifdef __cplusplus
149 #define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
150 #define SDL_static_cast(type, expression) static_cast<type>(expression)
151 #define SDL_const_cast(type, expression) const_cast<type>(expression)
152 #else
153 #define SDL_reinterpret_cast(type, expression) ((type)(expression))
154 #define SDL_static_cast(type, expression) ((type)(expression))
155 #define SDL_const_cast(type, expression) ((type)(expression))
156 #endif
157 /* @} *//* Cast operators */
158
159 /* Define a four character code as a Uint32 */
160 #define SDL_FOURCC(A, B, C, D) \
161 ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
162 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
163 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
164 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
165
166 /**
167 * \name Basic data types
168 */
169 /* @{ */
170
171 #ifdef __CC_ARM
172 /* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
173 #define SDL_FALSE 0
174 #define SDL_TRUE 1
175 typedef int SDL_bool;
176 #else
177 typedef enum
178 {
179 SDL_FALSE = 0,
180 SDL_TRUE = 1
181 } SDL_bool;
182 #endif
183
184 /**
185 * \brief A signed 8-bit integer type.
186 */
187 #define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
188 #define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
189 typedef int8_t Sint8;
190 /**
191 * \brief An unsigned 8-bit integer type.
192 */
193 #define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
194 #define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
195 typedef uint8_t Uint8;
196 /**
197 * \brief A signed 16-bit integer type.
198 */
199 #define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
200 #define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
201 typedef int16_t Sint16;
202 /**
203 * \brief An unsigned 16-bit integer type.
204 */
205 #define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
206 #define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
207 typedef uint16_t Uint16;
208 /**
209 * \brief A signed 32-bit integer type.
210 */
211 #define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
212 #define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
213 typedef int32_t Sint32;
214 /**
215 * \brief An unsigned 32-bit integer type.
216 */
217 #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
218 #define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
219 typedef uint32_t Uint32;
220
221 /**
222 * \brief A signed 64-bit integer type.
223 */
224 #define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */
225 #define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */
226 typedef int64_t Sint64;
227 /**
228 * \brief An unsigned 64-bit integer type.
229 */
230 #define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */
231 #define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */
232 typedef uint64_t Uint64;
233
234 /* @} *//* Basic data types */
235
236 /**
237 * \name Floating-point constants
238 */
239 /* @{ */
240
241 #ifdef FLT_EPSILON
242 #define SDL_FLT_EPSILON FLT_EPSILON
243 #else
244 #define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
245 #endif
246
247 /* @} *//* Floating-point constants */
248
249 /* Make sure we have macros for printing width-based integers.
250 * <stdint.h> should define these but this is not true all platforms.
251 * (for example win32) */
252 #ifndef SDL_PRIs64
253 #ifdef PRIs64
254 #define SDL_PRIs64 PRIs64
255 #elif defined(__WIN32__)
256 #define SDL_PRIs64 "I64d"
257 #elif defined(__LINUX__) && defined(__LP64__)
258 #define SDL_PRIs64 "ld"
259 #else
260 #define SDL_PRIs64 "lld"
261 #endif
262 #endif
263 #ifndef SDL_PRIu64
264 #ifdef PRIu64
265 #define SDL_PRIu64 PRIu64
266 #elif defined(__WIN32__)
267 #define SDL_PRIu64 "I64u"
268 #elif defined(__LINUX__) && defined(__LP64__)
269 #define SDL_PRIu64 "lu"
270 #else
271 #define SDL_PRIu64 "llu"
272 #endif
273 #endif
274 #ifndef SDL_PRIx64
275 #ifdef PRIx64
276 #define SDL_PRIx64 PRIx64
277 #elif defined(__WIN32__)
278 #define SDL_PRIx64 "I64x"
279 #elif defined(__LINUX__) && defined(__LP64__)
280 #define SDL_PRIx64 "lx"
281 #else
282 #define SDL_PRIx64 "llx"
283 #endif
284 #endif
285 #ifndef SDL_PRIX64
286 #ifdef PRIX64
287 #define SDL_PRIX64 PRIX64
288 #elif defined(__WIN32__)
289 #define SDL_PRIX64 "I64X"
290 #elif defined(__LINUX__) && defined(__LP64__)
291 #define SDL_PRIX64 "lX"
292 #else
293 #define SDL_PRIX64 "llX"
294 #endif
295 #endif
296 #ifndef SDL_PRIs32
297 #ifdef PRId32
298 #define SDL_PRIs32 PRId32
299 #else
300 #define SDL_PRIs32 "d"
301 #endif
302 #endif
303 #ifndef SDL_PRIu32
304 #ifdef PRIu32
305 #define SDL_PRIu32 PRIu32
306 #else
307 #define SDL_PRIu32 "u"
308 #endif
309 #endif
310 #ifndef SDL_PRIx32
311 #ifdef PRIx32
312 #define SDL_PRIx32 PRIx32
313 #else
314 #define SDL_PRIx32 "x"
315 #endif
316 #endif
317 #ifndef SDL_PRIX32
318 #ifdef PRIX32
319 #define SDL_PRIX32 PRIX32
320 #else
321 #define SDL_PRIX32 "X"
322 #endif
323 #endif
324
325 /* Annotations to help code analysis tools */
326 #ifdef SDL_DISABLE_ANALYZE_MACROS
327 #define SDL_IN_BYTECAP(x)
328 #define SDL_INOUT_Z_CAP(x)
329 #define SDL_OUT_Z_CAP(x)
330 #define SDL_OUT_CAP(x)
331 #define SDL_OUT_BYTECAP(x)
332 #define SDL_OUT_Z_BYTECAP(x)
333 #define SDL_PRINTF_FORMAT_STRING
334 #define SDL_SCANF_FORMAT_STRING
335 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
336 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
337 #else
338 #if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
339 #include <sal.h>
340
341 #define SDL_IN_BYTECAP(x) _In_bytecount_(x)
342 #define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
343 #define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
344 #define SDL_OUT_CAP(x) _Out_cap_(x)
345 #define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
346 #define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
347
348 #define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
349 #define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
350 #else
351 #define SDL_IN_BYTECAP(x)
352 #define SDL_INOUT_Z_CAP(x)
353 #define SDL_OUT_Z_CAP(x)
354 #define SDL_OUT_CAP(x)
355 #define SDL_OUT_BYTECAP(x)
356 #define SDL_OUT_Z_BYTECAP(x)
357 #define SDL_PRINTF_FORMAT_STRING
358 #define SDL_SCANF_FORMAT_STRING
359 #endif
360 #if defined(__GNUC__)
361 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
362 #define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
363 #else
364 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
365 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
366 #endif
367 #endif /* SDL_DISABLE_ANALYZE_MACROS */
368
369 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
370 #define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
371 #elif defined(__cplusplus) && (__cplusplus >= 201103L)
372 #define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
373 #else /* universal, but may trigger -Wunused-local-typedefs */
374 #define SDL_COMPILE_TIME_ASSERT(name, x) \
375 typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
376 #endif
377 /** \cond */
378 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
379 SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
380 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
381 SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
382 SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
383 SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
384 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
385 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
386 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
387 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
388 /** \endcond */
389
390 /* Check to make sure enums are the size of ints, for structure packing.
391 For both Watcom C/C++ and Borland C/C++ the compiler option that makes
392 enums having the size of an int must be enabled.
393 This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
394 */
395
396 /** \cond */
397 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
398 #if !defined(__ANDROID__) && !defined(__VITA__)
399 /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
400 typedef enum
401 {
402 DUMMY_ENUM_VALUE
403 } SDL_DUMMY_ENUM;
404
405 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
406 #endif
407 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
408 /** \endcond */
409
410 #include <SDL2/begin_code.h>
411 /* Set up for C function definitions, even when using C++ */
412 #ifdef __cplusplus
413 extern "C" {
414 #endif
415
416 #ifdef HAVE_ALLOCA
417 #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
418 #define SDL_stack_free(data)
419 #else
420 #define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
421 #define SDL_stack_free(data) SDL_free(data)
422 #endif
423
424 extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
425 extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
426 extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
427 extern DECLSPEC void SDLCALL SDL_free(void *mem);
428
429 typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
430 typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
431 typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
432 typedef void (SDLCALL *SDL_free_func)(void *mem);
433
434 /**
435 * Get the current set of SDL memory functions
436 *
437 * \since This function is available since SDL 2.0.7.
438 */
439 extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
440 SDL_calloc_func *calloc_func,
441 SDL_realloc_func *realloc_func,
442 SDL_free_func *free_func);
443
444 /**
445 * Replace SDL's memory allocation functions with a custom set
446 *
447 * \since This function is available since SDL 2.0.7.
448 */
449 extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
450 SDL_calloc_func calloc_func,
451 SDL_realloc_func realloc_func,
452 SDL_free_func free_func);
453
454 /**
455 * Get the number of outstanding (unfreed) allocations
456 *
457 * \since This function is available since SDL 2.0.7.
458 */
459 extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
460
461 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
462 extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
463
464 extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
465
466 extern DECLSPEC int SDLCALL SDL_abs(int x);
467
468 /* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */
469 #define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
470 #define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
471 #define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
472
473 extern DECLSPEC int SDLCALL SDL_isalpha(int x);
474 extern DECLSPEC int SDLCALL SDL_isalnum(int x);
475 extern DECLSPEC int SDLCALL SDL_isblank(int x);
476 extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
477 extern DECLSPEC int SDLCALL SDL_isdigit(int x);
478 extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
479 extern DECLSPEC int SDLCALL SDL_ispunct(int x);
480 extern DECLSPEC int SDLCALL SDL_isspace(int x);
481 extern DECLSPEC int SDLCALL SDL_isupper(int x);
482 extern DECLSPEC int SDLCALL SDL_islower(int x);
483 extern DECLSPEC int SDLCALL SDL_isprint(int x);
484 extern DECLSPEC int SDLCALL SDL_isgraph(int x);
485 extern DECLSPEC int SDLCALL SDL_toupper(int x);
486 extern DECLSPEC int SDLCALL SDL_tolower(int x);
487
488 extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
489
490 extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
491
492 #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
493 #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
494 #define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
495
496 /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
497 SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
498 {
499 #ifdef __APPLE__
500 memset_pattern4(dst, &val, dwords * 4);
501 #elif defined(__GNUC__) && defined(__i386__)
502 int u0, u1, u2;
503 __asm__ __volatile__ (
504 "cld \n\t"
505 "rep ; stosl \n\t"
506 : "=&D" (u0), "=&a" (u1), "=&c" (u2)
507 : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
508 : "memory"
509 );
510 #else
511 size_t _n = (dwords + 3) / 4;
512 Uint32 *_p = SDL_static_cast(Uint32 *, dst);
513 Uint32 _val = (val);
514 if (dwords == 0) {
515 return;
516 }
517 switch (dwords % 4) {
518 case 0: do { *_p++ = _val; SDL_FALLTHROUGH;
519 case 3: *_p++ = _val; SDL_FALLTHROUGH;
520 case 2: *_p++ = _val; SDL_FALLTHROUGH;
521 case 1: *_p++ = _val;
522 } while ( --_n );
523 }
524 #endif
525 }
526
527 extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
528
529 extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
530 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
531
532 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
533 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
534 extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
535 extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
536 extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
537
538 extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
539 extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
540 extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
541 extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
542
543 extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
544 extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
545 extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
546 extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
547 extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
548 extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
549 extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
550 extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
551 extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
552 extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
553 extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
554 extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
555 extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
556
557 extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
558 extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
559 extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
560 extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
561 extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
562 extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
563
564 extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
565 extern DECLSPEC double SDLCALL SDL_atof(const char *str);
566 extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
567 extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
568 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
569 extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
570 extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
571
572 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
573 extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
574 extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
575 extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
576
577 extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
578 extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
579 extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
580 extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
581 extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
582 extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
583
584 #ifndef HAVE_M_PI
585 #ifndef M_PI
586 #define M_PI 3.14159265358979323846264338327950288 /**< pi */
587 #endif
588 #endif
589
590 /**
591 * Use this function to compute arc cosine of `x`.
592 *
593 * The definition of `y = acos(x)` is `x = cos(y)`.
594 *
595 * Domain: `-1 <= x <= 1`
596 *
597 * Range: `0 <= y <= Pi`
598 *
599 * \param x floating point value, in radians.
600 * \returns arc cosine of `x`.
601 *
602 * \since This function is available since SDL 2.0.2.
603 */
604 extern DECLSPEC double SDLCALL SDL_acos(double x);
605 extern DECLSPEC float SDLCALL SDL_acosf(float x);
606 extern DECLSPEC double SDLCALL SDL_asin(double x);
607 extern DECLSPEC float SDLCALL SDL_asinf(float x);
608 extern DECLSPEC double SDLCALL SDL_atan(double x);
609 extern DECLSPEC float SDLCALL SDL_atanf(float x);
610 extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
611 extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
612 extern DECLSPEC double SDLCALL SDL_ceil(double x);
613 extern DECLSPEC float SDLCALL SDL_ceilf(float x);
614 extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
615 extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
616 extern DECLSPEC double SDLCALL SDL_cos(double x);
617 extern DECLSPEC float SDLCALL SDL_cosf(float x);
618 extern DECLSPEC double SDLCALL SDL_exp(double x);
619 extern DECLSPEC float SDLCALL SDL_expf(float x);
620 extern DECLSPEC double SDLCALL SDL_fabs(double x);
621 extern DECLSPEC float SDLCALL SDL_fabsf(float x);
622 extern DECLSPEC double SDLCALL SDL_floor(double x);
623 extern DECLSPEC float SDLCALL SDL_floorf(float x);
624 extern DECLSPEC double SDLCALL SDL_trunc(double x);
625 extern DECLSPEC float SDLCALL SDL_truncf(float x);
626 extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
627 extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
628 extern DECLSPEC double SDLCALL SDL_log(double x);
629 extern DECLSPEC float SDLCALL SDL_logf(float x);
630 extern DECLSPEC double SDLCALL SDL_log10(double x);
631 extern DECLSPEC float SDLCALL SDL_log10f(float x);
632 extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
633 extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
634 extern DECLSPEC double SDLCALL SDL_round(double x);
635 extern DECLSPEC float SDLCALL SDL_roundf(float x);
636 extern DECLSPEC long SDLCALL SDL_lround(double x);
637 extern DECLSPEC long SDLCALL SDL_lroundf(float x);
638 extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
639 extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
640 extern DECLSPEC double SDLCALL SDL_sin(double x);
641 extern DECLSPEC float SDLCALL SDL_sinf(float x);
642 extern DECLSPEC double SDLCALL SDL_sqrt(double x);
643 extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
644 extern DECLSPEC double SDLCALL SDL_tan(double x);
645 extern DECLSPEC float SDLCALL SDL_tanf(float x);
646
647 /* The SDL implementation of iconv() returns these error codes */
648 #define SDL_ICONV_ERROR (size_t)-1
649 #define SDL_ICONV_E2BIG (size_t)-2
650 #define SDL_ICONV_EILSEQ (size_t)-3
651 #define SDL_ICONV_EINVAL (size_t)-4
652
653 /* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
654 typedef struct _SDL_iconv_t *SDL_iconv_t;
655 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
656 const char *fromcode);
657 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
658 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
659 size_t * inbytesleft, char **outbuf,
660 size_t * outbytesleft);
661
662 /**
663 * This function converts a string between encodings in one pass, returning a
664 * string that must be freed with SDL_free() or NULL on error.
665 *
666 * \since This function is available since SDL 2.0.0.
667 */
668 extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
669 const char *fromcode,
670 const char *inbuf,
671 size_t inbytesleft);
672 #define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
673 #define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
674 #define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
675 #define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
676
677 /* force builds using Clang's static analysis tools to use literal C runtime
678 here, since there are possibly tests that are ineffective otherwise. */
679 #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
680
681 /* The analyzer knows about strlcpy even when the system doesn't provide it */
682 #ifndef HAVE_STRLCPY
683 size_t strlcpy(char* dst, const char* src, size_t size);
684 #endif
685
686 /* The analyzer knows about strlcat even when the system doesn't provide it */
687 #ifndef HAVE_STRLCAT
688 size_t strlcat(char* dst, const char* src, size_t size);
689 #endif
690
691 #define SDL_malloc malloc
692 #define SDL_calloc calloc
693 #define SDL_realloc realloc
694 #define SDL_free free
695 #define SDL_memset memset
696 #define SDL_memcpy memcpy
697 #define SDL_memmove memmove
698 #define SDL_memcmp memcmp
699 #define SDL_strlcpy strlcpy
700 #define SDL_strlcat strlcat
701 #define SDL_strlen strlen
702 #define SDL_wcslen wcslen
703 #define SDL_wcslcpy wcslcpy
704 #define SDL_wcslcat wcslcat
705 #define SDL_strdup strdup
706 #define SDL_wcsdup wcsdup
707 #define SDL_strchr strchr
708 #define SDL_strrchr strrchr
709 #define SDL_strstr strstr
710 #define SDL_wcsstr wcsstr
711 #define SDL_strtokr strtok_r
712 #define SDL_strcmp strcmp
713 #define SDL_wcscmp wcscmp
714 #define SDL_strncmp strncmp
715 #define SDL_wcsncmp wcsncmp
716 #define SDL_strcasecmp strcasecmp
717 #define SDL_strncasecmp strncasecmp
718 #define SDL_sscanf sscanf
719 #define SDL_vsscanf vsscanf
720 #define SDL_snprintf snprintf
721 #define SDL_vsnprintf vsnprintf
722 #endif
723
724 SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
725 {
726 return SDL_memcpy(dst, src, dwords * 4);
727 }
728
729 /* Ends C function definitions when using C++ */
730 #ifdef __cplusplus
731 }
732 #endif
733 #include <SDL2/close_code.h>
734
735 #endif /* SDL_stdinc_h_ */
736
737 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_surface.h
23 *
24 * Header file for ::SDL_Surface definition and management functions.
25 */
26
27 #ifndef SDL_surface_h_
28 #define SDL_surface_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_blendmode.h>
34 #include <SDL2/SDL_rwops.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \name Surface flags
44 *
45 * These are the currently supported flags for the ::SDL_Surface.
46 *
47 * \internal
48 * Used internally (read-only).
49 */
50 /* @{ */
51 #define SDL_SWSURFACE 0 /**< Just here for compatibility */
52 #define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
53 #define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
54 #define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
55 #define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
56 /* @} *//* Surface flags */
57
58 /**
59 * Evaluates to true if the surface needs to be locked before access.
60 */
61 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
62
63 /**
64 * \brief A collection of pixels used in software blitting.
65 *
66 * \note This structure should be treated as read-only, except for \c pixels,
67 * which, if not NULL, contains the raw pixel data for the surface.
68 */
69 typedef struct SDL_Surface
70 {
71 Uint32 flags; /**< Read-only */
72 SDL_PixelFormat *format; /**< Read-only */
73 int w, h; /**< Read-only */
74 int pitch; /**< Read-only */
75 void *pixels; /**< Read-write */
76
77 /** Application data associated with the surface */
78 void *userdata; /**< Read-write */
79
80 /** information needed for surfaces requiring locks */
81 int locked; /**< Read-only */
82
83 /** list of BlitMap that hold a reference to this surface */
84 void *list_blitmap; /**< Private */
85
86 /** clipping information */
87 SDL_Rect clip_rect; /**< Read-only */
88
89 /** info for fast blit mapping to other surfaces */
90 struct SDL_BlitMap *map; /**< Private */
91
92 /** Reference count -- used when freeing surface */
93 int refcount; /**< Read-mostly */
94 } SDL_Surface;
95
96 /**
97 * \brief The type of function used for surface blitting functions.
98 */
99 typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
100 struct SDL_Surface * dst, SDL_Rect * dstrect);
101
102 /**
103 * \brief The formula used for converting between YUV and RGB
104 */
105 typedef enum
106 {
107 SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
108 SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
109 SDL_YUV_CONVERSION_BT709, /**< BT.709 */
110 SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
111 } SDL_YUV_CONVERSION_MODE;
112
113 /**
114 * Allocate a new RGB surface.
115 *
116 * If `depth` is 4 or 8 bits, an empty palette is allocated for the surface.
117 * If `depth` is greater than 8 bits, the pixel format is set using the
118 * [RGBA]mask parameters.
119 *
120 * The [RGBA]mask parameters are the bitmasks used to extract that color from
121 * a pixel. For instance, `Rmask` being 0xFF000000 means the red data is
122 * stored in the most significant byte. Using zeros for the RGB masks sets a
123 * default value, based on the depth. For example:
124 *
125 * ```c++
126 * SDL_CreateRGBSurface(0,w,h,32,0,0,0,0);
127 * ```
128 *
129 * However, using zero for the Amask results in an Amask of 0.
130 *
131 * By default surfaces with an alpha mask are set up for blending as with:
132 *
133 * ```c++
134 * SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)
135 * ```
136 *
137 * You can change this by calling SDL_SetSurfaceBlendMode() and selecting a
138 * different `blendMode`.
139 *
140 * \param flags the flags are unused and should be set to 0
141 * \param width the width of the surface
142 * \param height the height of the surface
143 * \param depth the depth of the surface in bits
144 * \param Rmask the red mask for the pixels
145 * \param Gmask the green mask for the pixels
146 * \param Bmask the blue mask for the pixels
147 * \param Amask the alpha mask for the pixels
148 * \returns the new SDL_Surface structure that is created or NULL if it fails;
149 * call SDL_GetError() for more information.
150 *
151 * \since This function is available since SDL 2.0.0.
152 *
153 * \sa SDL_CreateRGBSurfaceFrom
154 * \sa SDL_CreateRGBSurfaceWithFormat
155 * \sa SDL_FreeSurface
156 */
157 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
158 (Uint32 flags, int width, int height, int depth,
159 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
160
161
162 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
163
164 /**
165 * Allocate a new RGB surface with a specific pixel format.
166 *
167 * This function operates mostly like SDL_CreateRGBSurface(), except instead
168 * of providing pixel color masks, you provide it with a predefined format
169 * from SDL_PixelFormatEnum.
170 *
171 * \param flags the flags are unused and should be set to 0
172 * \param width the width of the surface
173 * \param height the height of the surface
174 * \param depth the depth of the surface in bits
175 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
176 * \returns the new SDL_Surface structure that is created or NULL if it fails;
177 * call SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.5.
180 *
181 * \sa SDL_CreateRGBSurface
182 * \sa SDL_CreateRGBSurfaceFrom
183 * \sa SDL_FreeSurface
184 */
185 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
186 (Uint32 flags, int width, int height, int depth, Uint32 format);
187
188 /**
189 * Allocate a new RGB surface with existing pixel data.
190 *
191 * This function operates mostly like SDL_CreateRGBSurface(), except it does
192 * not allocate memory for the pixel data, instead the caller provides an
193 * existing buffer of data for the surface to use.
194 *
195 * No copy is made of the pixel data. Pixel data is not managed automatically;
196 * you must free the surface before you free the pixel data.
197 *
198 * \param pixels a pointer to existing pixel data
199 * \param width the width of the surface
200 * \param height the height of the surface
201 * \param depth the depth of the surface in bits
202 * \param pitch the pitch of the surface in bytes
203 * \param Rmask the red mask for the pixels
204 * \param Gmask the green mask for the pixels
205 * \param Bmask the blue mask for the pixels
206 * \param Amask the alpha mask for the pixels
207 * \returns the new SDL_Surface structure that is created or NULL if it fails;
208 * call SDL_GetError() for more information.
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_CreateRGBSurface
213 * \sa SDL_CreateRGBSurfaceWithFormat
214 * \sa SDL_FreeSurface
215 */
216 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
217 int width,
218 int height,
219 int depth,
220 int pitch,
221 Uint32 Rmask,
222 Uint32 Gmask,
223 Uint32 Bmask,
224 Uint32 Amask);
225
226 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
227
228 /**
229 * Allocate a new RGB surface with with a specific pixel format and existing
230 * pixel data.
231 *
232 * This function operates mostly like SDL_CreateRGBSurfaceFrom(), except
233 * instead of providing pixel color masks, you provide it with a predefined
234 * format from SDL_PixelFormatEnum.
235 *
236 * No copy is made of the pixel data. Pixel data is not managed automatically;
237 * you must free the surface before you free the pixel data.
238 *
239 * \param pixels a pointer to existing pixel data
240 * \param width the width of the surface
241 * \param height the height of the surface
242 * \param depth the depth of the surface in bits
243 * \param pitch the pitch of the surface in bytes
244 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
245 * \returns the new SDL_Surface structure that is created or NULL if it fails;
246 * call SDL_GetError() for more information.
247 *
248 * \since This function is available since SDL 2.0.5.
249 *
250 * \sa SDL_CreateRGBSurfaceFrom
251 * \sa SDL_CreateRGBSurfaceWithFormat
252 * \sa SDL_FreeSurface
253 */
254 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
255 (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
256
257 /**
258 * Free an RGB surface.
259 *
260 * It is safe to pass NULL to this function.
261 *
262 * \param surface the SDL_Surface to free.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_CreateRGBSurface
267 * \sa SDL_CreateRGBSurfaceFrom
268 * \sa SDL_LoadBMP
269 * \sa SDL_LoadBMP_RW
270 */
271 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
272
273 /**
274 * Set the palette used by a surface.
275 *
276 * A single palette can be shared with many surfaces.
277 *
278 * \param surface the SDL_Surface structure to update
279 * \param palette the SDL_Palette structure to use
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 */
285 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
286 SDL_Palette * palette);
287
288 /**
289 * Set up a surface for directly accessing the pixels.
290 *
291 * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
292 * and read from `surface->pixels`, using the pixel format stored in
293 * `surface->format`. Once you are done accessing the surface, you should use
294 * SDL_UnlockSurface() to release it.
295 *
296 * Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
297 * 0, then you can read and write to the surface at any time, and the pixel
298 * format of the surface will not change.
299 *
300 * \param surface the SDL_Surface structure to be locked
301 * \returns 0 on success or a negative error code on failure; call
302 * SDL_GetError() for more information.
303 *
304 * \since This function is available since SDL 2.0.0.
305 *
306 * \sa SDL_MUSTLOCK
307 * \sa SDL_UnlockSurface
308 */
309 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
310
311 /**
312 * Release a surface after directly accessing the pixels.
313 *
314 * \param surface the SDL_Surface structure to be unlocked
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_LockSurface
319 */
320 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
321
322 /**
323 * Load a BMP image from a seekable SDL data stream.
324 *
325 * The new surface should be freed with SDL_FreeSurface(). Not doing so will
326 * result in a memory leak.
327 *
328 * src is an open SDL_RWops buffer, typically loaded with SDL_RWFromFile.
329 * Alternitavely, you might also use the macro SDL_LoadBMP to load a bitmap
330 * from a file, convert it to an SDL_Surface and then close the file.
331 *
332 * \param src the data stream for the surface
333 * \param freesrc non-zero to close the stream after being read
334 * \returns a pointer to a new SDL_Surface structure or NULL if there was an
335 * error; call SDL_GetError() for more information.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_FreeSurface
340 * \sa SDL_RWFromFile
341 * \sa SDL_LoadBMP
342 * \sa SDL_SaveBMP_RW
343 */
344 extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
345 int freesrc);
346
347 /**
348 * Load a surface from a file.
349 *
350 * Convenience macro.
351 */
352 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
353
354 /**
355 * Save a surface to a seekable SDL data stream in BMP format.
356 *
357 * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
358 * BMP directly. Other RGB formats with 8-bit or higher get converted to a
359 * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
360 * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
361 * not supported.
362 *
363 * \param surface the SDL_Surface structure containing the image to be saved
364 * \param dst a data stream to save to
365 * \param freedst non-zero to close the stream after being written
366 * \returns 0 on success or a negative error code on failure; call
367 * SDL_GetError() for more information.
368 *
369 * \since This function is available since SDL 2.0.0.
370 *
371 * \sa SDL_LoadBMP_RW
372 * \sa SDL_SaveBMP
373 */
374 extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
375 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
376
377 /**
378 * Save a surface to a file.
379 *
380 * Convenience macro.
381 */
382 #define SDL_SaveBMP(surface, file) \
383 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
384
385 /**
386 * Set the RLE acceleration hint for a surface.
387 *
388 * If RLE is enabled, color key and alpha blending blits are much faster, but
389 * the surface must be locked before directly accessing the pixels.
390 *
391 * \param surface the SDL_Surface structure to optimize
392 * \param flag 0 to disable, non-zero to enable RLE acceleration
393 * \returns 0 on success or a negative error code on failure; call
394 * SDL_GetError() for more information.
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_BlitSurface
399 * \sa SDL_LockSurface
400 * \sa SDL_UnlockSurface
401 */
402 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
403 int flag);
404
405 /**
406 * Returns whether the surface is RLE enabled
407 *
408 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
409 *
410 * \param surface the SDL_Surface structure to query
411 * \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise.
412 *
413 * \since This function is available since SDL 2.0.14.
414 *
415 * \sa SDL_SetSurfaceRLE
416 */
417 extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
418
419 /**
420 * Set the color key (transparent pixel) in a surface.
421 *
422 * The color key defines a pixel value that will be treated as transparent in
423 * a blit. For example, one can use this to specify that cyan pixels should be
424 * considered transparent, and therefore not rendered.
425 *
426 * It is a pixel of the format used by the surface, as generated by
427 * SDL_MapRGB().
428 *
429 * RLE acceleration can substantially speed up blitting of images with large
430 * horizontal runs of transparent pixels. See SDL_SetSurfaceRLE() for details.
431 *
432 * \param surface the SDL_Surface structure to update
433 * \param flag SDL_TRUE to enable color key, SDL_FALSE to disable color key
434 * \param key the transparent pixel
435 * \returns 0 on success or a negative error code on failure; call
436 * SDL_GetError() for more information.
437 *
438 * \since This function is available since SDL 2.0.0.
439 *
440 * \sa SDL_BlitSurface
441 * \sa SDL_GetColorKey
442 */
443 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
444 int flag, Uint32 key);
445
446 /**
447 * Returns whether the surface has a color key
448 *
449 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
450 *
451 * \param surface the SDL_Surface structure to query
452 * \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.
453 *
454 * \since This function is available since SDL 2.0.9.
455 *
456 * \sa SDL_SetColorKey
457 * \sa SDL_GetColorKey
458 */
459 extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
460
461 /**
462 * Get the color key (transparent pixel) for a surface.
463 *
464 * The color key is a pixel of the format used by the surface, as generated by
465 * SDL_MapRGB().
466 *
467 * If the surface doesn't have color key enabled this function returns -1.
468 *
469 * \param surface the SDL_Surface structure to query
470 * \param key a pointer filled in with the transparent pixel
471 * \returns 0 on success or a negative error code on failure; call
472 * SDL_GetError() for more information.
473 *
474 * \since This function is available since SDL 2.0.0.
475 *
476 * \sa SDL_BlitSurface
477 * \sa SDL_SetColorKey
478 */
479 extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
480 Uint32 * key);
481
482 /**
483 * Set an additional color value multiplied into blit operations.
484 *
485 * When this surface is blitted, during the blit operation each source color
486 * channel is modulated by the appropriate color value according to the
487 * following formula:
488 *
489 * `srcC = srcC * (color / 255)`
490 *
491 * \param surface the SDL_Surface structure to update
492 * \param r the red color value multiplied into blit operations
493 * \param g the green color value multiplied into blit operations
494 * \param b the blue color value multiplied into blit operations
495 * \returns 0 on success or a negative error code on failure; call
496 * SDL_GetError() for more information.
497 *
498 * \since This function is available since SDL 2.0.0.
499 *
500 * \sa SDL_GetSurfaceColorMod
501 * \sa SDL_SetSurfaceAlphaMod
502 */
503 extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
504 Uint8 r, Uint8 g, Uint8 b);
505
506
507 /**
508 * Get the additional color value multiplied into blit operations.
509 *
510 * \param surface the SDL_Surface structure to query
511 * \param r a pointer filled in with the current red color value
512 * \param g a pointer filled in with the current green color value
513 * \param b a pointer filled in with the current blue color value
514 * \returns 0 on success or a negative error code on failure; call
515 * SDL_GetError() for more information.
516 *
517 * \since This function is available since SDL 2.0.0.
518 *
519 * \sa SDL_GetSurfaceAlphaMod
520 * \sa SDL_SetSurfaceColorMod
521 */
522 extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
523 Uint8 * r, Uint8 * g,
524 Uint8 * b);
525
526 /**
527 * Set an additional alpha value used in blit operations.
528 *
529 * When this surface is blitted, during the blit operation the source alpha
530 * value is modulated by this alpha value according to the following formula:
531 *
532 * `srcA = srcA * (alpha / 255)`
533 *
534 * \param surface the SDL_Surface structure to update
535 * \param alpha the alpha value multiplied into blit operations
536 * \returns 0 on success or a negative error code on failure; call
537 * SDL_GetError() for more information.
538 *
539 * \since This function is available since SDL 2.0.0.
540 *
541 * \sa SDL_GetSurfaceAlphaMod
542 * \sa SDL_SetSurfaceColorMod
543 */
544 extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
545 Uint8 alpha);
546
547 /**
548 * Get the additional alpha value used in blit operations.
549 *
550 * \param surface the SDL_Surface structure to query
551 * \param alpha a pointer filled in with the current alpha value
552 * \returns 0 on success or a negative error code on failure; call
553 * SDL_GetError() for more information.
554 *
555 * \since This function is available since SDL 2.0.0.
556 *
557 * \sa SDL_GetSurfaceColorMod
558 * \sa SDL_SetSurfaceAlphaMod
559 */
560 extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
561 Uint8 * alpha);
562
563 /**
564 * Set the blend mode used for blit operations.
565 *
566 * To copy a surface to another surface (or texture) without blending with the
567 * existing data, the blendmode of the SOURCE surface should be set to
568 * `SDL_BLENDMODE_NONE`.
569 *
570 * \param surface the SDL_Surface structure to update
571 * \param blendMode the SDL_BlendMode to use for blit blending
572 * \returns 0 on success or a negative error code on failure; call
573 * SDL_GetError() for more information.
574 *
575 * \since This function is available since SDL 2.0.0.
576 *
577 * \sa SDL_GetSurfaceBlendMode
578 */
579 extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
580 SDL_BlendMode blendMode);
581
582 /**
583 * Get the blend mode used for blit operations.
584 *
585 * \param surface the SDL_Surface structure to query
586 * \param blendMode a pointer filled in with the current SDL_BlendMode
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_SetSurfaceBlendMode
593 */
594 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
595 SDL_BlendMode *blendMode);
596
597 /**
598 * Set the clipping rectangle for a surface.
599 *
600 * When `surface` is the destination of a blit, only the area within the clip
601 * rectangle is drawn into.
602 *
603 * Note that blits are automatically clipped to the edges of the source and
604 * destination surfaces.
605 *
606 * \param surface the SDL_Surface structure to be clipped
607 * \param rect the SDL_Rect structure representing the clipping rectangle, or
608 * NULL to disable clipping
609 * \returns SDL_TRUE if the rectangle intersects the surface, otherwise
610 * SDL_FALSE and blits will be completely clipped.
611 *
612 * \since This function is available since SDL 2.0.0.
613 *
614 * \sa SDL_BlitSurface
615 * \sa SDL_GetClipRect
616 */
617 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
618 const SDL_Rect * rect);
619
620 /**
621 * Get the clipping rectangle for a surface.
622 *
623 * When `surface` is the destination of a blit, only the area within the clip
624 * rectangle is drawn into.
625 *
626 * \param surface the SDL_Surface structure representing the surface to be
627 * clipped
628 * \param rect an SDL_Rect structure filled in with the clipping rectangle for
629 * the surface
630 *
631 * \since This function is available since SDL 2.0.0.
632 *
633 * \sa SDL_BlitSurface
634 * \sa SDL_SetClipRect
635 */
636 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
637 SDL_Rect * rect);
638
639 /*
640 * Creates a new surface identical to the existing surface.
641 *
642 * The returned surface should be freed with SDL_FreeSurface().
643 *
644 * \param surface the surface to duplicate.
645 * \returns a copy of the surface, or NULL on failure; call SDL_GetError() for
646 * more information.
647 */
648 extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
649
650 /**
651 * Copy an existing surface to a new surface of the specified format.
652 *
653 * This function is used to optimize images for faster *repeat* blitting. This
654 * is accomplished by converting the original and storing the result as a new
655 * surface. The new, optimized surface can then be used as the source for
656 * future blits, making them faster.
657 *
658 * \param src the existing SDL_Surface structure to convert
659 * \param fmt the SDL_PixelFormat structure that the new surface is optimized
660 * for
661 * \param flags the flags are unused and should be set to 0; this is a
662 * leftover from SDL 1.2's API
663 * \returns the new SDL_Surface structure that is created or NULL if it fails;
664 * call SDL_GetError() for more information.
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_AllocFormat
669 * \sa SDL_ConvertSurfaceFormat
670 * \sa SDL_CreateRGBSurface
671 */
672 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
673 (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
674
675 /**
676 * Copy an existing surface to a new surface of the specified format enum.
677 *
678 * This function operates just like SDL_ConvertSurface(), but accepts an
679 * SDL_PixelFormatEnum value instead of an SDL_PixelFormat structure. As such,
680 * it might be easier to call but it doesn't have access to palette
681 * information for the destination surface, in case that would be important.
682 *
683 * \param src the existing SDL_Surface structure to convert
684 * \param pixel_format the SDL_PixelFormatEnum that the new surface is
685 * optimized for
686 * \param flags the flags are unused and should be set to 0; this is a
687 * leftover from SDL 1.2's API
688 * \returns the new SDL_Surface structure that is created or NULL if it fails;
689 * call SDL_GetError() for more information.
690 *
691 * \since This function is available since SDL 2.0.0.
692 *
693 * \sa SDL_AllocFormat
694 * \sa SDL_ConvertSurface
695 * \sa SDL_CreateRGBSurface
696 */
697 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
698 (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
699
700 /**
701 * Copy a block of pixels of one format to another format.
702 *
703 * \param width the width of the block to copy, in pixels
704 * \param height the height of the block to copy, in pixels
705 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
706 * \param src a pointer to the source pixels
707 * \param src_pitch the pitch of the source pixels, in bytes
708 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
709 * \param dst a pointer to be filled in with new pixel data
710 * \param dst_pitch the pitch of the destination pixels, in bytes
711 * \returns 0 on success or a negative error code on failure; call
712 * SDL_GetError() for more information.
713 *
714 * \since This function is available since SDL 2.0.0.
715 */
716 extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
717 Uint32 src_format,
718 const void * src, int src_pitch,
719 Uint32 dst_format,
720 void * dst, int dst_pitch);
721
722 /**
723 * Premultiply the alpha on a block of pixels.
724 *
725 * This is safe to use with src == dst, but not for other overlapping areas.
726 *
727 * This function is currently only implemented for SDL_PIXELFORMAT_ARGB8888.
728 *
729 * \param width the width of the block to convert, in pixels
730 * \param height the height of the block to convert, in pixels
731 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
732 * \param src a pointer to the source pixels
733 * \param src_pitch the pitch of the source pixels, in bytes
734 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
735 * \param dst a pointer to be filled in with premultiplied pixel data
736 * \param dst_pitch the pitch of the destination pixels, in bytes
737 * \returns 0 on success or a negative error code on failure; call
738 * SDL_GetError() for more information.
739 *
740 * \since This function is available since SDL 2.0.18.
741 */
742 extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height,
743 Uint32 src_format,
744 const void * src, int src_pitch,
745 Uint32 dst_format,
746 void * dst, int dst_pitch);
747
748 /**
749 * Perform a fast fill of a rectangle with a specific color.
750 *
751 * `color` should be a pixel of the format used by the surface, and can be
752 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
753 * alpha component then the destination is simply filled with that alpha
754 * information, no blending takes place.
755 *
756 * If there is a clip rectangle set on the destination (set via
757 * SDL_SetClipRect()), then this function will fill based on the intersection
758 * of the clip rectangle and `rect`.
759 *
760 * \param dst the SDL_Surface structure that is the drawing target
761 * \param rect the SDL_Rect structure representing the rectangle to fill, or
762 * NULL to fill the entire surface
763 * \param color the color to fill with
764 * \returns 0 on success or a negative error code on failure; call
765 * SDL_GetError() for more information.
766 *
767 * \since This function is available since SDL 2.0.0.
768 *
769 * \sa SDL_FillRects
770 */
771 extern DECLSPEC int SDLCALL SDL_FillRect
772 (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
773
774 /**
775 * Perform a fast fill of a set of rectangles with a specific color.
776 *
777 * `color` should be a pixel of the format used by the surface, and can be
778 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
779 * alpha component then the destination is simply filled with that alpha
780 * information, no blending takes place.
781 *
782 * If there is a clip rectangle set on the destination (set via
783 * SDL_SetClipRect()), then this function will fill based on the intersection
784 * of the clip rectangle and `rect`.
785 *
786 * \param dst the SDL_Surface structure that is the drawing target
787 * \param rects an array of SDL_Rects representing the rectangles to fill.
788 * \param count the number of rectangles in the array
789 * \param color the color to fill with
790 * \returns 0 on success or a negative error code on failure; call
791 * SDL_GetError() for more information.
792 *
793 * \since This function is available since SDL 2.0.0.
794 *
795 * \sa SDL_FillRect
796 */
797 extern DECLSPEC int SDLCALL SDL_FillRects
798 (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
799
800 /* !!! FIXME: merge this documentation with the wiki */
801 /**
802 * Performs a fast blit from the source surface to the destination surface.
803 *
804 * This assumes that the source and destination rectangles are
805 * the same size. If either \c srcrect or \c dstrect are NULL, the entire
806 * surface (\c src or \c dst) is copied. The final blit rectangles are saved
807 * in \c srcrect and \c dstrect after all clipping is performed.
808 *
809 * \returns 0 if the blit is successful, otherwise it returns -1.
810 *
811 * The blit function should not be called on a locked surface.
812 *
813 * The blit semantics for surfaces with and without blending and colorkey
814 * are defined as follows:
815 * \verbatim
816 RGBA->RGB:
817 Source surface blend mode set to SDL_BLENDMODE_BLEND:
818 alpha-blend (using the source alpha-channel and per-surface alpha)
819 SDL_SRCCOLORKEY ignored.
820 Source surface blend mode set to SDL_BLENDMODE_NONE:
821 copy RGB.
822 if SDL_SRCCOLORKEY set, only copy the pixels matching the
823 RGB values of the source color key, ignoring alpha in the
824 comparison.
825
826 RGB->RGBA:
827 Source surface blend mode set to SDL_BLENDMODE_BLEND:
828 alpha-blend (using the source per-surface alpha)
829 Source surface blend mode set to SDL_BLENDMODE_NONE:
830 copy RGB, set destination alpha to source per-surface alpha value.
831 both:
832 if SDL_SRCCOLORKEY set, only copy the pixels matching the
833 source color key.
834
835 RGBA->RGBA:
836 Source surface blend mode set to SDL_BLENDMODE_BLEND:
837 alpha-blend (using the source alpha-channel and per-surface alpha)
838 SDL_SRCCOLORKEY ignored.
839 Source surface blend mode set to SDL_BLENDMODE_NONE:
840 copy all of RGBA to the destination.
841 if SDL_SRCCOLORKEY set, only copy the pixels matching the
842 RGB values of the source color key, ignoring alpha in the
843 comparison.
844
845 RGB->RGB:
846 Source surface blend mode set to SDL_BLENDMODE_BLEND:
847 alpha-blend (using the source per-surface alpha)
848 Source surface blend mode set to SDL_BLENDMODE_NONE:
849 copy RGB.
850 both:
851 if SDL_SRCCOLORKEY set, only copy the pixels matching the
852 source color key.
853 \endverbatim
854 *
855 * You should call SDL_BlitSurface() unless you know exactly how SDL
856 * blitting works internally and how to use the other blit functions.
857 */
858 #define SDL_BlitSurface SDL_UpperBlit
859
860 /**
861 * Perform a fast blit from the source surface to the destination surface.
862 *
863 * SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
864 * macro for this function with a less confusing name.
865 *
866 * \since This function is available since SDL 2.0.0.
867 *
868 * \sa SDL_BlitSurface
869 */
870 extern DECLSPEC int SDLCALL SDL_UpperBlit
871 (SDL_Surface * src, const SDL_Rect * srcrect,
872 SDL_Surface * dst, SDL_Rect * dstrect);
873
874 /**
875 * Perform low-level surface blitting only.
876 *
877 * This is a semi-private blit function and it performs low-level surface
878 * blitting, assuming the input rectangles have already been clipped.
879 *
880 * Unless you know what you're doing, you should be using SDL_BlitSurface()
881 * instead.
882 *
883 * \param src the SDL_Surface structure to be copied from
884 * \param srcrect the SDL_Rect structure representing the rectangle to be
885 * copied, or NULL to copy the entire surface
886 * \param dst the SDL_Surface structure that is the blit target
887 * \param dstrect the SDL_Rect structure representing the rectangle that is
888 * copied into
889 * \returns 0 on success or a negative error code on failure; call
890 * SDL_GetError() for more information.
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_BlitSurface
895 */
896 extern DECLSPEC int SDLCALL SDL_LowerBlit
897 (SDL_Surface * src, SDL_Rect * srcrect,
898 SDL_Surface * dst, SDL_Rect * dstrect);
899
900
901 /**
902 * Perform a fast, low quality, stretch blit between two surfaces of the same
903 * format.
904 *
905 * Please use SDL_BlitScaled() instead.
906 *
907 * \since This function is available since SDL 2.0.0.
908 */
909 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
910 const SDL_Rect * srcrect,
911 SDL_Surface * dst,
912 const SDL_Rect * dstrect);
913
914 /**
915 * Perform bilinear scaling between two surfaces of the same format, 32BPP.
916 *
917 * \since This function is available since SDL 2.0.16.
918 */
919 extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
920 const SDL_Rect * srcrect,
921 SDL_Surface * dst,
922 const SDL_Rect * dstrect);
923
924
925 #define SDL_BlitScaled SDL_UpperBlitScaled
926
927 /**
928 * Perform a scaled surface copy to a destination surface.
929 *
930 * SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
931 * merely a macro for this function with a less confusing name.
932 *
933 * \since This function is available since SDL 2.0.0.
934 *
935 * \sa SDL_BlitScaled
936 */
937 extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
938 (SDL_Surface * src, const SDL_Rect * srcrect,
939 SDL_Surface * dst, SDL_Rect * dstrect);
940
941 /**
942 * Perform low-level surface scaled blitting only.
943 *
944 * This is a semi-private function and it performs low-level surface blitting,
945 * assuming the input rectangles have already been clipped.
946 *
947 * \param src the SDL_Surface structure to be copied from
948 * \param srcrect the SDL_Rect structure representing the rectangle to be
949 * copied
950 * \param dst the SDL_Surface structure that is the blit target
951 * \param dstrect the SDL_Rect structure representing the rectangle that is
952 * copied into
953 * \returns 0 on success or a negative error code on failure; call
954 * SDL_GetError() for more information.
955 *
956 * \since This function is available since SDL 2.0.0.
957 *
958 * \sa SDL_BlitScaled
959 */
960 extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
961 (SDL_Surface * src, SDL_Rect * srcrect,
962 SDL_Surface * dst, SDL_Rect * dstrect);
963
964 /**
965 * Set the YUV conversion mode
966 *
967 * \since This function is available since SDL 2.0.8.
968 */
969 extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
970
971 /**
972 * Get the YUV conversion mode
973 *
974 * \since This function is available since SDL 2.0.8.
975 */
976 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
977
978 /**
979 * Get the YUV conversion mode, returning the correct mode for the resolution
980 * when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
981 *
982 * \since This function is available since SDL 2.0.8.
983 */
984 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
985
986 /* Ends C function definitions when using C++ */
987 #ifdef __cplusplus
988 }
989 #endif
990 #include <SDL2/close_code.h>
991
992 #endif /* SDL_surface_h_ */
993
994 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_system.h
23 *
24 * Include file for platform specific SDL API functions
25 */
26
27 #ifndef SDL_system_h_
28 #define SDL_system_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_keyboard.h>
32 #include <SDL2/SDL_render.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42 /* Platform specific functions for Windows */
43 #ifdef __WIN32__
44
45 typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
46
47 /**
48 * Set a callback for every Windows message, run before TranslateMessage().
49 *
50 * \param callback The SDL_WindowsMessageHook function to call.
51 * \param userdata a pointer to pass to every iteration of `callback`
52 *
53 * \since This function is available since SDL 2.0.4.
54 */
55 extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
56
57 /**
58 * Get the D3D9 adapter index that matches the specified display index.
59 *
60 * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
61 * controls on which monitor a full screen application will appear.
62 *
63 * \param displayIndex the display index for which to get the D3D9 adapter
64 * index
65 * \returns the D3D9 adapter index on success or a negative error code on
66 * failure; call SDL_GetError() for more information.
67 *
68 * \since This function is available since SDL 2.0.1.
69 */
70 extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
71
72 typedef struct IDirect3DDevice9 IDirect3DDevice9;
73
74 /**
75 * Get the D3D9 device associated with a renderer.
76 *
77 * Once you are done using the device, you should release it to avoid a
78 * resource leak.
79 *
80 * \param renderer the renderer from which to get the associated D3D device
81 * \returns the D3D9 device associated with given renderer or NULL if it is
82 * not a D3D9 renderer; call SDL_GetError() for more information.
83 *
84 * \since This function is available since SDL 2.0.1.
85 */
86 extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
87
88 typedef struct ID3D11Device ID3D11Device;
89
90 /**
91 * Get the D3D11 device associated with a renderer.
92 *
93 * Once you are done using the device, you should release it to avoid a
94 * resource leak.
95 *
96 * \param renderer the renderer from which to get the associated D3D11 device
97 * \returns the D3D11 device associated with given renderer or NULL if it is
98 * not a D3D11 renderer; call SDL_GetError() for more information.
99 *
100 * \since This function is available since SDL 2.0.16.
101 */
102 extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
103
104 /**
105 * Get the DXGI Adapter and Output indices for the specified display index.
106 *
107 * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
108 * `EnumOutputs` respectively to get the objects required to create a DX10 or
109 * DX11 device and swap chain.
110 *
111 * Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it
112 * returns an SDL_bool.
113 *
114 * \param displayIndex the display index for which to get both indices
115 * \param adapterIndex a pointer to be filled in with the adapter index
116 * \param outputIndex a pointer to be filled in with the output index
117 * \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
118 * for more information.
119 *
120 * \since This function is available since SDL 2.0.2.
121 */
122 extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
123
124 #endif /* __WIN32__ */
125
126
127 /* Platform specific functions for Linux */
128 #ifdef __LINUX__
129
130 /**
131 * Sets the UNIX nice value for a thread.
132 *
133 * This uses setpriority() if possible, and RealtimeKit if available.
134 *
135 * \param threadID the Unix thread ID to change priority of.
136 * \param priority The new, Unix-specific, priority value.
137 * \returns 0 on success, or -1 on error.
138 *
139 * \since This function is available since SDL 2.0.9.
140 */
141 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
142
143 /**
144 * Sets the priority (not nice level) and scheduling policy for a thread.
145 *
146 * This uses setpriority() if possible, and RealtimeKit if available.
147 *
148 * \param threadID The Unix thread ID to change priority of.
149 * \param sdlPriority The new SDL_ThreadPriority value.
150 * \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR,
151 * SCHED_OTHER, etc...)
152 * \returns 0 on success, or -1 on error.
153 *
154 * \since This function is available since SDL 2.0.18.
155 */
156 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
157
158 #endif /* __LINUX__ */
159
160 /* Platform specific functions for iOS */
161 #ifdef __IPHONEOS__
162
163 #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
164
165 /**
166 * Use this function to set the animation callback on Apple iOS.
167 *
168 * The function prototype for `callback` is:
169 *
170 * ```c
171 * void callback(void* callbackParam);
172 * ```
173 *
174 * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
175 * to SDL_iPhoneSetAnimationCallback().
176 *
177 * This function is only available on Apple iOS.
178 *
179 * For more information see:
180 * [README-ios.md](https://hg.libsdl.org/SDL/file/default/docs/README-ios.md)
181 *
182 * This functions is also accessible using the macro
183 * SDL_iOSSetAnimationCallback() since SDL 2.0.4.
184 *
185 * \param window the window for which the animation callback should be set
186 * \param interval the number of frames after which **callback** will be
187 * called
188 * \param callback the function to call for every frame.
189 * \param callbackParam a pointer that is passed to `callback`.
190 * \returns 0 on success or a negative error code on failure; call
191 * SDL_GetError() for more information.
192 *
193 * \since This function is available since SDL 2.0.0.
194 *
195 * \sa SDL_iPhoneSetEventPump
196 */
197 extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
198
199 #define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
200
201 /**
202 * Use this function to enable or disable the SDL event pump on Apple iOS.
203 *
204 * This function is only available on Apple iOS.
205 *
206 * This functions is also accessible using the macro SDL_iOSSetEventPump()
207 * since SDL 2.0.4.
208 *
209 * \param enabled SDL_TRUE to enable the event pump, SDL_FALSE to disable it
210 *
211 * \since This function is available since SDL 2.0.0.
212 *
213 * \sa SDL_iPhoneSetAnimationCallback
214 */
215 extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
216
217 #endif /* __IPHONEOS__ */
218
219
220 /* Platform specific functions for Android */
221 #ifdef __ANDROID__
222
223 /**
224 * Get the Android Java Native Interface Environment of the current thread.
225 *
226 * This is the JNIEnv one needs to access the Java virtual machine from native
227 * code, and is needed for many Android APIs to be usable from C.
228 *
229 * The prototype of the function in SDL's code actually declare a void* return
230 * type, even if the implementation returns a pointer to a JNIEnv. The
231 * rationale being that the SDL headers can avoid including jni.h.
232 *
233 * \returns a pointer to Java native interface object (JNIEnv) to which the
234 * current thread is attached, or 0 on error.
235 *
236 * \since This function is available since SDL 2.0.0.
237 *
238 * \sa SDL_AndroidGetActivity
239 */
240 extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
241
242 /**
243 * Retrieve the Java instance of the Android activity class.
244 *
245 * The prototype of the function in SDL's code actually declares a void*
246 * return type, even if the implementation returns a jobject. The rationale
247 * being that the SDL headers can avoid including jni.h.
248 *
249 * The jobject returned by the function is a local reference and must be
250 * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
251 * DeleteLocalRef() functions of the Java native interface:
252 *
253 * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
254 *
255 * \returns the jobject representing the instance of the Activity class of the
256 * Android application, or NULL on error.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_AndroidGetJNIEnv
261 */
262 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
263
264 /**
265 * Query Android API level of the current device.
266 *
267 * - API level 31: Android 12
268 * - API level 30: Android 11
269 * - API level 29: Android 10
270 * - API level 28: Android 9
271 * - API level 27: Android 8.1
272 * - API level 26: Android 8.0
273 * - API level 25: Android 7.1
274 * - API level 24: Android 7.0
275 * - API level 23: Android 6.0
276 * - API level 22: Android 5.1
277 * - API level 21: Android 5.0
278 * - API level 20: Android 4.4W
279 * - API level 19: Android 4.4
280 * - API level 18: Android 4.3
281 * - API level 17: Android 4.2
282 * - API level 16: Android 4.1
283 * - API level 15: Android 4.0.3
284 * - API level 14: Android 4.0
285 * - API level 13: Android 3.2
286 * - API level 12: Android 3.1
287 * - API level 11: Android 3.0
288 * - API level 10: Android 2.3.3
289 *
290 * \returns the Android API level.
291 *
292 * \since This function is available since SDL 2.0.12.
293 */
294 extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
295
296 /**
297 * Query if the application is running on Android TV.
298 *
299 * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
300 *
301 * \since This function is available since SDL 2.0.8.
302 */
303 extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
304
305 /**
306 * Query if the application is running on a Chromebook.
307 *
308 * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
309 *
310 * \since This function is available since SDL 2.0.9.
311 */
312 extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
313
314 /**
315 * Query if the application is running on a Samsung DeX docking station.
316 *
317 * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
318 *
319 * \since This function is available since SDL 2.0.9.
320 */
321 extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
322
323 /**
324 * Trigger the Android system back button behavior.
325 *
326 * \since This function is available since SDL 2.0.9.
327 */
328 extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
329
330 /**
331 See the official Android developer guide for more information:
332 http://developer.android.com/guide/topics/data/data-storage.html
333 */
334 #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
335 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
336
337 /**
338 * Get the path used for internal storage for this application.
339 *
340 * This path is unique to your application and cannot be written to by other
341 * applications.
342 *
343 * Your internal storage path is typically:
344 * `/data/data/your.app.package/files`.
345 *
346 * \returns the path used for internal storage or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.0.
350 *
351 * \sa SDL_AndroidGetExternalStorageState
352 */
353 extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
354
355 /**
356 * Get the current state of external storage.
357 *
358 * The current state of external storage, a bitmask of these values:
359 * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
360 *
361 * If external storage is currently unavailable, this will return 0.
362 *
363 * \returns the current state of external storage on success or 0 on failure;
364 * call SDL_GetError() for more information.
365 *
366 * \since This function is available since SDL 2.0.0.
367 *
368 * \sa SDL_AndroidGetExternalStoragePath
369 */
370 extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
371
372 /**
373 * Get the path used for external storage for this application.
374 *
375 * This path is unique to your application, but is public and can be written
376 * to by other applications.
377 *
378 * Your external storage path is typically:
379 * `/storage/sdcard0/Android/data/your.app.package/files`.
380 *
381 * \returns the path used for external storage for this application on success
382 * or NULL on failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_AndroidGetExternalStorageState
387 */
388 extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
389
390 /**
391 * Request permissions at runtime.
392 *
393 * This blocks the calling thread until the permission is granted or denied.
394 *
395 * \param permission The permission to request.
396 * \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise.
397 *
398 * \since This function is available since SDL 2.0.14.
399 */
400 extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
401
402 /**
403 * Shows an Android toast notification.
404 *
405 * Toasts are a sort of lightweight notification that are unique to Android.
406 *
407 * https://developer.android.com/guide/topics/ui/notifiers/toasts
408 *
409 * Shows toast in UI thread.
410 *
411 * For the `gravity` parameter, choose a value from here, or -1 if you don't
412 * have a preference:
413 *
414 * https://developer.android.com/reference/android/view/Gravity
415 *
416 * \param message text message to be shown
417 * \param duration 0=short, 1=long
418 * \param gravity where the notification should appear on the screen.
419 * \param xoffset set this parameter only when gravity >=0
420 * \param yoffset set this parameter only when gravity >=0
421 * \returns 0 if success, -1 if any error occurs.
422 *
423 * \since This function is available since SDL 2.0.16.
424 */
425 extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
426
427 /**
428 * Send a user command to SDLActivity.
429 *
430 * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
431 *
432 * \param command user command that must be greater or equal to 0x8000
433 * \param param user parameter
434 *
435 * \since This function is available since SDL 2.0.22.
436 */
437 extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
438
439 #endif /* __ANDROID__ */
440
441 /* Platform specific functions for WinRT */
442 #ifdef __WINRT__
443
444 /**
445 * \brief WinRT / Windows Phone path types
446 */
447 typedef enum
448 {
449 /** \brief The installed app's root directory.
450 Files here are likely to be read-only. */
451 SDL_WINRT_PATH_INSTALLED_LOCATION,
452
453 /** \brief The app's local data store. Files may be written here */
454 SDL_WINRT_PATH_LOCAL_FOLDER,
455
456 /** \brief The app's roaming data store. Unsupported on Windows Phone.
457 Files written here may be copied to other machines via a network
458 connection.
459 */
460 SDL_WINRT_PATH_ROAMING_FOLDER,
461
462 /** \brief The app's temporary data store. Unsupported on Windows Phone.
463 Files written here may be deleted at any time. */
464 SDL_WINRT_PATH_TEMP_FOLDER
465 } SDL_WinRT_Path;
466
467
468 /**
469 * \brief WinRT Device Family
470 */
471 typedef enum
472 {
473 /** \brief Unknown family */
474 SDL_WINRT_DEVICEFAMILY_UNKNOWN,
475
476 /** \brief Desktop family*/
477 SDL_WINRT_DEVICEFAMILY_DESKTOP,
478
479 /** \brief Mobile family (for example smartphone) */
480 SDL_WINRT_DEVICEFAMILY_MOBILE,
481
482 /** \brief XBox family */
483 SDL_WINRT_DEVICEFAMILY_XBOX,
484 } SDL_WinRT_DeviceFamily;
485
486
487 /**
488 * Retrieve a WinRT defined path on the local file system.
489 *
490 * Not all paths are available on all versions of Windows. This is especially
491 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
492 * for more information on which path types are supported where.
493 *
494 * Documentation on most app-specific path types on WinRT can be found on
495 * MSDN, at the URL:
496 *
497 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
498 *
499 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
500 * \returns a UCS-2 string (16-bit, wide-char) containing the path, or NULL if
501 * the path is not available for any reason; call SDL_GetError() for
502 * more information.
503 *
504 * \since This function is available since SDL 2.0.3.
505 *
506 * \sa SDL_WinRTGetFSPathUTF8
507 */
508 extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
509
510 /**
511 * Retrieve a WinRT defined path on the local file system.
512 *
513 * Not all paths are available on all versions of Windows. This is especially
514 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
515 * for more information on which path types are supported where.
516 *
517 * Documentation on most app-specific path types on WinRT can be found on
518 * MSDN, at the URL:
519 *
520 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
521 *
522 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
523 * \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
524 * the path is not available for any reason; call SDL_GetError() for
525 * more information.
526 *
527 * \since This function is available since SDL 2.0.3.
528 *
529 * \sa SDL_WinRTGetFSPathUNICODE
530 */
531 extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
532
533 /**
534 * Detects the device family of WinRT plattform at runtime.
535 *
536 * \returns a value from the SDL_WinRT_DeviceFamily enum.
537 *
538 * \since This function is available since SDL 2.0.8.
539 */
540 extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
541
542 #endif /* __WINRT__ */
543
544 /**
545 * Query if the current device is a tablet.
546 *
547 * If SDL can't determine this, it will return SDL_FALSE.
548 *
549 * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
550 *
551 * \since This function is available since SDL 2.0.9.
552 */
553 extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
554
555 /* Functions used by iOS application delegates to notify SDL about state changes */
556 extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
557 extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
558 extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
559 extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
560 extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
561 extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
562 #ifdef __IPHONEOS__
563 extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
564 #endif
565
566 /* Ends C function definitions when using C++ */
567 #ifdef __cplusplus
568 }
569 #endif
570 #include <SDL2/close_code.h>
571
572 #endif /* SDL_system_h_ */
573
574 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_syswm.h
23 *
24 * Include file for SDL custom system window manager hooks.
25 */
26
27 #ifndef SDL_syswm_h_
28 #define SDL_syswm_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_version.h>
34
35 /**
36 * \brief SDL_syswm.h
37 *
38 * Your application has access to a special type of event ::SDL_SYSWMEVENT,
39 * which contains window-manager specific information and arrives whenever
40 * an unhandled window event occurs. This event is ignored by default, but
41 * you can enable it with SDL_EventState().
42 */
43 struct SDL_SysWMinfo;
44
45 #if !defined(SDL_PROTOTYPES_ONLY)
46
47 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
48 #ifndef WIN32_LEAN_AND_MEAN
49 #define WIN32_LEAN_AND_MEAN
50 #endif
51 #ifndef NOMINMAX /* don't define min() and max(). */
52 #define NOMINMAX
53 #endif
54 #include <windows.h>
55 #endif
56
57 #if defined(SDL_VIDEO_DRIVER_WINRT)
58 #include <Inspectable.h>
59 #endif
60
61 /* This is the structure for custom window manager events */
62 #if defined(SDL_VIDEO_DRIVER_X11)
63 #if defined(__APPLE__) && defined(__MACH__)
64 /* conflicts with Quickdraw.h */
65 #define Cursor X11Cursor
66 #endif
67
68 #include <X11/Xlib.h>
69 #include <X11/Xatom.h>
70
71 #if defined(__APPLE__) && defined(__MACH__)
72 /* matches the re-define above */
73 #undef Cursor
74 #endif
75
76 #endif /* defined(SDL_VIDEO_DRIVER_X11) */
77
78 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
79 #include <directfb.h>
80 #endif
81
82 #if defined(SDL_VIDEO_DRIVER_COCOA)
83 #ifdef __OBJC__
84 @class NSWindow;
85 #else
86 typedef struct _NSWindow NSWindow;
87 #endif
88 #endif
89
90 #if defined(SDL_VIDEO_DRIVER_UIKIT)
91 #ifdef __OBJC__
92 #include <UIKit/UIKit.h>
93 #else
94 typedef struct _UIWindow UIWindow;
95 typedef struct _UIViewController UIViewController;
96 #endif
97 typedef Uint32 GLuint;
98 #endif
99
100 #if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL)
101 #define SDL_METALVIEW_TAG 255
102 #endif
103
104 #if defined(SDL_VIDEO_DRIVER_ANDROID)
105 typedef struct ANativeWindow ANativeWindow;
106 typedef void *EGLSurface;
107 #endif
108
109 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
110 #include <SDL2/SDL_egl.h>
111 #endif
112
113 #if defined(SDL_VIDEO_DRIVER_OS2)
114 #define INCL_WIN
115 #include <os2.h>
116 #endif
117 #endif /* SDL_PROTOTYPES_ONLY */
118
119 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
120 struct gbm_device;
121 #endif
122
123
124 #include <SDL2/begin_code.h>
125 /* Set up for C function definitions, even when using C++ */
126 #ifdef __cplusplus
127 extern "C" {
128 #endif
129
130 #if !defined(SDL_PROTOTYPES_ONLY)
131 /**
132 * These are the various supported windowing subsystems
133 */
134 typedef enum
135 {
136 SDL_SYSWM_UNKNOWN,
137 SDL_SYSWM_WINDOWS,
138 SDL_SYSWM_X11,
139 SDL_SYSWM_DIRECTFB,
140 SDL_SYSWM_COCOA,
141 SDL_SYSWM_UIKIT,
142 SDL_SYSWM_WAYLAND,
143 SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
144 SDL_SYSWM_WINRT,
145 SDL_SYSWM_ANDROID,
146 SDL_SYSWM_VIVANTE,
147 SDL_SYSWM_OS2,
148 SDL_SYSWM_HAIKU,
149 SDL_SYSWM_KMSDRM,
150 SDL_SYSWM_RISCOS
151 } SDL_SYSWM_TYPE;
152
153 /**
154 * The custom event structure.
155 */
156 struct SDL_SysWMmsg
157 {
158 SDL_version version;
159 SDL_SYSWM_TYPE subsystem;
160 union
161 {
162 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
163 struct {
164 HWND hwnd; /**< The window for the message */
165 UINT msg; /**< The type of message */
166 WPARAM wParam; /**< WORD message parameter */
167 LPARAM lParam; /**< LONG message parameter */
168 } win;
169 #endif
170 #if defined(SDL_VIDEO_DRIVER_X11)
171 struct {
172 XEvent event;
173 } x11;
174 #endif
175 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
176 struct {
177 DFBEvent event;
178 } dfb;
179 #endif
180 #if defined(SDL_VIDEO_DRIVER_COCOA)
181 struct
182 {
183 /* Latest version of Xcode clang complains about empty structs in C v. C++:
184 error: empty struct has size 0 in C, size 1 in C++
185 */
186 int dummy;
187 /* No Cocoa window events yet */
188 } cocoa;
189 #endif
190 #if defined(SDL_VIDEO_DRIVER_UIKIT)
191 struct
192 {
193 int dummy;
194 /* No UIKit window events yet */
195 } uikit;
196 #endif
197 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
198 struct
199 {
200 int dummy;
201 /* No Vivante window events yet */
202 } vivante;
203 #endif
204 #if defined(SDL_VIDEO_DRIVER_OS2)
205 struct
206 {
207 BOOL fFrame; /**< TRUE if hwnd is a frame window */
208 HWND hwnd; /**< The window receiving the message */
209 ULONG msg; /**< The message identifier */
210 MPARAM mp1; /**< The first first message parameter */
211 MPARAM mp2; /**< The second first message parameter */
212 } os2;
213 #endif
214 /* Can't have an empty union */
215 int dummy;
216 } msg;
217 };
218
219 /**
220 * The custom window manager information structure.
221 *
222 * When this structure is returned, it holds information about which
223 * low level system it is using, and will be one of SDL_SYSWM_TYPE.
224 */
225 struct SDL_SysWMinfo
226 {
227 SDL_version version;
228 SDL_SYSWM_TYPE subsystem;
229 union
230 {
231 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
232 struct
233 {
234 HWND window; /**< The window handle */
235 HDC hdc; /**< The window device context */
236 HINSTANCE hinstance; /**< The instance handle */
237 } win;
238 #endif
239 #if defined(SDL_VIDEO_DRIVER_WINRT)
240 struct
241 {
242 IInspectable * window; /**< The WinRT CoreWindow */
243 } winrt;
244 #endif
245 #if defined(SDL_VIDEO_DRIVER_X11)
246 struct
247 {
248 Display *display; /**< The X11 display */
249 Window window; /**< The X11 window */
250 } x11;
251 #endif
252 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
253 struct
254 {
255 IDirectFB *dfb; /**< The directfb main interface */
256 IDirectFBWindow *window; /**< The directfb window handle */
257 IDirectFBSurface *surface; /**< The directfb client surface */
258 } dfb;
259 #endif
260 #if defined(SDL_VIDEO_DRIVER_COCOA)
261 struct
262 {
263 #if defined(__OBJC__) && defined(__has_feature)
264 #if __has_feature(objc_arc)
265 NSWindow __unsafe_unretained *window; /**< The Cocoa window */
266 #else
267 NSWindow *window; /**< The Cocoa window */
268 #endif
269 #else
270 NSWindow *window; /**< The Cocoa window */
271 #endif
272 } cocoa;
273 #endif
274 #if defined(SDL_VIDEO_DRIVER_UIKIT)
275 struct
276 {
277 #if defined(__OBJC__) && defined(__has_feature)
278 #if __has_feature(objc_arc)
279 UIWindow __unsafe_unretained *window; /**< The UIKit window */
280 #else
281 UIWindow *window; /**< The UIKit window */
282 #endif
283 #else
284 UIWindow *window; /**< The UIKit window */
285 #endif
286 GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
287 GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
288 GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
289 } uikit;
290 #endif
291 #if defined(SDL_VIDEO_DRIVER_WAYLAND)
292 struct
293 {
294 struct wl_display *display; /**< Wayland display */
295 struct wl_surface *surface; /**< Wayland surface */
296 void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */
297 struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
298 struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
299 struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */
300 struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */
301 struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */
302 } wl;
303 #endif
304 #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
305 struct
306 {
307 void *connection; /**< Mir display server connection */
308 void *surface; /**< Mir surface */
309 } mir;
310 #endif
311
312 #if defined(SDL_VIDEO_DRIVER_ANDROID)
313 struct
314 {
315 ANativeWindow *window;
316 EGLSurface surface;
317 } android;
318 #endif
319
320 #if defined(SDL_VIDEO_DRIVER_OS2)
321 struct
322 {
323 HWND hwnd; /**< The window handle */
324 HWND hwndFrame; /**< The frame window handle */
325 } os2;
326 #endif
327
328 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
329 struct
330 {
331 EGLNativeDisplayType display;
332 EGLNativeWindowType window;
333 } vivante;
334 #endif
335
336 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
337 struct
338 {
339 int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */
340 int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */
341 struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */
342 } kmsdrm;
343 #endif
344
345 /* Make sure this union is always 64 bytes (8 64-bit pointers). */
346 /* Be careful not to overflow this if you add a new target! */
347 Uint8 dummy[64];
348 } info;
349 };
350
351 #endif /* SDL_PROTOTYPES_ONLY */
352
353 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
354
355
356 /**
357 * Get driver-specific information about a window.
358 *
359 * You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.
360 *
361 * The caller must initialize the `info` structure's version by using
362 * `SDL_VERSION(&info.version)`, and then this function will fill in the rest
363 * of the structure with information about the given window.
364 *
365 * \param window the window about which information is being requested
366 * \param info an SDL_SysWMinfo structure filled in with window information
367 * \returns SDL_TRUE if the function is implemented and the `version` member
368 * of the `info` struct is valid, or SDL_FALSE if the information
369 * could not be retrieved; call SDL_GetError() for more information.
370 *
371 * \since This function is available since SDL 2.0.0.
372 */
373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
374 SDL_SysWMinfo * info);
375
376
377 /* Ends C function definitions when using C++ */
378 #ifdef __cplusplus
379 }
380 #endif
381 #include <SDL2/close_code.h>
382
383 #endif /* SDL_syswm_h_ */
384
385 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_thread_h_
22 #define SDL_thread_h_
23
24 /**
25 * \file SDL_thread.h
26 *
27 * Header for the SDL thread management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /* Thread synchronization primitives */
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_mutex.h>
36
37 #if defined(__WIN32__)
38 #include <process.h> /* _beginthreadex() and _endthreadex() */
39 #endif
40 #if defined(__OS2__) /* for _beginthread() and _endthread() */
41 #ifndef __EMX__
42 #include <process.h>
43 #else
44 #include <stdlib.h>
45 #endif
46 #endif
47
48 #include <SDL2/begin_code.h>
49 /* Set up for C function definitions, even when using C++ */
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 /* The SDL thread structure, defined in SDL_thread.c */
55 struct SDL_Thread;
56 typedef struct SDL_Thread SDL_Thread;
57
58 /* The SDL thread ID */
59 typedef unsigned long SDL_threadID;
60
61 /* Thread local storage ID, 0 is the invalid ID */
62 typedef unsigned int SDL_TLSID;
63
64 /**
65 * The SDL thread priority.
66 *
67 * SDL will make system changes as necessary in order to apply the thread priority.
68 * Code which attempts to control thread state related to priority should be aware
69 * that calling SDL_SetThreadPriority may alter such state.
70 * SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
71 *
72 * \note On many systems you require special privileges to set high or time critical priority.
73 */
74 typedef enum {
75 SDL_THREAD_PRIORITY_LOW,
76 SDL_THREAD_PRIORITY_NORMAL,
77 SDL_THREAD_PRIORITY_HIGH,
78 SDL_THREAD_PRIORITY_TIME_CRITICAL
79 } SDL_ThreadPriority;
80
81 /**
82 * The function passed to SDL_CreateThread().
83 *
84 * \param data what was passed as `data` to SDL_CreateThread()
85 * \returns a value that can be reported through SDL_WaitThread().
86 */
87 typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
88
89
90 #if defined(__WIN32__)
91 /**
92 * \file SDL_thread.h
93 *
94 * We compile SDL into a DLL. This means, that it's the DLL which
95 * creates a new thread for the calling process with the SDL_CreateThread()
96 * API. There is a problem with this, that only the RTL of the SDL2.DLL will
97 * be initialized for those threads, and not the RTL of the calling
98 * application!
99 *
100 * To solve this, we make a little hack here.
101 *
102 * We'll always use the caller's _beginthread() and _endthread() APIs to
103 * start a new thread. This way, if it's the SDL2.DLL which uses this API,
104 * then the RTL of SDL2.DLL will be used to create the new thread, and if it's
105 * the application, then the RTL of the application will be used.
106 *
107 * So, in short:
108 * Always use the _beginthread() and _endthread() of the calling runtime
109 * library!
110 */
111 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
112
113 typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
114 (void *, unsigned, unsigned (__stdcall *func)(void *),
115 void * /*arg*/, unsigned, unsigned * /* threadID */);
116 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
117
118 #ifndef SDL_beginthread
119 #define SDL_beginthread _beginthreadex
120 #endif
121 #ifndef SDL_endthread
122 #define SDL_endthread _endthreadex
123 #endif
124
125 extern DECLSPEC SDL_Thread *SDLCALL
126 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
127 pfnSDL_CurrentBeginThread pfnBeginThread,
128 pfnSDL_CurrentEndThread pfnEndThread);
129
130 extern DECLSPEC SDL_Thread *SDLCALL
131 SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
132 const char *name, const size_t stacksize, void *data,
133 pfnSDL_CurrentBeginThread pfnBeginThread,
134 pfnSDL_CurrentEndThread pfnEndThread);
135
136
137 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
138 #undef SDL_CreateThread
139 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
140 #undef SDL_CreateThreadWithStackSize
141 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
142 #else
143 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
144 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
145 #endif
146
147 #elif defined(__OS2__)
148 /*
149 * just like the windows case above: We compile SDL2
150 * into a dll with Watcom's runtime statically linked.
151 */
152 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
153
154 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
155 typedef void (*pfnSDL_CurrentEndThread)(void);
156
157 #ifndef SDL_beginthread
158 #define SDL_beginthread _beginthread
159 #endif
160 #ifndef SDL_endthread
161 #define SDL_endthread _endthread
162 #endif
163
164 extern DECLSPEC SDL_Thread *SDLCALL
165 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
166 pfnSDL_CurrentBeginThread pfnBeginThread,
167 pfnSDL_CurrentEndThread pfnEndThread);
168 extern DECLSPEC SDL_Thread *SDLCALL
169 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
170 pfnSDL_CurrentBeginThread pfnBeginThread,
171 pfnSDL_CurrentEndThread pfnEndThread);
172
173 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
174 #undef SDL_CreateThread
175 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
176 #undef SDL_CreateThreadWithStackSize
177 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
178 #else
179 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
180 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
181 #endif
182
183 #else
184
185 /**
186 * Create a new thread with a default stack size.
187 *
188 * This is equivalent to calling:
189 *
190 * ```c
191 * SDL_CreateThreadWithStackSize(fn, name, 0, data);
192 * ```
193 *
194 * \param fn the SDL_ThreadFunction function to call in the new thread
195 * \param name the name of the thread
196 * \param data a pointer that is passed to `fn`
197 * \returns an opaque pointer to the new thread object on success, NULL if the
198 * new thread could not be created; call SDL_GetError() for more
199 * information.
200 *
201 * \since This function is available since SDL 2.0.0.
202 *
203 * \sa SDL_CreateThreadWithStackSize
204 * \sa SDL_WaitThread
205 */
206 extern DECLSPEC SDL_Thread *SDLCALL
207 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
208
209 /**
210 * Create a new thread with a specific stack size.
211 *
212 * SDL makes an attempt to report `name` to the system, so that debuggers can
213 * display it. Not all platforms support this.
214 *
215 * Thread naming is a little complicated: Most systems have very small limits
216 * for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
217 * C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
218 * see what happens with your system's debugger. The name should be UTF-8 (but
219 * using the naming limits of C identifiers is a better bet). There are no
220 * requirements for thread naming conventions, so long as the string is
221 * null-terminated UTF-8, but these guidelines are helpful in choosing a name:
222 *
223 * https://stackoverflow.com/questions/149932/naming-conventions-for-threads
224 *
225 * If a system imposes requirements, SDL will try to munge the string for it
226 * (truncate, etc), but the original string contents will be available from
227 * SDL_GetThreadName().
228 *
229 * The size (in bytes) of the new stack can be specified. Zero means "use the
230 * system default" which might be wildly different between platforms. x86
231 * Linux generally defaults to eight megabytes, an embedded device might be a
232 * few kilobytes instead. You generally need to specify a stack that is a
233 * multiple of the system's page size (in many cases, this is 4 kilobytes, but
234 * check your system documentation).
235 *
236 * In SDL 2.1, stack size will be folded into the original SDL_CreateThread
237 * function, but for backwards compatibility, this is currently a separate
238 * function.
239 *
240 * \param fn the SDL_ThreadFunction function to call in the new thread
241 * \param name the name of the thread
242 * \param stacksize the size, in bytes, to allocate for the new thread stack.
243 * \param data a pointer that is passed to `fn`
244 * \returns an opaque pointer to the new thread object on success, NULL if the
245 * new thread could not be created; call SDL_GetError() for more
246 * information.
247 *
248 * \since This function is available since SDL 2.0.9.
249 *
250 * \sa SDL_WaitThread
251 */
252 extern DECLSPEC SDL_Thread *SDLCALL
253 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
254
255 #endif
256
257 /**
258 * Get the thread name as it was specified in SDL_CreateThread().
259 *
260 * This is internal memory, not to be freed by the caller, and remains valid
261 * until the specified thread is cleaned up by SDL_WaitThread().
262 *
263 * \param thread the thread to query
264 * \returns a pointer to a UTF-8 string that names the specified thread, or
265 * NULL if it doesn't have a name.
266 *
267 * \since This function is available since SDL 2.0.0.
268 *
269 * \sa SDL_CreateThread
270 */
271 extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
272
273 /**
274 * Get the thread identifier for the current thread.
275 *
276 * This thread identifier is as reported by the underlying operating system.
277 * If SDL is running on a platform that does not support threads the return
278 * value will always be zero.
279 *
280 * This function also returns a valid thread ID when called from the main
281 * thread.
282 *
283 * \returns the ID of the current thread.
284 *
285 * \since This function is available since SDL 2.0.0.
286 *
287 * \sa SDL_GetThreadID
288 */
289 extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
290
291 /**
292 * Get the thread identifier for the specified thread.
293 *
294 * This thread identifier is as reported by the underlying operating system.
295 * If SDL is running on a platform that does not support threads the return
296 * value will always be zero.
297 *
298 * \param thread the thread to query
299 * \returns the ID of the specified thread, or the ID of the current thread if
300 * `thread` is NULL.
301 *
302 * \since This function is available since SDL 2.0.0.
303 *
304 * \sa SDL_ThreadID
305 */
306 extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
307
308 /**
309 * Set the priority for the current thread.
310 *
311 * Note that some platforms will not let you alter the priority (or at least,
312 * promote the thread to a higher priority) at all, and some require you to be
313 * an administrator account. Be prepared for this to fail.
314 *
315 * \param priority the SDL_ThreadPriority to set
316 * \returns 0 on success or a negative error code on failure; call
317 * SDL_GetError() for more information.
318 *
319 * \since This function is available since SDL 2.0.0.
320 */
321 extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
322
323 /**
324 * Wait for a thread to finish.
325 *
326 * Threads that haven't been detached will remain (as a "zombie") until this
327 * function cleans them up. Not doing so is a resource leak.
328 *
329 * Once a thread has been cleaned up through this function, the SDL_Thread
330 * that references it becomes invalid and should not be referenced again. As
331 * such, only one thread may call SDL_WaitThread() on another.
332 *
333 * The return code for the thread function is placed in the area pointed to by
334 * `status`, if `status` is not NULL.
335 *
336 * You may not wait on a thread that has been used in a call to
337 * SDL_DetachThread(). Use either that function or this one, but not both, or
338 * behavior is undefined.
339 *
340 * It is safe to pass a NULL thread to this function; it is a no-op.
341 *
342 * Note that the thread pointer is freed by this function and is not valid
343 * afterward.
344 *
345 * \param thread the SDL_Thread pointer that was returned from the
346 * SDL_CreateThread() call that started this thread
347 * \param status pointer to an integer that will receive the value returned
348 * from the thread function by its 'return', or NULL to not
349 * receive such value back.
350 *
351 * \since This function is available since SDL 2.0.0.
352 *
353 * \sa SDL_CreateThread
354 * \sa SDL_DetachThread
355 */
356 extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
357
358 /**
359 * Let a thread clean up on exit without intervention.
360 *
361 * A thread may be "detached" to signify that it should not remain until
362 * another thread has called SDL_WaitThread() on it. Detaching a thread is
363 * useful for long-running threads that nothing needs to synchronize with or
364 * further manage. When a detached thread is done, it simply goes away.
365 *
366 * There is no way to recover the return code of a detached thread. If you
367 * need this, don't detach the thread and instead use SDL_WaitThread().
368 *
369 * Once a thread is detached, you should usually assume the SDL_Thread isn't
370 * safe to reference again, as it will become invalid immediately upon the
371 * detached thread's exit, instead of remaining until someone has called
372 * SDL_WaitThread() to finally clean it up. As such, don't detach the same
373 * thread more than once.
374 *
375 * If a thread has already exited when passed to SDL_DetachThread(), it will
376 * stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
377 * not safe to detach a thread that might be used with SDL_WaitThread().
378 *
379 * You may not call SDL_WaitThread() on a thread that has been detached. Use
380 * either that function or this one, but not both, or behavior is undefined.
381 *
382 * It is safe to pass NULL to this function; it is a no-op.
383 *
384 * \param thread the SDL_Thread pointer that was returned from the
385 * SDL_CreateThread() call that started this thread
386 *
387 * \since This function is available since SDL 2.0.2.
388 *
389 * \sa SDL_CreateThread
390 * \sa SDL_WaitThread
391 */
392 extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
393
394 /**
395 * Create a piece of thread-local storage.
396 *
397 * This creates an identifier that is globally visible to all threads but
398 * refers to data that is thread-specific.
399 *
400 * \returns the newly created thread local storage identifier or 0 on error.
401 *
402 * \since This function is available since SDL 2.0.0.
403 *
404 * \sa SDL_TLSGet
405 * \sa SDL_TLSSet
406 */
407 extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
408
409 /**
410 * Get the current thread's value associated with a thread local storage ID.
411 *
412 * \param id the thread local storage ID
413 * \returns the value associated with the ID for the current thread or NULL if
414 * no value has been set; call SDL_GetError() for more information.
415 *
416 * \since This function is available since SDL 2.0.0.
417 *
418 * \sa SDL_TLSCreate
419 * \sa SDL_TLSSet
420 */
421 extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
422
423 /**
424 * Set the current thread's value associated with a thread local storage ID.
425 *
426 * The function prototype for `destructor` is:
427 *
428 * ```c
429 * void destructor(void *value)
430 * ```
431 *
432 * where its parameter `value` is what was passed as `value` to SDL_TLSSet().
433 *
434 * \param id the thread local storage ID
435 * \param value the value to associate with the ID for the current thread
436 * \param destructor a function called when the thread exits, to free the
437 * value
438 * \returns 0 on success or a negative error code on failure; call
439 * SDL_GetError() for more information.
440 *
441 * \since This function is available since SDL 2.0.0.
442 *
443 * \sa SDL_TLSCreate
444 * \sa SDL_TLSGet
445 */
446 extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
447
448 /**
449 * Cleanup all TLS data for this thread.
450 *
451 * \since This function is available since SDL 2.0.16.
452 */
453 extern DECLSPEC void SDLCALL SDL_TLSCleanup(void);
454
455 /* Ends C function definitions when using C++ */
456 #ifdef __cplusplus
457 }
458 #endif
459 #include <SDL2/close_code.h>
460
461 #endif /* SDL_thread_h_ */
462
463 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_timer_h_
22 #define SDL_timer_h_
23
24 /**
25 * \file SDL_timer.h
26 *
27 * Header for the SDL time management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the number of milliseconds since SDL library initialization.
41 *
42 * This value wraps if the program runs for more than ~49 days.
43 *
44 * This function is not recommended as of SDL 2.0.18; use SDL_GetTicks64()
45 * instead, where the value doesn't wrap every ~49 days. There are places in
46 * SDL where we provide a 32-bit timestamp that can not change without
47 * breaking binary compatibility, though, so this function isn't officially
48 * deprecated.
49 *
50 * \returns an unsigned 32-bit value representing the number of milliseconds
51 * since the SDL library initialized.
52 *
53 * \since This function is available since SDL 2.0.0.
54 *
55 * \sa SDL_TICKS_PASSED
56 */
57 extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
58
59 /**
60 * Get the number of milliseconds since SDL library initialization.
61 *
62 * Note that you should not use the SDL_TICKS_PASSED macro with values
63 * returned by this function, as that macro does clever math to compensate for
64 * the 32-bit overflow every ~49 days that SDL_GetTicks() suffers from. 64-bit
65 * values from this function can be safely compared directly.
66 *
67 * For example, if you want to wait 100 ms, you could do this:
68 *
69 * ```c
70 * const Uint64 timeout = SDL_GetTicks64() + 100;
71 * while (SDL_GetTicks64() < timeout) {
72 * // ... do work until timeout has elapsed
73 * }
74 * ```
75 *
76 * \returns an unsigned 64-bit value representing the number of milliseconds
77 * since the SDL library initialized.
78 *
79 * \since This function is available since SDL 2.0.18.
80 */
81 extern DECLSPEC Uint64 SDLCALL SDL_GetTicks64(void);
82
83 /**
84 * Compare 32-bit SDL ticks values, and return true if `A` has passed `B`.
85 *
86 * This should be used with results from SDL_GetTicks(), as this macro
87 * attempts to deal with the 32-bit counter wrapping back to zero every ~49
88 * days, but should _not_ be used with SDL_GetTicks64(), which does not have
89 * that problem.
90 *
91 * For example, with SDL_GetTicks(), if you want to wait 100 ms, you could
92 * do this:
93 *
94 * ```c
95 * const Uint32 timeout = SDL_GetTicks() + 100;
96 * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
97 * // ... do work until timeout has elapsed
98 * }
99 * ```
100 *
101 * Note that this does not handle tick differences greater
102 * than 2^31 so take care when using the above kind of code
103 * with large timeout delays (tens of days).
104 */
105 #define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0)
106
107 /**
108 * Get the current value of the high resolution counter.
109 *
110 * This function is typically used for profiling.
111 *
112 * The counter values are only meaningful relative to each other. Differences
113 * between values can be converted to times by using
114 * SDL_GetPerformanceFrequency().
115 *
116 * \returns the current counter value.
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_GetPerformanceFrequency
121 */
122 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
123
124 /**
125 * Get the count per second of the high resolution counter.
126 *
127 * \returns a platform-specific count per second.
128 *
129 * \since This function is available since SDL 2.0.0.
130 *
131 * \sa SDL_GetPerformanceCounter
132 */
133 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
134
135 /**
136 * Wait a specified number of milliseconds before returning.
137 *
138 * This function waits a specified number of milliseconds before returning. It
139 * waits at least the specified time, but possibly longer due to OS
140 * scheduling.
141 *
142 * \param ms the number of milliseconds to delay
143 *
144 * \since This function is available since SDL 2.0.0.
145 */
146 extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
147
148 /**
149 * Function prototype for the timer callback function.
150 *
151 * The callback function is passed the current timer interval and returns
152 * the next timer interval. If the returned value is the same as the one
153 * passed in, the periodic alarm continues, otherwise a new alarm is
154 * scheduled. If the callback returns 0, the periodic alarm is cancelled.
155 */
156 typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);
157
158 /**
159 * Definition of the timer ID type.
160 */
161 typedef int SDL_TimerID;
162
163 /**
164 * Call a callback function at a future time.
165 *
166 * If you use this function, you must pass `SDL_INIT_TIMER` to SDL_Init().
167 *
168 * The callback function is passed the current timer interval and the user
169 * supplied parameter from the SDL_AddTimer() call and should return the next
170 * timer interval. If the value returned from the callback is 0, the timer is
171 * canceled.
172 *
173 * The callback is run on a separate thread.
174 *
175 * Timers take into account the amount of time it took to execute the
176 * callback. For example, if the callback took 250 ms to execute and returned
177 * 1000 (ms), the timer would only wait another 750 ms before its next
178 * iteration.
179 *
180 * Timing may be inexact due to OS scheduling. Be sure to note the current
181 * time with SDL_GetTicks() or SDL_GetPerformanceCounter() in case your
182 * callback needs to adjust for variances.
183 *
184 * \param interval the timer delay, in milliseconds, passed to `callback`
185 * \param callback the SDL_TimerCallback function to call when the specified
186 * `interval` elapses
187 * \param param a pointer that is passed to `callback`
188 * \returns a timer ID or 0 if an error occurs; call SDL_GetError() for more
189 * information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_RemoveTimer
194 */
195 extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
196 SDL_TimerCallback callback,
197 void *param);
198
199 /**
200 * Remove a timer created with SDL_AddTimer().
201 *
202 * \param id the ID of the timer to remove
203 * \returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't
204 * found.
205 *
206 * \since This function is available since SDL 2.0.0.
207 *
208 * \sa SDL_AddTimer
209 */
210 extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
211
212
213 /* Ends C function definitions when using C++ */
214 #ifdef __cplusplus
215 }
216 #endif
217 #include <SDL2/close_code.h>
218
219 #endif /* SDL_timer_h_ */
220
221 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_touch.h
23 *
24 * Include file for SDL touch event handling.
25 */
26
27 #ifndef SDL_touch_h_
28 #define SDL_touch_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef Sint64 SDL_TouchID;
41 typedef Sint64 SDL_FingerID;
42
43 typedef enum
44 {
45 SDL_TOUCH_DEVICE_INVALID = -1,
46 SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
47 SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
48 SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
49 } SDL_TouchDeviceType;
50
51 typedef struct SDL_Finger
52 {
53 SDL_FingerID id;
54 float x;
55 float y;
56 float pressure;
57 } SDL_Finger;
58
59 /* Used as the device ID for mouse events simulated with touch input */
60 #define SDL_TOUCH_MOUSEID ((Uint32)-1)
61
62 /* Used as the SDL_TouchID for touch events simulated with mouse input */
63 #define SDL_MOUSE_TOUCHID ((Sint64)-1)
64
65
66 /**
67 * Get the number of registered touch devices.
68 *
69 * On some platforms SDL first sees the touch device if it was actually used.
70 * Therefore SDL_GetNumTouchDevices() may return 0 although devices are
71 * available. After using all devices at least once the number will be
72 * correct.
73 *
74 * This was fixed for Android in SDL 2.0.1.
75 *
76 * \returns the number of registered touch devices.
77 *
78 * \since This function is available since SDL 2.0.0.
79 *
80 * \sa SDL_GetTouchDevice
81 */
82 extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
83
84 /**
85 * Get the touch ID with the given index.
86 *
87 * \param index the touch device index
88 * \returns the touch ID with the given index on success or 0 if the index is
89 * invalid; call SDL_GetError() for more information.
90 *
91 * \since This function is available since SDL 2.0.0.
92 *
93 * \sa SDL_GetNumTouchDevices
94 */
95 extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
96
97 /**
98 * Get the touch device name as reported from the driver or NULL if the index
99 * is invalid.
100 *
101 * \since This function is available since SDL 2.0.22.
102 */
103 extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index);
104
105 /**
106 * Get the type of the given touch device.
107 *
108 * \since This function is available since SDL 2.0.10.
109 */
110 extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
111
112 /**
113 * Get the number of active fingers for a given touch device.
114 *
115 * \param touchID the ID of a touch device
116 * \returns the number of active fingers for a given touch device on success
117 * or 0 on failure; call SDL_GetError() for more information.
118 *
119 * \since This function is available since SDL 2.0.0.
120 *
121 * \sa SDL_GetTouchFinger
122 */
123 extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
124
125 /**
126 * Get the finger object for specified touch device ID and finger index.
127 *
128 * The returned resource is owned by SDL and should not be deallocated.
129 *
130 * \param touchID the ID of the requested touch device
131 * \param index the index of the requested finger
132 * \returns a pointer to the SDL_Finger object or NULL if no object at the
133 * given ID and index could be found.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_RecordGesture
138 */
139 extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
140
141 /* Ends C function definitions when using C++ */
142 #ifdef __cplusplus
143 }
144 #endif
145 #include <SDL2/close_code.h>
146
147 #endif /* SDL_touch_h_ */
148
149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_types.h
23 *
24 * \deprecated
25 */
26
27 /* DEPRECATED */
28 #include <SDL2/SDL_stdinc.h>
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_version.h
23 *
24 * This header defines the current SDL version.
25 */
26
27 #ifndef SDL_version_h_
28 #define SDL_version_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * Information about the version of SDL in use.
40 *
41 * Represents the library's version as three levels: major revision
42 * (increments with massive changes, additions, and enhancements),
43 * minor revision (increments with backwards-compatible changes to the
44 * major revision), and patchlevel (increments with fixes to the minor
45 * revision).
46 *
47 * \sa SDL_VERSION
48 * \sa SDL_GetVersion
49 */
50 typedef struct SDL_version
51 {
52 Uint8 major; /**< major version */
53 Uint8 minor; /**< minor version */
54 Uint8 patch; /**< update version */
55 } SDL_version;
56
57 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
58 */
59 #define SDL_MAJOR_VERSION 2
60 #define SDL_MINOR_VERSION 0
61 #define SDL_PATCHLEVEL 22
62
63 /**
64 * Macro to determine SDL version program was compiled against.
65 *
66 * This macro fills in a SDL_version structure with the version of the
67 * library you compiled against. This is determined by what header the
68 * compiler uses. Note that if you dynamically linked the library, you might
69 * have a slightly newer or older version at runtime. That version can be
70 * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
71 * is not a macro.
72 *
73 * \param x A pointer to a SDL_version struct to initialize.
74 *
75 * \sa SDL_version
76 * \sa SDL_GetVersion
77 */
78 #define SDL_VERSION(x) \
79 { \
80 (x)->major = SDL_MAJOR_VERSION; \
81 (x)->minor = SDL_MINOR_VERSION; \
82 (x)->patch = SDL_PATCHLEVEL; \
83 }
84
85 /**
86 * This macro turns the version numbers into a numeric value:
87 * \verbatim
88 (1,2,3) -> (1203)
89 \endverbatim
90 *
91 * This assumes that there will never be more than 100 patchlevels.
92 */
93 #define SDL_VERSIONNUM(X, Y, Z) \
94 ((X)*1000 + (Y)*100 + (Z))
95
96 /**
97 * This is the version number macro for the current SDL version.
98 */
99 #define SDL_COMPILEDVERSION \
100 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
101
102 /**
103 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
104 */
105 #define SDL_VERSION_ATLEAST(X, Y, Z) \
106 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
107
108 /**
109 * Get the version of SDL that is linked against your program.
110 *
111 * If you are linking to SDL dynamically, then it is possible that the current
112 * version will be different than the version you compiled against. This
113 * function returns the current version, while SDL_VERSION() is a macro that
114 * tells you what version you compiled with.
115 *
116 * This function may be called safely at any time, even before SDL_Init().
117 *
118 * \param ver the SDL_version structure that contains the version information
119 *
120 * \since This function is available since SDL 2.0.0.
121 *
122 * \sa SDL_GetRevision
123 */
124 extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
125
126 /**
127 * Get the code revision of SDL that is linked against your program.
128 *
129 * This value is the revision of the code you are linked with and may be
130 * different from the code you are compiling with, which is found in the
131 * constant SDL_REVISION.
132 *
133 * The revision is arbitrary string (a hash value) uniquely identifying the
134 * exact revision of the SDL library in use, and is only useful in comparing
135 * against other revisions. It is NOT an incrementing number.
136 *
137 * If SDL wasn't built from a git repository with the appropriate tools, this
138 * will return an empty string.
139 *
140 * Prior to SDL 2.0.16, before development moved to GitHub, this returned a
141 * hash for a Mercurial repository.
142 *
143 * You shouldn't use this function for anything but logging it for debugging
144 * purposes. The string is not intended to be reliable in any way.
145 *
146 * \returns an arbitrary string, uniquely identifying the exact revision of
147 * the SDL library in use.
148 *
149 * \since This function is available since SDL 2.0.0.
150 *
151 * \sa SDL_GetVersion
152 */
153 extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
154
155 /**
156 * Obsolete function, do not use.
157 *
158 * When SDL was hosted in a Mercurial repository, and was built carefully,
159 * this would return the revision number that the build was created from. This
160 * number was not reliable for several reasons, but more importantly, SDL is
161 * now hosted in a git repository, which does not offer numbers at all, only
162 * hashes. This function only ever returns zero now. Don't use it.
163 *
164 * Before SDL 2.0.16, this might have returned an unreliable, but non-zero
165 * number.
166 *
167 * \deprecated Use SDL_GetRevision() instead; if SDL was carefully built, it
168 * will return a git hash.
169 *
170 * \returns zero, always, in modern SDL releases.
171 *
172 * \since This function is available since SDL 2.0.0.
173 *
174 * \sa SDL_GetRevision
175 */
176 extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
177
178
179 /* Ends C function definitions when using C++ */
180 #ifdef __cplusplus
181 }
182 #endif
183 #include <SDL2/close_code.h>
184
185 #endif /* SDL_version_h_ */
186
187 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_video.h
23 *
24 * Header file for SDL video functions.
25 */
26
27 #ifndef SDL_video_h_
28 #define SDL_video_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_surface.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The structure that defines a display mode
43 *
44 * \sa SDL_GetNumDisplayModes()
45 * \sa SDL_GetDisplayMode()
46 * \sa SDL_GetDesktopDisplayMode()
47 * \sa SDL_GetCurrentDisplayMode()
48 * \sa SDL_GetClosestDisplayMode()
49 * \sa SDL_SetWindowDisplayMode()
50 * \sa SDL_GetWindowDisplayMode()
51 */
52 typedef struct
53 {
54 Uint32 format; /**< pixel format */
55 int w; /**< width, in screen coordinates */
56 int h; /**< height, in screen coordinates */
57 int refresh_rate; /**< refresh rate (or zero for unspecified) */
58 void *driverdata; /**< driver-specific data, initialize to 0 */
59 } SDL_DisplayMode;
60
61 /**
62 * \brief The type used to identify a window
63 *
64 * \sa SDL_CreateWindow()
65 * \sa SDL_CreateWindowFrom()
66 * \sa SDL_DestroyWindow()
67 * \sa SDL_FlashWindow()
68 * \sa SDL_GetWindowData()
69 * \sa SDL_GetWindowFlags()
70 * \sa SDL_GetWindowGrab()
71 * \sa SDL_GetWindowKeyboardGrab()
72 * \sa SDL_GetWindowMouseGrab()
73 * \sa SDL_GetWindowPosition()
74 * \sa SDL_GetWindowSize()
75 * \sa SDL_GetWindowTitle()
76 * \sa SDL_HideWindow()
77 * \sa SDL_MaximizeWindow()
78 * \sa SDL_MinimizeWindow()
79 * \sa SDL_RaiseWindow()
80 * \sa SDL_RestoreWindow()
81 * \sa SDL_SetWindowData()
82 * \sa SDL_SetWindowFullscreen()
83 * \sa SDL_SetWindowGrab()
84 * \sa SDL_SetWindowKeyboardGrab()
85 * \sa SDL_SetWindowMouseGrab()
86 * \sa SDL_SetWindowIcon()
87 * \sa SDL_SetWindowPosition()
88 * \sa SDL_SetWindowSize()
89 * \sa SDL_SetWindowBordered()
90 * \sa SDL_SetWindowResizable()
91 * \sa SDL_SetWindowTitle()
92 * \sa SDL_ShowWindow()
93 */
94 typedef struct SDL_Window SDL_Window;
95
96 /**
97 * \brief The flags on a window
98 *
99 * \sa SDL_GetWindowFlags()
100 */
101 typedef enum
102 {
103 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
104 SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
105 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
106 SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
107 SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
108 SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
109 SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */
110 SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */
111 SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
112 SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
113 SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
114 SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
115 SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
116 SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported.
117 On macOS NSHighResolutionCapable must be set true in the
118 application's Info.plist for this to have any effect. */
119 SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
120 SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
121 SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
122 SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
123 SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
124 SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
125 SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
126 SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
127 SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
128
129 SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED /**< equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility */
130 } SDL_WindowFlags;
131
132 /**
133 * \brief Used to indicate that you don't care what the window position is.
134 */
135 #define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
136 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
137 #define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
138 #define SDL_WINDOWPOS_ISUNDEFINED(X) \
139 (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
140
141 /**
142 * \brief Used to indicate that the window position should be centered.
143 */
144 #define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
145 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
146 #define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
147 #define SDL_WINDOWPOS_ISCENTERED(X) \
148 (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
149
150 /**
151 * \brief Event subtype for window events
152 */
153 typedef enum
154 {
155 SDL_WINDOWEVENT_NONE, /**< Never used */
156 SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
157 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
158 SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be
159 redrawn */
160 SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
161 */
162 SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
163 SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
164 a result of an API call or through the
165 system or user changing the window size. */
166 SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
167 SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
168 SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
169 and position */
170 SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */
171 SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
172 SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
173 SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
174 SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
175 SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
176 SDL_WINDOWEVENT_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
177 SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
178 SDL_WINDOWEVENT_DISPLAY_CHANGED /**< Window has been moved to display data1. */
179 } SDL_WindowEventID;
180
181 /**
182 * \brief Event subtype for display events
183 */
184 typedef enum
185 {
186 SDL_DISPLAYEVENT_NONE, /**< Never used */
187 SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
188 SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
189 SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
190 } SDL_DisplayEventID;
191
192 /**
193 * \brief Display orientation
194 */
195 typedef enum
196 {
197 SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
198 SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
199 SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
200 SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
201 SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
202 } SDL_DisplayOrientation;
203
204 /**
205 * \brief Window flash operation
206 */
207 typedef enum
208 {
209 SDL_FLASH_CANCEL, /**< Cancel any window flash state */
210 SDL_FLASH_BRIEFLY, /**< Flash the window briefly to get attention */
211 SDL_FLASH_UNTIL_FOCUSED /**< Flash the window until it gets focus */
212 } SDL_FlashOperation;
213
214 /**
215 * \brief An opaque handle to an OpenGL context.
216 */
217 typedef void *SDL_GLContext;
218
219 /**
220 * \brief OpenGL configuration attributes
221 */
222 typedef enum
223 {
224 SDL_GL_RED_SIZE,
225 SDL_GL_GREEN_SIZE,
226 SDL_GL_BLUE_SIZE,
227 SDL_GL_ALPHA_SIZE,
228 SDL_GL_BUFFER_SIZE,
229 SDL_GL_DOUBLEBUFFER,
230 SDL_GL_DEPTH_SIZE,
231 SDL_GL_STENCIL_SIZE,
232 SDL_GL_ACCUM_RED_SIZE,
233 SDL_GL_ACCUM_GREEN_SIZE,
234 SDL_GL_ACCUM_BLUE_SIZE,
235 SDL_GL_ACCUM_ALPHA_SIZE,
236 SDL_GL_STEREO,
237 SDL_GL_MULTISAMPLEBUFFERS,
238 SDL_GL_MULTISAMPLESAMPLES,
239 SDL_GL_ACCELERATED_VISUAL,
240 SDL_GL_RETAINED_BACKING,
241 SDL_GL_CONTEXT_MAJOR_VERSION,
242 SDL_GL_CONTEXT_MINOR_VERSION,
243 SDL_GL_CONTEXT_EGL,
244 SDL_GL_CONTEXT_FLAGS,
245 SDL_GL_CONTEXT_PROFILE_MASK,
246 SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
247 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
248 SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
249 SDL_GL_CONTEXT_RESET_NOTIFICATION,
250 SDL_GL_CONTEXT_NO_ERROR
251 } SDL_GLattr;
252
253 typedef enum
254 {
255 SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
256 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
257 SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
258 } SDL_GLprofile;
259
260 typedef enum
261 {
262 SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001,
263 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
264 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004,
265 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
266 } SDL_GLcontextFlag;
267
268 typedef enum
269 {
270 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
271 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
272 } SDL_GLcontextReleaseFlag;
273
274 typedef enum
275 {
276 SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
277 SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
278 } SDL_GLContextResetNotification;
279
280 /* Function prototypes */
281
282 /**
283 * Get the number of video drivers compiled into SDL.
284 *
285 * \returns a number >= 1 on success or a negative error code on failure; call
286 * SDL_GetError() for more information.
287 *
288 * \since This function is available since SDL 2.0.0.
289 *
290 * \sa SDL_GetVideoDriver
291 */
292 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
293
294 /**
295 * Get the name of a built in video driver.
296 *
297 * The video drivers are presented in the order in which they are normally
298 * checked during initialization.
299 *
300 * \param index the index of a video driver
301 * \returns the name of the video driver with the given **index**.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetNumVideoDrivers
306 */
307 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
308
309 /**
310 * Initialize the video subsystem, optionally specifying a video driver.
311 *
312 * This function initializes the video subsystem, setting up a connection to
313 * the window manager, etc, and determines the available display modes and
314 * pixel formats, but does not initialize a window or graphics mode.
315 *
316 * If you use this function and you haven't used the SDL_INIT_VIDEO flag with
317 * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
318 * before calling SDL_Quit().
319 *
320 * It is safe to call this function multiple times. SDL_VideoInit() will call
321 * SDL_VideoQuit() itself if the video subsystem has already been initialized.
322 *
323 * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
324 * specific `driver_name`.
325 *
326 * \param driver_name the name of a video driver to initialize, or NULL for
327 * the default driver
328 * \returns 0 on success or a negative error code on failure; call
329 * SDL_GetError() for more information.
330 *
331 * \since This function is available since SDL 2.0.0.
332 *
333 * \sa SDL_GetNumVideoDrivers
334 * \sa SDL_GetVideoDriver
335 * \sa SDL_InitSubSystem
336 * \sa SDL_VideoQuit
337 */
338 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
339
340 /**
341 * Shut down the video subsystem, if initialized with SDL_VideoInit().
342 *
343 * This function closes all windows, and restores the original video mode.
344 *
345 * \since This function is available since SDL 2.0.0.
346 *
347 * \sa SDL_VideoInit
348 */
349 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
350
351 /**
352 * Get the name of the currently initialized video driver.
353 *
354 * \returns the name of the current video driver or NULL if no driver has been
355 * initialized.
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_GetNumVideoDrivers
360 * \sa SDL_GetVideoDriver
361 */
362 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
363
364 /**
365 * Get the number of available video displays.
366 *
367 * \returns a number >= 1 or a negative error code on failure; call
368 * SDL_GetError() for more information.
369 *
370 * \since This function is available since SDL 2.0.0.
371 *
372 * \sa SDL_GetDisplayBounds
373 */
374 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
375
376 /**
377 * Get the name of a display in UTF-8 encoding.
378 *
379 * \param displayIndex the index of display from which the name should be
380 * queried
381 * \returns the name of a display or NULL for an invalid display index or
382 * failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_GetNumVideoDisplays
387 */
388 extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
389
390 /**
391 * Get the desktop area represented by a display.
392 *
393 * The primary display (`displayIndex` zero) is always located at 0,0.
394 *
395 * \param displayIndex the index of the display to query
396 * \param rect the SDL_Rect structure filled in with the display bounds
397 * \returns 0 on success or a negative error code on failure; call
398 * SDL_GetError() for more information.
399 *
400 * \since This function is available since SDL 2.0.0.
401 *
402 * \sa SDL_GetNumVideoDisplays
403 */
404 extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
405
406 /**
407 * Get the usable desktop area represented by a display.
408 *
409 * The primary display (`displayIndex` zero) is always located at 0,0.
410 *
411 * This is the same area as SDL_GetDisplayBounds() reports, but with portions
412 * reserved by the system removed. For example, on Apple's macOS, this
413 * subtracts the area occupied by the menu bar and dock.
414 *
415 * Setting a window to be fullscreen generally bypasses these unusable areas,
416 * so these are good guidelines for the maximum space available to a
417 * non-fullscreen window.
418 *
419 * The parameter `rect` is ignored if it is NULL.
420 *
421 * This function also returns -1 if the parameter `displayIndex` is out of
422 * range.
423 *
424 * \param displayIndex the index of the display to query the usable bounds
425 * from
426 * \param rect the SDL_Rect structure filled in with the display bounds
427 * \returns 0 on success or a negative error code on failure; call
428 * SDL_GetError() for more information.
429 *
430 * \since This function is available since SDL 2.0.5.
431 *
432 * \sa SDL_GetDisplayBounds
433 * \sa SDL_GetNumVideoDisplays
434 */
435 extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
436
437 /**
438 * Get the dots/pixels-per-inch for a display.
439 *
440 * Diagonal, horizontal and vertical DPI can all be optionally returned if the
441 * appropriate parameter is non-NULL.
442 *
443 * A failure of this function usually means that either no DPI information is
444 * available or the `displayIndex` is out of range.
445 *
446 * \param displayIndex the index of the display from which DPI information
447 * should be queried
448 * \param ddpi a pointer filled in with the diagonal DPI of the display; may
449 * be NULL
450 * \param hdpi a pointer filled in with the horizontal DPI of the display; may
451 * be NULL
452 * \param vdpi a pointer filled in with the vertical DPI of the display; may
453 * be NULL
454 * \returns 0 on success or a negative error code on failure; call
455 * SDL_GetError() for more information.
456 *
457 * \since This function is available since SDL 2.0.4.
458 *
459 * \sa SDL_GetNumVideoDisplays
460 */
461 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
462
463 /**
464 * Get the orientation of a display.
465 *
466 * \param displayIndex the index of the display to query
467 * \returns The SDL_DisplayOrientation enum value of the display, or
468 * `SDL_ORIENTATION_UNKNOWN` if it isn't available.
469 *
470 * \since This function is available since SDL 2.0.9.
471 *
472 * \sa SDL_GetNumVideoDisplays
473 */
474 extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
475
476 /**
477 * Get the number of available display modes.
478 *
479 * The `displayIndex` needs to be in the range from 0 to
480 * SDL_GetNumVideoDisplays() - 1.
481 *
482 * \param displayIndex the index of the display to query
483 * \returns a number >= 1 on success or a negative error code on failure; call
484 * SDL_GetError() for more information.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetDisplayMode
489 * \sa SDL_GetNumVideoDisplays
490 */
491 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
492
493 /**
494 * Get information about a specific display mode.
495 *
496 * The display modes are sorted in this priority:
497 *
498 * - width -> largest to smallest
499 * - height -> largest to smallest
500 * - bits per pixel -> more colors to fewer colors
501 * - packed pixel layout -> largest to smallest
502 * - refresh rate -> highest to lowest
503 *
504 * \param displayIndex the index of the display to query
505 * \param modeIndex the index of the display mode to query
506 * \param mode an SDL_DisplayMode structure filled in with the mode at
507 * `modeIndex`
508 * \returns 0 on success or a negative error code on failure; call
509 * SDL_GetError() for more information.
510 *
511 * \since This function is available since SDL 2.0.0.
512 *
513 * \sa SDL_GetNumDisplayModes
514 */
515 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
516 SDL_DisplayMode * mode);
517
518 /**
519 * Get information about the desktop's display mode.
520 *
521 * There's a difference between this function and SDL_GetCurrentDisplayMode()
522 * when SDL runs fullscreen and has changed the resolution. In that case this
523 * function will return the previous native display mode, and not the current
524 * display mode.
525 *
526 * \param displayIndex the index of the display to query
527 * \param mode an SDL_DisplayMode structure filled in with the current display
528 * mode
529 * \returns 0 on success or a negative error code on failure; call
530 * SDL_GetError() for more information.
531 *
532 * \since This function is available since SDL 2.0.0.
533 *
534 * \sa SDL_GetCurrentDisplayMode
535 * \sa SDL_GetDisplayMode
536 * \sa SDL_SetWindowDisplayMode
537 */
538 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
539
540 /**
541 * Get information about the current display mode.
542 *
543 * There's a difference between this function and SDL_GetDesktopDisplayMode()
544 * when SDL runs fullscreen and has changed the resolution. In that case this
545 * function will return the current display mode, and not the previous native
546 * display mode.
547 *
548 * \param displayIndex the index of the display to query
549 * \param mode an SDL_DisplayMode structure filled in with the current display
550 * mode
551 * \returns 0 on success or a negative error code on failure; call
552 * SDL_GetError() for more information.
553 *
554 * \since This function is available since SDL 2.0.0.
555 *
556 * \sa SDL_GetDesktopDisplayMode
557 * \sa SDL_GetDisplayMode
558 * \sa SDL_GetNumVideoDisplays
559 * \sa SDL_SetWindowDisplayMode
560 */
561 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
562
563
564 /**
565 * Get the closest match to the requested display mode.
566 *
567 * The available display modes are scanned and `closest` is filled in with the
568 * closest mode matching the requested mode and returned. The mode format and
569 * refresh rate default to the desktop mode if they are set to 0. The modes
570 * are scanned with size being first priority, format being second priority,
571 * and finally checking the refresh rate. If all the available modes are too
572 * small, then NULL is returned.
573 *
574 * \param displayIndex the index of the display to query
575 * \param mode an SDL_DisplayMode structure containing the desired display
576 * mode
577 * \param closest an SDL_DisplayMode structure filled in with the closest
578 * match of the available display modes
579 * \returns the passed in value `closest` or NULL if no matching video mode
580 * was available; call SDL_GetError() for more information.
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetDisplayMode
585 * \sa SDL_GetNumDisplayModes
586 */
587 extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
588
589 /**
590 * Get the index of the display associated with a window.
591 *
592 * \param window the window to query
593 * \returns the index of the display containing the center of the window on
594 * success or a negative error code on failure; call SDL_GetError()
595 * for more information.
596 *
597 * \since This function is available since SDL 2.0.0.
598 *
599 * \sa SDL_GetDisplayBounds
600 * \sa SDL_GetNumVideoDisplays
601 */
602 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
603
604 /**
605 * Set the display mode to use when a window is visible at fullscreen.
606 *
607 * This only affects the display mode used when the window is fullscreen. To
608 * change the window size when the window is not fullscreen, use
609 * SDL_SetWindowSize().
610 *
611 * \param window the window to affect
612 * \param mode the SDL_DisplayMode structure representing the mode to use, or
613 * NULL to use the window's dimensions and the desktop's format
614 * and refresh rate
615 * \returns 0 on success or a negative error code on failure; call
616 * SDL_GetError() for more information.
617 *
618 * \since This function is available since SDL 2.0.0.
619 *
620 * \sa SDL_GetWindowDisplayMode
621 * \sa SDL_SetWindowFullscreen
622 */
623 extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
624 const SDL_DisplayMode * mode);
625
626 /**
627 * Query the display mode to use when a window is visible at fullscreen.
628 *
629 * \param window the window to query
630 * \param mode an SDL_DisplayMode structure filled in with the fullscreen
631 * display mode
632 * \returns 0 on success or a negative error code on failure; call
633 * SDL_GetError() for more information.
634 *
635 * \since This function is available since SDL 2.0.0.
636 *
637 * \sa SDL_SetWindowDisplayMode
638 * \sa SDL_SetWindowFullscreen
639 */
640 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
641 SDL_DisplayMode * mode);
642
643 /**
644 * Get the raw ICC profile data for the screen the window is currently on.
645 *
646 * Data returned should be freed with SDL_free.
647 *
648 * \param window the window to query
649 * \param size the size of the ICC profile
650 * \returns the raw ICC profile data on success or NULL on failure; call
651 * SDL_GetError() for more information.
652 *
653 * \since This function is available since SDL 2.0.18.
654 */
655 extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
656
657 /**
658 * Get the pixel format associated with the window.
659 *
660 * \param window the window to query
661 * \returns the pixel format of the window on success or
662 * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
663 * information.
664 *
665 * \since This function is available since SDL 2.0.0.
666 */
667 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
668
669 /**
670 * Create a window with the specified position, dimensions, and flags.
671 *
672 * `flags` may be any of the following OR'd together:
673 *
674 * - `SDL_WINDOW_FULLSCREEN`: fullscreen window
675 * - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
676 * - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
677 * - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
678 * - `SDL_WINDOW_METAL`: window usable with a Metal instance
679 * - `SDL_WINDOW_HIDDEN`: window is not visible
680 * - `SDL_WINDOW_BORDERLESS`: no window decoration
681 * - `SDL_WINDOW_RESIZABLE`: window can be resized
682 * - `SDL_WINDOW_MINIMIZED`: window is minimized
683 * - `SDL_WINDOW_MAXIMIZED`: window is maximized
684 * - `SDL_WINDOW_INPUT_GRABBED`: window has grabbed input focus
685 * - `SDL_WINDOW_ALLOW_HIGHDPI`: window should be created in high-DPI mode if
686 * supported (>= SDL 2.0.1)
687 *
688 * `SDL_WINDOW_SHOWN` is ignored by SDL_CreateWindow(). The SDL_Window is
689 * implicitly shown if SDL_WINDOW_HIDDEN is not set. `SDL_WINDOW_SHOWN` may be
690 * queried later using SDL_GetWindowFlags().
691 *
692 * On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
693 * property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
694 *
695 * If the window is created with the `SDL_WINDOW_ALLOW_HIGHDPI` flag, its size
696 * in pixels may differ from its size in screen coordinates on platforms with
697 * high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
698 * client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
699 * SDL_GetRendererOutputSize() to query the drawable size in pixels.
700 *
701 * If the window is set fullscreen, the width and height parameters `w` and
702 * `h` will not be used. However, invalid size parameters (e.g. too large) may
703 * still fail. Window size is actually limited to 16384 x 16384 for all
704 * platforms at window creation.
705 *
706 * If the window is created with any of the SDL_WINDOW_OPENGL or
707 * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
708 * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
709 * corresponding UnloadLibrary function is called by SDL_DestroyWindow().
710 *
711 * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
712 * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
713 *
714 * If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
715 * SDL_CreateWindow() will fail.
716 *
717 * On non-Apple devices, SDL requires you to either not link to the Vulkan
718 * loader or link to a dynamic library version. This limitation may be removed
719 * in a future version of SDL.
720 *
721 * \param title the title of the window, in UTF-8 encoding
722 * \param x the x position of the window, `SDL_WINDOWPOS_CENTERED`, or
723 * `SDL_WINDOWPOS_UNDEFINED`
724 * \param y the y position of the window, `SDL_WINDOWPOS_CENTERED`, or
725 * `SDL_WINDOWPOS_UNDEFINED`
726 * \param w the width of the window, in screen coordinates
727 * \param h the height of the window, in screen coordinates
728 * \param flags 0, or one or more SDL_WindowFlags OR'd together
729 * \returns the window that was created or NULL on failure; call
730 * SDL_GetError() for more information.
731 *
732 * \since This function is available since SDL 2.0.0.
733 *
734 * \sa SDL_CreateWindowFrom
735 * \sa SDL_DestroyWindow
736 */
737 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
738 int x, int y, int w,
739 int h, Uint32 flags);
740
741 /**
742 * Create an SDL window from an existing native window.
743 *
744 * In some cases (e.g. OpenGL) and on some platforms (e.g. Microsoft Windows)
745 * the hint `SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT` needs to be configured
746 * before using SDL_CreateWindowFrom().
747 *
748 * \param data a pointer to driver-dependent window creation data, typically
749 * your native window cast to a void*
750 * \returns the window that was created or NULL on failure; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_CreateWindow
756 * \sa SDL_DestroyWindow
757 */
758 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
759
760 /**
761 * Get the numeric ID of a window.
762 *
763 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
764 * these events to specific SDL_Window objects.
765 *
766 * \param window the window to query
767 * \returns the ID of the window on success or 0 on failure; call
768 * SDL_GetError() for more information.
769 *
770 * \since This function is available since SDL 2.0.0.
771 *
772 * \sa SDL_GetWindowFromID
773 */
774 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
775
776 /**
777 * Get a window from a stored ID.
778 *
779 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
780 * these events to specific SDL_Window objects.
781 *
782 * \param id the ID of the window
783 * \returns the window associated with `id` or NULL if it doesn't exist; call
784 * SDL_GetError() for more information.
785 *
786 * \since This function is available since SDL 2.0.0.
787 *
788 * \sa SDL_GetWindowID
789 */
790 extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
791
792 /**
793 * Get the window flags.
794 *
795 * \param window the window to query
796 * \returns a mask of the SDL_WindowFlags associated with `window`
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_CreateWindow
801 * \sa SDL_HideWindow
802 * \sa SDL_MaximizeWindow
803 * \sa SDL_MinimizeWindow
804 * \sa SDL_SetWindowFullscreen
805 * \sa SDL_SetWindowGrab
806 * \sa SDL_ShowWindow
807 */
808 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
809
810 /**
811 * Set the title of a window.
812 *
813 * This string is expected to be in UTF-8 encoding.
814 *
815 * \param window the window to change
816 * \param title the desired window title in UTF-8 format
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_GetWindowTitle
821 */
822 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
823 const char *title);
824
825 /**
826 * Get the title of a window.
827 *
828 * \param window the window to query
829 * \returns the title of the window in UTF-8 format or "" if there is no
830 * title.
831 *
832 * \since This function is available since SDL 2.0.0.
833 *
834 * \sa SDL_SetWindowTitle
835 */
836 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
837
838 /**
839 * Set the icon for a window.
840 *
841 * \param window the window to change
842 * \param icon an SDL_Surface structure containing the icon for the window
843 *
844 * \since This function is available since SDL 2.0.0.
845 */
846 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
847 SDL_Surface * icon);
848
849 /**
850 * Associate an arbitrary named pointer with a window.
851 *
852 * `name` is case-sensitive.
853 *
854 * \param window the window to associate with the pointer
855 * \param name the name of the pointer
856 * \param userdata the associated pointer
857 * \returns the previous value associated with `name`.
858 *
859 * \since This function is available since SDL 2.0.0.
860 *
861 * \sa SDL_GetWindowData
862 */
863 extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
864 const char *name,
865 void *userdata);
866
867 /**
868 * Retrieve the data pointer associated with a window.
869 *
870 * \param window the window to query
871 * \param name the name of the pointer
872 * \returns the value associated with `name`.
873 *
874 * \since This function is available since SDL 2.0.0.
875 *
876 * \sa SDL_SetWindowData
877 */
878 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
879 const char *name);
880
881 /**
882 * Set the position of a window.
883 *
884 * The window coordinate origin is the upper left of the display.
885 *
886 * \param window the window to reposition
887 * \param x the x coordinate of the window in screen coordinates, or
888 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
889 * \param y the y coordinate of the window in screen coordinates, or
890 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_GetWindowPosition
895 */
896 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
897 int x, int y);
898
899 /**
900 * Get the position of a window.
901 *
902 * If you do not need the value for one of the positions a NULL may be passed
903 * in the `x` or `y` parameter.
904 *
905 * \param window the window to query
906 * \param x a pointer filled in with the x position of the window, in screen
907 * coordinates, may be NULL
908 * \param y a pointer filled in with the y position of the window, in screen
909 * coordinates, may be NULL
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_SetWindowPosition
914 */
915 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
916 int *x, int *y);
917
918 /**
919 * Set the size of a window's client area.
920 *
921 * The window size in screen coordinates may differ from the size in pixels,
922 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
923 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize() or
924 * SDL_GetRendererOutputSize() to get the real client area size in pixels.
925 *
926 * Fullscreen windows automatically match the size of the display mode, and
927 * you should use SDL_SetWindowDisplayMode() to change their size.
928 *
929 * \param window the window to change
930 * \param w the width of the window in pixels, in screen coordinates, must be
931 * > 0
932 * \param h the height of the window in pixels, in screen coordinates, must be
933 * > 0
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_GetWindowSize
938 * \sa SDL_SetWindowDisplayMode
939 */
940 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
941 int h);
942
943 /**
944 * Get the size of a window's client area.
945 *
946 * NULL can safely be passed as the `w` or `h` parameter if the width or
947 * height value is not desired.
948 *
949 * The window size in screen coordinates may differ from the size in pixels,
950 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
951 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize(),
952 * SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to get the
953 * real client area size in pixels.
954 *
955 * \param window the window to query the width and height from
956 * \param w a pointer filled in with the width of the window, in screen
957 * coordinates, may be NULL
958 * \param h a pointer filled in with the height of the window, in screen
959 * coordinates, may be NULL
960 *
961 * \since This function is available since SDL 2.0.0.
962 *
963 * \sa SDL_GL_GetDrawableSize
964 * \sa SDL_Vulkan_GetDrawableSize
965 * \sa SDL_SetWindowSize
966 */
967 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
968 int *h);
969
970 /**
971 * Get the size of a window's borders (decorations) around the client area.
972 *
973 * Note: If this function fails (returns -1), the size values will be
974 * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
975 * window in question was borderless.
976 *
977 * Note: This function may fail on systems where the window has not yet been
978 * decorated by the display server (for example, immediately after calling
979 * SDL_CreateWindow). It is recommended that you wait at least until the
980 * window has been presented and composited, so that the window system has a
981 * chance to decorate the window and provide the border dimensions to SDL.
982 *
983 * This function also returns -1 if getting the information is not supported.
984 *
985 * \param window the window to query the size values of the border
986 * (decorations) from
987 * \param top pointer to variable for storing the size of the top border; NULL
988 * is permitted
989 * \param left pointer to variable for storing the size of the left border;
990 * NULL is permitted
991 * \param bottom pointer to variable for storing the size of the bottom
992 * border; NULL is permitted
993 * \param right pointer to variable for storing the size of the right border;
994 * NULL is permitted
995 * \returns 0 on success or a negative error code on failure; call
996 * SDL_GetError() for more information.
997 *
998 * \since This function is available since SDL 2.0.5.
999 *
1000 * \sa SDL_GetWindowSize
1001 */
1002 extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
1003 int *top, int *left,
1004 int *bottom, int *right);
1005
1006 /**
1007 * Set the minimum size of a window's client area.
1008 *
1009 * \param window the window to change
1010 * \param min_w the minimum width of the window in pixels
1011 * \param min_h the minimum height of the window in pixels
1012 *
1013 * \since This function is available since SDL 2.0.0.
1014 *
1015 * \sa SDL_GetWindowMinimumSize
1016 * \sa SDL_SetWindowMaximumSize
1017 */
1018 extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
1019 int min_w, int min_h);
1020
1021 /**
1022 * Get the minimum size of a window's client area.
1023 *
1024 * \param window the window to query
1025 * \param w a pointer filled in with the minimum width of the window, may be
1026 * NULL
1027 * \param h a pointer filled in with the minimum height of the window, may be
1028 * NULL
1029 *
1030 * \since This function is available since SDL 2.0.0.
1031 *
1032 * \sa SDL_GetWindowMaximumSize
1033 * \sa SDL_SetWindowMinimumSize
1034 */
1035 extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
1036 int *w, int *h);
1037
1038 /**
1039 * Set the maximum size of a window's client area.
1040 *
1041 * \param window the window to change
1042 * \param max_w the maximum width of the window in pixels
1043 * \param max_h the maximum height of the window in pixels
1044 *
1045 * \since This function is available since SDL 2.0.0.
1046 *
1047 * \sa SDL_GetWindowMaximumSize
1048 * \sa SDL_SetWindowMinimumSize
1049 */
1050 extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
1051 int max_w, int max_h);
1052
1053 /**
1054 * Get the maximum size of a window's client area.
1055 *
1056 * \param window the window to query
1057 * \param w a pointer filled in with the maximum width of the window, may be
1058 * NULL
1059 * \param h a pointer filled in with the maximum height of the window, may be
1060 * NULL
1061 *
1062 * \since This function is available since SDL 2.0.0.
1063 *
1064 * \sa SDL_GetWindowMinimumSize
1065 * \sa SDL_SetWindowMaximumSize
1066 */
1067 extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
1068 int *w, int *h);
1069
1070 /**
1071 * Set the border state of a window.
1072 *
1073 * This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add
1074 * or remove the border from the actual window. This is a no-op if the
1075 * window's border already matches the requested state.
1076 *
1077 * You can't change the border state of a fullscreen window.
1078 *
1079 * \param window the window of which to change the border state
1080 * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border
1081 *
1082 * \since This function is available since SDL 2.0.0.
1083 *
1084 * \sa SDL_GetWindowFlags
1085 */
1086 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
1087 SDL_bool bordered);
1088
1089 /**
1090 * Set the user-resizable state of a window.
1091 *
1092 * This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and
1093 * allow/disallow user resizing of the window. This is a no-op if the window's
1094 * resizable state already matches the requested state.
1095 *
1096 * You can't change the resizable state of a fullscreen window.
1097 *
1098 * \param window the window of which to change the resizable state
1099 * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow
1100 *
1101 * \since This function is available since SDL 2.0.5.
1102 *
1103 * \sa SDL_GetWindowFlags
1104 */
1105 extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
1106 SDL_bool resizable);
1107
1108 /**
1109 * Set the window to always be above the others.
1110 *
1111 * This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This
1112 * will bring the window to the front and keep the window above the rest.
1113 *
1114 * \param window The window of which to change the always on top state
1115 * \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to
1116 * disable
1117 *
1118 * \since This function is available since SDL 2.0.16.
1119 *
1120 * \sa SDL_GetWindowFlags
1121 */
1122 extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
1123 SDL_bool on_top);
1124
1125 /**
1126 * Show a window.
1127 *
1128 * \param window the window to show
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_HideWindow
1133 * \sa SDL_RaiseWindow
1134 */
1135 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
1136
1137 /**
1138 * Hide a window.
1139 *
1140 * \param window the window to hide
1141 *
1142 * \since This function is available since SDL 2.0.0.
1143 *
1144 * \sa SDL_ShowWindow
1145 */
1146 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
1147
1148 /**
1149 * Raise a window above other windows and set the input focus.
1150 *
1151 * \param window the window to raise
1152 *
1153 * \since This function is available since SDL 2.0.0.
1154 */
1155 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
1156
1157 /**
1158 * Make a window as large as possible.
1159 *
1160 * \param window the window to maximize
1161 *
1162 * \since This function is available since SDL 2.0.0.
1163 *
1164 * \sa SDL_MinimizeWindow
1165 * \sa SDL_RestoreWindow
1166 */
1167 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
1168
1169 /**
1170 * Minimize a window to an iconic representation.
1171 *
1172 * \param window the window to minimize
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_MaximizeWindow
1177 * \sa SDL_RestoreWindow
1178 */
1179 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
1180
1181 /**
1182 * Restore the size and position of a minimized or maximized window.
1183 *
1184 * \param window the window to restore
1185 *
1186 * \since This function is available since SDL 2.0.0.
1187 *
1188 * \sa SDL_MaximizeWindow
1189 * \sa SDL_MinimizeWindow
1190 */
1191 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
1192
1193 /**
1194 * Set a window's fullscreen state.
1195 *
1196 * `flags` may be `SDL_WINDOW_FULLSCREEN`, for "real" fullscreen with a
1197 * videomode change; `SDL_WINDOW_FULLSCREEN_DESKTOP` for "fake" fullscreen
1198 * that takes the size of the desktop; and 0 for windowed mode.
1199 *
1200 * \param window the window to change
1201 * \param flags `SDL_WINDOW_FULLSCREEN`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
1202 * \returns 0 on success or a negative error code on failure; call
1203 * SDL_GetError() for more information.
1204 *
1205 * \since This function is available since SDL 2.0.0.
1206 *
1207 * \sa SDL_GetWindowDisplayMode
1208 * \sa SDL_SetWindowDisplayMode
1209 */
1210 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
1211 Uint32 flags);
1212
1213 /**
1214 * Get the SDL surface associated with the window.
1215 *
1216 * A new surface will be created with the optimal format for the window, if
1217 * necessary. This surface will be freed when the window is destroyed. Do not
1218 * free this surface.
1219 *
1220 * This surface will be invalidated if the window is resized. After resizing a
1221 * window this function must be called again to return a valid surface.
1222 *
1223 * You may not combine this with 3D or the rendering API on this window.
1224 *
1225 * This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.
1226 *
1227 * \param window the window to query
1228 * \returns the surface associated with the window, or NULL on failure; call
1229 * SDL_GetError() for more information.
1230 *
1231 * \since This function is available since SDL 2.0.0.
1232 *
1233 * \sa SDL_UpdateWindowSurface
1234 * \sa SDL_UpdateWindowSurfaceRects
1235 */
1236 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
1237
1238 /**
1239 * Copy the window surface to the screen.
1240 *
1241 * This is the function you use to reflect any changes to the surface on the
1242 * screen.
1243 *
1244 * This function is equivalent to the SDL 1.2 API SDL_Flip().
1245 *
1246 * \param window the window to update
1247 * \returns 0 on success or a negative error code on failure; call
1248 * SDL_GetError() for more information.
1249 *
1250 * \since This function is available since SDL 2.0.0.
1251 *
1252 * \sa SDL_GetWindowSurface
1253 * \sa SDL_UpdateWindowSurfaceRects
1254 */
1255 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
1256
1257 /**
1258 * Copy areas of the window surface to the screen.
1259 *
1260 * This is the function you use to reflect changes to portions of the surface
1261 * on the screen.
1262 *
1263 * This function is equivalent to the SDL 1.2 API SDL_UpdateRects().
1264 *
1265 * \param window the window to update
1266 * \param rects an array of SDL_Rect structures representing areas of the
1267 * surface to copy
1268 * \param numrects the number of rectangles
1269 * \returns 0 on success or a negative error code on failure; call
1270 * SDL_GetError() for more information.
1271 *
1272 * \since This function is available since SDL 2.0.0.
1273 *
1274 * \sa SDL_GetWindowSurface
1275 * \sa SDL_UpdateWindowSurface
1276 */
1277 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
1278 const SDL_Rect * rects,
1279 int numrects);
1280
1281 /**
1282 * Set a window's input grab mode.
1283 *
1284 * When input is grabbed, the mouse is confined to the window. This function
1285 * will also grab the keyboard if `SDL_HINT_GRAB_KEYBOARD` is set. To grab the
1286 * keyboard without also grabbing the mouse, use SDL_SetWindowKeyboardGrab().
1287 *
1288 * If the caller enables a grab while another window is currently grabbed, the
1289 * other window loses its grab in favor of the caller's window.
1290 *
1291 * \param window the window for which the input grab mode should be set
1292 * \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input
1293 *
1294 * \since This function is available since SDL 2.0.0.
1295 *
1296 * \sa SDL_GetGrabbedWindow
1297 * \sa SDL_GetWindowGrab
1298 */
1299 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
1300 SDL_bool grabbed);
1301
1302 /**
1303 * Set a window's keyboard grab mode.
1304 *
1305 * Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or
1306 * the Meta/Super key. Note that not all system keyboard shortcuts can be
1307 * captured by applications (one example is Ctrl+Alt+Del on Windows).
1308 *
1309 * This is primarily intended for specialized applications such as VNC clients
1310 * or VM frontends. Normal games should not use keyboard grab.
1311 *
1312 * When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the
1313 * window is full-screen to ensure the user is not trapped in your
1314 * application. If you have a custom keyboard shortcut to exit fullscreen
1315 * mode, you may suppress this behavior with
1316 * `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.
1317 *
1318 * If the caller enables a grab while another window is currently grabbed, the
1319 * other window loses its grab in favor of the caller's window.
1320 *
1321 * \param window The window for which the keyboard grab mode should be set.
1322 * \param grabbed This is SDL_TRUE to grab keyboard, and SDL_FALSE to release.
1323 *
1324 * \since This function is available since SDL 2.0.16.
1325 *
1326 * \sa SDL_GetWindowKeyboardGrab
1327 * \sa SDL_SetWindowMouseGrab
1328 * \sa SDL_SetWindowGrab
1329 */
1330 extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
1331 SDL_bool grabbed);
1332
1333 /**
1334 * Set a window's mouse grab mode.
1335 *
1336 * Mouse grab confines the mouse cursor to the window.
1337 *
1338 * \param window The window for which the mouse grab mode should be set.
1339 * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
1340 *
1341 * \since This function is available since SDL 2.0.16.
1342 *
1343 * \sa SDL_GetWindowMouseGrab
1344 * \sa SDL_SetWindowKeyboardGrab
1345 * \sa SDL_SetWindowGrab
1346 */
1347 extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
1348 SDL_bool grabbed);
1349
1350 /**
1351 * Get a window's input grab mode.
1352 *
1353 * \param window the window to query
1354 * \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise.
1355 *
1356 * \since This function is available since SDL 2.0.0.
1357 *
1358 * \sa SDL_SetWindowGrab
1359 */
1360 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
1361
1362 /**
1363 * Get a window's keyboard grab mode.
1364 *
1365 * \param window the window to query
1366 * \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise.
1367 *
1368 * \since This function is available since SDL 2.0.16.
1369 *
1370 * \sa SDL_SetWindowKeyboardGrab
1371 * \sa SDL_GetWindowGrab
1372 */
1373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
1374
1375 /**
1376 * Get a window's mouse grab mode.
1377 *
1378 * \param window the window to query
1379 * \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.
1380 *
1381 * \since This function is available since SDL 2.0.16.
1382 *
1383 * \sa SDL_SetWindowKeyboardGrab
1384 * \sa SDL_GetWindowGrab
1385 */
1386 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window);
1387
1388 /**
1389 * Get the window that currently has an input grab enabled.
1390 *
1391 * \returns the window if input is grabbed or NULL otherwise.
1392 *
1393 * \since This function is available since SDL 2.0.4.
1394 *
1395 * \sa SDL_GetWindowGrab
1396 * \sa SDL_SetWindowGrab
1397 */
1398 extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
1399
1400 /**
1401 * Confines the cursor to the specified area of a window.
1402 *
1403 * Note that this does NOT grab the cursor, it only defines the area a cursor
1404 * is restricted to when the window has mouse focus.
1405 *
1406 * \param window The window that will be associated with the barrier.
1407 * \param rect A rectangle area in window-relative coordinates. If NULL the
1408 * barrier for the specified window will be destroyed.
1409 * \returns 0 on success or a negative error code on failure; call
1410 * SDL_GetError() for more information.
1411 *
1412 * \since This function is available since SDL 2.0.18.
1413 *
1414 * \sa SDL_GetWindowMouseRect
1415 * \sa SDL_SetWindowMouseGrab
1416 */
1417 extern DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect);
1418
1419 /**
1420 * Get the mouse confinement rectangle of a window.
1421 *
1422 * \param window The window to query
1423 * \returns A pointer to the mouse confinement rectangle of a window, or NULL
1424 * if there isn't one.
1425 *
1426 * \since This function is available since SDL 2.0.18.
1427 *
1428 * \sa SDL_SetWindowMouseRect
1429 */
1430 extern DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * window);
1431
1432 /**
1433 * Set the brightness (gamma multiplier) for a given window's display.
1434 *
1435 * Despite the name and signature, this method sets the brightness of the
1436 * entire display, not an individual window. A window is considered to be
1437 * owned by the display that contains the window's center pixel. (The index of
1438 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The
1439 * brightness set will not follow the window if it is moved to another
1440 * display.
1441 *
1442 * Many platforms will refuse to set the display brightness in modern times.
1443 * You are better off using a shader to adjust gamma during rendering, or
1444 * something similar.
1445 *
1446 * \param window the window used to select the display whose brightness will
1447 * be changed
1448 * \param brightness the brightness (gamma multiplier) value to set where 0.0
1449 * is completely dark and 1.0 is normal brightness
1450 * \returns 0 on success or a negative error code on failure; call
1451 * SDL_GetError() for more information.
1452 *
1453 * \since This function is available since SDL 2.0.0.
1454 *
1455 * \sa SDL_GetWindowBrightness
1456 * \sa SDL_SetWindowGammaRamp
1457 */
1458 extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
1459
1460 /**
1461 * Get the brightness (gamma multiplier) for a given window's display.
1462 *
1463 * Despite the name and signature, this method retrieves the brightness of the
1464 * entire display, not an individual window. A window is considered to be
1465 * owned by the display that contains the window's center pixel. (The index of
1466 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1467 *
1468 * \param window the window used to select the display whose brightness will
1469 * be queried
1470 * \returns the brightness for the display where 0.0 is completely dark and
1471 * 1.0 is normal brightness.
1472 *
1473 * \since This function is available since SDL 2.0.0.
1474 *
1475 * \sa SDL_SetWindowBrightness
1476 */
1477 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
1478
1479 /**
1480 * Set the opacity for a window.
1481 *
1482 * The parameter `opacity` will be clamped internally between 0.0f
1483 * (transparent) and 1.0f (opaque).
1484 *
1485 * This function also returns -1 if setting the opacity isn't supported.
1486 *
1487 * \param window the window which will be made transparent or opaque
1488 * \param opacity the opacity value (0.0f - transparent, 1.0f - opaque)
1489 * \returns 0 on success or a negative error code on failure; call
1490 * SDL_GetError() for more information.
1491 *
1492 * \since This function is available since SDL 2.0.5.
1493 *
1494 * \sa SDL_GetWindowOpacity
1495 */
1496 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
1497
1498 /**
1499 * Get the opacity of a window.
1500 *
1501 * If transparency isn't supported on this platform, opacity will be reported
1502 * as 1.0f without error.
1503 *
1504 * The parameter `opacity` is ignored if it is NULL.
1505 *
1506 * This function also returns -1 if an invalid window was provided.
1507 *
1508 * \param window the window to get the current opacity value from
1509 * \param out_opacity the float filled in (0.0f - transparent, 1.0f - opaque)
1510 * \returns 0 on success or a negative error code on failure; call
1511 * SDL_GetError() for more information.
1512 *
1513 * \since This function is available since SDL 2.0.5.
1514 *
1515 * \sa SDL_SetWindowOpacity
1516 */
1517 extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
1518
1519 /**
1520 * Set the window as a modal for another window.
1521 *
1522 * \param modal_window the window that should be set modal
1523 * \param parent_window the parent window for the modal window
1524 * \returns 0 on success or a negative error code on failure; call
1525 * SDL_GetError() for more information.
1526 *
1527 * \since This function is available since SDL 2.0.5.
1528 */
1529 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
1530
1531 /**
1532 * Explicitly set input focus to the window.
1533 *
1534 * You almost certainly want SDL_RaiseWindow() instead of this function. Use
1535 * this with caution, as you might give focus to a window that is completely
1536 * obscured by other windows.
1537 *
1538 * \param window the window that should get the input focus
1539 * \returns 0 on success or a negative error code on failure; call
1540 * SDL_GetError() for more information.
1541 *
1542 * \since This function is available since SDL 2.0.5.
1543 *
1544 * \sa SDL_RaiseWindow
1545 */
1546 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
1547
1548 /**
1549 * Set the gamma ramp for the display that owns a given window.
1550 *
1551 * Set the gamma translation table for the red, green, and blue channels of
1552 * the video hardware. Each table is an array of 256 16-bit quantities,
1553 * representing a mapping between the input and output for that channel. The
1554 * input is the index into the array, and the output is the 16-bit gamma value
1555 * at that index, scaled to the output color precision.
1556 *
1557 * Despite the name and signature, this method sets the gamma ramp of the
1558 * entire display, not an individual window. A window is considered to be
1559 * owned by the display that contains the window's center pixel. (The index of
1560 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The gamma
1561 * ramp set will not follow the window if it is moved to another display.
1562 *
1563 * \param window the window used to select the display whose gamma ramp will
1564 * be changed
1565 * \param red a 256 element array of 16-bit quantities representing the
1566 * translation table for the red channel, or NULL
1567 * \param green a 256 element array of 16-bit quantities representing the
1568 * translation table for the green channel, or NULL
1569 * \param blue a 256 element array of 16-bit quantities representing the
1570 * translation table for the blue channel, or NULL
1571 * \returns 0 on success or a negative error code on failure; call
1572 * SDL_GetError() for more information.
1573 *
1574 * \since This function is available since SDL 2.0.0.
1575 *
1576 * \sa SDL_GetWindowGammaRamp
1577 */
1578 extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
1579 const Uint16 * red,
1580 const Uint16 * green,
1581 const Uint16 * blue);
1582
1583 /**
1584 * Get the gamma ramp for a given window's display.
1585 *
1586 * Despite the name and signature, this method retrieves the gamma ramp of the
1587 * entire display, not an individual window. A window is considered to be
1588 * owned by the display that contains the window's center pixel. (The index of
1589 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1590 *
1591 * \param window the window used to select the display whose gamma ramp will
1592 * be queried
1593 * \param red a 256 element array of 16-bit quantities filled in with the
1594 * translation table for the red channel, or NULL
1595 * \param green a 256 element array of 16-bit quantities filled in with the
1596 * translation table for the green channel, or NULL
1597 * \param blue a 256 element array of 16-bit quantities filled in with the
1598 * translation table for the blue channel, or NULL
1599 * \returns 0 on success or a negative error code on failure; call
1600 * SDL_GetError() for more information.
1601 *
1602 * \since This function is available since SDL 2.0.0.
1603 *
1604 * \sa SDL_SetWindowGammaRamp
1605 */
1606 extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
1607 Uint16 * red,
1608 Uint16 * green,
1609 Uint16 * blue);
1610
1611 /**
1612 * Possible return values from the SDL_HitTest callback.
1613 *
1614 * \sa SDL_HitTest
1615 */
1616 typedef enum
1617 {
1618 SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
1619 SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
1620 SDL_HITTEST_RESIZE_TOPLEFT,
1621 SDL_HITTEST_RESIZE_TOP,
1622 SDL_HITTEST_RESIZE_TOPRIGHT,
1623 SDL_HITTEST_RESIZE_RIGHT,
1624 SDL_HITTEST_RESIZE_BOTTOMRIGHT,
1625 SDL_HITTEST_RESIZE_BOTTOM,
1626 SDL_HITTEST_RESIZE_BOTTOMLEFT,
1627 SDL_HITTEST_RESIZE_LEFT
1628 } SDL_HitTestResult;
1629
1630 /**
1631 * Callback used for hit-testing.
1632 *
1633 * \param win the SDL_Window where hit-testing was set on
1634 * \param area an SDL_Point which should be hit-tested
1635 * \param data what was passed as `callback_data` to SDL_SetWindowHitTest()
1636 * \return an SDL_HitTestResult value.
1637 *
1638 * \sa SDL_SetWindowHitTest
1639 */
1640 typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
1641 const SDL_Point *area,
1642 void *data);
1643
1644 /**
1645 * Provide a callback that decides if a window region has special properties.
1646 *
1647 * Normally windows are dragged and resized by decorations provided by the
1648 * system window manager (a title bar, borders, etc), but for some apps, it
1649 * makes sense to drag them from somewhere else inside the window itself; for
1650 * example, one might have a borderless window that wants to be draggable from
1651 * any part, or simulate its own title bar, etc.
1652 *
1653 * This function lets the app provide a callback that designates pieces of a
1654 * given window as special. This callback is run during event processing if we
1655 * need to tell the OS to treat a region of the window specially; the use of
1656 * this callback is known as "hit testing."
1657 *
1658 * Mouse input may not be delivered to your application if it is within a
1659 * special area; the OS will often apply that input to moving the window or
1660 * resizing the window and not deliver it to the application.
1661 *
1662 * Specifying NULL for a callback disables hit-testing. Hit-testing is
1663 * disabled by default.
1664 *
1665 * Platforms that don't support this functionality will return -1
1666 * unconditionally, even if you're attempting to disable hit-testing.
1667 *
1668 * Your callback may fire at any time, and its firing does not indicate any
1669 * specific behavior (for example, on Windows, this certainly might fire when
1670 * the OS is deciding whether to drag your window, but it fires for lots of
1671 * other reasons, too, some unrelated to anything you probably care about _and
1672 * when the mouse isn't actually at the location it is testing_). Since this
1673 * can fire at any time, you should try to keep your callback efficient,
1674 * devoid of allocations, etc.
1675 *
1676 * \param window the window to set hit-testing on
1677 * \param callback the function to call when doing a hit-test
1678 * \param callback_data an app-defined void pointer passed to **callback**
1679 * \returns 0 on success or -1 on error (including unsupported); call
1680 * SDL_GetError() for more information.
1681 *
1682 * \since This function is available since SDL 2.0.4.
1683 */
1684 extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
1685 SDL_HitTest callback,
1686 void *callback_data);
1687
1688 /**
1689 * Request a window to demand attention from the user.
1690 *
1691 * \param window the window to be flashed
1692 * \param operation the flash operation
1693 * \returns 0 on success or a negative error code on failure; call
1694 * SDL_GetError() for more information.
1695 *
1696 * \since This function is available since SDL 2.0.16.
1697 */
1698 extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
1699
1700 /**
1701 * Destroy a window.
1702 *
1703 * If `window` is NULL, this function will return immediately after setting
1704 * the SDL error message to "Invalid window". See SDL_GetError().
1705 *
1706 * \param window the window to destroy
1707 *
1708 * \since This function is available since SDL 2.0.0.
1709 *
1710 * \sa SDL_CreateWindow
1711 * \sa SDL_CreateWindowFrom
1712 */
1713 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1714
1715
1716 /**
1717 * Check whether the screensaver is currently enabled.
1718 *
1719 * The screensaver is disabled by default since SDL 2.0.2. Before SDL 2.0.2
1720 * the screensaver was enabled by default.
1721 *
1722 * The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.
1723 *
1724 * \returns SDL_TRUE if the screensaver is enabled, SDL_FALSE if it is
1725 * disabled.
1726 *
1727 * \since This function is available since SDL 2.0.0.
1728 *
1729 * \sa SDL_DisableScreenSaver
1730 * \sa SDL_EnableScreenSaver
1731 */
1732 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
1733
1734 /**
1735 * Allow the screen to be blanked by a screen saver.
1736 *
1737 * \since This function is available since SDL 2.0.0.
1738 *
1739 * \sa SDL_DisableScreenSaver
1740 * \sa SDL_IsScreenSaverEnabled
1741 */
1742 extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
1743
1744 /**
1745 * Prevent the screen from being blanked by a screen saver.
1746 *
1747 * If you disable the screensaver, it is automatically re-enabled when SDL
1748 * quits.
1749 *
1750 * \since This function is available since SDL 2.0.0.
1751 *
1752 * \sa SDL_EnableScreenSaver
1753 * \sa SDL_IsScreenSaverEnabled
1754 */
1755 extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
1756
1757
1758 /**
1759 * \name OpenGL support functions
1760 */
1761 /* @{ */
1762
1763 /**
1764 * Dynamically load an OpenGL library.
1765 *
1766 * This should be done after initializing the video driver, but before
1767 * creating any OpenGL windows. If no OpenGL library is loaded, the default
1768 * library will be loaded upon creation of the first OpenGL window.
1769 *
1770 * If you do this, you need to retrieve all of the GL functions used in your
1771 * program from the dynamic library using SDL_GL_GetProcAddress().
1772 *
1773 * \param path the platform dependent OpenGL library name, or NULL to open the
1774 * default OpenGL library
1775 * \returns 0 on success or a negative error code on failure; call
1776 * SDL_GetError() for more information.
1777 *
1778 * \since This function is available since SDL 2.0.0.
1779 *
1780 * \sa SDL_GL_GetProcAddress
1781 * \sa SDL_GL_UnloadLibrary
1782 */
1783 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
1784
1785 /**
1786 * Get an OpenGL function by name.
1787 *
1788 * If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all
1789 * GL functions must be retrieved this way. Usually this is used to retrieve
1790 * function pointers to OpenGL extensions.
1791 *
1792 * There are some quirks to looking up OpenGL functions that require some
1793 * extra care from the application. If you code carefully, you can handle
1794 * these quirks without any platform-specific code, though:
1795 *
1796 * - On Windows, function pointers are specific to the current GL context;
1797 * this means you need to have created a GL context and made it current
1798 * before calling SDL_GL_GetProcAddress(). If you recreate your context or
1799 * create a second context, you should assume that any existing function
1800 * pointers aren't valid to use with it. This is (currently) a
1801 * Windows-specific limitation, and in practice lots of drivers don't suffer
1802 * this limitation, but it is still the way the wgl API is documented to
1803 * work and you should expect crashes if you don't respect it. Store a copy
1804 * of the function pointers that comes and goes with context lifespan.
1805 * - On X11, function pointers returned by this function are valid for any
1806 * context, and can even be looked up before a context is created at all.
1807 * This means that, for at least some common OpenGL implementations, if you
1808 * look up a function that doesn't exist, you'll get a non-NULL result that
1809 * is _NOT_ safe to call. You must always make sure the function is actually
1810 * available for a given GL context before calling it, by checking for the
1811 * existence of the appropriate extension with SDL_GL_ExtensionSupported(),
1812 * or verifying that the version of OpenGL you're using offers the function
1813 * as core functionality.
1814 * - Some OpenGL drivers, on all platforms, *will* return NULL if a function
1815 * isn't supported, but you can't count on this behavior. Check for
1816 * extensions you use, and if you get a NULL anyway, act as if that
1817 * extension wasn't available. This is probably a bug in the driver, but you
1818 * can code defensively for this scenario anyhow.
1819 * - Just because you're on Linux/Unix, don't assume you'll be using X11.
1820 * Next-gen display servers are waiting to replace it, and may or may not
1821 * make the same promises about function pointers.
1822 * - OpenGL function pointers must be declared `APIENTRY` as in the example
1823 * code. This will ensure the proper calling convention is followed on
1824 * platforms where this matters (Win32) thereby avoiding stack corruption.
1825 *
1826 * \param proc the name of an OpenGL function
1827 * \returns a pointer to the named OpenGL function. The returned pointer
1828 * should be cast to the appropriate function signature.
1829 *
1830 * \since This function is available since SDL 2.0.0.
1831 *
1832 * \sa SDL_GL_ExtensionSupported
1833 * \sa SDL_GL_LoadLibrary
1834 * \sa SDL_GL_UnloadLibrary
1835 */
1836 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
1837
1838 /**
1839 * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
1840 *
1841 * \since This function is available since SDL 2.0.0.
1842 *
1843 * \sa SDL_GL_LoadLibrary
1844 */
1845 extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
1846
1847 /**
1848 * Check if an OpenGL extension is supported for the current context.
1849 *
1850 * This function operates on the current GL context; you must have created a
1851 * context and it must be current before calling this function. Do not assume
1852 * that all contexts you create will have the same set of extensions
1853 * available, or that recreating an existing context will offer the same
1854 * extensions again.
1855 *
1856 * While it's probably not a massive overhead, this function is not an O(1)
1857 * operation. Check the extensions you care about after creating the GL
1858 * context and save that information somewhere instead of calling the function
1859 * every time you need to know.
1860 *
1861 * \param extension the name of the extension to check
1862 * \returns SDL_TRUE if the extension is supported, SDL_FALSE otherwise.
1863 *
1864 * \since This function is available since SDL 2.0.0.
1865 */
1866 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
1867 *extension);
1868
1869 /**
1870 * Reset all previously set OpenGL context attributes to their default values.
1871 *
1872 * \since This function is available since SDL 2.0.2.
1873 *
1874 * \sa SDL_GL_GetAttribute
1875 * \sa SDL_GL_SetAttribute
1876 */
1877 extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
1878
1879 /**
1880 * Set an OpenGL window attribute before window creation.
1881 *
1882 * This function sets the OpenGL attribute `attr` to `value`. The requested
1883 * attributes should be set before creating an OpenGL window. You should use
1884 * SDL_GL_GetAttribute() to check the values after creating the OpenGL
1885 * context, since the values obtained can differ from the requested ones.
1886 *
1887 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to set
1888 * \param value the desired value for the attribute
1889 * \returns 0 on success or a negative error code on failure; call
1890 * SDL_GetError() for more information.
1891 *
1892 * \since This function is available since SDL 2.0.0.
1893 *
1894 * \sa SDL_GL_GetAttribute
1895 * \sa SDL_GL_ResetAttributes
1896 */
1897 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
1898
1899 /**
1900 * Get the actual value for an attribute from the current context.
1901 *
1902 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to get
1903 * \param value a pointer filled in with the current value of `attr`
1904 * \returns 0 on success or a negative error code on failure; call
1905 * SDL_GetError() for more information.
1906 *
1907 * \since This function is available since SDL 2.0.0.
1908 *
1909 * \sa SDL_GL_ResetAttributes
1910 * \sa SDL_GL_SetAttribute
1911 */
1912 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1913
1914 /**
1915 * Create an OpenGL context for an OpenGL window, and make it current.
1916 *
1917 * Windows users new to OpenGL should note that, for historical reasons, GL
1918 * functions added after OpenGL version 1.1 are not available by default.
1919 * Those functions must be loaded at run-time, either with an OpenGL
1920 * extension-handling library or with SDL_GL_GetProcAddress() and its related
1921 * functions.
1922 *
1923 * SDL_GLContext is an alias for `void *`. It's opaque to the application.
1924 *
1925 * \param window the window to associate with the context
1926 * \returns the OpenGL context associated with `window` or NULL on error; call
1927 * SDL_GetError() for more details.
1928 *
1929 * \since This function is available since SDL 2.0.0.
1930 *
1931 * \sa SDL_GL_DeleteContext
1932 * \sa SDL_GL_MakeCurrent
1933 */
1934 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
1935 window);
1936
1937 /**
1938 * Set up an OpenGL context for rendering into an OpenGL window.
1939 *
1940 * The context must have been created with a compatible window.
1941 *
1942 * \param window the window to associate with the context
1943 * \param context the OpenGL context to associate with the window
1944 * \returns 0 on success or a negative error code on failure; call
1945 * SDL_GetError() for more information.
1946 *
1947 * \since This function is available since SDL 2.0.0.
1948 *
1949 * \sa SDL_GL_CreateContext
1950 */
1951 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
1952 SDL_GLContext context);
1953
1954 /**
1955 * Get the currently active OpenGL window.
1956 *
1957 * \returns the currently active OpenGL window on success or NULL on failure;
1958 * call SDL_GetError() for more information.
1959 *
1960 * \since This function is available since SDL 2.0.0.
1961 */
1962 extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
1963
1964 /**
1965 * Get the currently active OpenGL context.
1966 *
1967 * \returns the currently active OpenGL context or NULL on failure; call
1968 * SDL_GetError() for more information.
1969 *
1970 * \since This function is available since SDL 2.0.0.
1971 *
1972 * \sa SDL_GL_MakeCurrent
1973 */
1974 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
1975
1976 /**
1977 * Get the size of a window's underlying drawable in pixels.
1978 *
1979 * This returns info useful for calling glViewport().
1980 *
1981 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
1982 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
1983 * platform with high-DPI support (Apple calls this "Retina"), and not
1984 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
1985 *
1986 * \param window the window from which the drawable size should be queried
1987 * \param w a pointer to variable for storing the width in pixels, may be NULL
1988 * \param h a pointer to variable for storing the height in pixels, may be
1989 * NULL
1990 *
1991 * \since This function is available since SDL 2.0.1.
1992 *
1993 * \sa SDL_CreateWindow
1994 * \sa SDL_GetWindowSize
1995 */
1996 extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
1997 int *h);
1998
1999 /**
2000 * Set the swap interval for the current OpenGL context.
2001 *
2002 * Some systems allow specifying -1 for the interval, to enable adaptive
2003 * vsync. Adaptive vsync works the same as vsync, but if you've already missed
2004 * the vertical retrace for a given frame, it swaps buffers immediately, which
2005 * might be less jarring for the user during occasional framerate drops. If an
2006 * application requests adaptive vsync and the system does not support it,
2007 * this function will fail and return -1. In such a case, you should probably
2008 * retry the call with 1 for the interval.
2009 *
2010 * Adaptive vsync is implemented for some glX drivers with
2011 * GLX_EXT_swap_control_tear:
2012 *
2013 * https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt
2014 *
2015 * and for some Windows drivers with WGL_EXT_swap_control_tear:
2016 *
2017 * https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt
2018 *
2019 * Read more on the Khronos wiki:
2020 * https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
2021 *
2022 * \param interval 0 for immediate updates, 1 for updates synchronized with
2023 * the vertical retrace, -1 for adaptive vsync
2024 * \returns 0 on success or -1 if setting the swap interval is not supported;
2025 * call SDL_GetError() for more information.
2026 *
2027 * \since This function is available since SDL 2.0.0.
2028 *
2029 * \sa SDL_GL_GetSwapInterval
2030 */
2031 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
2032
2033 /**
2034 * Get the swap interval for the current OpenGL context.
2035 *
2036 * If the system can't determine the swap interval, or there isn't a valid
2037 * current context, this function will return 0 as a safe default.
2038 *
2039 * \returns 0 if there is no vertical retrace synchronization, 1 if the buffer
2040 * swap is synchronized with the vertical retrace, and -1 if late
2041 * swaps happen immediately instead of waiting for the next retrace;
2042 * call SDL_GetError() for more information.
2043 *
2044 * \since This function is available since SDL 2.0.0.
2045 *
2046 * \sa SDL_GL_SetSwapInterval
2047 */
2048 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
2049
2050 /**
2051 * Update a window with OpenGL rendering.
2052 *
2053 * This is used with double-buffered OpenGL contexts, which are the default.
2054 *
2055 * On macOS, make sure you bind 0 to the draw framebuffer before swapping the
2056 * window, otherwise nothing will happen. If you aren't using
2057 * glBindFramebuffer(), this is the default and you won't have to do anything
2058 * extra.
2059 *
2060 * \param window the window to change
2061 *
2062 * \since This function is available since SDL 2.0.0.
2063 */
2064 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
2065
2066 /**
2067 * Delete an OpenGL context.
2068 *
2069 * \param context the OpenGL context to be deleted
2070 *
2071 * \since This function is available since SDL 2.0.0.
2072 *
2073 * \sa SDL_GL_CreateContext
2074 */
2075 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
2076
2077 /* @} *//* OpenGL support functions */
2078
2079
2080 /* Ends C function definitions when using C++ */
2081 #ifdef __cplusplus
2082 }
2083 #endif
2084 #include <SDL2/close_code.h>
2085
2086 #endif /* SDL_video_h_ */
2087
2088 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 2017, Mark Callow
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_vulkan.h
23 *
24 * Header file for functions to creating Vulkan surfaces on SDL windows.
25 */
26
27 #ifndef SDL_vulkan_h_
28 #define SDL_vulkan_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Avoid including vulkan.h, don't define VkInstance if it's already included */
39 #ifdef VULKAN_H_
40 #define NO_SDL_VULKAN_TYPEDEFS
41 #endif
42 #ifndef NO_SDL_VULKAN_TYPEDEFS
43 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
44
45 #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
46 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
47 #else
48 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
49 #endif
50
51 VK_DEFINE_HANDLE(VkInstance)
52 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
53
54 #endif /* !NO_SDL_VULKAN_TYPEDEFS */
55
56 typedef VkInstance SDL_vulkanInstance;
57 typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
58
59 /**
60 * \name Vulkan support functions
61 *
62 * \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API
63 * is compatable with Tizen's implementation of Vulkan in SDL.
64 */
65 /* @{ */
66
67 /**
68 * Dynamically load the Vulkan loader library.
69 *
70 * This should be called after initializing the video driver, but before
71 * creating any Vulkan windows. If no Vulkan loader library is loaded, the
72 * default library will be loaded upon creation of the first Vulkan window.
73 *
74 * It is fairly common for Vulkan applications to link with libvulkan instead
75 * of explicitly loading it at run time. This will work with SDL provided the
76 * application links to a dynamic library and both it and SDL use the same
77 * search path.
78 *
79 * If you specify a non-NULL `path`, an application should retrieve all of the
80 * Vulkan functions it uses from the dynamic library using
81 * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
82 * to the same vulkan loader library the application linked to.
83 *
84 * On Apple devices, if `path` is NULL, SDL will attempt to find the
85 * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
86 * process. This is because it is fairly common for Vulkan applications to
87 * link with libvulkan (and historically MoltenVK was provided as a static
88 * library). If it is not found, on macOS, SDL will attempt to load
89 * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
90 * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
91 * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
92 * dynamic framework or .dylib must ensure it is included in its application
93 * bundle.
94 *
95 * On non-Apple devices, application linking with a static libvulkan is not
96 * supported. Either do not link to the Vulkan loader or link to a dynamic
97 * library version.
98 *
99 * \param path The platform dependent Vulkan loader library name or NULL
100 * \returns 0 on success or -1 if the library couldn't be loaded; call
101 * SDL_GetError() for more information.
102 *
103 * \since This function is available since SDL 2.0.6.
104 *
105 * \sa SDL_Vulkan_GetVkInstanceProcAddr
106 * \sa SDL_Vulkan_UnloadLibrary
107 */
108 extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
109
110 /**
111 * Get the address of the `vkGetInstanceProcAddr` function.
112 *
113 * This should be called after either calling SDL_Vulkan_LoadLibrary() or
114 * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
115 *
116 * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error.
117 *
118 * \since This function is available since SDL 2.0.6.
119 */
120 extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
121
122 /**
123 * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
124 *
125 * \since This function is available since SDL 2.0.6.
126 *
127 * \sa SDL_Vulkan_LoadLibrary
128 */
129 extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
130
131 /**
132 * Get the names of the Vulkan instance extensions needed to create a surface
133 * with SDL_Vulkan_CreateSurface.
134 *
135 * If `pNames` is NULL, then the number of required Vulkan instance extensions
136 * is returned in `pCount`. Otherwise, `pCount` must point to a variable set
137 * to the number of elements in the `pNames` array, and on return the variable
138 * is overwritten with the number of names actually written to `pNames`. If
139 * `pCount` is less than the number of required extensions, at most `pCount`
140 * structures will be written. If `pCount` is smaller than the number of
141 * required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
142 * indicate that not all the required extensions were returned.
143 *
144 * The `window` parameter is currently needed to be valid as of SDL 2.0.8,
145 * however, this parameter will likely be removed in future releases
146 *
147 * \param window A window for which the required Vulkan instance extensions
148 * should be retrieved (will be deprecated in a future release)
149 * \param pCount A pointer to an unsigned int corresponding to the number of
150 * extensions to be returned
151 * \param pNames NULL or a pointer to an array to be filled with required
152 * Vulkan instance extensions
153 * \returns SDL_TRUE on success, SDL_FALSE on error.
154 *
155 * \since This function is available since SDL 2.0.6.
156 *
157 * \sa SDL_Vulkan_CreateSurface
158 */
159 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
160 unsigned int *pCount,
161 const char **pNames);
162
163 /**
164 * Create a Vulkan rendering surface for a window.
165 *
166 * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
167 * `instance` must have been created with extensions returned by
168 * SDL_Vulkan_GetInstanceExtensions() enabled.
169 *
170 * \param window The window to which to attach the Vulkan surface
171 * \param instance The Vulkan instance handle
172 * \param surface A pointer to a VkSurfaceKHR handle to output the newly
173 * created surface
174 * \returns SDL_TRUE on success, SDL_FALSE on error.
175 *
176 * \since This function is available since SDL 2.0.6.
177 *
178 * \sa SDL_Vulkan_GetInstanceExtensions
179 * \sa SDL_Vulkan_GetDrawableSize
180 */
181 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
182 VkInstance instance,
183 VkSurfaceKHR* surface);
184
185 /**
186 * Get the size of the window's underlying drawable dimensions in pixels.
187 *
188 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
189 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
190 * platform with high-DPI support (Apple calls this "Retina"), and not
191 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
192 *
193 * \param window an SDL_Window for which the size is to be queried
194 * \param w Pointer to the variable to write the width to or NULL
195 * \param h Pointer to the variable to write the height to or NULL
196 *
197 * \since This function is available since SDL 2.0.6.
198 *
199 * \sa SDL_GetWindowSize
200 * \sa SDL_CreateWindow
201 * \sa SDL_Vulkan_CreateSurface
202 */
203 extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
204 int *w, int *h);
205
206 /* @} *//* Vulkan support functions */
207
208 /* Ends C function definitions when using C++ */
209 #ifdef __cplusplus
210 }
211 #endif
212 #include <SDL2/close_code.h>
213
214 #endif /* SDL_vulkan_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file begin_code.h
23 *
24 * This file sets things up for C dynamic library function definitions,
25 * static inlined functions, and structures aligned at 4-byte alignment.
26 * If you don't like ugly C preprocessor code, don't look at this file. :)
27 */
28
29 /* This shouldn't be nested -- included it around code only. */
30 #ifdef _begin_code_h
31 #error Nested inclusion of begin_code.h
32 #endif
33 #define _begin_code_h
34
35 #ifndef SDL_DEPRECATED
36 # if (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
37 # define SDL_DEPRECATED __attribute__((deprecated))
38 # else
39 # define SDL_DEPRECATED
40 # endif
41 #endif
42
43 #ifndef SDL_UNUSED
44 # ifdef __GNUC__
45 # define SDL_UNUSED __attribute__((unused))
46 # else
47 # define SDL_UNUSED
48 # endif
49 #endif
50
51 /* Some compilers use a special export keyword */
52 #ifndef DECLSPEC
53 # if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
54 # ifdef DLL_EXPORT
55 # define DECLSPEC __declspec(dllexport)
56 # else
57 # define DECLSPEC
58 # endif
59 # elif defined(__OS2__)
60 # ifdef BUILD_SDL
61 # define DECLSPEC __declspec(dllexport)
62 # else
63 # define DECLSPEC
64 # endif
65 # else
66 # if defined(__GNUC__) && __GNUC__ >= 4
67 # define DECLSPEC __attribute__ ((visibility("default")))
68 # else
69 # define DECLSPEC
70 # endif
71 # endif
72 #endif
73
74 /* By default SDL uses the C calling convention */
75 #ifndef SDLCALL
76 #if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
77 #define SDLCALL __cdecl
78 #elif defined(__OS2__) || defined(__EMX__)
79 #define SDLCALL _System
80 # if defined (__GNUC__) && !defined(_System)
81 # define _System /* for old EMX/GCC compat. */
82 # endif
83 #else
84 #define SDLCALL
85 #endif
86 #endif /* SDLCALL */
87
88 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
89 #ifdef __SYMBIAN32__
90 #undef DECLSPEC
91 #define DECLSPEC
92 #endif /* __SYMBIAN32__ */
93
94 /* Force structure packing at 4 byte alignment.
95 This is necessary if the header is included in code which has structure
96 packing set to an alternate value, say for loading structures from disk.
97 The packing is reset to the previous value in close_code.h
98 */
99 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
100 #ifdef _MSC_VER
101 #pragma warning(disable: 4103)
102 #endif
103 #ifdef __clang__
104 #pragma clang diagnostic ignored "-Wpragma-pack"
105 #endif
106 #ifdef __BORLANDC__
107 #pragma nopackwarning
108 #endif
109 #ifdef _WIN64
110 /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
111 #pragma pack(push,8)
112 #else
113 #pragma pack(push,4)
114 #endif
115 #endif /* Compiler needs structure packing set */
116
117 #ifndef SDL_INLINE
118 #if defined(__GNUC__)
119 #define SDL_INLINE __inline__
120 #elif defined(_MSC_VER) || defined(__BORLANDC__) || \
121 defined(__DMC__) || defined(__SC__) || \
122 defined(__WATCOMC__) || defined(__LCC__) || \
123 defined(__DECC) || defined(__CC_ARM)
124 #define SDL_INLINE __inline
125 #ifndef __inline__
126 #define __inline__ __inline
127 #endif
128 #else
129 #define SDL_INLINE inline
130 #ifndef __inline__
131 #define __inline__ inline
132 #endif
133 #endif
134 #endif /* SDL_INLINE not defined */
135
136 #ifndef SDL_FORCE_INLINE
137 #if defined(_MSC_VER)
138 #define SDL_FORCE_INLINE __forceinline
139 #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
140 #define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
141 #else
142 #define SDL_FORCE_INLINE static SDL_INLINE
143 #endif
144 #endif /* SDL_FORCE_INLINE not defined */
145
146 #ifndef SDL_NORETURN
147 #if defined(__GNUC__)
148 #define SDL_NORETURN __attribute__((noreturn))
149 #elif defined(_MSC_VER)
150 #define SDL_NORETURN __declspec(noreturn)
151 #else
152 #define SDL_NORETURN
153 #endif
154 #endif /* SDL_NORETURN not defined */
155
156 /* Apparently this is needed by several Windows compilers */
157 #if !defined(__MACH__)
158 #ifndef NULL
159 #ifdef __cplusplus
160 #define NULL 0
161 #else
162 #define NULL ((void *)0)
163 #endif
164 #endif /* NULL */
165 #endif /* ! Mac OS X - breaks precompiled headers */
166
167 #ifndef SDL_FALLTHROUGH
168 #if (defined(__cplusplus) && __cplusplus >= 201703L) || \
169 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
170 #define SDL_FALLTHROUGH [[fallthrough]]
171 #else
172 #if defined(__has_attribute)
173 #define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
174 #else
175 #define _HAS_FALLTHROUGH 0
176 #endif /* __has_attribute */
177 #if _HAS_FALLTHROUGH && \
178 ((defined(__GNUC__) && __GNUC__ >= 7) || \
179 (defined(__clang_major__) && __clang_major__ >= 10))
180 #define SDL_FALLTHROUGH __attribute__((__fallthrough__))
181 #else
182 #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
183 #endif /* _HAS_FALLTHROUGH */
184 #undef _HAS_FALLTHROUGH
185 #endif /* C++17 or C2x */
186 #endif /* SDL_FALLTHROUGH not defined */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file close_code.h
23 *
24 * This file reverses the effects of begin_code.h and should be included
25 * after you finish any function and structure declarations in your headers
26 */
27
28 #ifndef _begin_code_h
29 #error close_code.h included without matching begin_code.h
30 #endif
31 #undef _begin_code_h
32
33 /* Reset structure packing at previous byte alignment */
34 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
35 #ifdef __BORLANDC__
36 #pragma nopackwarning
37 #endif
38 #pragma pack(pop)
39 #endif /* Compiler needs structure packing set */
0
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
0 The Simple DirectMedia Layer (SDL for short) is a cross-platform
1 library designed to make it easy to write multi-media software,
2 such as games and emulators.
3
4 The Simple DirectMedia Layer library source code is available from:
5 http://www.libsdl.org/
6
7 This library is distributed under the terms of the zlib license:
8 http://zlib.net/zlib_license.html
9
10
11 This packages contains the SDL framework for OS X.
12 Conforming with Apple guidelines, this framework
13 contains both the SDL runtime component and development header files.
14
15
16 To Install:
17 Copy the SDL2.framework to /Library/Frameworks
18
19 You may alternatively install it in <Your home directory>/Library/Frameworks
20 if your access privileges are not high enough.
21
22
23 Additional References:
24
25 - Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are
26 available at:
27 http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
28 Though these are OpenSceneGraph centric, the same exact concepts apply to
29 SDL, thus the videos are recommended for everybody getting started with
30 developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
31 doesn't have any PlugIns to worry about.)
0 Versions/Current/Headers
0 Versions/Current/Resources
0 Versions/Current/SDL2
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL.h
23 *
24 * Main include header for the SDL library
25 */
26
27
28 #ifndef SDL_h_
29 #define SDL_h_
30
31 #include <SDL2/SDL_main.h>
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_assert.h>
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_audio.h>
36 #include <SDL2/SDL_clipboard.h>
37 #include <SDL2/SDL_cpuinfo.h>
38 #include <SDL2/SDL_endian.h>
39 #include <SDL2/SDL_error.h>
40 #include <SDL2/SDL_events.h>
41 #include <SDL2/SDL_filesystem.h>
42 #include <SDL2/SDL_gamecontroller.h>
43 #include <SDL2/SDL_haptic.h>
44 #include <SDL2/SDL_hidapi.h>
45 #include <SDL2/SDL_hints.h>
46 #include <SDL2/SDL_joystick.h>
47 #include <SDL2/SDL_loadso.h>
48 #include <SDL2/SDL_log.h>
49 #include <SDL2/SDL_messagebox.h>
50 #include <SDL2/SDL_metal.h>
51 #include <SDL2/SDL_mutex.h>
52 #include <SDL2/SDL_power.h>
53 #include <SDL2/SDL_render.h>
54 #include <SDL2/SDL_rwops.h>
55 #include <SDL2/SDL_sensor.h>
56 #include <SDL2/SDL_shape.h>
57 #include <SDL2/SDL_system.h>
58 #include <SDL2/SDL_thread.h>
59 #include <SDL2/SDL_timer.h>
60 #include <SDL2/SDL_version.h>
61 #include <SDL2/SDL_video.h>
62 #include <SDL2/SDL_locale.h>
63 #include <SDL2/SDL_misc.h>
64
65 #include <SDL2/begin_code.h>
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /* As of version 0.5, SDL is loaded dynamically into the application */
72
73 /**
74 * \name SDL_INIT_*
75 *
76 * These are the flags which may be passed to SDL_Init(). You should
77 * specify the subsystems which you will be using in your application.
78 */
79 /* @{ */
80 #define SDL_INIT_TIMER 0x00000001u
81 #define SDL_INIT_AUDIO 0x00000010u
82 #define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
83 #define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
84 #define SDL_INIT_HAPTIC 0x00001000u
85 #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
86 #define SDL_INIT_EVENTS 0x00004000u
87 #define SDL_INIT_SENSOR 0x00008000u
88 #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
89 #define SDL_INIT_EVERYTHING ( \
90 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
91 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
92 )
93 /* @} */
94
95 /**
96 * Initialize the SDL library.
97 *
98 * SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
99 * two may be used interchangeably. Though for readability of your code
100 * SDL_InitSubSystem() might be preferred.
101 *
102 * The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
103 * subsystems are initialized by default. Message boxes
104 * (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
105 * video subsystem, in hopes of being useful in showing an error dialog when
106 * SDL_Init fails. You must specifically initialize other subsystems if you
107 * use them in your application.
108 *
109 * Logging (such as SDL_Log) works without initialization, too.
110 *
111 * `flags` may be any of the following OR'd together:
112 *
113 * - `SDL_INIT_TIMER`: timer subsystem
114 * - `SDL_INIT_AUDIO`: audio subsystem
115 * - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
116 * subsystem
117 * - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
118 * events subsystem
119 * - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
120 * - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
121 * initializes the joystick subsystem
122 * - `SDL_INIT_EVENTS`: events subsystem
123 * - `SDL_INIT_EVERYTHING`: all of the above subsystems
124 * - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
125 *
126 * Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
127 * for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
128 * call SDL_Quit() to force shutdown). If a subsystem is already loaded then
129 * this call will increase the ref-count and return.
130 *
131 * \param flags subsystem initialization flags
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_InitSubSystem
138 * \sa SDL_Quit
139 * \sa SDL_SetMainReady
140 * \sa SDL_WasInit
141 */
142 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
143
144 /**
145 * Compatibility function to initialize the SDL library.
146 *
147 * In SDL2, this function and SDL_Init() are interchangeable.
148 *
149 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
150 * \returns 0 on success or a negative error code on failure; call
151 * SDL_GetError() for more information.
152 *
153 * \since This function is available since SDL 2.0.0.
154 *
155 * \sa SDL_Init
156 * \sa SDL_Quit
157 * \sa SDL_QuitSubSystem
158 */
159 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
160
161 /**
162 * Shut down specific SDL subsystems.
163 *
164 * If you start a subsystem using a call to that subsystem's init function
165 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
166 * SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
167 * that subsystem's quit function (SDL_VideoQuit()) directly instead. But
168 * generally, you should not be using those functions directly anyhow; use
169 * SDL_Init() instead.
170 *
171 * You still need to call SDL_Quit() even if you close all open subsystems
172 * with SDL_QuitSubSystem().
173 *
174 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
175 *
176 * \since This function is available since SDL 2.0.0.
177 *
178 * \sa SDL_InitSubSystem
179 * \sa SDL_Quit
180 */
181 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
182
183 /**
184 * Get a mask of the specified subsystems which are currently initialized.
185 *
186 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
187 * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
188 * returns the initialization status of the specified subsystems.
189 *
190 * The return value does not include SDL_INIT_NOPARACHUTE.
191 *
192 * \since This function is available since SDL 2.0.0.
193 *
194 * \sa SDL_Init
195 * \sa SDL_InitSubSystem
196 */
197 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
198
199 /**
200 * Clean up all initialized subsystems.
201 *
202 * You should call this function even if you have already shutdown each
203 * initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
204 * function even in the case of errors in initialization.
205 *
206 * If you start a subsystem using a call to that subsystem's init function
207 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
208 * then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
209 * it down before calling SDL_Quit(). But generally, you should not be using
210 * those functions directly anyhow; use SDL_Init() instead.
211 *
212 * You can use this function with atexit() to ensure that it is run when your
213 * application is shutdown, but it is not wise to do this from a library or
214 * other dynamically loaded code.
215 *
216 * \since This function is available since SDL 2.0.0.
217 *
218 * \sa SDL_Init
219 * \sa SDL_QuitSubSystem
220 */
221 extern DECLSPEC void SDLCALL SDL_Quit(void);
222
223 /* Ends C function definitions when using C++ */
224 #ifdef __cplusplus
225 }
226 #endif
227 #include <SDL2/close_code.h>
228
229 #endif /* SDL_h_ */
230
231 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_assert_h_
22 #define SDL_assert_h_
23
24 #include <SDL2/SDL_config.h>
25
26 #include <SDL2/begin_code.h>
27 /* Set up for C function definitions, even when using C++ */
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #ifndef SDL_ASSERT_LEVEL
33 #ifdef SDL_DEFAULT_ASSERT_LEVEL
34 #define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
35 #elif defined(_DEBUG) || defined(DEBUG) || \
36 (defined(__GNUC__) && !defined(__OPTIMIZE__))
37 #define SDL_ASSERT_LEVEL 2
38 #else
39 #define SDL_ASSERT_LEVEL 1
40 #endif
41 #endif /* SDL_ASSERT_LEVEL */
42
43 /*
44 These are macros and not first class functions so that the debugger breaks
45 on the assertion line and not in some random guts of SDL, and so each
46 assert can have unique static variables associated with it.
47 */
48
49 #if defined(_MSC_VER)
50 /* Don't include intrin.h here because it contains C++ code */
51 extern void __cdecl __debugbreak(void);
52 #define SDL_TriggerBreakpoint() __debugbreak()
53 #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
54 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
55 #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
56 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
57 #elif defined(__APPLE__) && defined(__arm__)
58 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
59 #elif defined(__386__) && defined(__WATCOMC__)
60 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
61 #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
62 #include <signal.h>
63 #define SDL_TriggerBreakpoint() raise(SIGTRAP)
64 #else
65 /* How do we trigger breakpoints on this platform? */
66 #define SDL_TriggerBreakpoint()
67 #endif
68
69 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
70 # define SDL_FUNCTION __func__
71 #elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
72 # define SDL_FUNCTION __FUNCTION__
73 #else
74 # define SDL_FUNCTION "???"
75 #endif
76 #define SDL_FILE __FILE__
77 #define SDL_LINE __LINE__
78
79 /*
80 sizeof (x) makes the compiler still parse the expression even without
81 assertions enabled, so the code is always checked at compile time, but
82 doesn't actually generate code for it, so there are no side effects or
83 expensive checks at run time, just the constant size of what x WOULD be,
84 which presumably gets optimized out as unused.
85 This also solves the problem of...
86
87 int somevalue = blah();
88 SDL_assert(somevalue == 1);
89
90 ...which would cause compiles to complain that somevalue is unused if we
91 disable assertions.
92 */
93
94 /* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
95 this condition isn't constant. And looks like an owl's face! */
96 #ifdef _MSC_VER /* stupid /W4 warnings. */
97 #define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
98 #else
99 #define SDL_NULL_WHILE_LOOP_CONDITION (0)
100 #endif
101
102 #define SDL_disabled_assert(condition) \
103 do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
104
105 typedef enum
106 {
107 SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
108 SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
109 SDL_ASSERTION_ABORT, /**< Terminate the program. */
110 SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
111 SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
112 } SDL_AssertState;
113
114 typedef struct SDL_AssertData
115 {
116 int always_ignore;
117 unsigned int trigger_count;
118 const char *condition;
119 const char *filename;
120 int linenum;
121 const char *function;
122 const struct SDL_AssertData *next;
123 } SDL_AssertData;
124
125 #if (SDL_ASSERT_LEVEL > 0)
126
127 /* Never call this directly. Use the SDL_assert* macros. */
128 extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
129 const char *,
130 const char *, int)
131 #if defined(__clang__)
132 #if __has_feature(attribute_analyzer_noreturn)
133 /* this tells Clang's static analysis that we're a custom assert function,
134 and that the analyzer should assume the condition was always true past this
135 SDL_assert test. */
136 __attribute__((analyzer_noreturn))
137 #endif
138 #endif
139 ;
140
141 /* the do {} while(0) avoids dangling else problems:
142 if (x) SDL_assert(y); else blah();
143 ... without the do/while, the "else" could attach to this macro's "if".
144 We try to handle just the minimum we need here in a macro...the loop,
145 the static vars, and break points. The heavy lifting is handled in
146 SDL_ReportAssertion(), in SDL_assert.c.
147 */
148 #define SDL_enabled_assert(condition) \
149 do { \
150 while ( !(condition) ) { \
151 static struct SDL_AssertData sdl_assert_data = { \
152 0, 0, #condition, 0, 0, 0, 0 \
153 }; \
154 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
155 if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
156 continue; /* go again. */ \
157 } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
158 SDL_TriggerBreakpoint(); \
159 } \
160 break; /* not retrying. */ \
161 } \
162 } while (SDL_NULL_WHILE_LOOP_CONDITION)
163
164 #endif /* enabled assertions support code */
165
166 /* Enable various levels of assertions. */
167 #if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
168 # define SDL_assert(condition) SDL_disabled_assert(condition)
169 # define SDL_assert_release(condition) SDL_disabled_assert(condition)
170 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
171 #elif SDL_ASSERT_LEVEL == 1 /* release settings. */
172 # define SDL_assert(condition) SDL_disabled_assert(condition)
173 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
174 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
175 #elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
176 # define SDL_assert(condition) SDL_enabled_assert(condition)
177 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
178 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
179 #elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
180 # define SDL_assert(condition) SDL_enabled_assert(condition)
181 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
182 # define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
183 #else
184 # error Unknown assertion level.
185 #endif
186
187 /* this assertion is never disabled at any level. */
188 #define SDL_assert_always(condition) SDL_enabled_assert(condition)
189
190
191 /**
192 * A callback that fires when an SDL assertion fails.
193 *
194 * \param data a pointer to the SDL_AssertData structure corresponding to the
195 * current assertion
196 * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
197 * \returns an SDL_AssertState value indicating how to handle the failure.
198 */
199 typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
200 const SDL_AssertData* data, void* userdata);
201
202 /**
203 * Set an application-defined assertion handler.
204 *
205 * This function allows an application to show its own assertion UI and/or
206 * force the response to an assertion failure. If the application doesn't
207 * provide this, SDL will try to do the right thing, popping up a
208 * system-specific GUI dialog, and probably minimizing any fullscreen windows.
209 *
210 * This callback may fire from any thread, but it runs wrapped in a mutex, so
211 * it will only fire from one thread at a time.
212 *
213 * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
214 *
215 * \param handler the SDL_AssertionHandler function to call when an assertion
216 * fails or NULL for the default handler
217 * \param userdata a pointer that is passed to `handler`
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_GetAssertionHandler
222 */
223 extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
224 SDL_AssertionHandler handler,
225 void *userdata);
226
227 /**
228 * Get the default assertion handler.
229 *
230 * This returns the function pointer that is called by default when an
231 * assertion is triggered. This is an internal function provided by SDL, that
232 * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
233 * provide a different function.
234 *
235 * \returns the default SDL_AssertionHandler that is called when an assert
236 * triggers.
237 *
238 * \since This function is available since SDL 2.0.2.
239 *
240 * \sa SDL_GetAssertionHandler
241 */
242 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
243
244 /**
245 * Get the current assertion handler.
246 *
247 * This returns the function pointer that is called when an assertion is
248 * triggered. This is either the value last passed to
249 * SDL_SetAssertionHandler(), or if no application-specified function is set,
250 * is equivalent to calling SDL_GetDefaultAssertionHandler().
251 *
252 * The parameter `puserdata` is a pointer to a void*, which will store the
253 * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
254 * will always be NULL for the default handler. If you don't care about this
255 * data, it is safe to pass a NULL pointer to this function to ignore it.
256 *
257 * \param puserdata pointer which is filled with the "userdata" pointer that
258 * was passed to SDL_SetAssertionHandler()
259 * \returns the SDL_AssertionHandler that is called when an assert triggers.
260 *
261 * \since This function is available since SDL 2.0.2.
262 *
263 * \sa SDL_SetAssertionHandler
264 */
265 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
266
267 /**
268 * Get a list of all assertion failures.
269 *
270 * This function gets all assertions triggered since the last call to
271 * SDL_ResetAssertionReport(), or the start of the program.
272 *
273 * The proper way to examine this data looks something like this:
274 *
275 * ```c
276 * const SDL_AssertData *item = SDL_GetAssertionReport();
277 * while (item) {
278 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
279 * item->condition, item->function, item->filename,
280 * item->linenum, item->trigger_count,
281 * item->always_ignore ? "yes" : "no");
282 * item = item->next;
283 * }
284 * ```
285 *
286 * \returns a list of all failed assertions or NULL if the list is empty. This
287 * memory should not be modified or freed by the application.
288 *
289 * \since This function is available since SDL 2.0.0.
290 *
291 * \sa SDL_ResetAssertionReport
292 */
293 extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
294
295 /**
296 * Clear the list of all assertion failures.
297 *
298 * This function will clear the list of all assertions triggered up to that
299 * point. Immediately following this call, SDL_GetAssertionReport will return
300 * no items. In addition, any previously-triggered assertions will be reset to
301 * a trigger_count of zero, and their always_ignore state will be false.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetAssertionReport
306 */
307 extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
308
309
310 /* these had wrong naming conventions until 2.0.4. Please update your app! */
311 #define SDL_assert_state SDL_AssertState
312 #define SDL_assert_data SDL_AssertData
313
314
315 /* Ends C function definitions when using C++ */
316 #ifdef __cplusplus
317 }
318 #endif
319 #include <SDL2/close_code.h>
320
321 #endif /* SDL_assert_h_ */
322
323 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_atomic.h
23 *
24 * Atomic operations.
25 *
26 * IMPORTANT:
27 * If you are not an expert in concurrent lockless programming, you should
28 * only be using the atomic lock and reference counting functions in this
29 * file. In all other cases you should be protecting your data structures
30 * with full mutexes.
31 *
32 * The list of "safe" functions to use are:
33 * SDL_AtomicLock()
34 * SDL_AtomicUnlock()
35 * SDL_AtomicIncRef()
36 * SDL_AtomicDecRef()
37 *
38 * Seriously, here be dragons!
39 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 *
41 * You can find out a little more about lockless programming and the
42 * subtle issues that can arise here:
43 * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
44 *
45 * There's also lots of good information here:
46 * http://www.1024cores.net/home/lock-free-algorithms
47 * http://preshing.com/
48 *
49 * These operations may or may not actually be implemented using
50 * processor specific atomic operations. When possible they are
51 * implemented as true processor specific atomic operations. When that
52 * is not possible the are implemented using locks that *do* use the
53 * available atomic operations.
54 *
55 * All of the atomic operations that modify memory are full memory barriers.
56 */
57
58 #ifndef SDL_atomic_h_
59 #define SDL_atomic_h_
60
61 #include <SDL2/SDL_stdinc.h>
62 #include <SDL2/SDL_platform.h>
63
64 #include <SDL2/begin_code.h>
65
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /**
72 * \name SDL AtomicLock
73 *
74 * The atomic locks are efficient spinlocks using CPU instructions,
75 * but are vulnerable to starvation and can spin forever if a thread
76 * holding a lock has been terminated. For this reason you should
77 * minimize the code executed inside an atomic lock and never do
78 * expensive things like API or system calls while holding them.
79 *
80 * The atomic locks are not safe to lock recursively.
81 *
82 * Porting Note:
83 * The spin lock functions and type are required and can not be
84 * emulated because they are used in the atomic emulation code.
85 */
86 /* @{ */
87
88 typedef int SDL_SpinLock;
89
90 /**
91 * Try to lock a spin lock by setting it to a non-zero value.
92 *
93 * ***Please note that spinlocks are dangerous if you don't know what you're
94 * doing. Please be careful using any sort of spinlock!***
95 *
96 * \param lock a pointer to a lock variable
97 * \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
98 * held.
99 *
100 * \since This function is available since SDL 2.0.0.
101 *
102 * \sa SDL_AtomicLock
103 * \sa SDL_AtomicUnlock
104 */
105 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
106
107 /**
108 * Lock a spin lock by setting it to a non-zero value.
109 *
110 * ***Please note that spinlocks are dangerous if you don't know what you're
111 * doing. Please be careful using any sort of spinlock!***
112 *
113 * \param lock a pointer to a lock variable
114 *
115 * \since This function is available since SDL 2.0.0.
116 *
117 * \sa SDL_AtomicTryLock
118 * \sa SDL_AtomicUnlock
119 */
120 extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
121
122 /**
123 * Unlock a spin lock by setting it to 0.
124 *
125 * Always returns immediately.
126 *
127 * ***Please note that spinlocks are dangerous if you don't know what you're
128 * doing. Please be careful using any sort of spinlock!***
129 *
130 * \param lock a pointer to a lock variable
131 *
132 * \since This function is available since SDL 2.0.0.
133 *
134 * \sa SDL_AtomicLock
135 * \sa SDL_AtomicTryLock
136 */
137 extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
138
139 /* @} *//* SDL AtomicLock */
140
141
142 /**
143 * The compiler barrier prevents the compiler from reordering
144 * reads and writes to globally visible variables across the call.
145 */
146 #if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
147 void _ReadWriteBarrier(void);
148 #pragma intrinsic(_ReadWriteBarrier)
149 #define SDL_CompilerBarrier() _ReadWriteBarrier()
150 #elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
151 /* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
152 #define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
153 #elif defined(__WATCOMC__)
154 extern __inline void SDL_CompilerBarrier(void);
155 #pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
156 #else
157 #define SDL_CompilerBarrier() \
158 { SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
159 #endif
160
161 /**
162 * Memory barriers are designed to prevent reads and writes from being
163 * reordered by the compiler and being seen out of order on multi-core CPUs.
164 *
165 * A typical pattern would be for thread A to write some data and a flag, and
166 * for thread B to read the flag and get the data. In this case you would
167 * insert a release barrier between writing the data and the flag,
168 * guaranteeing that the data write completes no later than the flag is
169 * written, and you would insert an acquire barrier between reading the flag
170 * and reading the data, to ensure that all the reads associated with the flag
171 * have completed.
172 *
173 * In this pattern you should always see a release barrier paired with an
174 * acquire barrier and you should gate the data reads/writes with a single
175 * flag variable.
176 *
177 * For more information on these semantics, take a look at the blog post:
178 * http://preshing.com/20120913/acquire-and-release-semantics
179 *
180 * \since This function is available since SDL 2.0.6.
181 */
182 extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
183 extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
184
185 #if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
186 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
187 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
188 #elif defined(__GNUC__) && defined(__aarch64__)
189 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
190 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
191 #elif defined(__GNUC__) && defined(__arm__)
192 #if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
193 /* Information from:
194 https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
195
196 The Linux kernel provides a helper function which provides the right code for a memory barrier,
197 hard-coded at address 0xffff0fa0
198 */
199 typedef void (*SDL_KernelMemoryBarrierFunc)();
200 #define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
201 #define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
202 #elif 0 /* defined(__QNXNTO__) */
203 #include <sys/cpuinline.h>
204
205 #define SDL_MemoryBarrierRelease() __cpu_membarrier()
206 #define SDL_MemoryBarrierAcquire() __cpu_membarrier()
207 #else
208 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
209 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
210 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
211 #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
212 #ifdef __thumb__
213 /* The mcr instruction isn't available in thumb mode, use real functions */
214 #define SDL_MEMORY_BARRIER_USES_FUNCTION
215 #define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
216 #define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
217 #else
218 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
219 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
220 #endif /* __thumb__ */
221 #else
222 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
223 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
224 #endif /* __LINUX__ || __ANDROID__ */
225 #endif /* __GNUC__ && __arm__ */
226 #else
227 #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
228 /* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
229 #include <mbarrier.h>
230 #define SDL_MemoryBarrierRelease() __machine_rel_barrier()
231 #define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
232 #else
233 /* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
234 #define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
235 #define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
236 #endif
237 #endif
238
239 /**
240 * \brief A type representing an atomic integer value. It is a struct
241 * so people don't accidentally use numeric operations on it.
242 */
243 typedef struct { int value; } SDL_atomic_t;
244
245 /**
246 * Set an atomic variable to a new value if it is currently an old value.
247 *
248 * ***Note: If you don't know what this function is for, you shouldn't use
249 * it!***
250 *
251 * \param a a pointer to an SDL_atomic_t variable to be modified
252 * \param oldval the old value
253 * \param newval the new value
254 * \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
255 *
256 * \since This function is available since SDL 2.0.0.
257 *
258 * \sa SDL_AtomicCASPtr
259 * \sa SDL_AtomicGet
260 * \sa SDL_AtomicSet
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
263
264 /**
265 * Set an atomic variable to a value.
266 *
267 * This function also acts as a full memory barrier.
268 *
269 * ***Note: If you don't know what this function is for, you shouldn't use
270 * it!***
271 *
272 * \param a a pointer to an SDL_atomic_t variable to be modified
273 * \param v the desired value
274 * \returns the previous value of the atomic variable.
275 *
276 * \since This function is available since SDL 2.0.2.
277 *
278 * \sa SDL_AtomicGet
279 */
280 extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
281
282 /**
283 * Get the value of an atomic variable.
284 *
285 * ***Note: If you don't know what this function is for, you shouldn't use
286 * it!***
287 *
288 * \param a a pointer to an SDL_atomic_t variable
289 * \returns the current value of an atomic variable.
290 *
291 * \since This function is available since SDL 2.0.2.
292 *
293 * \sa SDL_AtomicSet
294 */
295 extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
296
297 /**
298 * Add to an atomic variable.
299 *
300 * This function also acts as a full memory barrier.
301 *
302 * ***Note: If you don't know what this function is for, you shouldn't use
303 * it!***
304 *
305 * \param a a pointer to an SDL_atomic_t variable to be modified
306 * \param v the desired value to add
307 * \returns the previous value of the atomic variable.
308 *
309 * \since This function is available since SDL 2.0.2.
310 *
311 * \sa SDL_AtomicDecRef
312 * \sa SDL_AtomicIncRef
313 */
314 extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
315
316 /**
317 * \brief Increment an atomic variable used as a reference count.
318 */
319 #ifndef SDL_AtomicIncRef
320 #define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
321 #endif
322
323 /**
324 * \brief Decrement an atomic variable used as a reference count.
325 *
326 * \return SDL_TRUE if the variable reached zero after decrementing,
327 * SDL_FALSE otherwise
328 */
329 #ifndef SDL_AtomicDecRef
330 #define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
331 #endif
332
333 /**
334 * Set a pointer to a new value if it is currently an old value.
335 *
336 * ***Note: If you don't know what this function is for, you shouldn't use
337 * it!***
338 *
339 * \param a a pointer to a pointer
340 * \param oldval the old pointer value
341 * \param newval the new pointer value
342 * \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
343 *
344 * \since This function is available since SDL 2.0.0.
345 *
346 * \sa SDL_AtomicCAS
347 * \sa SDL_AtomicGetPtr
348 * \sa SDL_AtomicSetPtr
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
351
352 /**
353 * Set a pointer to a value atomically.
354 *
355 * ***Note: If you don't know what this function is for, you shouldn't use
356 * it!***
357 *
358 * \param a a pointer to a pointer
359 * \param v the desired pointer value
360 * \returns the previous value of the pointer.
361 *
362 * \since This function is available since SDL 2.0.2.
363 *
364 * \sa SDL_AtomicCASPtr
365 * \sa SDL_AtomicGetPtr
366 */
367 extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
368
369 /**
370 * Get the value of a pointer atomically.
371 *
372 * ***Note: If you don't know what this function is for, you shouldn't use
373 * it!***
374 *
375 * \param a a pointer to a pointer
376 * \returns the current value of a pointer.
377 *
378 * \since This function is available since SDL 2.0.2.
379 *
380 * \sa SDL_AtomicCASPtr
381 * \sa SDL_AtomicSetPtr
382 */
383 extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
384
385 /* Ends C function definitions when using C++ */
386 #ifdef __cplusplus
387 }
388 #endif
389
390 #include <SDL2/close_code.h>
391
392 #endif /* SDL_atomic_h_ */
393
394 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /* !!! FIXME: several functions in here need Doxygen comments. */
22
23 /**
24 * \file SDL_audio.h
25 *
26 * Access to the raw audio mixing buffer for the SDL library.
27 */
28
29 #ifndef SDL_audio_h_
30 #define SDL_audio_h_
31
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_error.h>
34 #include <SDL2/SDL_endian.h>
35 #include <SDL2/SDL_mutex.h>
36 #include <SDL2/SDL_thread.h>
37 #include <SDL2/SDL_rwops.h>
38
39 #include <SDL2/begin_code.h>
40 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 /**
46 * \brief Audio format flags.
47 *
48 * These are what the 16 bits in SDL_AudioFormat currently mean...
49 * (Unspecified bits are always zero).
50 *
51 * \verbatim
52 ++-----------------------sample is signed if set
53 ||
54 || ++-----------sample is bigendian if set
55 || ||
56 || || ++---sample is float if set
57 || || ||
58 || || || +---sample bit size---+
59 || || || | |
60 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
61 \endverbatim
62 *
63 * There are macros in SDL 2.0 and later to query these bits.
64 */
65 typedef Uint16 SDL_AudioFormat;
66
67 /**
68 * \name Audio flags
69 */
70 /* @{ */
71
72 #define SDL_AUDIO_MASK_BITSIZE (0xFF)
73 #define SDL_AUDIO_MASK_DATATYPE (1<<8)
74 #define SDL_AUDIO_MASK_ENDIAN (1<<12)
75 #define SDL_AUDIO_MASK_SIGNED (1<<15)
76 #define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
77 #define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
78 #define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
79 #define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
80 #define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
81 #define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
82 #define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
83
84 /**
85 * \name Audio format flags
86 *
87 * Defaults to LSB byte order.
88 */
89 /* @{ */
90 #define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
91 #define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
92 #define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */
93 #define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
94 #define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */
95 #define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
96 #define AUDIO_U16 AUDIO_U16LSB
97 #define AUDIO_S16 AUDIO_S16LSB
98 /* @} */
99
100 /**
101 * \name int32 support
102 */
103 /* @{ */
104 #define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
105 #define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
106 #define AUDIO_S32 AUDIO_S32LSB
107 /* @} */
108
109 /**
110 * \name float32 support
111 */
112 /* @{ */
113 #define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
114 #define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
115 #define AUDIO_F32 AUDIO_F32LSB
116 /* @} */
117
118 /**
119 * \name Native audio byte ordering
120 */
121 /* @{ */
122 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
123 #define AUDIO_U16SYS AUDIO_U16LSB
124 #define AUDIO_S16SYS AUDIO_S16LSB
125 #define AUDIO_S32SYS AUDIO_S32LSB
126 #define AUDIO_F32SYS AUDIO_F32LSB
127 #else
128 #define AUDIO_U16SYS AUDIO_U16MSB
129 #define AUDIO_S16SYS AUDIO_S16MSB
130 #define AUDIO_S32SYS AUDIO_S32MSB
131 #define AUDIO_F32SYS AUDIO_F32MSB
132 #endif
133 /* @} */
134
135 /**
136 * \name Allow change flags
137 *
138 * Which audio format changes are allowed when opening a device.
139 */
140 /* @{ */
141 #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
142 #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
143 #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
144 #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
145 #define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
146 /* @} */
147
148 /* @} *//* Audio flags */
149
150 /**
151 * This function is called when the audio device needs more data.
152 *
153 * \param userdata An application-specific parameter saved in
154 * the SDL_AudioSpec structure
155 * \param stream A pointer to the audio data buffer.
156 * \param len The length of that buffer in bytes.
157 *
158 * Once the callback returns, the buffer will no longer be valid.
159 * Stereo samples are stored in a LRLRLR ordering.
160 *
161 * You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
162 * you like. Just open your audio device with a NULL callback.
163 */
164 typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
165 int len);
166
167 /**
168 * The calculated values in this structure are calculated by SDL_OpenAudio().
169 *
170 * For multi-channel audio, the default SDL channel mapping is:
171 * 2: FL FR (stereo)
172 * 3: FL FR LFE (2.1 surround)
173 * 4: FL FR BL BR (quad)
174 * 5: FL FR FC BL BR (quad + center)
175 * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
176 * 7: FL FR FC LFE BC SL SR (6.1 surround)
177 * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
178 */
179 typedef struct SDL_AudioSpec
180 {
181 int freq; /**< DSP frequency -- samples per second */
182 SDL_AudioFormat format; /**< Audio data format */
183 Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
184 Uint8 silence; /**< Audio buffer silence value (calculated) */
185 Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
186 Uint16 padding; /**< Necessary for some compile environments */
187 Uint32 size; /**< Audio buffer size in bytes (calculated) */
188 SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
189 void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */
190 } SDL_AudioSpec;
191
192
193 struct SDL_AudioCVT;
194 typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
195 SDL_AudioFormat format);
196
197 /**
198 * \brief Upper limit of filters in SDL_AudioCVT
199 *
200 * The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
201 * currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
202 * one of which is the terminating NULL pointer.
203 */
204 #define SDL_AUDIOCVT_MAX_FILTERS 9
205
206 /**
207 * \struct SDL_AudioCVT
208 * \brief A structure to hold a set of audio conversion filters and buffers.
209 *
210 * Note that various parts of the conversion pipeline can take advantage
211 * of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
212 * you to pass it aligned data, but can possibly run much faster if you
213 * set both its (buf) field to a pointer that is aligned to 16 bytes, and its
214 * (len) field to something that's a multiple of 16, if possible.
215 */
216 #if defined(__GNUC__) && !defined(__CHERI_PURE_CAPABILITY__)
217 /* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
218 pad it out to 88 bytes to guarantee ABI compatibility between compilers.
219 This is not a concern on CHERI architectures, where pointers must be stored
220 at aligned locations otherwise they will become invalid, and thus structs
221 containing pointers cannot be packed without giving a warning or error.
222 vvv
223 The next time we rev the ABI, make sure to size the ints and add padding.
224 */
225 #define SDL_AUDIOCVT_PACKED __attribute__((packed))
226 #else
227 #define SDL_AUDIOCVT_PACKED
228 #endif
229 /* */
230 typedef struct SDL_AudioCVT
231 {
232 int needed; /**< Set to 1 if conversion possible */
233 SDL_AudioFormat src_format; /**< Source audio format */
234 SDL_AudioFormat dst_format; /**< Target audio format */
235 double rate_incr; /**< Rate conversion increment */
236 Uint8 *buf; /**< Buffer to hold entire audio data */
237 int len; /**< Length of original audio buffer */
238 int len_cvt; /**< Length of converted audio buffer */
239 int len_mult; /**< buffer must be len*len_mult big */
240 double len_ratio; /**< Given len, final size is len*len_ratio */
241 SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */
242 int filter_index; /**< Current audio conversion function */
243 } SDL_AUDIOCVT_PACKED SDL_AudioCVT;
244
245
246 /* Function prototypes */
247
248 /**
249 * \name Driver discovery functions
250 *
251 * These functions return the list of built in audio drivers, in the
252 * order that they are normally initialized by default.
253 */
254 /* @{ */
255
256 /**
257 * Use this function to get the number of built-in audio drivers.
258 *
259 * This function returns a hardcoded number. This never returns a negative
260 * value; if there are no drivers compiled into this build of SDL, this
261 * function returns zero. The presence of a driver in this list does not mean
262 * it will function, it just means SDL is capable of interacting with that
263 * interface. For example, a build of SDL might have esound support, but if
264 * there's no esound server available, SDL's esound driver would fail if used.
265 *
266 * By default, SDL tries all drivers, in its preferred order, until one is
267 * found to be usable.
268 *
269 * \returns the number of built-in audio drivers.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_GetAudioDriver
274 */
275 extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
276
277 /**
278 * Use this function to get the name of a built in audio driver.
279 *
280 * The list of audio drivers is given in the order that they are normally
281 * initialized by default; the drivers that seem more reasonable to choose
282 * first (as far as the SDL developers believe) are earlier in the list.
283 *
284 * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
285 * "coreaudio" or "xaudio2". These never have Unicode characters, and are not
286 * meant to be proper names.
287 *
288 * \param index the index of the audio driver; the value ranges from 0 to
289 * SDL_GetNumAudioDrivers() - 1
290 * \returns the name of the audio driver at the requested index, or NULL if an
291 * invalid index was specified.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_GetNumAudioDrivers
296 */
297 extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
298 /* @} */
299
300 /**
301 * \name Initialization and cleanup
302 *
303 * \internal These functions are used internally, and should not be used unless
304 * you have a specific need to specify the audio driver you want to
305 * use. You should normally use SDL_Init() or SDL_InitSubSystem().
306 */
307 /* @{ */
308
309 /**
310 * Use this function to initialize a particular audio driver.
311 *
312 * This function is used internally, and should not be used unless you have a
313 * specific need to designate the audio driver you want to use. You should
314 * normally use SDL_Init() or SDL_InitSubSystem().
315 *
316 * \param driver_name the name of the desired audio driver
317 * \returns 0 on success or a negative error code on failure; call
318 * SDL_GetError() for more information.
319 *
320 * \since This function is available since SDL 2.0.0.
321 *
322 * \sa SDL_AudioQuit
323 */
324 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
325
326 /**
327 * Use this function to shut down audio if you initialized it with
328 * SDL_AudioInit().
329 *
330 * This function is used internally, and should not be used unless you have a
331 * specific need to specify the audio driver you want to use. You should
332 * normally use SDL_Quit() or SDL_QuitSubSystem().
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_AudioInit
337 */
338 extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
339 /* @} */
340
341 /**
342 * Get the name of the current audio driver.
343 *
344 * The returned string points to internal static memory and thus never becomes
345 * invalid, even if you quit the audio subsystem and initialize a new driver
346 * (although such a case would return a different static string from another
347 * call to this function, of course). As such, you should not modify or free
348 * the returned string.
349 *
350 * \returns the name of the current audio driver or NULL if no driver has been
351 * initialized.
352 *
353 * \since This function is available since SDL 2.0.0.
354 *
355 * \sa SDL_AudioInit
356 */
357 extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
358
359 /**
360 * This function is a legacy means of opening the audio device.
361 *
362 * This function remains for compatibility with SDL 1.2, but also because it's
363 * slightly easier to use than the new functions in SDL 2.0. The new, more
364 * powerful, and preferred way to do this is SDL_OpenAudioDevice().
365 *
366 * This function is roughly equivalent to:
367 *
368 * ```c
369 * SDL_OpenAudioDevice(NULL, 0, desired, obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
370 * ```
371 *
372 * With two notable exceptions:
373 *
374 * - If `obtained` is NULL, we use `desired` (and allow no changes), which
375 * means desired will be modified to have the correct values for silence,
376 * etc, and SDL will convert any differences between your app's specific
377 * request and the hardware behind the scenes.
378 * - The return value is always success or failure, and not a device ID, which
379 * means you can only have one device open at a time with this function.
380 *
381 * \param desired an SDL_AudioSpec structure representing the desired output
382 * format. Please refer to the SDL_OpenAudioDevice
383 * documentation for details on how to prepare this structure.
384 * \param obtained an SDL_AudioSpec structure filled in with the actual
385 * parameters, or NULL.
386 * \returns 0 if successful, placing the actual hardware parameters in the
387 * structure pointed to by `obtained`.
388 *
389 * If `obtained` is NULL, the audio data passed to the callback
390 * function will be guaranteed to be in the requested format, and
391 * will be automatically converted to the actual hardware audio
392 * format if necessary. If `obtained` is NULL, `desired` will have
393 * fields modified.
394 *
395 * This function returns a negative error code on failure to open the
396 * audio device or failure to set up the audio thread; call
397 * SDL_GetError() for more information.
398 *
399 * \since This function is available since SDL 2.0.0.
400 *
401 * \sa SDL_CloseAudio
402 * \sa SDL_LockAudio
403 * \sa SDL_PauseAudio
404 * \sa SDL_UnlockAudio
405 */
406 extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
407 SDL_AudioSpec * obtained);
408
409 /**
410 * SDL Audio Device IDs.
411 *
412 * A successful call to SDL_OpenAudio() is always device id 1, and legacy
413 * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
414 * always returns devices >= 2 on success. The legacy calls are good both
415 * for backwards compatibility and when you don't care about multiple,
416 * specific, or capture devices.
417 */
418 typedef Uint32 SDL_AudioDeviceID;
419
420 /**
421 * Get the number of built-in audio devices.
422 *
423 * This function is only valid after successfully initializing the audio
424 * subsystem.
425 *
426 * Note that audio capture support is not implemented as of SDL 2.0.4, so the
427 * `iscapture` parameter is for future expansion and should always be zero for
428 * now.
429 *
430 * This function will return -1 if an explicit list of devices can't be
431 * determined. Returning -1 is not an error. For example, if SDL is set up to
432 * talk to a remote audio server, it can't list every one available on the
433 * Internet, but it will still allow a specific host to be specified in
434 * SDL_OpenAudioDevice().
435 *
436 * In many common cases, when this function returns a value <= 0, it can still
437 * successfully open the default device (NULL for first argument of
438 * SDL_OpenAudioDevice()).
439 *
440 * This function may trigger a complete redetect of available hardware. It
441 * should not be called for each iteration of a loop, but rather once at the
442 * start of a loop:
443 *
444 * ```c
445 * // Don't do this:
446 * for (int i = 0; i < SDL_GetNumAudioDevices(0); i++)
447 *
448 * // do this instead:
449 * const int count = SDL_GetNumAudioDevices(0);
450 * for (int i = 0; i < count; ++i) { do_something_here(); }
451 * ```
452 *
453 * \param iscapture zero to request playback devices, non-zero to request
454 * recording devices
455 * \returns the number of available devices exposed by the current driver or
456 * -1 if an explicit list of devices can't be determined. A return
457 * value of -1 does not necessarily mean an error condition.
458 *
459 * \since This function is available since SDL 2.0.0.
460 *
461 * \sa SDL_GetAudioDeviceName
462 * \sa SDL_OpenAudioDevice
463 */
464 extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
465
466 /**
467 * Get the human-readable name of a specific audio device.
468 *
469 * This function is only valid after successfully initializing the audio
470 * subsystem. The values returned by this function reflect the latest call to
471 * SDL_GetNumAudioDevices(); re-call that function to redetect available
472 * hardware.
473 *
474 * The string returned by this function is UTF-8 encoded, read-only, and
475 * managed internally. You are not to free it. If you need to keep the string
476 * for any length of time, you should make your own copy of it, as it will be
477 * invalid next time any of several other SDL functions are called.
478 *
479 * \param index the index of the audio device; valid values range from 0 to
480 * SDL_GetNumAudioDevices() - 1
481 * \param iscapture non-zero to query the list of recording devices, zero to
482 * query the list of output devices.
483 * \returns the name of the audio device at the requested index, or NULL on
484 * error.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetNumAudioDevices
489 */
490 extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
491 int iscapture);
492
493 /**
494 * Get the preferred audio format of a specific audio device.
495 *
496 * This function is only valid after a successfully initializing the audio
497 * subsystem. The values returned by this function reflect the latest call to
498 * SDL_GetNumAudioDevices(); re-call that function to redetect available
499 * hardware.
500 *
501 * `spec` will be filled with the sample rate, sample format, and channel
502 * count.
503 *
504 * \param index the index of the audio device; valid values range from 0 to
505 * SDL_GetNumAudioDevices() - 1
506 * \param iscapture non-zero to query the list of recording devices, zero to
507 * query the list of output devices.
508 * \param spec The SDL_AudioSpec to be initialized by this function.
509 * \returns 0 on success, nonzero on error
510 *
511 * \since This function is available since SDL 2.0.16.
512 *
513 * \sa SDL_GetNumAudioDevices
514 */
515 extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
516 int iscapture,
517 SDL_AudioSpec *spec);
518
519
520 /**
521 * Open a specific audio device.
522 *
523 * SDL_OpenAudio(), unlike this function, always acts on device ID 1. As such,
524 * this function will never return a 1 so as not to conflict with the legacy
525 * function.
526 *
527 * Please note that SDL 2.0 before 2.0.5 did not support recording; as such,
528 * this function would fail if `iscapture` was not zero. Starting with SDL
529 * 2.0.5, recording is implemented and this value can be non-zero.
530 *
531 * Passing in a `device` name of NULL requests the most reasonable default
532 * (and is equivalent to what SDL_OpenAudio() does to choose a device). The
533 * `device` name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
534 * some drivers allow arbitrary and driver-specific strings, such as a
535 * hostname/IP address for a remote audio server, or a filename in the
536 * diskaudio driver.
537 *
538 * An opened audio device starts out paused, and should be enabled for playing
539 * by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
540 * callback function to be called. Since the audio driver may modify the
541 * requested size of the audio buffer, you should allocate any local mixing
542 * buffers after you open the audio device.
543 *
544 * The audio callback runs in a separate thread in most cases; you can prevent
545 * race conditions between your callback and other threads without fully
546 * pausing playback with SDL_LockAudioDevice(). For more information about the
547 * callback, see SDL_AudioSpec.
548 *
549 * Managing the audio spec via 'desired' and 'obtained':
550 *
551 * When filling in the desired audio spec structure:
552 *
553 * - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
554 * - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
555 * - `desired->samples` is the desired size of the audio buffer, in _sample
556 * frames_ (with stereo output, two samples--left and right--would make a
557 * single sample frame). This number should be a power of two, and may be
558 * adjusted by the audio driver to a value more suitable for the hardware.
559 * Good values seem to range between 512 and 8096 inclusive, depending on
560 * the application and CPU speed. Smaller values reduce latency, but can
561 * lead to underflow if the application is doing heavy processing and cannot
562 * fill the audio buffer in time. Note that the number of sample frames is
563 * directly related to time by the following formula: `ms =
564 * (sampleframes*1000)/freq`
565 * - `desired->size` is the size in _bytes_ of the audio buffer, and is
566 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
567 * - `desired->silence` is the value used to set the buffer to silence, and is
568 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
569 * - `desired->callback` should be set to a function that will be called when
570 * the audio device is ready for more data. It is passed a pointer to the
571 * audio buffer, and the length in bytes of the audio buffer. This function
572 * usually runs in a separate thread, and so you should protect data
573 * structures that it accesses by calling SDL_LockAudioDevice() and
574 * SDL_UnlockAudioDevice() in your code. Alternately, you may pass a NULL
575 * pointer here, and call SDL_QueueAudio() with some frequency, to queue
576 * more audio samples to be played (or for capture devices, call
577 * SDL_DequeueAudio() with some frequency, to obtain audio samples).
578 * - `desired->userdata` is passed as the first parameter to your callback
579 * function. If you passed a NULL callback, this value is ignored.
580 *
581 * `allowed_changes` can have the following flags OR'd together:
582 *
583 * - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
584 * - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
585 * - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
586 * - `SDL_AUDIO_ALLOW_ANY_CHANGE`
587 *
588 * These flags specify how SDL should behave when a device cannot offer a
589 * specific feature. If the application requests a feature that the hardware
590 * doesn't offer, SDL will always try to get the closest equivalent.
591 *
592 * For example, if you ask for float32 audio format, but the sound card only
593 * supports int16, SDL will set the hardware to int16. If you had set
594 * SDL_AUDIO_ALLOW_FORMAT_CHANGE, SDL will change the format in the `obtained`
595 * structure. If that flag was *not* set, SDL will prepare to convert your
596 * callback's float32 audio to int16 before feeding it to the hardware and
597 * will keep the originally requested format in the `obtained` structure.
598 *
599 * The resulting audio specs, varying depending on hardware and on what
600 * changes were allowed, will then be written back to `obtained`.
601 *
602 * If your application can only handle one specific data format, pass a zero
603 * for `allowed_changes` and let SDL transparently handle any differences.
604 *
605 * \param device a UTF-8 string reported by SDL_GetAudioDeviceName() or a
606 * driver-specific name as appropriate. NULL requests the most
607 * reasonable default device.
608 * \param iscapture non-zero to specify a device should be opened for
609 * recording, not playback
610 * \param desired an SDL_AudioSpec structure representing the desired output
611 * format; see SDL_OpenAudio() for more information
612 * \param obtained an SDL_AudioSpec structure filled in with the actual output
613 * format; see SDL_OpenAudio() for more information
614 * \param allowed_changes 0, or one or more flags OR'd together
615 * \returns a valid device ID that is > 0 on success or 0 on failure; call
616 * SDL_GetError() for more information.
617 *
618 * For compatibility with SDL 1.2, this will never return 1, since
619 * SDL reserves that ID for the legacy SDL_OpenAudio() function.
620 *
621 * \since This function is available since SDL 2.0.0.
622 *
623 * \sa SDL_CloseAudioDevice
624 * \sa SDL_GetAudioDeviceName
625 * \sa SDL_LockAudioDevice
626 * \sa SDL_OpenAudio
627 * \sa SDL_PauseAudioDevice
628 * \sa SDL_UnlockAudioDevice
629 */
630 extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(
631 const char *device,
632 int iscapture,
633 const SDL_AudioSpec *desired,
634 SDL_AudioSpec *obtained,
635 int allowed_changes);
636
637
638
639 /**
640 * \name Audio state
641 *
642 * Get the current audio state.
643 */
644 /* @{ */
645 typedef enum
646 {
647 SDL_AUDIO_STOPPED = 0,
648 SDL_AUDIO_PLAYING,
649 SDL_AUDIO_PAUSED
650 } SDL_AudioStatus;
651
652 /**
653 * This function is a legacy means of querying the audio device.
654 *
655 * New programs might want to use SDL_GetAudioDeviceStatus() instead. This
656 * function is equivalent to calling...
657 *
658 * ```c
659 * SDL_GetAudioDeviceStatus(1);
660 * ```
661 *
662 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
663 *
664 * \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio().
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_GetAudioDeviceStatus
669 */
670 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
671
672 /**
673 * Use this function to get the current audio state of an audio device.
674 *
675 * \param dev the ID of an audio device previously opened with
676 * SDL_OpenAudioDevice()
677 * \returns the SDL_AudioStatus of the specified audio device.
678 *
679 * \since This function is available since SDL 2.0.0.
680 *
681 * \sa SDL_PauseAudioDevice
682 */
683 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
684 /* @} *//* Audio State */
685
686 /**
687 * \name Pause audio functions
688 *
689 * These functions pause and unpause the audio callback processing.
690 * They should be called with a parameter of 0 after opening the audio
691 * device to start playing sound. This is so you can safely initialize
692 * data for your callback function after opening the audio device.
693 * Silence will be written to the audio device during the pause.
694 */
695 /* @{ */
696
697 /**
698 * This function is a legacy means of pausing the audio device.
699 *
700 * New programs might want to use SDL_PauseAudioDevice() instead. This
701 * function is equivalent to calling...
702 *
703 * ```c
704 * SDL_PauseAudioDevice(1, pause_on);
705 * ```
706 *
707 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
708 *
709 * \param pause_on non-zero to pause, 0 to unpause
710 *
711 * \since This function is available since SDL 2.0.0.
712 *
713 * \sa SDL_GetAudioStatus
714 * \sa SDL_PauseAudioDevice
715 */
716 extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
717
718 /**
719 * Use this function to pause and unpause audio playback on a specified
720 * device.
721 *
722 * This function pauses and unpauses the audio callback processing for a given
723 * device. Newly-opened audio devices start in the paused state, so you must
724 * call this function with **pause_on**=0 after opening the specified audio
725 * device to start playing sound. This allows you to safely initialize data
726 * for your callback function after opening the audio device. Silence will be
727 * written to the audio device while paused, and the audio callback is
728 * guaranteed to not be called. Pausing one device does not prevent other
729 * unpaused devices from running their callbacks.
730 *
731 * Pausing state does not stack; even if you pause a device several times, a
732 * single unpause will start the device playing again, and vice versa. This is
733 * different from how SDL_LockAudioDevice() works.
734 *
735 * If you just need to protect a few variables from race conditions vs your
736 * callback, you shouldn't pause the audio device, as it will lead to dropouts
737 * in the audio playback. Instead, you should use SDL_LockAudioDevice().
738 *
739 * \param dev a device opened by SDL_OpenAudioDevice()
740 * \param pause_on non-zero to pause, 0 to unpause
741 *
742 * \since This function is available since SDL 2.0.0.
743 *
744 * \sa SDL_LockAudioDevice
745 */
746 extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
747 int pause_on);
748 /* @} *//* Pause audio functions */
749
750 /**
751 * Load the audio data of a WAVE file into memory.
752 *
753 * Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to
754 * be valid pointers. The entire data portion of the file is then loaded into
755 * memory and decoded if necessary.
756 *
757 * If `freesrc` is non-zero, the data source gets automatically closed and
758 * freed before the function returns.
759 *
760 * Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
761 * 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
762 * A-law and mu-law (8 bits). Other formats are currently unsupported and
763 * cause an error.
764 *
765 * If this function succeeds, the pointer returned by it is equal to `spec`
766 * and the pointer to the audio data allocated by the function is written to
767 * `audio_buf` and its length in bytes to `audio_len`. The SDL_AudioSpec
768 * members `freq`, `channels`, and `format` are set to the values of the audio
769 * data in the buffer. The `samples` member is set to a sane default and all
770 * others are set to zero.
771 *
772 * It's necessary to use SDL_FreeWAV() to free the audio data returned in
773 * `audio_buf` when it is no longer used.
774 *
775 * Because of the underspecification of the .WAV format, there are many
776 * problematic files in the wild that cause issues with strict decoders. To
777 * provide compatibility with these files, this decoder is lenient in regards
778 * to the truncation of the file, the fact chunk, and the size of the RIFF
779 * chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,
780 * `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to
781 * tune the behavior of the loading process.
782 *
783 * Any file that is invalid (due to truncation, corruption, or wrong values in
784 * the headers), too big, or unsupported causes an error. Additionally, any
785 * critical I/O error from the data source will terminate the loading process
786 * with an error. The function returns NULL on error and in all cases (with
787 * the exception of `src` being NULL), an appropriate error message will be
788 * set.
789 *
790 * It is required that the data source supports seeking.
791 *
792 * Example:
793 *
794 * ```c
795 * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
796 * ```
797 *
798 * Note that the SDL_LoadWAV macro does this same thing for you, but in a less
799 * messy way:
800 *
801 * ```c
802 * SDL_LoadWAV("sample.wav", &spec, &buf, &len);
803 * ```
804 *
805 * \param src The data source for the WAVE data
806 * \param freesrc If non-zero, SDL will _always_ free the data source
807 * \param spec An SDL_AudioSpec that will be filled in with the wave file's
808 * format details
809 * \param audio_buf A pointer filled with the audio data, allocated by the
810 * function.
811 * \param audio_len A pointer filled with the length of the audio data buffer
812 * in bytes
813 * \returns This function, if successfully called, returns `spec`, which will
814 * be filled with the audio data format of the wave source data.
815 * `audio_buf` will be filled with a pointer to an allocated buffer
816 * containing the audio data, and `audio_len` is filled with the
817 * length of that audio buffer in bytes.
818 *
819 * This function returns NULL if the .WAV file cannot be opened, uses
820 * an unknown data format, or is corrupt; call SDL_GetError() for
821 * more information.
822 *
823 * When the application is done with the data returned in
824 * `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
825 *
826 * \since This function is available since SDL 2.0.0.
827 *
828 * \sa SDL_FreeWAV
829 * \sa SDL_LoadWAV
830 */
831 extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
832 int freesrc,
833 SDL_AudioSpec * spec,
834 Uint8 ** audio_buf,
835 Uint32 * audio_len);
836
837 /**
838 * Loads a WAV from a file.
839 * Compatibility convenience function.
840 */
841 #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
842 SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
843
844 /**
845 * Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
846 *
847 * After a WAVE file has been opened with SDL_LoadWAV() or SDL_LoadWAV_RW()
848 * its data can eventually be freed with SDL_FreeWAV(). It is safe to call
849 * this function with a NULL pointer.
850 *
851 * \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
852 * SDL_LoadWAV_RW()
853 *
854 * \since This function is available since SDL 2.0.0.
855 *
856 * \sa SDL_LoadWAV
857 * \sa SDL_LoadWAV_RW
858 */
859 extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
860
861 /**
862 * Initialize an SDL_AudioCVT structure for conversion.
863 *
864 * Before an SDL_AudioCVT structure can be used to convert audio data it must
865 * be initialized with source and destination information.
866 *
867 * This function will zero out every field of the SDL_AudioCVT, so it must be
868 * called before the application fills in the final buffer information.
869 *
870 * Once this function has returned successfully, and reported that a
871 * conversion is necessary, the application fills in the rest of the fields in
872 * SDL_AudioCVT, now that it knows how large a buffer it needs to allocate,
873 * and then can call SDL_ConvertAudio() to complete the conversion.
874 *
875 * \param cvt an SDL_AudioCVT structure filled in with audio conversion
876 * information
877 * \param src_format the source format of the audio data; for more info see
878 * SDL_AudioFormat
879 * \param src_channels the number of channels in the source
880 * \param src_rate the frequency (sample-frames-per-second) of the source
881 * \param dst_format the destination format of the audio data; for more info
882 * see SDL_AudioFormat
883 * \param dst_channels the number of channels in the destination
884 * \param dst_rate the frequency (sample-frames-per-second) of the destination
885 * \returns 1 if the audio filter is prepared, 0 if no conversion is needed,
886 * or a negative error code on failure; call SDL_GetError() for more
887 * information.
888 *
889 * \since This function is available since SDL 2.0.0.
890 *
891 * \sa SDL_ConvertAudio
892 */
893 extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
894 SDL_AudioFormat src_format,
895 Uint8 src_channels,
896 int src_rate,
897 SDL_AudioFormat dst_format,
898 Uint8 dst_channels,
899 int dst_rate);
900
901 /**
902 * Convert audio data to a desired audio format.
903 *
904 * This function does the actual audio data conversion, after the application
905 * has called SDL_BuildAudioCVT() to prepare the conversion information and
906 * then filled in the buffer details.
907 *
908 * Once the application has initialized the `cvt` structure using
909 * SDL_BuildAudioCVT(), allocated an audio buffer and filled it with audio
910 * data in the source format, this function will convert the buffer, in-place,
911 * to the desired format.
912 *
913 * The data conversion may go through several passes; any given pass may
914 * possibly temporarily increase the size of the data. For example, SDL might
915 * expand 16-bit data to 32 bits before resampling to a lower frequency,
916 * shrinking the data size after having grown it briefly. Since the supplied
917 * buffer will be both the source and destination, converting as necessary
918 * in-place, the application must allocate a buffer that will fully contain
919 * the data during its largest conversion pass. After SDL_BuildAudioCVT()
920 * returns, the application should set the `cvt->len` field to the size, in
921 * bytes, of the source data, and allocate a buffer that is `cvt->len *
922 * cvt->len_mult` bytes long for the `buf` field.
923 *
924 * The source data should be copied into this buffer before the call to
925 * SDL_ConvertAudio(). Upon successful return, this buffer will contain the
926 * converted audio, and `cvt->len_cvt` will be the size of the converted data,
927 * in bytes. Any bytes in the buffer past `cvt->len_cvt` are undefined once
928 * this function returns.
929 *
930 * \param cvt an SDL_AudioCVT structure that was previously set up by
931 * SDL_BuildAudioCVT().
932 * \returns 0 if the conversion was completed successfully or a negative error
933 * code on failure; call SDL_GetError() for more information.
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_BuildAudioCVT
938 */
939 extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
940
941 /* SDL_AudioStream is a new audio conversion interface.
942 The benefits vs SDL_AudioCVT:
943 - it can handle resampling data in chunks without generating
944 artifacts, when it doesn't have the complete buffer available.
945 - it can handle incoming data in any variable size.
946 - You push data as you have it, and pull it when you need it
947 */
948 /* this is opaque to the outside world. */
949 struct _SDL_AudioStream;
950 typedef struct _SDL_AudioStream SDL_AudioStream;
951
952 /**
953 * Create a new audio stream.
954 *
955 * \param src_format The format of the source audio
956 * \param src_channels The number of channels of the source audio
957 * \param src_rate The sampling rate of the source audio
958 * \param dst_format The format of the desired audio output
959 * \param dst_channels The number of channels of the desired audio output
960 * \param dst_rate The sampling rate of the desired audio output
961 * \returns 0 on success, or -1 on error.
962 *
963 * \since This function is available since SDL 2.0.7.
964 *
965 * \sa SDL_AudioStreamPut
966 * \sa SDL_AudioStreamGet
967 * \sa SDL_AudioStreamAvailable
968 * \sa SDL_AudioStreamFlush
969 * \sa SDL_AudioStreamClear
970 * \sa SDL_FreeAudioStream
971 */
972 extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
973 const Uint8 src_channels,
974 const int src_rate,
975 const SDL_AudioFormat dst_format,
976 const Uint8 dst_channels,
977 const int dst_rate);
978
979 /**
980 * Add data to be converted/resampled to the stream.
981 *
982 * \param stream The stream the audio data is being added to
983 * \param buf A pointer to the audio data to add
984 * \param len The number of bytes to write to the stream
985 * \returns 0 on success, or -1 on error.
986 *
987 * \since This function is available since SDL 2.0.7.
988 *
989 * \sa SDL_NewAudioStream
990 * \sa SDL_AudioStreamGet
991 * \sa SDL_AudioStreamAvailable
992 * \sa SDL_AudioStreamFlush
993 * \sa SDL_AudioStreamClear
994 * \sa SDL_FreeAudioStream
995 */
996 extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
997
998 /**
999 * Get converted/resampled data from the stream
1000 *
1001 * \param stream The stream the audio is being requested from
1002 * \param buf A buffer to fill with audio data
1003 * \param len The maximum number of bytes to fill
1004 * \returns the number of bytes read from the stream, or -1 on error
1005 *
1006 * \since This function is available since SDL 2.0.7.
1007 *
1008 * \sa SDL_NewAudioStream
1009 * \sa SDL_AudioStreamPut
1010 * \sa SDL_AudioStreamAvailable
1011 * \sa SDL_AudioStreamFlush
1012 * \sa SDL_AudioStreamClear
1013 * \sa SDL_FreeAudioStream
1014 */
1015 extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
1016
1017 /**
1018 * Get the number of converted/resampled bytes available.
1019 *
1020 * The stream may be buffering data behind the scenes until it has enough to
1021 * resample correctly, so this number might be lower than what you expect, or
1022 * even be zero. Add more data or flush the stream if you need the data now.
1023 *
1024 * \since This function is available since SDL 2.0.7.
1025 *
1026 * \sa SDL_NewAudioStream
1027 * \sa SDL_AudioStreamPut
1028 * \sa SDL_AudioStreamGet
1029 * \sa SDL_AudioStreamFlush
1030 * \sa SDL_AudioStreamClear
1031 * \sa SDL_FreeAudioStream
1032 */
1033 extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
1034
1035 /**
1036 * Tell the stream that you're done sending data, and anything being buffered
1037 * should be converted/resampled and made available immediately.
1038 *
1039 * It is legal to add more data to a stream after flushing, but there will be
1040 * audio gaps in the output. Generally this is intended to signal the end of
1041 * input, so the complete output becomes available.
1042 *
1043 * \since This function is available since SDL 2.0.7.
1044 *
1045 * \sa SDL_NewAudioStream
1046 * \sa SDL_AudioStreamPut
1047 * \sa SDL_AudioStreamGet
1048 * \sa SDL_AudioStreamAvailable
1049 * \sa SDL_AudioStreamClear
1050 * \sa SDL_FreeAudioStream
1051 */
1052 extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
1053
1054 /**
1055 * Clear any pending data in the stream without converting it
1056 *
1057 * \since This function is available since SDL 2.0.7.
1058 *
1059 * \sa SDL_NewAudioStream
1060 * \sa SDL_AudioStreamPut
1061 * \sa SDL_AudioStreamGet
1062 * \sa SDL_AudioStreamAvailable
1063 * \sa SDL_AudioStreamFlush
1064 * \sa SDL_FreeAudioStream
1065 */
1066 extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
1067
1068 /**
1069 * Free an audio stream
1070 *
1071 * \since This function is available since SDL 2.0.7.
1072 *
1073 * \sa SDL_NewAudioStream
1074 * \sa SDL_AudioStreamPut
1075 * \sa SDL_AudioStreamGet
1076 * \sa SDL_AudioStreamAvailable
1077 * \sa SDL_AudioStreamFlush
1078 * \sa SDL_AudioStreamClear
1079 */
1080 extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
1081
1082 #define SDL_MIX_MAXVOLUME 128
1083
1084 /**
1085 * This function is a legacy means of mixing audio.
1086 *
1087 * This function is equivalent to calling...
1088 *
1089 * ```c
1090 * SDL_MixAudioFormat(dst, src, format, len, volume);
1091 * ```
1092 *
1093 * ...where `format` is the obtained format of the audio device from the
1094 * legacy SDL_OpenAudio() function.
1095 *
1096 * \param dst the destination for the mixed audio
1097 * \param src the source audio buffer to be mixed
1098 * \param len the length of the audio buffer in bytes
1099 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1100 * for full audio volume
1101 *
1102 * \since This function is available since SDL 2.0.0.
1103 *
1104 * \sa SDL_MixAudioFormat
1105 */
1106 extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
1107 Uint32 len, int volume);
1108
1109 /**
1110 * Mix audio data in a specified format.
1111 *
1112 * This takes an audio buffer `src` of `len` bytes of `format` data and mixes
1113 * it into `dst`, performing addition, volume adjustment, and overflow
1114 * clipping. The buffer pointed to by `dst` must also be `len` bytes of
1115 * `format` data.
1116 *
1117 * This is provided for convenience -- you can mix your own audio data.
1118 *
1119 * Do not use this function for mixing together more than two streams of
1120 * sample data. The output from repeated application of this function may be
1121 * distorted by clipping, because there is no accumulator with greater range
1122 * than the input (not to mention this being an inefficient way of doing it).
1123 *
1124 * It is a common misconception that this function is required to write audio
1125 * data to an output stream in an audio callback. While you can do that,
1126 * SDL_MixAudioFormat() is really only needed when you're mixing a single
1127 * audio stream with a volume adjustment.
1128 *
1129 * \param dst the destination for the mixed audio
1130 * \param src the source audio buffer to be mixed
1131 * \param format the SDL_AudioFormat structure representing the desired audio
1132 * format
1133 * \param len the length of the audio buffer in bytes
1134 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1135 * for full audio volume
1136 *
1137 * \since This function is available since SDL 2.0.0.
1138 */
1139 extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
1140 const Uint8 * src,
1141 SDL_AudioFormat format,
1142 Uint32 len, int volume);
1143
1144 /**
1145 * Queue more audio on non-callback devices.
1146 *
1147 * If you are looking to retrieve queued audio from a non-callback capture
1148 * device, you want SDL_DequeueAudio() instead. SDL_QueueAudio() will return
1149 * -1 to signify an error if you use it with capture devices.
1150 *
1151 * SDL offers two ways to feed audio to the device: you can either supply a
1152 * callback that SDL triggers with some frequency to obtain more audio (pull
1153 * method), or you can supply no callback, and then SDL will expect you to
1154 * supply data at regular intervals (push method) with this function.
1155 *
1156 * There are no limits on the amount of data you can queue, short of
1157 * exhaustion of address space. Queued data will drain to the device as
1158 * necessary without further intervention from you. If the device needs audio
1159 * but there is not enough queued, it will play silence to make up the
1160 * difference. This means you will have skips in your audio playback if you
1161 * aren't routinely queueing sufficient data.
1162 *
1163 * This function copies the supplied data, so you are safe to free it when the
1164 * function returns. This function is thread-safe, but queueing to the same
1165 * device from two threads at once does not promise which buffer will be
1166 * queued first.
1167 *
1168 * You may not queue audio on a device that is using an application-supplied
1169 * callback; doing so returns an error. You have to use the audio callback or
1170 * queue audio with this function, but not both.
1171 *
1172 * You should not call SDL_LockAudio() on the device before queueing; SDL
1173 * handles locking internally for this function.
1174 *
1175 * Note that SDL2 does not support planar audio. You will need to resample
1176 * from planar audio formats into a non-planar one (see SDL_AudioFormat)
1177 * before queuing audio.
1178 *
1179 * \param dev the device ID to which we will queue audio
1180 * \param data the data to queue to the device for later playback
1181 * \param len the number of bytes (not samples!) to which `data` points
1182 * \returns 0 on success or a negative error code on failure; call
1183 * SDL_GetError() for more information.
1184 *
1185 * \since This function is available since SDL 2.0.4.
1186 *
1187 * \sa SDL_ClearQueuedAudio
1188 * \sa SDL_GetQueuedAudioSize
1189 */
1190 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
1191
1192 /**
1193 * Dequeue more audio on non-callback devices.
1194 *
1195 * If you are looking to queue audio for output on a non-callback playback
1196 * device, you want SDL_QueueAudio() instead. SDL_DequeueAudio() will always
1197 * return 0 if you use it with playback devices.
1198 *
1199 * SDL offers two ways to retrieve audio from a capture device: you can either
1200 * supply a callback that SDL triggers with some frequency as the device
1201 * records more audio data, (push method), or you can supply no callback, and
1202 * then SDL will expect you to retrieve data at regular intervals (pull
1203 * method) with this function.
1204 *
1205 * There are no limits on the amount of data you can queue, short of
1206 * exhaustion of address space. Data from the device will keep queuing as
1207 * necessary without further intervention from you. This means you will
1208 * eventually run out of memory if you aren't routinely dequeueing data.
1209 *
1210 * Capture devices will not queue data when paused; if you are expecting to
1211 * not need captured audio for some length of time, use SDL_PauseAudioDevice()
1212 * to stop the capture device from queueing more data. This can be useful
1213 * during, say, level loading times. When unpaused, capture devices will start
1214 * queueing data from that point, having flushed any capturable data available
1215 * while paused.
1216 *
1217 * This function is thread-safe, but dequeueing from the same device from two
1218 * threads at once does not promise which thread will dequeue data first.
1219 *
1220 * You may not dequeue audio from a device that is using an
1221 * application-supplied callback; doing so returns an error. You have to use
1222 * the audio callback, or dequeue audio with this function, but not both.
1223 *
1224 * You should not call SDL_LockAudio() on the device before dequeueing; SDL
1225 * handles locking internally for this function.
1226 *
1227 * \param dev the device ID from which we will dequeue audio
1228 * \param data a pointer into where audio data should be copied
1229 * \param len the number of bytes (not samples!) to which (data) points
1230 * \returns the number of bytes dequeued, which could be less than requested;
1231 * call SDL_GetError() for more information.
1232 *
1233 * \since This function is available since SDL 2.0.5.
1234 *
1235 * \sa SDL_ClearQueuedAudio
1236 * \sa SDL_GetQueuedAudioSize
1237 */
1238 extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
1239
1240 /**
1241 * Get the number of bytes of still-queued audio.
1242 *
1243 * For playback devices: this is the number of bytes that have been queued for
1244 * playback with SDL_QueueAudio(), but have not yet been sent to the hardware.
1245 *
1246 * Once we've sent it to the hardware, this function can not decide the exact
1247 * byte boundary of what has been played. It's possible that we just gave the
1248 * hardware several kilobytes right before you called this function, but it
1249 * hasn't played any of it yet, or maybe half of it, etc.
1250 *
1251 * For capture devices, this is the number of bytes that have been captured by
1252 * the device and are waiting for you to dequeue. This number may grow at any
1253 * time, so this only informs of the lower-bound of available data.
1254 *
1255 * You may not queue or dequeue audio on a device that is using an
1256 * application-supplied callback; calling this function on such a device
1257 * always returns 0. You have to use the audio callback or queue audio, but
1258 * not both.
1259 *
1260 * You should not call SDL_LockAudio() on the device before querying; SDL
1261 * handles locking internally for this function.
1262 *
1263 * \param dev the device ID of which we will query queued audio size
1264 * \returns the number of bytes (not samples!) of queued audio.
1265 *
1266 * \since This function is available since SDL 2.0.4.
1267 *
1268 * \sa SDL_ClearQueuedAudio
1269 * \sa SDL_QueueAudio
1270 * \sa SDL_DequeueAudio
1271 */
1272 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
1273
1274 /**
1275 * Drop any queued audio data waiting to be sent to the hardware.
1276 *
1277 * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
1278 * output devices, the hardware will start playing silence if more audio isn't
1279 * queued. For capture devices, the hardware will start filling the empty
1280 * queue with new data if the capture device isn't paused.
1281 *
1282 * This will not prevent playback of queued audio that's already been sent to
1283 * the hardware, as we can not undo that, so expect there to be some fraction
1284 * of a second of audio that might still be heard. This can be useful if you
1285 * want to, say, drop any pending music or any unprocessed microphone input
1286 * during a level change in your game.
1287 *
1288 * You may not queue or dequeue audio on a device that is using an
1289 * application-supplied callback; calling this function on such a device
1290 * always returns 0. You have to use the audio callback or queue audio, but
1291 * not both.
1292 *
1293 * You should not call SDL_LockAudio() on the device before clearing the
1294 * queue; SDL handles locking internally for this function.
1295 *
1296 * This function always succeeds and thus returns void.
1297 *
1298 * \param dev the device ID of which to clear the audio queue
1299 *
1300 * \since This function is available since SDL 2.0.4.
1301 *
1302 * \sa SDL_GetQueuedAudioSize
1303 * \sa SDL_QueueAudio
1304 * \sa SDL_DequeueAudio
1305 */
1306 extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
1307
1308
1309 /**
1310 * \name Audio lock functions
1311 *
1312 * The lock manipulated by these functions protects the callback function.
1313 * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
1314 * the callback function is not running. Do not call these from the callback
1315 * function or you will cause deadlock.
1316 */
1317 /* @{ */
1318
1319 /**
1320 * This function is a legacy means of locking the audio device.
1321 *
1322 * New programs might want to use SDL_LockAudioDevice() instead. This function
1323 * is equivalent to calling...
1324 *
1325 * ```c
1326 * SDL_LockAudioDevice(1);
1327 * ```
1328 *
1329 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1330 *
1331 * \since This function is available since SDL 2.0.0.
1332 *
1333 * \sa SDL_LockAudioDevice
1334 * \sa SDL_UnlockAudio
1335 * \sa SDL_UnlockAudioDevice
1336 */
1337 extern DECLSPEC void SDLCALL SDL_LockAudio(void);
1338
1339 /**
1340 * Use this function to lock out the audio callback function for a specified
1341 * device.
1342 *
1343 * The lock manipulated by these functions protects the audio callback
1344 * function specified in SDL_OpenAudioDevice(). During a
1345 * SDL_LockAudioDevice()/SDL_UnlockAudioDevice() pair, you can be guaranteed
1346 * that the callback function for that device is not running, even if the
1347 * device is not paused. While a device is locked, any other unpaused,
1348 * unlocked devices may still run their callbacks.
1349 *
1350 * Calling this function from inside your audio callback is unnecessary. SDL
1351 * obtains this lock before calling your function, and releases it when the
1352 * function returns.
1353 *
1354 * You should not hold the lock longer than absolutely necessary. If you hold
1355 * it too long, you'll experience dropouts in your audio playback. Ideally,
1356 * your application locks the device, sets a few variables and unlocks again.
1357 * Do not do heavy work while holding the lock for a device.
1358 *
1359 * It is safe to lock the audio device multiple times, as long as you unlock
1360 * it an equivalent number of times. The callback will not run until the
1361 * device has been unlocked completely in this way. If your application fails
1362 * to unlock the device appropriately, your callback will never run, you might
1363 * hear repeating bursts of audio, and SDL_CloseAudioDevice() will probably
1364 * deadlock.
1365 *
1366 * Internally, the audio device lock is a mutex; if you lock from two threads
1367 * at once, not only will you block the audio callback, you'll block the other
1368 * thread.
1369 *
1370 * \param dev the ID of the device to be locked
1371 *
1372 * \since This function is available since SDL 2.0.0.
1373 *
1374 * \sa SDL_UnlockAudioDevice
1375 */
1376 extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
1377
1378 /**
1379 * This function is a legacy means of unlocking the audio device.
1380 *
1381 * New programs might want to use SDL_UnlockAudioDevice() instead. This
1382 * function is equivalent to calling...
1383 *
1384 * ```c
1385 * SDL_UnlockAudioDevice(1);
1386 * ```
1387 *
1388 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1389 *
1390 * \since This function is available since SDL 2.0.0.
1391 *
1392 * \sa SDL_LockAudio
1393 * \sa SDL_UnlockAudioDevice
1394 */
1395 extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
1396
1397 /**
1398 * Use this function to unlock the audio callback function for a specified
1399 * device.
1400 *
1401 * This function should be paired with a previous SDL_LockAudioDevice() call.
1402 *
1403 * \param dev the ID of the device to be unlocked
1404 *
1405 * \since This function is available since SDL 2.0.0.
1406 *
1407 * \sa SDL_LockAudioDevice
1408 */
1409 extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
1410 /* @} *//* Audio lock functions */
1411
1412 /**
1413 * This function is a legacy means of closing the audio device.
1414 *
1415 * This function is equivalent to calling...
1416 *
1417 * ```c
1418 * SDL_CloseAudioDevice(1);
1419 * ```
1420 *
1421 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1422 *
1423 * \since This function is available since SDL 2.0.0.
1424 *
1425 * \sa SDL_OpenAudio
1426 */
1427 extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
1428
1429 /**
1430 * Use this function to shut down audio processing and close the audio device.
1431 *
1432 * The application should close open audio devices once they are no longer
1433 * needed. Calling this function will wait until the device's audio callback
1434 * is not running, release the audio hardware and then clean up internal
1435 * state. No further audio will play from this device once this function
1436 * returns.
1437 *
1438 * This function may block briefly while pending audio data is played by the
1439 * hardware, so that applications don't drop the last buffer of data they
1440 * supplied.
1441 *
1442 * The device ID is invalid as soon as the device is closed, and is eligible
1443 * for reuse in a new SDL_OpenAudioDevice() call immediately.
1444 *
1445 * \param dev an audio device previously opened with SDL_OpenAudioDevice()
1446 *
1447 * \since This function is available since SDL 2.0.0.
1448 *
1449 * \sa SDL_OpenAudioDevice
1450 */
1451 extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
1452
1453 /* Ends C function definitions when using C++ */
1454 #ifdef __cplusplus
1455 }
1456 #endif
1457 #include <SDL2/close_code.h>
1458
1459 #endif /* SDL_audio_h_ */
1460
1461 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_bits.h
23 *
24 * Functions for fiddling with bits and bitmasks.
25 */
26
27 #ifndef SDL_bits_h_
28 #define SDL_bits_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \file SDL_bits.h
40 */
41
42 /**
43 * Get the index of the most significant bit. Result is undefined when called
44 * with 0. This operation can also be stated as "count leading zeroes" and
45 * "log base 2".
46 *
47 * \return the index of the most significant bit, or -1 if the value is 0.
48 */
49 #if defined(__WATCOMC__) && defined(__386__)
50 extern __inline int _SDL_bsr_watcom(Uint32);
51 #pragma aux _SDL_bsr_watcom = \
52 "bsr eax, eax" \
53 parm [eax] nomemory \
54 value [eax] \
55 modify exact [eax] nomemory;
56 #endif
57
58 SDL_FORCE_INLINE int
59 SDL_MostSignificantBitIndex32(Uint32 x)
60 {
61 #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
62 /* Count Leading Zeroes builtin in GCC.
63 * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
64 */
65 if (x == 0) {
66 return -1;
67 }
68 return 31 - __builtin_clz(x);
69 #elif defined(__WATCOMC__) && defined(__386__)
70 if (x == 0) {
71 return -1;
72 }
73 return _SDL_bsr_watcom(x);
74 #elif defined(_MSC_VER)
75 unsigned long index;
76 if (_BitScanReverse(&index, x)) {
77 return index;
78 }
79 return -1;
80 #else
81 /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
82 * <seander@cs.stanford.edu>, released in the public domain.
83 * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
84 */
85 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
86 const int S[] = {1, 2, 4, 8, 16};
87
88 int msbIndex = 0;
89 int i;
90
91 if (x == 0) {
92 return -1;
93 }
94
95 for (i = 4; i >= 0; i--)
96 {
97 if (x & b[i])
98 {
99 x >>= S[i];
100 msbIndex |= S[i];
101 }
102 }
103
104 return msbIndex;
105 #endif
106 }
107
108 SDL_FORCE_INLINE SDL_bool
109 SDL_HasExactlyOneBitSet32(Uint32 x)
110 {
111 if (x && !(x & (x - 1))) {
112 return SDL_TRUE;
113 }
114 return SDL_FALSE;
115 }
116
117 /* Ends C function definitions when using C++ */
118 #ifdef __cplusplus
119 }
120 #endif
121 #include <SDL2/close_code.h>
122
123 #endif /* SDL_bits_h_ */
124
125 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_blendmode.h
23 *
24 * Header file declaring the SDL_BlendMode enumeration
25 */
26
27 #ifndef SDL_blendmode_h_
28 #define SDL_blendmode_h_
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /**
37 * \brief The blend mode used in SDL_RenderCopy() and drawing operations.
38 */
39 typedef enum
40 {
41 SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
42 dstRGBA = srcRGBA */
43 SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
44 dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
45 dstA = srcA + (dstA * (1-srcA)) */
46 SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
47 dstRGB = (srcRGB * srcA) + dstRGB
48 dstA = dstA */
49 SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
50 dstRGB = srcRGB * dstRGB
51 dstA = dstA */
52 SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
53 dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
54 dstA = (srcA * dstA) + (dstA * (1-srcA)) */
55 SDL_BLENDMODE_INVALID = 0x7FFFFFFF
56
57 /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
58
59 } SDL_BlendMode;
60
61 /**
62 * \brief The blend operation used when combining source and destination pixel components
63 */
64 typedef enum
65 {
66 SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
67 SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
68 SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
69 SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
70 SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
71 } SDL_BlendOperation;
72
73 /**
74 * \brief The normalized factor used to multiply pixel components
75 */
76 typedef enum
77 {
78 SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
79 SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
80 SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
81 SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
82 SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
83 SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
84 SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
85 SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
86 SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
87 SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
88 } SDL_BlendFactor;
89
90 /**
91 * Compose a custom blend mode for renderers.
92 *
93 * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
94 * the SDL_BlendMode returned by this function if the renderer supports it.
95 *
96 * A blend mode controls how the pixels from a drawing operation (source) get
97 * combined with the pixels from the render target (destination). First, the
98 * components of the source and destination pixels get multiplied with their
99 * blend factors. Then, the blend operation takes the two products and
100 * calculates the result that will get stored in the render target.
101 *
102 * Expressed in pseudocode, it would look like this:
103 *
104 * ```c
105 * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
106 * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
107 * ```
108 *
109 * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
110 * dst)` can return one of the following:
111 *
112 * - `src + dst`
113 * - `src - dst`
114 * - `dst - src`
115 * - `min(src, dst)`
116 * - `max(src, dst)`
117 *
118 * The red, green, and blue components are always multiplied with the first,
119 * second, and third components of the SDL_BlendFactor, respectively. The
120 * fourth component is not used.
121 *
122 * The alpha component is always multiplied with the fourth component of the
123 * SDL_BlendFactor. The other components are not used in the alpha
124 * calculation.
125 *
126 * Support for these blend modes varies for each renderer. To check if a
127 * specific SDL_BlendMode is supported, create a renderer and pass it to
128 * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
129 * return with an error if the blend mode is not supported.
130 *
131 * This list describes the support of custom blend modes for each renderer in
132 * SDL 2.0.6. All renderers support the four blend modes listed in the
133 * SDL_BlendMode enumeration.
134 *
135 * - **direct3d**: Supports all operations with all factors. However, some
136 * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
137 * `SDL_BLENDOPERATION_MAXIMUM`.
138 * - **direct3d11**: Same as Direct3D 9.
139 * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
140 * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
141 * 2.0.6.
142 * - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
143 * factors. Color and alpha factors need to be the same. OpenGL ES 1
144 * implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
145 * and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
146 * operations being different from each other. May support color and alpha
147 * factors being different from each other.
148 * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
149 * `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
150 * operations with all factors.
151 * - **psp**: No custom blend mode support.
152 * - **software**: No custom blend mode support.
153 *
154 * Some renderers do not provide an alpha component for the default render
155 * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
156 * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
157 * case.
158 *
159 * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
160 * blue components of the source pixels
161 * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
162 * blue components of the destination pixels
163 * \param colorOperation the SDL_BlendOperation used to combine the red,
164 * green, and blue components of the source and
165 * destination pixels
166 * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
167 * the source pixels
168 * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
169 * the destination pixels
170 * \param alphaOperation the SDL_BlendOperation used to combine the alpha
171 * component of the source and destination pixels
172 * \returns an SDL_BlendMode that represents the chosen factors and
173 * operations.
174 *
175 * \since This function is available since SDL 2.0.6.
176 *
177 * \sa SDL_SetRenderDrawBlendMode
178 * \sa SDL_GetRenderDrawBlendMode
179 * \sa SDL_SetTextureBlendMode
180 * \sa SDL_GetTextureBlendMode
181 */
182 extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
183 SDL_BlendFactor dstColorFactor,
184 SDL_BlendOperation colorOperation,
185 SDL_BlendFactor srcAlphaFactor,
186 SDL_BlendFactor dstAlphaFactor,
187 SDL_BlendOperation alphaOperation);
188
189 /* Ends C function definitions when using C++ */
190 #ifdef __cplusplus
191 }
192 #endif
193 #include <SDL2/close_code.h>
194
195 #endif /* SDL_blendmode_h_ */
196
197 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_clipboard.h
23 *
24 * Include file for SDL clipboard handling
25 */
26
27 #ifndef SDL_clipboard_h_
28 #define SDL_clipboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Function prototypes */
39
40 /**
41 * Put UTF-8 text into the clipboard.
42 *
43 * \param text the text to store in the clipboard
44 * \returns 0 on success or a negative error code on failure; call
45 * SDL_GetError() for more information.
46 *
47 * \since This function is available since SDL 2.0.0.
48 *
49 * \sa SDL_GetClipboardText
50 * \sa SDL_HasClipboardText
51 */
52 extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
53
54 /**
55 * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
56 *
57 * This functions returns empty string if there was not enough memory left for
58 * a copy of the clipboard's content.
59 *
60 * \returns the clipboard text on success or an empty string on failure; call
61 * SDL_GetError() for more information. Caller must call SDL_free()
62 * on the returned pointer when done with it (even if there was an
63 * error).
64 *
65 * \since This function is available since SDL 2.0.0.
66 *
67 * \sa SDL_HasClipboardText
68 * \sa SDL_SetClipboardText
69 */
70 extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
71
72 /**
73 * Query whether the clipboard exists and contains a non-empty text string.
74 *
75 * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_GetClipboardText
80 * \sa SDL_SetClipboardText
81 */
82 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
83
84
85 /* Ends C function definitions when using C++ */
86 #ifdef __cplusplus
87 }
88 #endif
89 #include <SDL2/close_code.h>
90
91 #endif /* SDL_clipboard_h_ */
92
93 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_h_
22 #define SDL_config_h_
23
24 #include <SDL2/SDL_platform.h>
25
26 /**
27 * \file SDL_config.h
28 */
29
30 /* Add any platform that doesn't build using the configure system. */
31 #if defined(__WIN32__)
32 #include <SDL2/SDL_config_windows.h>
33 #elif defined(__WINRT__)
34 #include <SDL2/SDL_config_winrt.h>
35 #elif defined(__MACOSX__)
36 #include <SDL2/SDL_config_macosx.h>
37 #elif defined(__IPHONEOS__)
38 #include <SDL2/SDL_config_iphoneos.h>
39 #elif defined(__ANDROID__)
40 #include <SDL2/SDL_config_android.h>
41 #elif defined(__OS2__)
42 #include <SDL2/SDL_config_os2.h>
43 #elif defined(__EMSCRIPTEN__)
44 #include <SDL2/SDL_config_emscripten.h>
45 #else
46 /* This is a minimal configuration just to get SDL running on new platforms. */
47 #include <SDL2/SDL_config_minimal.h>
48 #endif /* platform config */
49
50 #ifdef USING_GENERATED_CONFIG_H
51 #error Wrong SDL_config.h, check your include path?
52 #endif
53
54 #endif /* SDL_config_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_macosx_h_
22 #define SDL_config_macosx_h_
23 #define SDL_config_h_
24
25 #include <SDL2/SDL_platform.h>
26
27 /* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
28 #include <AvailabilityMacros.h>
29
30 /* This is a set of defines to configure the SDL features */
31
32 #ifdef __LP64__
33 #define SIZEOF_VOIDP 8
34 #else
35 #define SIZEOF_VOIDP 4
36 #endif
37
38 /* Useful headers */
39 #define STDC_HEADERS 1
40 #define HAVE_ALLOCA_H 1
41 #define HAVE_CTYPE_H 1
42 #define HAVE_FLOAT_H 1
43 #define HAVE_INTTYPES_H 1
44 #define HAVE_LIMITS_H 1
45 #define HAVE_MATH_H 1
46 #define HAVE_SIGNAL_H 1
47 #define HAVE_STDINT_H 1
48 #define HAVE_STDIO_H 1
49 #define HAVE_STRING_H 1
50 #define HAVE_SYS_TYPES_H 1
51 #define HAVE_LIBUNWIND_H 1
52
53 /* C library functions */
54 #define HAVE_DLOPEN 1
55 #define HAVE_MALLOC 1
56 #define HAVE_CALLOC 1
57 #define HAVE_REALLOC 1
58 #define HAVE_FREE 1
59 #define HAVE_ALLOCA 1
60 #define HAVE_GETENV 1
61 #define HAVE_SETENV 1
62 #define HAVE_PUTENV 1
63 #define HAVE_UNSETENV 1
64 #define HAVE_QSORT 1
65 #define HAVE_ABS 1
66 #define HAVE_BCOPY 1
67 #define HAVE_MEMSET 1
68 #define HAVE_MEMCPY 1
69 #define HAVE_MEMMOVE 1
70 #define HAVE_MEMCMP 1
71 #define HAVE_STRLEN 1
72 #define HAVE_STRLCPY 1
73 #define HAVE_STRLCAT 1
74 #define HAVE_STRCHR 1
75 #define HAVE_STRRCHR 1
76 #define HAVE_STRSTR 1
77 #define HAVE_STRTOK_R 1
78 #define HAVE_STRTOL 1
79 #define HAVE_STRTOUL 1
80 #define HAVE_STRTOLL 1
81 #define HAVE_STRTOULL 1
82 #define HAVE_STRTOD 1
83 #define HAVE_ATOI 1
84 #define HAVE_ATOF 1
85 #define HAVE_STRCMP 1
86 #define HAVE_STRNCMP 1
87 #define HAVE_STRCASECMP 1
88 #define HAVE_STRNCASECMP 1
89 #define HAVE_VSSCANF 1
90 #define HAVE_VSNPRINTF 1
91 #define HAVE_M_PI 1
92 #define HAVE_ACOS 1
93 #define HAVE_ACOSF 1
94 #define HAVE_ASIN 1
95 #define HAVE_ASINF 1
96 #define HAVE_ATAN 1
97 #define HAVE_ATANF 1
98 #define HAVE_ATAN2 1
99 #define HAVE_ATAN2F 1
100 #define HAVE_CEIL 1
101 #define HAVE_CEILF 1
102 #define HAVE_COPYSIGN 1
103 #define HAVE_COPYSIGNF 1
104 #define HAVE_COS 1
105 #define HAVE_COSF 1
106 #define HAVE_EXP 1
107 #define HAVE_EXPF 1
108 #define HAVE_FABS 1
109 #define HAVE_FABSF 1
110 #define HAVE_FLOOR 1
111 #define HAVE_FLOORF 1
112 #define HAVE_FMOD 1
113 #define HAVE_FMODF 1
114 #define HAVE_LOG 1
115 #define HAVE_LOGF 1
116 #define HAVE_LOG10 1
117 #define HAVE_LOG10F 1
118 #define HAVE_LROUND 1
119 #define HAVE_LROUNDF 1
120 #define HAVE_POW 1
121 #define HAVE_POWF 1
122 #define HAVE_ROUND 1
123 #define HAVE_ROUNDF 1
124 #define HAVE_SCALBN 1
125 #define HAVE_SCALBNF 1
126 #define HAVE_SIN 1
127 #define HAVE_SINF 1
128 #define HAVE_SQRT 1
129 #define HAVE_SQRTF 1
130 #define HAVE_TAN 1
131 #define HAVE_TANF 1
132 #define HAVE_TRUNC 1
133 #define HAVE_TRUNCF 1
134 #define HAVE_SIGACTION 1
135 #define HAVE_SETJMP 1
136 #define HAVE_NANOSLEEP 1
137 #define HAVE_SYSCONF 1
138 #define HAVE_SYSCTLBYNAME 1
139
140 #if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
141 # if __has_include(<immintrin.h>)
142 # define HAVE_IMMINTRIN_H 1
143 # endif
144 #endif
145
146 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
147 #define HAVE_O_CLOEXEC 1
148 #endif
149
150 #define HAVE_GCC_ATOMICS 1
151
152 /* Enable various audio drivers */
153 #define SDL_AUDIO_DRIVER_COREAUDIO 1
154 #define SDL_AUDIO_DRIVER_DISK 1
155 #define SDL_AUDIO_DRIVER_DUMMY 1
156
157 /* Enable various input drivers */
158 #define SDL_JOYSTICK_HIDAPI 1
159 #define SDL_JOYSTICK_IOKIT 1
160 #define SDL_JOYSTICK_VIRTUAL 1
161 #define SDL_HAPTIC_IOKIT 1
162
163 /* The MFI controller support requires ARC Objective C runtime */
164 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
165 #define SDL_JOYSTICK_MFI 1
166 #endif
167
168 /* Enable the dummy sensor driver */
169 #define SDL_SENSOR_DUMMY 1
170
171 /* Enable various shared object loading systems */
172 #define SDL_LOADSO_DLOPEN 1
173
174 /* Enable various threading systems */
175 #define SDL_THREAD_PTHREAD 1
176 #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
177
178 /* Enable various timer systems */
179 #define SDL_TIMER_UNIX 1
180
181 /* Enable various video drivers */
182 #define SDL_VIDEO_DRIVER_COCOA 1
183 #define SDL_VIDEO_DRIVER_DUMMY 1
184 #undef SDL_VIDEO_DRIVER_X11
185 #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
186 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
187 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
188 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
189 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
190 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
191 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
192 #define SDL_VIDEO_DRIVER_X11_XDBE 1
193 #define SDL_VIDEO_DRIVER_X11_XINERAMA 1
194 #define SDL_VIDEO_DRIVER_X11_XRANDR 1
195 #define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
196 #define SDL_VIDEO_DRIVER_X11_XSHAPE 1
197 #define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
198 #define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
199
200 #ifdef MAC_OS_X_VERSION_10_8
201 /*
202 * No matter the versions targeted, this is the 10.8 or later SDK, so you have
203 * to use the external Xquartz, which is a more modern Xlib. Previous SDKs
204 * used an older Xlib.
205 */
206 #define SDL_VIDEO_DRIVER_X11_XINPUT2 1
207 #define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
208 #endif
209
210 #ifndef SDL_VIDEO_RENDER_OGL
211 #define SDL_VIDEO_RENDER_OGL 1
212 #endif
213
214 #ifndef SDL_VIDEO_RENDER_OGL_ES2
215 #define SDL_VIDEO_RENDER_OGL_ES2 1
216 #endif
217
218 /* Metal only supported on 64-bit architectures with 10.11+ */
219 #if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
220 #define SDL_PLATFORM_SUPPORTS_METAL 1
221 #else
222 #define SDL_PLATFORM_SUPPORTS_METAL 0
223 #endif
224
225 #ifndef SDL_VIDEO_RENDER_METAL
226 #if SDL_PLATFORM_SUPPORTS_METAL
227 #define SDL_VIDEO_RENDER_METAL 1
228 #else
229 #define SDL_VIDEO_RENDER_METAL 0
230 #endif
231 #endif
232
233 /* Enable OpenGL support */
234 #ifndef SDL_VIDEO_OPENGL
235 #define SDL_VIDEO_OPENGL 1
236 #endif
237 #ifndef SDL_VIDEO_OPENGL_ES2
238 #define SDL_VIDEO_OPENGL_ES2 1
239 #endif
240 #ifndef SDL_VIDEO_OPENGL_EGL
241 #define SDL_VIDEO_OPENGL_EGL 1
242 #endif
243 #ifndef SDL_VIDEO_OPENGL_CGL
244 #define SDL_VIDEO_OPENGL_CGL 1
245 #endif
246 #ifndef SDL_VIDEO_OPENGL_GLX
247 #define SDL_VIDEO_OPENGL_GLX 1
248 #endif
249
250 /* Enable Vulkan and Metal support */
251 #ifndef SDL_VIDEO_VULKAN
252 #if SDL_PLATFORM_SUPPORTS_METAL
253 #define SDL_VIDEO_VULKAN 1
254 #else
255 #define SDL_VIDEO_VULKAN 0
256 #endif
257 #endif
258
259 #ifndef SDL_VIDEO_METAL
260 #if SDL_PLATFORM_SUPPORTS_METAL
261 #define SDL_VIDEO_METAL 1
262 #else
263 #define SDL_VIDEO_METAL 0
264 #endif
265 #endif
266
267 /* Enable system power support */
268 #define SDL_POWER_MACOSX 1
269
270 /* enable filesystem support */
271 #define SDL_FILESYSTEM_COCOA 1
272
273 /* Enable assembly routines */
274 #define SDL_ASSEMBLY_ROUTINES 1
275 #ifdef __ppc__
276 #define SDL_ALTIVEC_BLITTERS 1
277 #endif
278
279 #endif /* SDL_config_macosx_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_cpuinfo.h
23 *
24 * CPU feature detection for SDL.
25 */
26
27 #ifndef SDL_cpuinfo_h_
28 #define SDL_cpuinfo_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /* Need to do this here because intrin.h has C++ code in it */
33 /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
34 #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
35 #ifdef __clang__
36 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
37 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
38
39 #ifndef __PRFCHWINTRIN_H
40 #define __PRFCHWINTRIN_H
41
42 static __inline__ void __attribute__((__always_inline__, __nodebug__))
43 _m_prefetch(void *__P)
44 {
45 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
46 }
47
48 #endif /* __PRFCHWINTRIN_H */
49 #endif /* __clang__ */
50 #include <intrin.h>
51 #ifndef _WIN64
52 #ifndef __MMX__
53 #define __MMX__
54 #endif
55 #ifndef __3dNOW__
56 #define __3dNOW__
57 #endif
58 #endif
59 #ifndef __SSE__
60 #define __SSE__
61 #endif
62 #ifndef __SSE2__
63 #define __SSE2__
64 #endif
65 #ifndef __SSE3__
66 #define __SSE3__
67 #endif
68 #elif defined(__MINGW64_VERSION_MAJOR)
69 #include <intrin.h>
70 #if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
71 # include <arm_neon.h>
72 #endif
73 #else
74 /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
75 #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
76 #include <altivec.h>
77 #endif
78 #if !defined(SDL_DISABLE_ARM_NEON_H)
79 # if defined(__ARM_NEON)
80 # include <arm_neon.h>
81 # elif defined(__WINDOWS__) || defined(__WINRT__)
82 /* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
83 # if defined(_M_ARM)
84 # include <armintr.h>
85 # include <arm_neon.h>
86 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
87 # endif
88 # if defined (_M_ARM64)
89 # include <arm64intr.h>
90 # include <arm64_neon.h>
91 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
92 # endif
93 # endif
94 #endif
95 #endif /* compiler version */
96
97 #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
98 #include <mm3dnow.h>
99 #endif
100 #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
101 #include <immintrin.h>
102 #else
103 #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
104 #include <mmintrin.h>
105 #endif
106 #if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
107 #include <xmmintrin.h>
108 #endif
109 #if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
110 #include <emmintrin.h>
111 #endif
112 #if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
113 #include <pmmintrin.h>
114 #endif
115 #endif /* HAVE_IMMINTRIN_H */
116
117 #include <SDL2/begin_code.h>
118 /* Set up for C function definitions, even when using C++ */
119 #ifdef __cplusplus
120 extern "C" {
121 #endif
122
123 /* This is a guess for the cacheline size used for padding.
124 * Most x86 processors have a 64 byte cache line.
125 * The 64-bit PowerPC processors have a 128 byte cache line.
126 * We'll use the larger value to be generally safe.
127 */
128 #define SDL_CACHELINE_SIZE 128
129
130 /**
131 * Get the number of CPU cores available.
132 *
133 * \returns the total number of logical CPU cores. On CPUs that include
134 * technologies such as hyperthreading, the number of logical cores
135 * may be more than the number of physical cores.
136 *
137 * \since This function is available since SDL 2.0.0.
138 */
139 extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
140
141 /**
142 * Determine the L1 cache line size of the CPU.
143 *
144 * This is useful for determining multi-threaded structure padding or SIMD
145 * prefetch sizes.
146 *
147 * \returns the L1 cache line size of the CPU, in bytes.
148 *
149 * \since This function is available since SDL 2.0.0.
150 */
151 extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
152
153 /**
154 * Determine whether the CPU has the RDTSC instruction.
155 *
156 * This always returns false on CPUs that aren't using Intel instruction sets.
157 *
158 * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
159 *
160 * \since This function is available since SDL 2.0.0.
161 *
162 * \sa SDL_Has3DNow
163 * \sa SDL_HasAltiVec
164 * \sa SDL_HasAVX
165 * \sa SDL_HasAVX2
166 * \sa SDL_HasMMX
167 * \sa SDL_HasSSE
168 * \sa SDL_HasSSE2
169 * \sa SDL_HasSSE3
170 * \sa SDL_HasSSE41
171 * \sa SDL_HasSSE42
172 */
173 extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
174
175 /**
176 * Determine whether the CPU has AltiVec features.
177 *
178 * This always returns false on CPUs that aren't using PowerPC instruction
179 * sets.
180 *
181 * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
182 *
183 * \since This function is available since SDL 2.0.0.
184 *
185 * \sa SDL_Has3DNow
186 * \sa SDL_HasAVX
187 * \sa SDL_HasAVX2
188 * \sa SDL_HasMMX
189 * \sa SDL_HasRDTSC
190 * \sa SDL_HasSSE
191 * \sa SDL_HasSSE2
192 * \sa SDL_HasSSE3
193 * \sa SDL_HasSSE41
194 * \sa SDL_HasSSE42
195 */
196 extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
197
198 /**
199 * Determine whether the CPU has MMX features.
200 *
201 * This always returns false on CPUs that aren't using Intel instruction sets.
202 *
203 * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
204 *
205 * \since This function is available since SDL 2.0.0.
206 *
207 * \sa SDL_Has3DNow
208 * \sa SDL_HasAltiVec
209 * \sa SDL_HasAVX
210 * \sa SDL_HasAVX2
211 * \sa SDL_HasRDTSC
212 * \sa SDL_HasSSE
213 * \sa SDL_HasSSE2
214 * \sa SDL_HasSSE3
215 * \sa SDL_HasSSE41
216 * \sa SDL_HasSSE42
217 */
218 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
219
220 /**
221 * Determine whether the CPU has 3DNow! features.
222 *
223 * This always returns false on CPUs that aren't using AMD instruction sets.
224 *
225 * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
226 *
227 * \since This function is available since SDL 2.0.0.
228 *
229 * \sa SDL_HasAltiVec
230 * \sa SDL_HasAVX
231 * \sa SDL_HasAVX2
232 * \sa SDL_HasMMX
233 * \sa SDL_HasRDTSC
234 * \sa SDL_HasSSE
235 * \sa SDL_HasSSE2
236 * \sa SDL_HasSSE3
237 * \sa SDL_HasSSE41
238 * \sa SDL_HasSSE42
239 */
240 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
241
242 /**
243 * Determine whether the CPU has SSE features.
244 *
245 * This always returns false on CPUs that aren't using Intel instruction sets.
246 *
247 * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
248 *
249 * \since This function is available since SDL 2.0.0.
250 *
251 * \sa SDL_Has3DNow
252 * \sa SDL_HasAltiVec
253 * \sa SDL_HasAVX
254 * \sa SDL_HasAVX2
255 * \sa SDL_HasMMX
256 * \sa SDL_HasRDTSC
257 * \sa SDL_HasSSE2
258 * \sa SDL_HasSSE3
259 * \sa SDL_HasSSE41
260 * \sa SDL_HasSSE42
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
263
264 /**
265 * Determine whether the CPU has SSE2 features.
266 *
267 * This always returns false on CPUs that aren't using Intel instruction sets.
268 *
269 * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_Has3DNow
274 * \sa SDL_HasAltiVec
275 * \sa SDL_HasAVX
276 * \sa SDL_HasAVX2
277 * \sa SDL_HasMMX
278 * \sa SDL_HasRDTSC
279 * \sa SDL_HasSSE
280 * \sa SDL_HasSSE3
281 * \sa SDL_HasSSE41
282 * \sa SDL_HasSSE42
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
285
286 /**
287 * Determine whether the CPU has SSE3 features.
288 *
289 * This always returns false on CPUs that aren't using Intel instruction sets.
290 *
291 * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_Has3DNow
296 * \sa SDL_HasAltiVec
297 * \sa SDL_HasAVX
298 * \sa SDL_HasAVX2
299 * \sa SDL_HasMMX
300 * \sa SDL_HasRDTSC
301 * \sa SDL_HasSSE
302 * \sa SDL_HasSSE2
303 * \sa SDL_HasSSE41
304 * \sa SDL_HasSSE42
305 */
306 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
307
308 /**
309 * Determine whether the CPU has SSE4.1 features.
310 *
311 * This always returns false on CPUs that aren't using Intel instruction sets.
312 *
313 * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
314 *
315 * \since This function is available since SDL 2.0.0.
316 *
317 * \sa SDL_Has3DNow
318 * \sa SDL_HasAltiVec
319 * \sa SDL_HasAVX
320 * \sa SDL_HasAVX2
321 * \sa SDL_HasMMX
322 * \sa SDL_HasRDTSC
323 * \sa SDL_HasSSE
324 * \sa SDL_HasSSE2
325 * \sa SDL_HasSSE3
326 * \sa SDL_HasSSE42
327 */
328 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
329
330 /**
331 * Determine whether the CPU has SSE4.2 features.
332 *
333 * This always returns false on CPUs that aren't using Intel instruction sets.
334 *
335 * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_Has3DNow
340 * \sa SDL_HasAltiVec
341 * \sa SDL_HasAVX
342 * \sa SDL_HasAVX2
343 * \sa SDL_HasMMX
344 * \sa SDL_HasRDTSC
345 * \sa SDL_HasSSE
346 * \sa SDL_HasSSE2
347 * \sa SDL_HasSSE3
348 * \sa SDL_HasSSE41
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
351
352 /**
353 * Determine whether the CPU has AVX features.
354 *
355 * This always returns false on CPUs that aren't using Intel instruction sets.
356 *
357 * \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
358 *
359 * \since This function is available since SDL 2.0.2.
360 *
361 * \sa SDL_Has3DNow
362 * \sa SDL_HasAltiVec
363 * \sa SDL_HasAVX2
364 * \sa SDL_HasMMX
365 * \sa SDL_HasRDTSC
366 * \sa SDL_HasSSE
367 * \sa SDL_HasSSE2
368 * \sa SDL_HasSSE3
369 * \sa SDL_HasSSE41
370 * \sa SDL_HasSSE42
371 */
372 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
373
374 /**
375 * Determine whether the CPU has AVX2 features.
376 *
377 * This always returns false on CPUs that aren't using Intel instruction sets.
378 *
379 * \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
380 *
381 * \since This function is available since SDL 2.0.4.
382 *
383 * \sa SDL_Has3DNow
384 * \sa SDL_HasAltiVec
385 * \sa SDL_HasAVX
386 * \sa SDL_HasMMX
387 * \sa SDL_HasRDTSC
388 * \sa SDL_HasSSE
389 * \sa SDL_HasSSE2
390 * \sa SDL_HasSSE3
391 * \sa SDL_HasSSE41
392 * \sa SDL_HasSSE42
393 */
394 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
395
396 /**
397 * Determine whether the CPU has AVX-512F (foundation) features.
398 *
399 * This always returns false on CPUs that aren't using Intel instruction sets.
400 *
401 * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
402 *
403 * \since This function is available since SDL 2.0.9.
404 *
405 * \sa SDL_HasAVX
406 */
407 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
408
409 /**
410 * Determine whether the CPU has ARM SIMD (ARMv6) features.
411 *
412 * This is different from ARM NEON, which is a different instruction set.
413 *
414 * This always returns false on CPUs that aren't using ARM instruction sets.
415 *
416 * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
417 *
418 * \since This function is available since SDL 2.0.12.
419 *
420 * \sa SDL_HasNEON
421 */
422 extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
423
424 /**
425 * Determine whether the CPU has NEON (ARM SIMD) features.
426 *
427 * This always returns false on CPUs that aren't using ARM instruction sets.
428 *
429 * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
434
435 /**
436 * Get the amount of RAM configured in the system.
437 *
438 * \returns the amount of RAM configured in the system in MB.
439 *
440 * \since This function is available since SDL 2.0.1.
441 */
442 extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
443
444 /**
445 * Report the alignment this system needs for SIMD allocations.
446 *
447 * This will return the minimum number of bytes to which a pointer must be
448 * aligned to be compatible with SIMD instructions on the current machine. For
449 * example, if the machine supports SSE only, it will return 16, but if it
450 * supports AVX-512F, it'll return 64 (etc). This only reports values for
451 * instruction sets SDL knows about, so if your SDL build doesn't have
452 * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
453 * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
454 * Plan accordingly.
455 *
456 * \returns the alignment in bytes needed for available, known SIMD
457 * instructions.
458 *
459 * \since This function is available since SDL 2.0.10.
460 */
461 extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
462
463 /**
464 * Allocate memory in a SIMD-friendly way.
465 *
466 * This will allocate a block of memory that is suitable for use with SIMD
467 * instructions. Specifically, it will be properly aligned and padded for the
468 * system's supported vector instructions.
469 *
470 * The memory returned will be padded such that it is safe to read or write an
471 * incomplete vector at the end of the memory block. This can be useful so you
472 * don't have to drop back to a scalar fallback at the end of your SIMD
473 * processing loop to deal with the final elements without overflowing the
474 * allocated buffer.
475 *
476 * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
477 * delete[], etc.
478 *
479 * Note that SDL will only deal with SIMD instruction sets it is aware of; for
480 * example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
481 * AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
482 * 64. To be clear: if you can't decide to use an instruction set with an
483 * SDL_Has*() function, don't use that instruction set with memory allocated
484 * through here.
485 *
486 * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
487 * out of memory, but you are not allowed to dereference it (because you only
488 * own zero bytes of that buffer).
489 *
490 * \param len The length, in bytes, of the block to allocate. The actual
491 * allocated block might be larger due to padding, etc.
492 * \returns a pointer to the newly-allocated block, NULL if out of memory.
493 *
494 * \since This function is available since SDL 2.0.10.
495 *
496 * \sa SDL_SIMDAlignment
497 * \sa SDL_SIMDRealloc
498 * \sa SDL_SIMDFree
499 */
500 extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
501
502 /**
503 * Reallocate memory obtained from SDL_SIMDAlloc
504 *
505 * It is not valid to use this function on a pointer from anything but
506 * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
507 * SDL_malloc, memalign, new[], etc.
508 *
509 * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
510 * accepts NULL, at which point this function is the same as
511 * calling SDL_SIMDAlloc with a NULL pointer.
512 * \param len The length, in bytes, of the block to allocated. The actual
513 * allocated block might be larger due to padding, etc. Passing 0
514 * will return a non-NULL pointer, assuming the system isn't out of
515 * memory.
516 * \returns a pointer to the newly-reallocated block, NULL if out of memory.
517 *
518 * \since This function is available since SDL 2.0.14.
519 *
520 * \sa SDL_SIMDAlignment
521 * \sa SDL_SIMDAlloc
522 * \sa SDL_SIMDFree
523 */
524 extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
525
526 /**
527 * Deallocate memory obtained from SDL_SIMDAlloc
528 *
529 * It is not valid to use this function on a pointer from anything but
530 * SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
531 * malloc, realloc, SDL_malloc, memalign, new[], etc.
532 *
533 * However, SDL_SIMDFree(NULL) is a legal no-op.
534 *
535 * The memory pointed to by `ptr` is no longer valid for access upon return,
536 * and may be returned to the system or reused by a future allocation. The
537 * pointer passed to this function is no longer safe to dereference once this
538 * function returns, and should be discarded.
539 *
540 * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
541 * deallocate. NULL is a legal no-op.
542 *
543 * \since This function is available since SDL 2.0.10.
544 *
545 * \sa SDL_SIMDAlloc
546 * \sa SDL_SIMDRealloc
547 */
548 extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
549
550 /* Ends C function definitions when using C++ */
551 #ifdef __cplusplus
552 }
553 #endif
554 #include <SDL2/close_code.h>
555
556 #endif /* SDL_cpuinfo_h_ */
557
558 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_endian.h
23 *
24 * Functions for reading and writing endian-specific values
25 */
26
27 #ifndef SDL_endian_h_
28 #define SDL_endian_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
33 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
34 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
35 #ifdef __clang__
36 #ifndef __PRFCHWINTRIN_H
37 #define __PRFCHWINTRIN_H
38 static __inline__ void __attribute__((__always_inline__, __nodebug__))
39 _m_prefetch(void *__P)
40 {
41 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
42 }
43 #endif /* __PRFCHWINTRIN_H */
44 #endif /* __clang__ */
45
46 #include <intrin.h>
47 #endif
48
49 /**
50 * \name The two types of endianness
51 */
52 /* @{ */
53 #define SDL_LIL_ENDIAN 1234
54 #define SDL_BIG_ENDIAN 4321
55 /* @} */
56
57 #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
58 #ifdef __linux__
59 #include <endian.h>
60 #define SDL_BYTEORDER __BYTE_ORDER
61 #elif defined(__OpenBSD__)
62 #include <endian.h>
63 #define SDL_BYTEORDER BYTE_ORDER
64 #elif defined(__FreeBSD__) || defined(__NetBSD__)
65 #include <sys/endian.h>
66 #define SDL_BYTEORDER BYTE_ORDER
67 /* predefs from newer gcc and clang versions: */
68 #elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
69 #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
70 #define SDL_BYTEORDER SDL_LIL_ENDIAN
71 #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
72 #define SDL_BYTEORDER SDL_BIG_ENDIAN
73 #else
74 #error Unsupported endianness
75 #endif /**/
76 #else
77 #if defined(__hppa__) || \
78 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
79 (defined(__MIPS__) && defined(__MIPSEB__)) || \
80 defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
81 defined(__sparc__)
82 #define SDL_BYTEORDER SDL_BIG_ENDIAN
83 #else
84 #define SDL_BYTEORDER SDL_LIL_ENDIAN
85 #endif
86 #endif /* __linux__ */
87 #endif /* !SDL_BYTEORDER */
88
89
90 #include <SDL2/begin_code.h>
91 /* Set up for C function definitions, even when using C++ */
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95
96 /**
97 * \file SDL_endian.h
98 */
99
100 /* various modern compilers may have builtin swap */
101 #if defined(__GNUC__) || defined(__clang__)
102 # define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
103 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
104 # define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
105 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
106 # define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
107 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
108
109 /* this one is broken */
110 # define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
111 #else
112 # define HAS_BUILTIN_BSWAP16 0
113 # define HAS_BUILTIN_BSWAP32 0
114 # define HAS_BUILTIN_BSWAP64 0
115 # define HAS_BROKEN_BSWAP 0
116 #endif
117
118 #if HAS_BUILTIN_BSWAP16
119 #define SDL_Swap16(x) __builtin_bswap16(x)
120 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
121 #pragma intrinsic(_byteswap_ushort)
122 #define SDL_Swap16(x) _byteswap_ushort(x)
123 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
124 SDL_FORCE_INLINE Uint16
125 SDL_Swap16(Uint16 x)
126 {
127 __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
128 return x;
129 }
130 #elif defined(__x86_64__)
131 SDL_FORCE_INLINE Uint16
132 SDL_Swap16(Uint16 x)
133 {
134 __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
135 return x;
136 }
137 #elif (defined(__powerpc__) || defined(__ppc__))
138 SDL_FORCE_INLINE Uint16
139 SDL_Swap16(Uint16 x)
140 {
141 int result;
142
143 __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
144 return (Uint16)result;
145 }
146 #elif (defined(__m68k__) && !defined(__mcoldfire__))
147 SDL_FORCE_INLINE Uint16
148 SDL_Swap16(Uint16 x)
149 {
150 __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
151 return x;
152 }
153 #elif defined(__WATCOMC__) && defined(__386__)
154 extern __inline Uint16 SDL_Swap16(Uint16);
155 #pragma aux SDL_Swap16 = \
156 "xchg al, ah" \
157 parm [ax] \
158 modify [ax];
159 #else
160 SDL_FORCE_INLINE Uint16
161 SDL_Swap16(Uint16 x)
162 {
163 return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
164 }
165 #endif
166
167 #if HAS_BUILTIN_BSWAP32
168 #define SDL_Swap32(x) __builtin_bswap32(x)
169 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
170 #pragma intrinsic(_byteswap_ulong)
171 #define SDL_Swap32(x) _byteswap_ulong(x)
172 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
173 SDL_FORCE_INLINE Uint32
174 SDL_Swap32(Uint32 x)
175 {
176 __asm__("bswap %0": "=r"(x):"0"(x));
177 return x;
178 }
179 #elif defined(__x86_64__)
180 SDL_FORCE_INLINE Uint32
181 SDL_Swap32(Uint32 x)
182 {
183 __asm__("bswapl %0": "=r"(x):"0"(x));
184 return x;
185 }
186 #elif (defined(__powerpc__) || defined(__ppc__))
187 SDL_FORCE_INLINE Uint32
188 SDL_Swap32(Uint32 x)
189 {
190 Uint32 result;
191
192 __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
193 __asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
194 __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
195 return result;
196 }
197 #elif (defined(__m68k__) && !defined(__mcoldfire__))
198 SDL_FORCE_INLINE Uint32
199 SDL_Swap32(Uint32 x)
200 {
201 __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
202 return x;
203 }
204 #elif defined(__WATCOMC__) && defined(__386__)
205 extern __inline Uint32 SDL_Swap32(Uint32);
206 #pragma aux SDL_Swap32 = \
207 "bswap eax" \
208 parm [eax] \
209 modify [eax];
210 #else
211 SDL_FORCE_INLINE Uint32
212 SDL_Swap32(Uint32 x)
213 {
214 return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
215 ((x >> 8) & 0x0000FF00) | (x >> 24)));
216 }
217 #endif
218
219 #if HAS_BUILTIN_BSWAP64
220 #define SDL_Swap64(x) __builtin_bswap64(x)
221 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
222 #pragma intrinsic(_byteswap_uint64)
223 #define SDL_Swap64(x) _byteswap_uint64(x)
224 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
225 SDL_FORCE_INLINE Uint64
226 SDL_Swap64(Uint64 x)
227 {
228 union {
229 struct {
230 Uint32 a, b;
231 } s;
232 Uint64 u;
233 } v;
234 v.u = x;
235 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
236 : "=r"(v.s.a), "=r"(v.s.b)
237 : "0" (v.s.a), "1"(v.s.b));
238 return v.u;
239 }
240 #elif defined(__x86_64__)
241 SDL_FORCE_INLINE Uint64
242 SDL_Swap64(Uint64 x)
243 {
244 __asm__("bswapq %0": "=r"(x):"0"(x));
245 return x;
246 }
247 #elif defined(__WATCOMC__) && defined(__386__)
248 extern __inline Uint64 SDL_Swap64(Uint64);
249 #pragma aux SDL_Swap64 = \
250 "bswap eax" \
251 "bswap edx" \
252 "xchg eax,edx" \
253 parm [eax edx] \
254 modify [eax edx];
255 #else
256 SDL_FORCE_INLINE Uint64
257 SDL_Swap64(Uint64 x)
258 {
259 Uint32 hi, lo;
260
261 /* Separate into high and low 32-bit values and swap them */
262 lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
263 x >>= 32;
264 hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
265 x = SDL_Swap32(lo);
266 x <<= 32;
267 x |= SDL_Swap32(hi);
268 return (x);
269 }
270 #endif
271
272
273 SDL_FORCE_INLINE float
274 SDL_SwapFloat(float x)
275 {
276 union {
277 float f;
278 Uint32 ui32;
279 } swapper;
280 swapper.f = x;
281 swapper.ui32 = SDL_Swap32(swapper.ui32);
282 return swapper.f;
283 }
284
285 /* remove extra macros */
286 #undef HAS_BROKEN_BSWAP
287 #undef HAS_BUILTIN_BSWAP16
288 #undef HAS_BUILTIN_BSWAP32
289 #undef HAS_BUILTIN_BSWAP64
290
291 /**
292 * \name Swap to native
293 * Byteswap item from the specified endianness to the native endianness.
294 */
295 /* @{ */
296 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
297 #define SDL_SwapLE16(X) (X)
298 #define SDL_SwapLE32(X) (X)
299 #define SDL_SwapLE64(X) (X)
300 #define SDL_SwapFloatLE(X) (X)
301 #define SDL_SwapBE16(X) SDL_Swap16(X)
302 #define SDL_SwapBE32(X) SDL_Swap32(X)
303 #define SDL_SwapBE64(X) SDL_Swap64(X)
304 #define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
305 #else
306 #define SDL_SwapLE16(X) SDL_Swap16(X)
307 #define SDL_SwapLE32(X) SDL_Swap32(X)
308 #define SDL_SwapLE64(X) SDL_Swap64(X)
309 #define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
310 #define SDL_SwapBE16(X) (X)
311 #define SDL_SwapBE32(X) (X)
312 #define SDL_SwapBE64(X) (X)
313 #define SDL_SwapFloatBE(X) (X)
314 #endif
315 /* @} *//* Swap to native */
316
317 /* Ends C function definitions when using C++ */
318 #ifdef __cplusplus
319 }
320 #endif
321 #include <SDL2/close_code.h>
322
323 #endif /* SDL_endian_h_ */
324
325 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_error.h
23 *
24 * Simple error message routines for SDL.
25 */
26
27 #ifndef SDL_error_h_
28 #define SDL_error_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Public functions */
39
40
41 /**
42 * Set the SDL error message for the current thread.
43 *
44 * Calling this function will replace any previous error message that was set.
45 *
46 * This function always returns -1, since SDL frequently uses -1 to signify an
47 * failing result, leading to this idiom:
48 *
49 * ```c
50 * if (error_code) {
51 * return SDL_SetError("This operation has failed: %d", error_code);
52 * }
53 * ```
54 *
55 * \param fmt a printf()-style message format string
56 * \param ... additional parameters matching % tokens in the `fmt` string, if
57 * any
58 * \returns always -1.
59 *
60 * \since This function is available since SDL 2.0.0.
61 *
62 * \sa SDL_ClearError
63 * \sa SDL_GetError
64 */
65 extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
66
67 /**
68 * Retrieve a message about the last error that occurred on the current
69 * thread.
70 *
71 * It is possible for multiple errors to occur before calling SDL_GetError().
72 * Only the last error is returned.
73 *
74 * The message is only applicable when an SDL function has signaled an error.
75 * You must check the return values of SDL function calls to determine when to
76 * appropriately call SDL_GetError(). You should *not* use the results of
77 * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
78 * an error string even when reporting success.
79 *
80 * SDL will *not* clear the error string for successful API calls. You *must*
81 * check return values for failure cases before you can assume the error
82 * string applies.
83 *
84 * Error strings are set per-thread, so an error set in a different thread
85 * will not interfere with the current thread's operation.
86 *
87 * The returned string is internally allocated and must not be freed by the
88 * application.
89 *
90 * \returns a message with information about the specific error that occurred,
91 * or an empty string if there hasn't been an error message set since
92 * the last call to SDL_ClearError(). The message is only applicable
93 * when an SDL function has signaled an error. You must check the
94 * return values of SDL function calls to determine when to
95 * appropriately call SDL_GetError().
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_ClearError
100 * \sa SDL_SetError
101 */
102 extern DECLSPEC const char *SDLCALL SDL_GetError(void);
103
104 /**
105 * Get the last error message that was set for the current thread.
106 *
107 * This allows the caller to copy the error string into a provided buffer, but
108 * otherwise operates exactly the same as SDL_GetError().
109 *
110 * \param errstr A buffer to fill with the last error message that was set for
111 * the current thread
112 * \param maxlen The size of the buffer pointed to by the errstr parameter
113 * \returns the pointer passed in as the `errstr` parameter.
114 *
115 * \since This function is available since SDL 2.0.14.
116 *
117 * \sa SDL_GetError
118 */
119 extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
120
121 /**
122 * Clear any previous error message for this thread.
123 *
124 * \since This function is available since SDL 2.0.0.
125 *
126 * \sa SDL_GetError
127 * \sa SDL_SetError
128 */
129 extern DECLSPEC void SDLCALL SDL_ClearError(void);
130
131 /**
132 * \name Internal error functions
133 *
134 * \internal
135 * Private error reporting function - used internally.
136 */
137 /* @{ */
138 #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
139 #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
140 #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
141 typedef enum
142 {
143 SDL_ENOMEM,
144 SDL_EFREAD,
145 SDL_EFWRITE,
146 SDL_EFSEEK,
147 SDL_UNSUPPORTED,
148 SDL_LASTERROR
149 } SDL_errorcode;
150 /* SDL_Error() unconditionally returns -1. */
151 extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
152 /* @} *//* Internal error functions */
153
154 /* Ends C function definitions when using C++ */
155 #ifdef __cplusplus
156 }
157 #endif
158 #include <SDL2/close_code.h>
159
160 #endif /* SDL_error_h_ */
161
162 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_events.h
23 *
24 * Include file for SDL event handling.
25 */
26
27 #ifndef SDL_events_h_
28 #define SDL_events_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_keyboard.h>
34 #include <SDL2/SDL_mouse.h>
35 #include <SDL2/SDL_joystick.h>
36 #include <SDL2/SDL_gamecontroller.h>
37 #include <SDL2/SDL_quit.h>
38 #include <SDL2/SDL_gesture.h>
39 #include <SDL2/SDL_touch.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 /* General keyboard/mouse state definitions */
48 #define SDL_RELEASED 0
49 #define SDL_PRESSED 1
50
51 /**
52 * The types of events that can be delivered.
53 */
54 typedef enum
55 {
56 SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
57
58 /* Application events */
59 SDL_QUIT = 0x100, /**< User-requested quit */
60
61 /* These application events have special meaning on iOS, see README-ios.md for details */
62 SDL_APP_TERMINATING, /**< The application is being terminated by the OS
63 Called on iOS in applicationWillTerminate()
64 Called on Android in onDestroy()
65 */
66 SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible.
67 Called on iOS in applicationDidReceiveMemoryWarning()
68 Called on Android in onLowMemory()
69 */
70 SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
71 Called on iOS in applicationWillResignActive()
72 Called on Android in onPause()
73 */
74 SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
75 Called on iOS in applicationDidEnterBackground()
76 Called on Android in onPause()
77 */
78 SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
79 Called on iOS in applicationWillEnterForeground()
80 Called on Android in onResume()
81 */
82 SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
83 Called on iOS in applicationDidBecomeActive()
84 Called on Android in onResume()
85 */
86
87 SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
88
89 /* Display events */
90 SDL_DISPLAYEVENT = 0x150, /**< Display state change */
91
92 /* Window events */
93 SDL_WINDOWEVENT = 0x200, /**< Window state change */
94 SDL_SYSWMEVENT, /**< System specific event */
95
96 /* Keyboard events */
97 SDL_KEYDOWN = 0x300, /**< Key pressed */
98 SDL_KEYUP, /**< Key released */
99 SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
100 SDL_TEXTINPUT, /**< Keyboard text input */
101 SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
102 input language or keyboard layout change.
103 */
104 SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
105
106 /* Mouse events */
107 SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
108 SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
109 SDL_MOUSEBUTTONUP, /**< Mouse button released */
110 SDL_MOUSEWHEEL, /**< Mouse wheel motion */
111
112 /* Joystick events */
113 SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */
114 SDL_JOYBALLMOTION, /**< Joystick trackball motion */
115 SDL_JOYHATMOTION, /**< Joystick hat position change */
116 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
117 SDL_JOYBUTTONUP, /**< Joystick button released */
118 SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
119 SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
120
121 /* Game controller events */
122 SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
123 SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */
124 SDL_CONTROLLERBUTTONUP, /**< Game controller button released */
125 SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
126 SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
127 SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
128 SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
129 SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
130 SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
131 SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
132
133 /* Touch events */
134 SDL_FINGERDOWN = 0x700,
135 SDL_FINGERUP,
136 SDL_FINGERMOTION,
137
138 /* Gesture events */
139 SDL_DOLLARGESTURE = 0x800,
140 SDL_DOLLARRECORD,
141 SDL_MULTIGESTURE,
142
143 /* Clipboard events */
144 SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
145
146 /* Drag and drop events */
147 SDL_DROPFILE = 0x1000, /**< The system requests a file open */
148 SDL_DROPTEXT, /**< text/plain drag-and-drop event */
149 SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
150 SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
151
152 /* Audio hotplug events */
153 SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
154 SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
155
156 /* Sensor events */
157 SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
158
159 /* Render events */
160 SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
161 SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
162
163 /* Internal events */
164 SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
165
166 /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
167 * and should be allocated with SDL_RegisterEvents()
168 */
169 SDL_USEREVENT = 0x8000,
170
171 /**
172 * This last event is only for bounding internal arrays
173 */
174 SDL_LASTEVENT = 0xFFFF
175 } SDL_EventType;
176
177 /**
178 * \brief Fields shared by every event
179 */
180 typedef struct SDL_CommonEvent
181 {
182 Uint32 type;
183 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
184 } SDL_CommonEvent;
185
186 /**
187 * \brief Display state change event data (event.display.*)
188 */
189 typedef struct SDL_DisplayEvent
190 {
191 Uint32 type; /**< ::SDL_DISPLAYEVENT */
192 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
193 Uint32 display; /**< The associated display index */
194 Uint8 event; /**< ::SDL_DisplayEventID */
195 Uint8 padding1;
196 Uint8 padding2;
197 Uint8 padding3;
198 Sint32 data1; /**< event dependent data */
199 } SDL_DisplayEvent;
200
201 /**
202 * \brief Window state change event data (event.window.*)
203 */
204 typedef struct SDL_WindowEvent
205 {
206 Uint32 type; /**< ::SDL_WINDOWEVENT */
207 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
208 Uint32 windowID; /**< The associated window */
209 Uint8 event; /**< ::SDL_WindowEventID */
210 Uint8 padding1;
211 Uint8 padding2;
212 Uint8 padding3;
213 Sint32 data1; /**< event dependent data */
214 Sint32 data2; /**< event dependent data */
215 } SDL_WindowEvent;
216
217 /**
218 * \brief Keyboard button event structure (event.key.*)
219 */
220 typedef struct SDL_KeyboardEvent
221 {
222 Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
223 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
224 Uint32 windowID; /**< The window with keyboard focus, if any */
225 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
226 Uint8 repeat; /**< Non-zero if this is a key repeat */
227 Uint8 padding2;
228 Uint8 padding3;
229 SDL_Keysym keysym; /**< The key that was pressed or released */
230 } SDL_KeyboardEvent;
231
232 #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
233 /**
234 * \brief Keyboard text editing event structure (event.edit.*)
235 */
236 typedef struct SDL_TextEditingEvent
237 {
238 Uint32 type; /**< ::SDL_TEXTEDITING */
239 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
240 Uint32 windowID; /**< The window with keyboard focus, if any */
241 char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
242 Sint32 start; /**< The start cursor of selected editing text */
243 Sint32 length; /**< The length of selected editing text */
244 } SDL_TextEditingEvent;
245
246 /**
247 * \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
248 * truncated if stored in the text buffer SDL_TextEditingEvent
249 */
250 typedef struct SDL_TextEditingExtEvent
251 {
252 Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
253 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
254 Uint32 windowID; /**< The window with keyboard focus, if any */
255 char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
256 Sint32 start; /**< The start cursor of selected editing text */
257 Sint32 length; /**< The length of selected editing text */
258 } SDL_TextEditingExtEvent;
259
260 #define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
261 /**
262 * \brief Keyboard text input event structure (event.text.*)
263 */
264 typedef struct SDL_TextInputEvent
265 {
266 Uint32 type; /**< ::SDL_TEXTINPUT */
267 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
268 Uint32 windowID; /**< The window with keyboard focus, if any */
269 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
270 } SDL_TextInputEvent;
271
272 /**
273 * \brief Mouse motion event structure (event.motion.*)
274 */
275 typedef struct SDL_MouseMotionEvent
276 {
277 Uint32 type; /**< ::SDL_MOUSEMOTION */
278 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
279 Uint32 windowID; /**< The window with mouse focus, if any */
280 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
281 Uint32 state; /**< The current button state */
282 Sint32 x; /**< X coordinate, relative to window */
283 Sint32 y; /**< Y coordinate, relative to window */
284 Sint32 xrel; /**< The relative motion in the X direction */
285 Sint32 yrel; /**< The relative motion in the Y direction */
286 } SDL_MouseMotionEvent;
287
288 /**
289 * \brief Mouse button event structure (event.button.*)
290 */
291 typedef struct SDL_MouseButtonEvent
292 {
293 Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
294 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
295 Uint32 windowID; /**< The window with mouse focus, if any */
296 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
297 Uint8 button; /**< The mouse button index */
298 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
299 Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
300 Uint8 padding1;
301 Sint32 x; /**< X coordinate, relative to window */
302 Sint32 y; /**< Y coordinate, relative to window */
303 } SDL_MouseButtonEvent;
304
305 /**
306 * \brief Mouse wheel event structure (event.wheel.*)
307 */
308 typedef struct SDL_MouseWheelEvent
309 {
310 Uint32 type; /**< ::SDL_MOUSEWHEEL */
311 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
312 Uint32 windowID; /**< The window with mouse focus, if any */
313 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
314 Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
315 Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
316 Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
317 float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
318 float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
319 } SDL_MouseWheelEvent;
320
321 /**
322 * \brief Joystick axis motion event structure (event.jaxis.*)
323 */
324 typedef struct SDL_JoyAxisEvent
325 {
326 Uint32 type; /**< ::SDL_JOYAXISMOTION */
327 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
328 SDL_JoystickID which; /**< The joystick instance id */
329 Uint8 axis; /**< The joystick axis index */
330 Uint8 padding1;
331 Uint8 padding2;
332 Uint8 padding3;
333 Sint16 value; /**< The axis value (range: -32768 to 32767) */
334 Uint16 padding4;
335 } SDL_JoyAxisEvent;
336
337 /**
338 * \brief Joystick trackball motion event structure (event.jball.*)
339 */
340 typedef struct SDL_JoyBallEvent
341 {
342 Uint32 type; /**< ::SDL_JOYBALLMOTION */
343 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
344 SDL_JoystickID which; /**< The joystick instance id */
345 Uint8 ball; /**< The joystick trackball index */
346 Uint8 padding1;
347 Uint8 padding2;
348 Uint8 padding3;
349 Sint16 xrel; /**< The relative motion in the X direction */
350 Sint16 yrel; /**< The relative motion in the Y direction */
351 } SDL_JoyBallEvent;
352
353 /**
354 * \brief Joystick hat position change event structure (event.jhat.*)
355 */
356 typedef struct SDL_JoyHatEvent
357 {
358 Uint32 type; /**< ::SDL_JOYHATMOTION */
359 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
360 SDL_JoystickID which; /**< The joystick instance id */
361 Uint8 hat; /**< The joystick hat index */
362 Uint8 value; /**< The hat position value.
363 * \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
364 * \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
365 * \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
366 *
367 * Note that zero means the POV is centered.
368 */
369 Uint8 padding1;
370 Uint8 padding2;
371 } SDL_JoyHatEvent;
372
373 /**
374 * \brief Joystick button event structure (event.jbutton.*)
375 */
376 typedef struct SDL_JoyButtonEvent
377 {
378 Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
379 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
380 SDL_JoystickID which; /**< The joystick instance id */
381 Uint8 button; /**< The joystick button index */
382 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
383 Uint8 padding1;
384 Uint8 padding2;
385 } SDL_JoyButtonEvent;
386
387 /**
388 * \brief Joystick device event structure (event.jdevice.*)
389 */
390 typedef struct SDL_JoyDeviceEvent
391 {
392 Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
393 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
394 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
395 } SDL_JoyDeviceEvent;
396
397
398 /**
399 * \brief Game controller axis motion event structure (event.caxis.*)
400 */
401 typedef struct SDL_ControllerAxisEvent
402 {
403 Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
404 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
405 SDL_JoystickID which; /**< The joystick instance id */
406 Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
407 Uint8 padding1;
408 Uint8 padding2;
409 Uint8 padding3;
410 Sint16 value; /**< The axis value (range: -32768 to 32767) */
411 Uint16 padding4;
412 } SDL_ControllerAxisEvent;
413
414
415 /**
416 * \brief Game controller button event structure (event.cbutton.*)
417 */
418 typedef struct SDL_ControllerButtonEvent
419 {
420 Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
421 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
422 SDL_JoystickID which; /**< The joystick instance id */
423 Uint8 button; /**< The controller button (SDL_GameControllerButton) */
424 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
425 Uint8 padding1;
426 Uint8 padding2;
427 } SDL_ControllerButtonEvent;
428
429
430 /**
431 * \brief Controller device event structure (event.cdevice.*)
432 */
433 typedef struct SDL_ControllerDeviceEvent
434 {
435 Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
436 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
437 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
438 } SDL_ControllerDeviceEvent;
439
440 /**
441 * \brief Game controller touchpad event structure (event.ctouchpad.*)
442 */
443 typedef struct SDL_ControllerTouchpadEvent
444 {
445 Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
446 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
447 SDL_JoystickID which; /**< The joystick instance id */
448 Sint32 touchpad; /**< The index of the touchpad */
449 Sint32 finger; /**< The index of the finger on the touchpad */
450 float x; /**< Normalized in the range 0...1 with 0 being on the left */
451 float y; /**< Normalized in the range 0...1 with 0 being at the top */
452 float pressure; /**< Normalized in the range 0...1 */
453 } SDL_ControllerTouchpadEvent;
454
455 /**
456 * \brief Game controller sensor event structure (event.csensor.*)
457 */
458 typedef struct SDL_ControllerSensorEvent
459 {
460 Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
461 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
462 SDL_JoystickID which; /**< The joystick instance id */
463 Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
464 float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
465 } SDL_ControllerSensorEvent;
466
467 /**
468 * \brief Audio device event structure (event.adevice.*)
469 */
470 typedef struct SDL_AudioDeviceEvent
471 {
472 Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
473 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
474 Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
475 Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
476 Uint8 padding1;
477 Uint8 padding2;
478 Uint8 padding3;
479 } SDL_AudioDeviceEvent;
480
481
482 /**
483 * \brief Touch finger event structure (event.tfinger.*)
484 */
485 typedef struct SDL_TouchFingerEvent
486 {
487 Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
488 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
489 SDL_TouchID touchId; /**< The touch device id */
490 SDL_FingerID fingerId;
491 float x; /**< Normalized in the range 0...1 */
492 float y; /**< Normalized in the range 0...1 */
493 float dx; /**< Normalized in the range -1...1 */
494 float dy; /**< Normalized in the range -1...1 */
495 float pressure; /**< Normalized in the range 0...1 */
496 Uint32 windowID; /**< The window underneath the finger, if any */
497 } SDL_TouchFingerEvent;
498
499
500 /**
501 * \brief Multiple Finger Gesture Event (event.mgesture.*)
502 */
503 typedef struct SDL_MultiGestureEvent
504 {
505 Uint32 type; /**< ::SDL_MULTIGESTURE */
506 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
507 SDL_TouchID touchId; /**< The touch device id */
508 float dTheta;
509 float dDist;
510 float x;
511 float y;
512 Uint16 numFingers;
513 Uint16 padding;
514 } SDL_MultiGestureEvent;
515
516
517 /**
518 * \brief Dollar Gesture Event (event.dgesture.*)
519 */
520 typedef struct SDL_DollarGestureEvent
521 {
522 Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
523 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
524 SDL_TouchID touchId; /**< The touch device id */
525 SDL_GestureID gestureId;
526 Uint32 numFingers;
527 float error;
528 float x; /**< Normalized center of gesture */
529 float y; /**< Normalized center of gesture */
530 } SDL_DollarGestureEvent;
531
532
533 /**
534 * \brief An event used to request a file open by the system (event.drop.*)
535 * This event is enabled by default, you can disable it with SDL_EventState().
536 * \note If this event is enabled, you must free the filename in the event.
537 */
538 typedef struct SDL_DropEvent
539 {
540 Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
541 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
542 char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
543 Uint32 windowID; /**< The window that was dropped on, if any */
544 } SDL_DropEvent;
545
546
547 /**
548 * \brief Sensor event structure (event.sensor.*)
549 */
550 typedef struct SDL_SensorEvent
551 {
552 Uint32 type; /**< ::SDL_SENSORUPDATE */
553 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
554 Sint32 which; /**< The instance ID of the sensor */
555 float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
556 } SDL_SensorEvent;
557
558 /**
559 * \brief The "quit requested" event
560 */
561 typedef struct SDL_QuitEvent
562 {
563 Uint32 type; /**< ::SDL_QUIT */
564 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
565 } SDL_QuitEvent;
566
567 /**
568 * \brief OS Specific event
569 */
570 typedef struct SDL_OSEvent
571 {
572 Uint32 type; /**< ::SDL_QUIT */
573 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
574 } SDL_OSEvent;
575
576 /**
577 * \brief A user-defined event type (event.user.*)
578 */
579 typedef struct SDL_UserEvent
580 {
581 Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
582 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
583 Uint32 windowID; /**< The associated window if any */
584 Sint32 code; /**< User defined event code */
585 void *data1; /**< User defined data pointer */
586 void *data2; /**< User defined data pointer */
587 } SDL_UserEvent;
588
589
590 struct SDL_SysWMmsg;
591 typedef struct SDL_SysWMmsg SDL_SysWMmsg;
592
593 /**
594 * \brief A video driver dependent system event (event.syswm.*)
595 * This event is disabled by default, you can enable it with SDL_EventState()
596 *
597 * \note If you want to use this event, you should include SDL_syswm.h.
598 */
599 typedef struct SDL_SysWMEvent
600 {
601 Uint32 type; /**< ::SDL_SYSWMEVENT */
602 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
603 SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
604 } SDL_SysWMEvent;
605
606 /**
607 * \brief General event structure
608 */
609 typedef union SDL_Event
610 {
611 Uint32 type; /**< Event type, shared with all events */
612 SDL_CommonEvent common; /**< Common event data */
613 SDL_DisplayEvent display; /**< Display event data */
614 SDL_WindowEvent window; /**< Window event data */
615 SDL_KeyboardEvent key; /**< Keyboard event data */
616 SDL_TextEditingEvent edit; /**< Text editing event data */
617 SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
618 SDL_TextInputEvent text; /**< Text input event data */
619 SDL_MouseMotionEvent motion; /**< Mouse motion event data */
620 SDL_MouseButtonEvent button; /**< Mouse button event data */
621 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
622 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
623 SDL_JoyBallEvent jball; /**< Joystick ball event data */
624 SDL_JoyHatEvent jhat; /**< Joystick hat event data */
625 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
626 SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
627 SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
628 SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
629 SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
630 SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
631 SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
632 SDL_AudioDeviceEvent adevice; /**< Audio device event data */
633 SDL_SensorEvent sensor; /**< Sensor event data */
634 SDL_QuitEvent quit; /**< Quit request event data */
635 SDL_UserEvent user; /**< Custom event data */
636 SDL_SysWMEvent syswm; /**< System dependent window event data */
637 SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
638 SDL_MultiGestureEvent mgesture; /**< Gesture event data */
639 SDL_DollarGestureEvent dgesture; /**< Gesture event data */
640 SDL_DropEvent drop; /**< Drag and drop event data */
641
642 /* This is necessary for ABI compatibility between Visual C++ and GCC.
643 Visual C++ will respect the push pack pragma and use 52 bytes (size of
644 SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
645 architectures) for this union, and GCC will use the alignment of the
646 largest datatype within the union, which is 8 bytes on 64-bit
647 architectures.
648
649 So... we'll add padding to force the size to be 56 bytes for both.
650
651 On architectures where pointers are 16 bytes, this needs rounding up to
652 the next multiple of 16, 64, and on architectures where pointers are
653 even larger the size of SDL_UserEvent will dominate as being 3 pointers.
654 */
655 Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
656 } SDL_Event;
657
658 /* Make sure we haven't broken binary compatibility */
659 SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
660
661
662 /* Function prototypes */
663
664 /**
665 * Pump the event loop, gathering events from the input devices.
666 *
667 * This function updates the event queue and internal input device state.
668 *
669 * **WARNING**: This should only be run in the thread that initialized the
670 * video subsystem, and for extra safety, you should consider only doing those
671 * things on the main thread in any case.
672 *
673 * SDL_PumpEvents() gathers all the pending input information from devices and
674 * places it in the event queue. Without calls to SDL_PumpEvents() no events
675 * would ever be placed on the queue. Often the need for calls to
676 * SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
677 * SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
678 * polling or waiting for events (e.g. you are filtering them), then you must
679 * call SDL_PumpEvents() to force an event queue update.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_PollEvent
684 * \sa SDL_WaitEvent
685 */
686 extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
687
688 /* @{ */
689 typedef enum
690 {
691 SDL_ADDEVENT,
692 SDL_PEEKEVENT,
693 SDL_GETEVENT
694 } SDL_eventaction;
695
696 /**
697 * Check the event queue for messages and optionally return them.
698 *
699 * `action` may be any of the following:
700 *
701 * - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
702 * event queue.
703 * - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
704 * within the specified minimum and maximum type, will be returned to the
705 * caller and will _not_ be removed from the queue.
706 * - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
707 * within the specified minimum and maximum type, will be returned to the
708 * caller and will be removed from the queue.
709 *
710 * You may have to call SDL_PumpEvents() before calling this function.
711 * Otherwise, the events may not be ready to be filtered when you call
712 * SDL_PeepEvents().
713 *
714 * This function is thread-safe.
715 *
716 * \param events destination buffer for the retrieved events
717 * \param numevents if action is SDL_ADDEVENT, the number of events to add
718 * back to the event queue; if action is SDL_PEEKEVENT or
719 * SDL_GETEVENT, the maximum number of events to retrieve
720 * \param action action to take; see [[#action|Remarks]] for details
721 * \param minType minimum value of the event type to be considered;
722 * SDL_FIRSTEVENT is a safe choice
723 * \param maxType maximum value of the event type to be considered;
724 * SDL_LASTEVENT is a safe choice
725 * \returns the number of events actually stored or a negative error code on
726 * failure; call SDL_GetError() for more information.
727 *
728 * \since This function is available since SDL 2.0.0.
729 *
730 * \sa SDL_PollEvent
731 * \sa SDL_PumpEvents
732 * \sa SDL_PushEvent
733 */
734 extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
735 SDL_eventaction action,
736 Uint32 minType, Uint32 maxType);
737 /* @} */
738
739 /**
740 * Check for the existence of a certain event type in the event queue.
741 *
742 * If you need to check for a range of event types, use SDL_HasEvents()
743 * instead.
744 *
745 * \param type the type of event to be queried; see SDL_EventType for details
746 * \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
747 * events matching `type` are not present.
748 *
749 * \since This function is available since SDL 2.0.0.
750 *
751 * \sa SDL_HasEvents
752 */
753 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
754
755
756 /**
757 * Check for the existence of certain event types in the event queue.
758 *
759 * If you need to check for a single event type, use SDL_HasEvent() instead.
760 *
761 * \param minType the low end of event type to be queried, inclusive; see
762 * SDL_EventType for details
763 * \param maxType the high end of event type to be queried, inclusive; see
764 * SDL_EventType for details
765 * \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
766 * present, or SDL_FALSE if not.
767 *
768 * \since This function is available since SDL 2.0.0.
769 *
770 * \sa SDL_HasEvents
771 */
772 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
773
774 /**
775 * Clear events of a specific type from the event queue.
776 *
777 * This will unconditionally remove any events from the queue that match
778 * `type`. If you need to remove a range of event types, use SDL_FlushEvents()
779 * instead.
780 *
781 * It's also normal to just ignore events you don't care about in your event
782 * loop without calling this function.
783 *
784 * This function only affects currently queued events. If you want to make
785 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
786 * on the main thread immediately before the flush call.
787 *
788 * \param type the type of event to be cleared; see SDL_EventType for details
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_FlushEvents
793 */
794 extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
795
796 /**
797 * Clear events of a range of types from the event queue.
798 *
799 * This will unconditionally remove any events from the queue that are in the
800 * range of `minType` to `maxType`, inclusive. If you need to remove a single
801 * event type, use SDL_FlushEvent() instead.
802 *
803 * It's also normal to just ignore events you don't care about in your event
804 * loop without calling this function.
805 *
806 * This function only affects currently queued events. If you want to make
807 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
808 * on the main thread immediately before the flush call.
809 *
810 * \param minType the low end of event type to be cleared, inclusive; see
811 * SDL_EventType for details
812 * \param maxType the high end of event type to be cleared, inclusive; see
813 * SDL_EventType for details
814 *
815 * \since This function is available since SDL 2.0.0.
816 *
817 * \sa SDL_FlushEvent
818 */
819 extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
820
821 /**
822 * Poll for currently pending events.
823 *
824 * If `event` is not NULL, the next event is removed from the queue and stored
825 * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
826 * this event, immediately stored in the SDL Event structure -- not an event
827 * to follow.
828 *
829 * If `event` is NULL, it simply returns 1 if there is an event in the queue,
830 * but will not remove it from the queue.
831 *
832 * As this function may implicitly call SDL_PumpEvents(), you can only call
833 * this function in the thread that set the video mode.
834 *
835 * SDL_PollEvent() is the favored way of receiving system events since it can
836 * be done from the main loop and does not suspend the main loop while waiting
837 * on an event to be posted.
838 *
839 * The common practice is to fully process the event queue once every frame,
840 * usually as a first step before updating the game's state:
841 *
842 * ```c
843 * while (game_is_still_running) {
844 * SDL_Event event;
845 * while (SDL_PollEvent(&event)) { // poll until all events are handled!
846 * // decide what to do with this event.
847 * }
848 *
849 * // update game state, draw the current frame
850 * }
851 * ```
852 *
853 * \param event the SDL_Event structure to be filled with the next event from
854 * the queue, or NULL
855 * \returns 1 if there is a pending event or 0 if there are none available.
856 *
857 * \since This function is available since SDL 2.0.0.
858 *
859 * \sa SDL_GetEventFilter
860 * \sa SDL_PeepEvents
861 * \sa SDL_PushEvent
862 * \sa SDL_SetEventFilter
863 * \sa SDL_WaitEvent
864 * \sa SDL_WaitEventTimeout
865 */
866 extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
867
868 /**
869 * Wait indefinitely for the next available event.
870 *
871 * If `event` is not NULL, the next event is removed from the queue and stored
872 * in the SDL_Event structure pointed to by `event`.
873 *
874 * As this function may implicitly call SDL_PumpEvents(), you can only call
875 * this function in the thread that initialized the video subsystem.
876 *
877 * \param event the SDL_Event structure to be filled in with the next event
878 * from the queue, or NULL
879 * \returns 1 on success or 0 if there was an error while waiting for events;
880 * call SDL_GetError() for more information.
881 *
882 * \since This function is available since SDL 2.0.0.
883 *
884 * \sa SDL_PollEvent
885 * \sa SDL_PumpEvents
886 * \sa SDL_WaitEventTimeout
887 */
888 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
889
890 /**
891 * Wait until the specified timeout (in milliseconds) for the next available
892 * event.
893 *
894 * If `event` is not NULL, the next event is removed from the queue and stored
895 * in the SDL_Event structure pointed to by `event`.
896 *
897 * As this function may implicitly call SDL_PumpEvents(), you can only call
898 * this function in the thread that initialized the video subsystem.
899 *
900 * \param event the SDL_Event structure to be filled in with the next event
901 * from the queue, or NULL
902 * \param timeout the maximum number of milliseconds to wait for the next
903 * available event
904 * \returns 1 on success or 0 if there was an error while waiting for events;
905 * call SDL_GetError() for more information. This also returns 0 if
906 * the timeout elapsed without an event arriving.
907 *
908 * \since This function is available since SDL 2.0.0.
909 *
910 * \sa SDL_PollEvent
911 * \sa SDL_PumpEvents
912 * \sa SDL_WaitEvent
913 */
914 extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
915 int timeout);
916
917 /**
918 * Add an event to the event queue.
919 *
920 * The event queue can actually be used as a two way communication channel.
921 * Not only can events be read from the queue, but the user can also push
922 * their own events onto it. `event` is a pointer to the event structure you
923 * wish to push onto the queue. The event is copied into the queue, and the
924 * caller may dispose of the memory pointed to after SDL_PushEvent() returns.
925 *
926 * Note: Pushing device input events onto the queue doesn't modify the state
927 * of the device within SDL.
928 *
929 * This function is thread-safe, and can be called from other threads safely.
930 *
931 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
932 * the event filter but events added with SDL_PeepEvents() do not.
933 *
934 * For pushing application-specific events, please use SDL_RegisterEvents() to
935 * get an event type that does not conflict with other code that also wants
936 * its own custom event types.
937 *
938 * \param event the SDL_Event to be added to the queue
939 * \returns 1 on success, 0 if the event was filtered, or a negative error
940 * code on failure; call SDL_GetError() for more information. A
941 * common reason for error is the event queue being full.
942 *
943 * \since This function is available since SDL 2.0.0.
944 *
945 * \sa SDL_PeepEvents
946 * \sa SDL_PollEvent
947 * \sa SDL_RegisterEvents
948 */
949 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
950
951 /**
952 * A function pointer used for callbacks that watch the event queue.
953 *
954 * \param userdata what was passed as `userdata` to SDL_SetEventFilter()
955 * or SDL_AddEventWatch, etc
956 * \param event the event that triggered the callback
957 * \returns 1 to permit event to be added to the queue, and 0 to disallow
958 * it. When used with SDL_AddEventWatch, the return value is ignored.
959 *
960 * \sa SDL_SetEventFilter
961 * \sa SDL_AddEventWatch
962 */
963 typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
964
965 /**
966 * Set up a filter to process all events before they change internal state and
967 * are posted to the internal event queue.
968 *
969 * If the filter function returns 1 when called, then the event will be added
970 * to the internal queue. If it returns 0, then the event will be dropped from
971 * the queue, but the internal state will still be updated. This allows
972 * selective filtering of dynamically arriving events.
973 *
974 * **WARNING**: Be very careful of what you do in the event filter function,
975 * as it may run in a different thread!
976 *
977 * On platforms that support it, if the quit event is generated by an
978 * interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
979 * application at the next event poll.
980 *
981 * There is one caveat when dealing with the ::SDL_QuitEvent event type. The
982 * event filter is only called when the window manager desires to close the
983 * application window. If the event filter returns 1, then the window will be
984 * closed, otherwise the window will remain open if possible.
985 *
986 * Note: Disabled events never make it to the event filter function; see
987 * SDL_EventState().
988 *
989 * Note: If you just want to inspect events without filtering, you should use
990 * SDL_AddEventWatch() instead.
991 *
992 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
993 * the event filter, but events pushed onto the queue with SDL_PeepEvents() do
994 * not.
995 *
996 * \param filter An SDL_EventFilter function to call when an event happens
997 * \param userdata a pointer that is passed to `filter`
998 *
999 * \since This function is available since SDL 2.0.0.
1000 *
1001 * \sa SDL_AddEventWatch
1002 * \sa SDL_EventState
1003 * \sa SDL_GetEventFilter
1004 * \sa SDL_PeepEvents
1005 * \sa SDL_PushEvent
1006 */
1007 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
1008 void *userdata);
1009
1010 /**
1011 * Query the current event filter.
1012 *
1013 * This function can be used to "chain" filters, by saving the existing filter
1014 * before replacing it with a function that will call that saved filter.
1015 *
1016 * \param filter the current callback function will be stored here
1017 * \param userdata the pointer that is passed to the current event filter will
1018 * be stored here
1019 * \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_SetEventFilter
1024 */
1025 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
1026 void **userdata);
1027
1028 /**
1029 * Add a callback to be triggered when an event is added to the event queue.
1030 *
1031 * `filter` will be called when an event happens, and its return value is
1032 * ignored.
1033 *
1034 * **WARNING**: Be very careful of what you do in the event filter function,
1035 * as it may run in a different thread!
1036 *
1037 * If the quit event is generated by a signal (e.g. SIGINT), it will bypass
1038 * the internal queue and be delivered to the watch callback immediately, and
1039 * arrive at the next event poll.
1040 *
1041 * Note: the callback is called for events posted by the user through
1042 * SDL_PushEvent(), but not for disabled events, nor for events by a filter
1043 * callback set with SDL_SetEventFilter(), nor for events posted by the user
1044 * through SDL_PeepEvents().
1045 *
1046 * \param filter an SDL_EventFilter function to call when an event happens.
1047 * \param userdata a pointer that is passed to `filter`
1048 *
1049 * \since This function is available since SDL 2.0.0.
1050 *
1051 * \sa SDL_DelEventWatch
1052 * \sa SDL_SetEventFilter
1053 */
1054 extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
1055 void *userdata);
1056
1057 /**
1058 * Remove an event watch callback added with SDL_AddEventWatch().
1059 *
1060 * This function takes the same input as SDL_AddEventWatch() to identify and
1061 * delete the corresponding callback.
1062 *
1063 * \param filter the function originally passed to SDL_AddEventWatch()
1064 * \param userdata the pointer originally passed to SDL_AddEventWatch()
1065 *
1066 * \since This function is available since SDL 2.0.0.
1067 *
1068 * \sa SDL_AddEventWatch
1069 */
1070 extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
1071 void *userdata);
1072
1073 /**
1074 * Run a specific filter function on the current event queue, removing any
1075 * events for which the filter returns 0.
1076 *
1077 * See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
1078 * this function does not change the filter permanently, it only uses the
1079 * supplied filter until this function returns.
1080 *
1081 * \param filter the SDL_EventFilter function to call when an event happens
1082 * \param userdata a pointer that is passed to `filter`
1083 *
1084 * \since This function is available since SDL 2.0.0.
1085 *
1086 * \sa SDL_GetEventFilter
1087 * \sa SDL_SetEventFilter
1088 */
1089 extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
1090 void *userdata);
1091
1092 /* @{ */
1093 #define SDL_QUERY -1
1094 #define SDL_IGNORE 0
1095 #define SDL_DISABLE 0
1096 #define SDL_ENABLE 1
1097
1098 /**
1099 * Set the state of processing events by type.
1100 *
1101 * `state` may be any of the following:
1102 *
1103 * - `SDL_QUERY`: returns the current processing state of the specified event
1104 * - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
1105 * from the event queue and will not be filtered
1106 * - `SDL_ENABLE`: the event will be processed normally
1107 *
1108 * \param type the type of event; see SDL_EventType for details
1109 * \param state how to process the event
1110 * \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
1111 * of the event before this function makes any changes to it.
1112 *
1113 * \since This function is available since SDL 2.0.0.
1114 *
1115 * \sa SDL_GetEventState
1116 */
1117 extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
1118 /* @} */
1119 #define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
1120
1121 /**
1122 * Allocate a set of user-defined events, and return the beginning event
1123 * number for that set of events.
1124 *
1125 * Calling this function with `numevents` <= 0 is an error and will return
1126 * (Uint32)-1.
1127 *
1128 * Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
1129 * 0xFFFFFFFF), but is clearer to write.
1130 *
1131 * \param numevents the number of events to be allocated
1132 * \returns the beginning event number, or (Uint32)-1 if there are not enough
1133 * user-defined events left.
1134 *
1135 * \since This function is available since SDL 2.0.0.
1136 *
1137 * \sa SDL_PushEvent
1138 */
1139 extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
1140
1141 /* Ends C function definitions when using C++ */
1142 #ifdef __cplusplus
1143 }
1144 #endif
1145 #include <SDL2/close_code.h>
1146
1147 #endif /* SDL_events_h_ */
1148
1149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_filesystem.h
23 *
24 * \brief Include file for filesystem SDL API functions
25 */
26
27 #ifndef SDL_filesystem_h_
28 #define SDL_filesystem_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the directory where the application was run from.
41 *
42 * This is not necessarily a fast call, so you should call this once near
43 * startup and save the string if you need it.
44 *
45 * **Mac OS X and iOS Specific Functionality**: If the application is in a
46 * ".app" bundle, this function returns the Resource directory (e.g.
47 * MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
48 * a property to the Info.plist file. Adding a string key with the name
49 * SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
50 * behaviour.
51 *
52 * Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
53 * application in /Applications/SDLApp/MyApp.app):
54 *
55 * - `resource`: bundle resource directory (the default). For example:
56 * `/Applications/SDLApp/MyApp.app/Contents/Resources`
57 * - `bundle`: the Bundle directory. For example:
58 * `/Applications/SDLApp/MyApp.app/`
59 * - `parent`: the containing directory of the bundle. For example:
60 * `/Applications/SDLApp/`
61 *
62 * The returned path is guaranteed to end with a path separator ('\' on
63 * Windows, '/' on most other platforms).
64 *
65 * The pointer returned is owned by the caller. Please call SDL_free() on the
66 * pointer when done with it.
67 *
68 * \returns an absolute path in UTF-8 encoding to the application data
69 * directory. NULL will be returned on error or when the platform
70 * doesn't implement this functionality, call SDL_GetError() for more
71 * information.
72 *
73 * \since This function is available since SDL 2.0.1.
74 *
75 * \sa SDL_GetPrefPath
76 */
77 extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
78
79 /**
80 * Get the user-and-app-specific path where files can be written.
81 *
82 * Get the "pref dir". This is meant to be where users can write personal
83 * files (preferences and save games, etc) that are specific to your
84 * application. This directory is unique per user, per application.
85 *
86 * This function will decide the appropriate location in the native
87 * filesystem, create the directory if necessary, and return a string of the
88 * absolute path to the directory in UTF-8 encoding.
89 *
90 * On Windows, the string might look like:
91 *
92 * `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
93 *
94 * On Linux, the string might look like"
95 *
96 * `/home/bob/.local/share/My Program Name/`
97 *
98 * On Mac OS X, the string might look like:
99 *
100 * `/Users/bob/Library/Application Support/My Program Name/`
101 *
102 * You should assume the path returned by this function is the only safe place
103 * to write files (and that SDL_GetBasePath(), while it might be writable, or
104 * even the parent of the returned path, isn't where you should be writing
105 * things).
106 *
107 * Both the org and app strings may become part of a directory name, so please
108 * follow these rules:
109 *
110 * - Try to use the same org string (_including case-sensitivity_) for all
111 * your applications that use this function.
112 * - Always use a unique app string for each one, and make sure it never
113 * changes for an app once you've decided on it.
114 * - Unicode characters are legal, as long as it's UTF-8 encoded, but...
115 * - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
116 * Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
117 *
118 * The returned path is guaranteed to end with a path separator ('\' on
119 * Windows, '/' on most other platforms).
120 *
121 * The pointer returned is owned by the caller. Please call SDL_free() on the
122 * pointer when done with it.
123 *
124 * \param org the name of your organization
125 * \param app the name of your application
126 * \returns a UTF-8 string of the user directory in platform-dependent
127 * notation. NULL if there's a problem (creating directory failed,
128 * etc.).
129 *
130 * \since This function is available since SDL 2.0.1.
131 *
132 * \sa SDL_GetBasePath
133 */
134 extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
135
136 /* Ends C function definitions when using C++ */
137 #ifdef __cplusplus
138 }
139 #endif
140 #include <SDL2/close_code.h>
141
142 #endif /* SDL_filesystem_h_ */
143
144 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gamecontroller.h
23 *
24 * Include file for SDL game controller event handling
25 */
26
27 #ifndef SDL_gamecontroller_h_
28 #define SDL_gamecontroller_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_rwops.h>
33 #include <SDL2/SDL_sensor.h>
34 #include <SDL2/SDL_joystick.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \file SDL_gamecontroller.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
47 * for game controllers, and load appropriate drivers.
48 *
49 * If you would like to receive controller updates while the application
50 * is in the background, you should set the following hint before calling
51 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
52 */
53
54 /**
55 * The gamecontroller structure used to identify an SDL game controller
56 */
57 struct _SDL_GameController;
58 typedef struct _SDL_GameController SDL_GameController;
59
60 typedef enum
61 {
62 SDL_CONTROLLER_TYPE_UNKNOWN = 0,
63 SDL_CONTROLLER_TYPE_XBOX360,
64 SDL_CONTROLLER_TYPE_XBOXONE,
65 SDL_CONTROLLER_TYPE_PS3,
66 SDL_CONTROLLER_TYPE_PS4,
67 SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
68 SDL_CONTROLLER_TYPE_VIRTUAL,
69 SDL_CONTROLLER_TYPE_PS5,
70 SDL_CONTROLLER_TYPE_AMAZON_LUNA,
71 SDL_CONTROLLER_TYPE_GOOGLE_STADIA
72 } SDL_GameControllerType;
73
74 typedef enum
75 {
76 SDL_CONTROLLER_BINDTYPE_NONE = 0,
77 SDL_CONTROLLER_BINDTYPE_BUTTON,
78 SDL_CONTROLLER_BINDTYPE_AXIS,
79 SDL_CONTROLLER_BINDTYPE_HAT
80 } SDL_GameControllerBindType;
81
82 /**
83 * Get the SDL joystick layer binding for this controller button/axis mapping
84 */
85 typedef struct SDL_GameControllerButtonBind
86 {
87 SDL_GameControllerBindType bindType;
88 union
89 {
90 int button;
91 int axis;
92 struct {
93 int hat;
94 int hat_mask;
95 } hat;
96 } value;
97
98 } SDL_GameControllerButtonBind;
99
100
101 /**
102 * To count the number of game controllers in the system for the following:
103 *
104 * ```c
105 * int nJoysticks = SDL_NumJoysticks();
106 * int nGameControllers = 0;
107 * for (int i = 0; i < nJoysticks; i++) {
108 * if (SDL_IsGameController(i)) {
109 * nGameControllers++;
110 * }
111 * }
112 * ```
113 *
114 * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
115 * guid,name,mappings
116 *
117 * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
118 * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
119 * The mapping format for joystick is:
120 * bX - a joystick button, index X
121 * hX.Y - hat X with value Y
122 * aX - axis X of the joystick
123 * Buttons can be used as a controller axis and vice versa.
124 *
125 * This string shows an example of a valid mapping for a controller
126 *
127 * ```c
128 * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
129 * ```
130 */
131
132 /**
133 * Load a set of Game Controller mappings from a seekable SDL data stream.
134 *
135 * You can call this function several times, if needed, to load different
136 * database files.
137 *
138 * If a new mapping is loaded for an already known controller GUID, the later
139 * version will overwrite the one currently loaded.
140 *
141 * Mappings not belonging to the current platform or with no platform field
142 * specified will be ignored (i.e. mappings for Linux will be ignored in
143 * Windows, etc).
144 *
145 * This function will load the text database entirely in memory before
146 * processing it, so take this into consideration if you are in a memory
147 * constrained environment.
148 *
149 * \param rw the data stream for the mappings to be added
150 * \param freerw non-zero to close the stream after being read
151 * \returns the number of mappings added or -1 on error; call SDL_GetError()
152 * for more information.
153 *
154 * \since This function is available since SDL 2.0.2.
155 *
156 * \sa SDL_GameControllerAddMapping
157 * \sa SDL_GameControllerAddMappingsFromFile
158 * \sa SDL_GameControllerMappingForGUID
159 */
160 extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
161
162 /**
163 * Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
164 *
165 * Convenience macro.
166 */
167 #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
168
169 /**
170 * Add support for controllers that SDL is unaware of or to cause an existing
171 * controller to have a different binding.
172 *
173 * The mapping string has the format "GUID,name,mapping", where GUID is the
174 * string value from SDL_JoystickGetGUIDString(), name is the human readable
175 * string for the device and mappings are controller mappings to joystick
176 * ones. Under Windows there is a reserved GUID of "xinput" that covers all
177 * XInput devices. The mapping format for joystick is: {| |bX |a joystick
178 * button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
179 * |} Buttons can be used as a controller axes and vice versa.
180 *
181 * This string shows an example of a valid mapping for a controller:
182 *
183 * ```c
184 * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
185 * ```
186 *
187 * \param mappingString the mapping string
188 * \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
189 * -1 on error; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GameControllerMapping
194 * \sa SDL_GameControllerMappingForGUID
195 */
196 extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
197
198 /**
199 * Get the number of mappings installed.
200 *
201 * \returns the number of mappings.
202 *
203 * \since This function is available since SDL 2.0.6.
204 */
205 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
206
207 /**
208 * Get the mapping at a particular index.
209 *
210 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
211 * the index is out of range.
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
216
217 /**
218 * Get the game controller mapping string for a given GUID.
219 *
220 * The returned string must be freed with SDL_free().
221 *
222 * \param guid a structure containing the GUID for which a mapping is desired
223 * \returns a mapping string or NULL on error; call SDL_GetError() for more
224 * information.
225 *
226 * \since This function is available since SDL 2.0.0.
227 *
228 * \sa SDL_JoystickGetDeviceGUID
229 * \sa SDL_JoystickGetGUID
230 */
231 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
232
233 /**
234 * Get the current mapping of a Game Controller.
235 *
236 * The returned string must be freed with SDL_free().
237 *
238 * Details about mappings are discussed with SDL_GameControllerAddMapping().
239 *
240 * \param gamecontroller the game controller you want to get the current
241 * mapping for
242 * \returns a string that has the controller's mapping or NULL if no mapping
243 * is available; call SDL_GetError() for more information.
244 *
245 * \since This function is available since SDL 2.0.0.
246 *
247 * \sa SDL_GameControllerAddMapping
248 * \sa SDL_GameControllerMappingForGUID
249 */
250 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
251
252 /**
253 * Check if the given joystick is supported by the game controller interface.
254 *
255 * `joystick_index` is the same as the `device_index` passed to
256 * SDL_JoystickOpen().
257 *
258 * \param joystick_index the device_index of a device, up to
259 * SDL_NumJoysticks()
260 * \returns SDL_TRUE if the given joystick is supported by the game controller
261 * interface, SDL_FALSE if it isn't or it's an invalid index.
262 *
263 * \since This function is available since SDL 2.0.0.
264 *
265 * \sa SDL_GameControllerNameForIndex
266 * \sa SDL_GameControllerOpen
267 */
268 extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
269
270 /**
271 * Get the implementation dependent name for the game controller.
272 *
273 * This function can be called before any controllers are opened.
274 *
275 * `joystick_index` is the same as the `device_index` passed to
276 * SDL_JoystickOpen().
277 *
278 * \param joystick_index the device_index of a device, from zero to
279 * SDL_NumJoysticks()-1
280 * \returns the implementation-dependent name for the game controller, or NULL
281 * if there is no name or the index is invalid.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_GameControllerName
286 * \sa SDL_GameControllerOpen
287 * \sa SDL_IsGameController
288 */
289 extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
290
291 /**
292 * Get the type of a game controller.
293 *
294 * This can be called before any controllers are opened.
295 *
296 * \param joystick_index the device_index of a device, from zero to
297 * SDL_NumJoysticks()-1
298 * \returns the controller type.
299 *
300 * \since This function is available since SDL 2.0.12.
301 */
302 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
303
304 /**
305 * Get the mapping of a game controller.
306 *
307 * This can be called before any controllers are opened.
308 *
309 * \param joystick_index the device_index of a device, from zero to
310 * SDL_NumJoysticks()-1
311 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
312 * no mapping is available.
313 *
314 * \since This function is available since SDL 2.0.9.
315 */
316 extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
317
318 /**
319 * Open a game controller for use.
320 *
321 * `joystick_index` is the same as the `device_index` passed to
322 * SDL_JoystickOpen().
323 *
324 * The index passed as an argument refers to the N'th game controller on the
325 * system. This index is not the value which will identify this controller in
326 * future controller events. The joystick's instance id (SDL_JoystickID) will
327 * be used there instead.
328 *
329 * \param joystick_index the device_index of a device, up to
330 * SDL_NumJoysticks()
331 * \returns a gamecontroller identifier or NULL if an error occurred; call
332 * SDL_GetError() for more information.
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_GameControllerClose
337 * \sa SDL_GameControllerNameForIndex
338 * \sa SDL_IsGameController
339 */
340 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
341
342 /**
343 * Get the SDL_GameController associated with an instance id.
344 *
345 * \param joyid the instance id to get the SDL_GameController for
346 * \returns an SDL_GameController on success or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.4.
350 */
351 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
352
353 /**
354 * Get the SDL_GameController associated with a player index.
355 *
356 * Please note that the player index is _not_ the device index, nor is it the
357 * instance id!
358 *
359 * \param player_index the player index, which is not the device index or the
360 * instance id!
361 * \returns the SDL_GameController associated with a player index.
362 *
363 * \since This function is available since SDL 2.0.12.
364 *
365 * \sa SDL_GameControllerGetPlayerIndex
366 * \sa SDL_GameControllerSetPlayerIndex
367 */
368 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
369
370 /**
371 * Get the implementation-dependent name for an opened game controller.
372 *
373 * This is the same name as returned by SDL_GameControllerNameForIndex(), but
374 * it takes a controller identifier instead of the (unstable) device index.
375 *
376 * \param gamecontroller a game controller identifier previously returned by
377 * SDL_GameControllerOpen()
378 * \returns the implementation dependent name for the game controller, or NULL
379 * if there is no name or the identifier passed is invalid.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_GameControllerNameForIndex
384 * \sa SDL_GameControllerOpen
385 */
386 extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
387
388 /**
389 * Get the type of this currently opened controller
390 *
391 * This is the same name as returned by SDL_GameControllerTypeForIndex(), but
392 * it takes a controller identifier instead of the (unstable) device index.
393 *
394 * \param gamecontroller the game controller object to query.
395 * \returns the controller type.
396 *
397 * \since This function is available since SDL 2.0.12.
398 */
399 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
400
401 /**
402 * Get the player index of an opened game controller.
403 *
404 * For XInput controllers this returns the XInput user index.
405 *
406 * \param gamecontroller the game controller object to query.
407 * \returns the player index for controller, or -1 if it's not available.
408 *
409 * \since This function is available since SDL 2.0.9.
410 */
411 extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
412
413 /**
414 * Set the player index of an opened game controller.
415 *
416 * \param gamecontroller the game controller object to adjust.
417 * \param player_index Player index to assign to this controller.
418 *
419 * \since This function is available since SDL 2.0.12.
420 */
421 extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
422
423 /**
424 * Get the USB vendor ID of an opened controller, if available.
425 *
426 * If the vendor ID isn't available this function returns 0.
427 *
428 * \param gamecontroller the game controller object to query.
429 * \return the USB vendor ID, or zero if unavailable.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
434
435 /**
436 * Get the USB product ID of an opened controller, if available.
437 *
438 * If the product ID isn't available this function returns 0.
439 *
440 * \param gamecontroller the game controller object to query.
441 * \return the USB product ID, or zero if unavailable.
442 *
443 * \since This function is available since SDL 2.0.6.
444 */
445 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
446
447 /**
448 * Get the product version of an opened controller, if available.
449 *
450 * If the product version isn't available this function returns 0.
451 *
452 * \param gamecontroller the game controller object to query.
453 * \return the USB product version, or zero if unavailable.
454 *
455 * \since This function is available since SDL 2.0.6.
456 */
457 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
458
459 /**
460 * Get the serial number of an opened controller, if available.
461 *
462 * Returns the serial number of the controller, or NULL if it is not
463 * available.
464 *
465 * \param gamecontroller the game controller object to query.
466 * \return the serial number, or NULL if unavailable.
467 *
468 * \since This function is available since SDL 2.0.14.
469 */
470 extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
471
472 /**
473 * Check if a controller has been opened and is currently connected.
474 *
475 * \param gamecontroller a game controller identifier previously returned by
476 * SDL_GameControllerOpen()
477 * \returns SDL_TRUE if the controller has been opened and is currently
478 * connected, or SDL_FALSE if not.
479 *
480 * \since This function is available since SDL 2.0.0.
481 *
482 * \sa SDL_GameControllerClose
483 * \sa SDL_GameControllerOpen
484 */
485 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
486
487 /**
488 * Get the Joystick ID from a Game Controller.
489 *
490 * This function will give you a SDL_Joystick object, which allows you to use
491 * the SDL_Joystick functions with a SDL_GameController object. This would be
492 * useful for getting a joystick's position at any given time, even if it
493 * hasn't moved (moving it would produce an event, which would have the axis'
494 * value).
495 *
496 * The pointer returned is owned by the SDL_GameController. You should not
497 * call SDL_JoystickClose() on it, for example, since doing so will likely
498 * cause SDL to crash.
499 *
500 * \param gamecontroller the game controller object that you want to get a
501 * joystick from
502 * \returns a SDL_Joystick object; call SDL_GetError() for more information.
503 *
504 * \since This function is available since SDL 2.0.0.
505 */
506 extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
507
508 /**
509 * Query or change current state of Game Controller events.
510 *
511 * If controller events are disabled, you must call SDL_GameControllerUpdate()
512 * yourself and check the state of the controller when you want controller
513 * information.
514 *
515 * Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
516 * and 1 will have any effect. Other numbers will just be returned.
517 *
518 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
519 * \returns the same value passed to the function, with exception to -1
520 * (SDL_QUERY), which will return the current state.
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_JoystickEventState
525 */
526 extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
527
528 /**
529 * Manually pump game controller updates if not using the loop.
530 *
531 * This function is called automatically by the event loop if events are
532 * enabled. Under such circumstances, it will not be necessary to call this
533 * function.
534 *
535 * \since This function is available since SDL 2.0.0.
536 */
537 extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
538
539
540 /**
541 * The list of axes available from a controller
542 *
543 * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
544 * and are centered within ~8000 of zero, though advanced UI will allow users to set
545 * or autodetect the dead zone, which varies between controllers.
546 *
547 * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
548 */
549 typedef enum
550 {
551 SDL_CONTROLLER_AXIS_INVALID = -1,
552 SDL_CONTROLLER_AXIS_LEFTX,
553 SDL_CONTROLLER_AXIS_LEFTY,
554 SDL_CONTROLLER_AXIS_RIGHTX,
555 SDL_CONTROLLER_AXIS_RIGHTY,
556 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
557 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
558 SDL_CONTROLLER_AXIS_MAX
559 } SDL_GameControllerAxis;
560
561 /**
562 * Convert a string into SDL_GameControllerAxis enum.
563 *
564 * This function is called internally to translate SDL_GameController mapping
565 * strings for the underlying joystick device into the consistent
566 * SDL_GameController mapping. You do not normally need to call this function
567 * unless you are parsing SDL_GameController mappings in your own code.
568 *
569 * Note specially that "righttrigger" and "lefttrigger" map to
570 * `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
571 * respectively.
572 *
573 * \param str string representing a SDL_GameController axis
574 * \returns the SDL_GameControllerAxis enum corresponding to the input string,
575 * or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
576 *
577 * \since This function is available since SDL 2.0.0.
578 *
579 * \sa SDL_GameControllerGetStringForAxis
580 */
581 extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
582
583 /**
584 * Convert from an SDL_GameControllerAxis enum to a string.
585 *
586 * The caller should not SDL_free() the returned string.
587 *
588 * \param axis an enum value for a given SDL_GameControllerAxis
589 * \returns a string for the given axis, or NULL if an invalid axis is
590 * specified. The string returned is of the format used by
591 * SDL_GameController mapping strings.
592 *
593 * \since This function is available since SDL 2.0.0.
594 *
595 * \sa SDL_GameControllerGetAxisFromString
596 */
597 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
598
599 /**
600 * Get the SDL joystick layer binding for a controller axis mapping.
601 *
602 * \param gamecontroller a game controller
603 * \param axis an axis enum value (one of the SDL_GameControllerAxis values)
604 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
605 * (like the given Controller axis doesn't exist on the device), its
606 * `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
607 *
608 * \since This function is available since SDL 2.0.0.
609 *
610 * \sa SDL_GameControllerGetBindForButton
611 */
612 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
613 SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
614 SDL_GameControllerAxis axis);
615
616 /**
617 * Query whether a game controller has a given axis.
618 *
619 * This merely reports whether the controller's mapping defined this axis, as
620 * that is all the information SDL has about the physical device.
621 *
622 * \param gamecontroller a game controller
623 * \param axis an axis enum value (an SDL_GameControllerAxis value)
624 * \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
625 *
626 * \since This function is available since SDL 2.0.14.
627 */
628 extern DECLSPEC SDL_bool SDLCALL
629 SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
630
631 /**
632 * Get the current state of an axis control on a game controller.
633 *
634 * The axis indices start at index 0.
635 *
636 * The state is a value ranging from -32768 to 32767. Triggers, however, range
637 * from 0 to 32767 (they never return a negative value).
638 *
639 * \param gamecontroller a game controller
640 * \param axis an axis index (one of the SDL_GameControllerAxis values)
641 * \returns axis state (including 0) on success or 0 (also) on failure; call
642 * SDL_GetError() for more information.
643 *
644 * \since This function is available since SDL 2.0.0.
645 *
646 * \sa SDL_GameControllerGetButton
647 */
648 extern DECLSPEC Sint16 SDLCALL
649 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
650
651 /**
652 * The list of buttons available from a controller
653 */
654 typedef enum
655 {
656 SDL_CONTROLLER_BUTTON_INVALID = -1,
657 SDL_CONTROLLER_BUTTON_A,
658 SDL_CONTROLLER_BUTTON_B,
659 SDL_CONTROLLER_BUTTON_X,
660 SDL_CONTROLLER_BUTTON_Y,
661 SDL_CONTROLLER_BUTTON_BACK,
662 SDL_CONTROLLER_BUTTON_GUIDE,
663 SDL_CONTROLLER_BUTTON_START,
664 SDL_CONTROLLER_BUTTON_LEFTSTICK,
665 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
666 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
667 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
668 SDL_CONTROLLER_BUTTON_DPAD_UP,
669 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
670 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
671 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
672 SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
673 SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
674 SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
675 SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
676 SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
677 SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
678 SDL_CONTROLLER_BUTTON_MAX
679 } SDL_GameControllerButton;
680
681 /**
682 * Convert a string into an SDL_GameControllerButton enum.
683 *
684 * This function is called internally to translate SDL_GameController mapping
685 * strings for the underlying joystick device into the consistent
686 * SDL_GameController mapping. You do not normally need to call this function
687 * unless you are parsing SDL_GameController mappings in your own code.
688 *
689 * \param str string representing a SDL_GameController axis
690 * \returns the SDL_GameControllerButton enum corresponding to the input
691 * string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
692 *
693 * \since This function is available since SDL 2.0.0.
694 */
695 extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
696
697 /**
698 * Convert from an SDL_GameControllerButton enum to a string.
699 *
700 * The caller should not SDL_free() the returned string.
701 *
702 * \param button an enum value for a given SDL_GameControllerButton
703 * \returns a string for the given button, or NULL if an invalid axis is
704 * specified. The string returned is of the format used by
705 * SDL_GameController mapping strings.
706 *
707 * \since This function is available since SDL 2.0.0.
708 *
709 * \sa SDL_GameControllerGetButtonFromString
710 */
711 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
712
713 /**
714 * Get the SDL joystick layer binding for a controller button mapping.
715 *
716 * \param gamecontroller a game controller
717 * \param button an button enum value (an SDL_GameControllerButton value)
718 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
719 * (like the given Controller button doesn't exist on the device),
720 * its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
721 *
722 * \since This function is available since SDL 2.0.0.
723 *
724 * \sa SDL_GameControllerGetBindForAxis
725 */
726 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
727 SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
728 SDL_GameControllerButton button);
729
730 /**
731 * Query whether a game controller has a given button.
732 *
733 * This merely reports whether the controller's mapping defined this button,
734 * as that is all the information SDL has about the physical device.
735 *
736 * \param gamecontroller a game controller
737 * \param button a button enum value (an SDL_GameControllerButton value)
738 * \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
739 *
740 * \since This function is available since SDL 2.0.14.
741 */
742 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
743 SDL_GameControllerButton button);
744
745 /**
746 * Get the current state of a button on a game controller.
747 *
748 * \param gamecontroller a game controller
749 * \param button a button index (one of the SDL_GameControllerButton values)
750 * \returns 1 for pressed state or 0 for not pressed state or error; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_GameControllerGetAxis
756 */
757 extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
758 SDL_GameControllerButton button);
759
760 /**
761 * Get the number of touchpads on a game controller.
762 *
763 * \since This function is available since SDL 2.0.14.
764 */
765 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
766
767 /**
768 * Get the number of supported simultaneous fingers on a touchpad on a game
769 * controller.
770 *
771 * \since This function is available since SDL 2.0.14.
772 */
773 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
774
775 /**
776 * Get the current state of a finger on a touchpad on a game controller.
777 *
778 * \since This function is available since SDL 2.0.14.
779 */
780 extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
781
782 /**
783 * Return whether a game controller has a particular sensor.
784 *
785 * \param gamecontroller The controller to query
786 * \param type The type of sensor to query
787 * \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
788 *
789 * \since This function is available since SDL 2.0.14.
790 */
791 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
792
793 /**
794 * Set whether data reporting for a game controller sensor is enabled.
795 *
796 * \param gamecontroller The controller to update
797 * \param type The type of sensor to enable/disable
798 * \param enabled Whether data reporting should be enabled
799 * \returns 0 or -1 if an error occurred.
800 *
801 * \since This function is available since SDL 2.0.14.
802 */
803 extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
804
805 /**
806 * Query whether sensor data reporting is enabled for a game controller.
807 *
808 * \param gamecontroller The controller to query
809 * \param type The type of sensor to query
810 * \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
811 *
812 * \since This function is available since SDL 2.0.14.
813 */
814 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
815
816 /**
817 * Get the data rate (number of events per second) of a game controller
818 * sensor.
819 *
820 * \param gamecontroller The controller to query
821 * \param type The type of sensor to query
822 * \return the data rate, or 0.0f if the data rate is not available.
823 *
824 * \since This function is available since SDL 2.0.16.
825 */
826 extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
827
828 /**
829 * Get the current state of a game controller sensor.
830 *
831 * The number of values and interpretation of the data is sensor dependent.
832 * See SDL_sensor.h for the details for each type of sensor.
833 *
834 * \param gamecontroller The controller to query
835 * \param type The type of sensor to query
836 * \param data A pointer filled with the current sensor state
837 * \param num_values The number of values to write to data
838 * \return 0 or -1 if an error occurred.
839 *
840 * \since This function is available since SDL 2.0.14.
841 */
842 extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
843
844 /**
845 * Start a rumble effect on a game controller.
846 *
847 * Each call to this function cancels any previous rumble effect, and calling
848 * it with 0 intensity stops any rumbling.
849 *
850 * \param gamecontroller The controller to vibrate
851 * \param low_frequency_rumble The intensity of the low frequency (left)
852 * rumble motor, from 0 to 0xFFFF
853 * \param high_frequency_rumble The intensity of the high frequency (right)
854 * rumble motor, from 0 to 0xFFFF
855 * \param duration_ms The duration of the rumble effect, in milliseconds
856 * \returns 0, or -1 if rumble isn't supported on this controller
857 *
858 * \since This function is available since SDL 2.0.9.
859 *
860 * \sa SDL_GameControllerHasRumble
861 */
862 extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
863
864 /**
865 * Start a rumble effect in the game controller's triggers.
866 *
867 * Each call to this function cancels any previous trigger rumble effect, and
868 * calling it with 0 intensity stops any rumbling.
869 *
870 * Note that this is rumbling of the _triggers_ and not the game controller as
871 * a whole. This is currently only supported on Xbox One controllers. If you
872 * want the (more common) whole-controller rumble, use
873 * SDL_GameControllerRumble() instead.
874 *
875 * \param gamecontroller The controller to vibrate
876 * \param left_rumble The intensity of the left trigger rumble motor, from 0
877 * to 0xFFFF
878 * \param right_rumble The intensity of the right trigger rumble motor, from 0
879 * to 0xFFFF
880 * \param duration_ms The duration of the rumble effect, in milliseconds
881 * \returns 0, or -1 if trigger rumble isn't supported on this controller
882 *
883 * \since This function is available since SDL 2.0.14.
884 *
885 * \sa SDL_GameControllerHasRumbleTriggers
886 */
887 extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
888
889 /**
890 * Query whether a game controller has an LED.
891 *
892 * \param gamecontroller The controller to query
893 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
894 * modifiable LED
895 *
896 * \since This function is available since SDL 2.0.14.
897 */
898 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
899
900 /**
901 * Query whether a game controller has rumble support.
902 *
903 * \param gamecontroller The controller to query
904 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
905 * support
906 *
907 * \since This function is available since SDL 2.0.18.
908 *
909 * \sa SDL_GameControllerRumble
910 */
911 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
912
913 /**
914 * Query whether a game controller has rumble support on triggers.
915 *
916 * \param gamecontroller The controller to query
917 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
918 * rumble support
919 *
920 * \since This function is available since SDL 2.0.18.
921 *
922 * \sa SDL_GameControllerRumbleTriggers
923 */
924 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
925
926 /**
927 * Update a game controller's LED color.
928 *
929 * \param gamecontroller The controller to update
930 * \param red The intensity of the red LED
931 * \param green The intensity of the green LED
932 * \param blue The intensity of the blue LED
933 * \returns 0, or -1 if this controller does not have a modifiable LED
934 *
935 * \since This function is available since SDL 2.0.14.
936 */
937 extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
938
939 /**
940 * Send a controller specific effect packet
941 *
942 * \param gamecontroller The controller to affect
943 * \param data The data to send to the controller
944 * \param size The size of the data to send to the controller
945 * \returns 0, or -1 if this controller or driver doesn't support effect
946 * packets
947 *
948 * \since This function is available since SDL 2.0.16.
949 */
950 extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
951
952 /**
953 * Close a game controller previously opened with SDL_GameControllerOpen().
954 *
955 * \param gamecontroller a game controller identifier previously returned by
956 * SDL_GameControllerOpen()
957 *
958 * \since This function is available since SDL 2.0.0.
959 *
960 * \sa SDL_GameControllerOpen
961 */
962 extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
963
964 /**
965 * Return the sfSymbolsName for a given button on a game controller on Apple
966 * platforms.
967 *
968 * \param gamecontroller the controller to query
969 * \param button a button on the game controller
970 * \returns the sfSymbolsName or NULL if the name can't be found
971 *
972 * \since This function is available since SDL 2.0.18.
973 *
974 * \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
975 */
976 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
977
978 /**
979 * Return the sfSymbolsName for a given axis on a game controller on Apple
980 * platforms.
981 *
982 * \param gamecontroller the controller to query
983 * \param axis an axis on the game controller
984 * \returns the sfSymbolsName or NULL if the name can't be found
985 *
986 * \since This function is available since SDL 2.0.18.
987 *
988 * \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
989 */
990 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
991
992
993 /* Ends C function definitions when using C++ */
994 #ifdef __cplusplus
995 }
996 #endif
997 #include <SDL2/close_code.h>
998
999 #endif /* SDL_gamecontroller_h_ */
1000
1001 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gesture.h
23 *
24 * Include file for SDL gesture event handling.
25 */
26
27 #ifndef SDL_gesture_h_
28 #define SDL_gesture_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/SDL_touch.h>
35
36
37 #include <SDL2/begin_code.h>
38 /* Set up for C function definitions, even when using C++ */
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 typedef Sint64 SDL_GestureID;
44
45 /* Function prototypes */
46
47 /**
48 * Begin recording a gesture on a specified touch device or all touch devices.
49 *
50 * If the parameter `touchId` is -1 (i.e., all devices), this function will
51 * always return 1, regardless of whether there actually are any devices.
52 *
53 * \param touchId the touch device id, or -1 for all touch devices
54 * \returns 1 on success or 0 if the specified device could not be found.
55 *
56 * \since This function is available since SDL 2.0.0.
57 *
58 * \sa SDL_GetTouchDevice
59 */
60 extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
61
62
63 /**
64 * Save all currently loaded Dollar Gesture templates.
65 *
66 * \param dst a SDL_RWops to save to
67 * \returns the number of saved templates on success or 0 on failure; call
68 * SDL_GetError() for more information.
69 *
70 * \since This function is available since SDL 2.0.0.
71 *
72 * \sa SDL_LoadDollarTemplates
73 * \sa SDL_SaveDollarTemplate
74 */
75 extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
76
77 /**
78 * Save a currently loaded Dollar Gesture template.
79 *
80 * \param gestureId a gesture id
81 * \param dst a SDL_RWops to save to
82 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
83 * information.
84 *
85 * \since This function is available since SDL 2.0.0.
86 *
87 * \sa SDL_LoadDollarTemplates
88 * \sa SDL_SaveAllDollarTemplates
89 */
90 extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
91
92
93 /**
94 * Load Dollar Gesture templates from a file.
95 *
96 * \param touchId a touch id
97 * \param src a SDL_RWops to load from
98 * \returns the number of loaded templates on success or a negative error code
99 * (or 0) on failure; call SDL_GetError() for more information.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_SaveAllDollarTemplates
104 * \sa SDL_SaveDollarTemplate
105 */
106 extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
107
108 /* Ends C function definitions when using C++ */
109 #ifdef __cplusplus
110 }
111 #endif
112 #include <SDL2/close_code.h>
113
114 #endif /* SDL_gesture_h_ */
115
116 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_haptic.h
23 *
24 * \brief The SDL haptic subsystem allows you to control haptic (force feedback)
25 * devices.
26 *
27 * The basic usage is as follows:
28 * - Initialize the subsystem (::SDL_INIT_HAPTIC).
29 * - Open a haptic device.
30 * - SDL_HapticOpen() to open from index.
31 * - SDL_HapticOpenFromJoystick() to open from an existing joystick.
32 * - Create an effect (::SDL_HapticEffect).
33 * - Upload the effect with SDL_HapticNewEffect().
34 * - Run the effect with SDL_HapticRunEffect().
35 * - (optional) Free the effect with SDL_HapticDestroyEffect().
36 * - Close the haptic device with SDL_HapticClose().
37 *
38 * \par Simple rumble example:
39 * \code
40 * SDL_Haptic *haptic;
41 *
42 * // Open the device
43 * haptic = SDL_HapticOpen( 0 );
44 * if (haptic == NULL)
45 * return -1;
46 *
47 * // Initialize simple rumble
48 * if (SDL_HapticRumbleInit( haptic ) != 0)
49 * return -1;
50 *
51 * // Play effect at 50% strength for 2 seconds
52 * if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
53 * return -1;
54 * SDL_Delay( 2000 );
55 *
56 * // Clean up
57 * SDL_HapticClose( haptic );
58 * \endcode
59 *
60 * \par Complete example:
61 * \code
62 * int test_haptic( SDL_Joystick * joystick ) {
63 * SDL_Haptic *haptic;
64 * SDL_HapticEffect effect;
65 * int effect_id;
66 *
67 * // Open the device
68 * haptic = SDL_HapticOpenFromJoystick( joystick );
69 * if (haptic == NULL) return -1; // Most likely joystick isn't haptic
70 *
71 * // See if it can do sine waves
72 * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
73 * SDL_HapticClose(haptic); // No sine effect
74 * return -1;
75 * }
76 *
77 * // Create the effect
78 * SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
79 * effect.type = SDL_HAPTIC_SINE;
80 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
81 * effect.periodic.direction.dir[0] = 18000; // Force comes from south
82 * effect.periodic.period = 1000; // 1000 ms
83 * effect.periodic.magnitude = 20000; // 20000/32767 strength
84 * effect.periodic.length = 5000; // 5 seconds long
85 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
86 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away
87 *
88 * // Upload the effect
89 * effect_id = SDL_HapticNewEffect( haptic, &effect );
90 *
91 * // Test the effect
92 * SDL_HapticRunEffect( haptic, effect_id, 1 );
93 * SDL_Delay( 5000); // Wait for the effect to finish
94 *
95 * // We destroy the effect, although closing the device also does this
96 * SDL_HapticDestroyEffect( haptic, effect_id );
97 *
98 * // Close the device
99 * SDL_HapticClose(haptic);
100 *
101 * return 0; // Success
102 * }
103 * \endcode
104 */
105
106 #ifndef SDL_haptic_h_
107 #define SDL_haptic_h_
108
109 #include <SDL2/SDL_stdinc.h>
110 #include <SDL2/SDL_error.h>
111 #include <SDL2/SDL_joystick.h>
112
113 #include <SDL2/begin_code.h>
114 /* Set up for C function definitions, even when using C++ */
115 #ifdef __cplusplus
116 extern "C" {
117 #endif /* __cplusplus */
118
119 /* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
120 *
121 * At the moment the magnitude variables are mixed between signed/unsigned, and
122 * it is also not made clear that ALL of those variables expect a max of 0x7FFF.
123 *
124 * Some platforms may have higher precision than that (Linux FF, Windows XInput)
125 * so we should fix the inconsistency in favor of higher possible precision,
126 * adjusting for platforms that use different scales.
127 * -flibit
128 */
129
130 /**
131 * \typedef SDL_Haptic
132 *
133 * \brief The haptic structure used to identify an SDL haptic.
134 *
135 * \sa SDL_HapticOpen
136 * \sa SDL_HapticOpenFromJoystick
137 * \sa SDL_HapticClose
138 */
139 struct _SDL_Haptic;
140 typedef struct _SDL_Haptic SDL_Haptic;
141
142
143 /**
144 * \name Haptic features
145 *
146 * Different haptic features a device can have.
147 */
148 /* @{ */
149
150 /**
151 * \name Haptic effects
152 */
153 /* @{ */
154
155 /**
156 * \brief Constant effect supported.
157 *
158 * Constant haptic effect.
159 *
160 * \sa SDL_HapticCondition
161 */
162 #define SDL_HAPTIC_CONSTANT (1u<<0)
163
164 /**
165 * \brief Sine wave effect supported.
166 *
167 * Periodic haptic effect that simulates sine waves.
168 *
169 * \sa SDL_HapticPeriodic
170 */
171 #define SDL_HAPTIC_SINE (1u<<1)
172
173 /**
174 * \brief Left/Right effect supported.
175 *
176 * Haptic effect for direct control over high/low frequency motors.
177 *
178 * \sa SDL_HapticLeftRight
179 * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
180 * we ran out of bits, and this is important for XInput devices.
181 */
182 #define SDL_HAPTIC_LEFTRIGHT (1u<<2)
183
184 /* !!! FIXME: put this back when we have more bits in 2.1 */
185 /* #define SDL_HAPTIC_SQUARE (1<<2) */
186
187 /**
188 * \brief Triangle wave effect supported.
189 *
190 * Periodic haptic effect that simulates triangular waves.
191 *
192 * \sa SDL_HapticPeriodic
193 */
194 #define SDL_HAPTIC_TRIANGLE (1u<<3)
195
196 /**
197 * \brief Sawtoothup wave effect supported.
198 *
199 * Periodic haptic effect that simulates saw tooth up waves.
200 *
201 * \sa SDL_HapticPeriodic
202 */
203 #define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
204
205 /**
206 * \brief Sawtoothdown wave effect supported.
207 *
208 * Periodic haptic effect that simulates saw tooth down waves.
209 *
210 * \sa SDL_HapticPeriodic
211 */
212 #define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
213
214 /**
215 * \brief Ramp effect supported.
216 *
217 * Ramp haptic effect.
218 *
219 * \sa SDL_HapticRamp
220 */
221 #define SDL_HAPTIC_RAMP (1u<<6)
222
223 /**
224 * \brief Spring effect supported - uses axes position.
225 *
226 * Condition haptic effect that simulates a spring. Effect is based on the
227 * axes position.
228 *
229 * \sa SDL_HapticCondition
230 */
231 #define SDL_HAPTIC_SPRING (1u<<7)
232
233 /**
234 * \brief Damper effect supported - uses axes velocity.
235 *
236 * Condition haptic effect that simulates dampening. Effect is based on the
237 * axes velocity.
238 *
239 * \sa SDL_HapticCondition
240 */
241 #define SDL_HAPTIC_DAMPER (1u<<8)
242
243 /**
244 * \brief Inertia effect supported - uses axes acceleration.
245 *
246 * Condition haptic effect that simulates inertia. Effect is based on the axes
247 * acceleration.
248 *
249 * \sa SDL_HapticCondition
250 */
251 #define SDL_HAPTIC_INERTIA (1u<<9)
252
253 /**
254 * \brief Friction effect supported - uses axes movement.
255 *
256 * Condition haptic effect that simulates friction. Effect is based on the
257 * axes movement.
258 *
259 * \sa SDL_HapticCondition
260 */
261 #define SDL_HAPTIC_FRICTION (1u<<10)
262
263 /**
264 * \brief Custom effect is supported.
265 *
266 * User defined custom haptic effect.
267 */
268 #define SDL_HAPTIC_CUSTOM (1u<<11)
269
270 /* @} *//* Haptic effects */
271
272 /* These last few are features the device has, not effects */
273
274 /**
275 * \brief Device can set global gain.
276 *
277 * Device supports setting the global gain.
278 *
279 * \sa SDL_HapticSetGain
280 */
281 #define SDL_HAPTIC_GAIN (1u<<12)
282
283 /**
284 * \brief Device can set autocenter.
285 *
286 * Device supports setting autocenter.
287 *
288 * \sa SDL_HapticSetAutocenter
289 */
290 #define SDL_HAPTIC_AUTOCENTER (1u<<13)
291
292 /**
293 * \brief Device can be queried for effect status.
294 *
295 * Device supports querying effect status.
296 *
297 * \sa SDL_HapticGetEffectStatus
298 */
299 #define SDL_HAPTIC_STATUS (1u<<14)
300
301 /**
302 * \brief Device can be paused.
303 *
304 * Devices supports being paused.
305 *
306 * \sa SDL_HapticPause
307 * \sa SDL_HapticUnpause
308 */
309 #define SDL_HAPTIC_PAUSE (1u<<15)
310
311
312 /**
313 * \name Direction encodings
314 */
315 /* @{ */
316
317 /**
318 * \brief Uses polar coordinates for the direction.
319 *
320 * \sa SDL_HapticDirection
321 */
322 #define SDL_HAPTIC_POLAR 0
323
324 /**
325 * \brief Uses cartesian coordinates for the direction.
326 *
327 * \sa SDL_HapticDirection
328 */
329 #define SDL_HAPTIC_CARTESIAN 1
330
331 /**
332 * \brief Uses spherical coordinates for the direction.
333 *
334 * \sa SDL_HapticDirection
335 */
336 #define SDL_HAPTIC_SPHERICAL 2
337
338 /**
339 * \brief Use this value to play an effect on the steering wheel axis. This
340 * provides better compatibility across platforms and devices as SDL will guess
341 * the correct axis.
342 * \sa SDL_HapticDirection
343 */
344 #define SDL_HAPTIC_STEERING_AXIS 3
345
346 /* @} *//* Direction encodings */
347
348 /* @} *//* Haptic features */
349
350 /*
351 * Misc defines.
352 */
353
354 /**
355 * \brief Used to play a device an infinite number of times.
356 *
357 * \sa SDL_HapticRunEffect
358 */
359 #define SDL_HAPTIC_INFINITY 4294967295U
360
361
362 /**
363 * \brief Structure that represents a haptic direction.
364 *
365 * This is the direction where the force comes from,
366 * instead of the direction in which the force is exerted.
367 *
368 * Directions can be specified by:
369 * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
370 * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
371 * - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
372 *
373 * Cardinal directions of the haptic device are relative to the positioning
374 * of the device. North is considered to be away from the user.
375 *
376 * The following diagram represents the cardinal directions:
377 * \verbatim
378 .--.
379 |__| .-------.
380 |=.| |.-----.|
381 |--| || ||
382 | | |'-----'|
383 |__|~')_____('
384 [ COMPUTER ]
385
386
387 North (0,-1)
388 ^
389 |
390 |
391 (-1,0) West <----[ HAPTIC ]----> East (1,0)
392 |
393 |
394 v
395 South (0,1)
396
397
398 [ USER ]
399 \|||/
400 (o o)
401 ---ooO-(_)-Ooo---
402 \endverbatim
403 *
404 * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
405 * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses
406 * the first \c dir parameter. The cardinal directions would be:
407 * - North: 0 (0 degrees)
408 * - East: 9000 (90 degrees)
409 * - South: 18000 (180 degrees)
410 * - West: 27000 (270 degrees)
411 *
412 * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
413 * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
414 * the first three \c dir parameters. The cardinal directions would be:
415 * - North: 0,-1, 0
416 * - East: 1, 0, 0
417 * - South: 0, 1, 0
418 * - West: -1, 0, 0
419 *
420 * The Z axis represents the height of the effect if supported, otherwise
421 * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
422 * can use any multiple you want, only the direction matters.
423 *
424 * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
425 * The first two \c dir parameters are used. The \c dir parameters are as
426 * follows (all values are in hundredths of degrees):
427 * - Degrees from (1, 0) rotated towards (0, 1).
428 * - Degrees towards (0, 0, 1) (device needs at least 3 axes).
429 *
430 *
431 * Example of force coming from the south with all encodings (force coming
432 * from the south means the user will have to pull the stick to counteract):
433 * \code
434 * SDL_HapticDirection direction;
435 *
436 * // Cartesian directions
437 * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
438 * direction.dir[0] = 0; // X position
439 * direction.dir[1] = 1; // Y position
440 * // Assuming the device has 2 axes, we don't need to specify third parameter.
441 *
442 * // Polar directions
443 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
444 * direction.dir[0] = 18000; // Polar only uses first parameter
445 *
446 * // Spherical coordinates
447 * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
448 * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
449 * \endcode
450 *
451 * \sa SDL_HAPTIC_POLAR
452 * \sa SDL_HAPTIC_CARTESIAN
453 * \sa SDL_HAPTIC_SPHERICAL
454 * \sa SDL_HAPTIC_STEERING_AXIS
455 * \sa SDL_HapticEffect
456 * \sa SDL_HapticNumAxes
457 */
458 typedef struct SDL_HapticDirection
459 {
460 Uint8 type; /**< The type of encoding. */
461 Sint32 dir[3]; /**< The encoded direction. */
462 } SDL_HapticDirection;
463
464
465 /**
466 * \brief A structure containing a template for a Constant effect.
467 *
468 * This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
469 *
470 * A constant effect applies a constant force in the specified direction
471 * to the joystick.
472 *
473 * \sa SDL_HAPTIC_CONSTANT
474 * \sa SDL_HapticEffect
475 */
476 typedef struct SDL_HapticConstant
477 {
478 /* Header */
479 Uint16 type; /**< ::SDL_HAPTIC_CONSTANT */
480 SDL_HapticDirection direction; /**< Direction of the effect. */
481
482 /* Replay */
483 Uint32 length; /**< Duration of the effect. */
484 Uint16 delay; /**< Delay before starting the effect. */
485
486 /* Trigger */
487 Uint16 button; /**< Button that triggers the effect. */
488 Uint16 interval; /**< How soon it can be triggered again after button. */
489
490 /* Constant */
491 Sint16 level; /**< Strength of the constant effect. */
492
493 /* Envelope */
494 Uint16 attack_length; /**< Duration of the attack. */
495 Uint16 attack_level; /**< Level at the start of the attack. */
496 Uint16 fade_length; /**< Duration of the fade. */
497 Uint16 fade_level; /**< Level at the end of the fade. */
498 } SDL_HapticConstant;
499
500 /**
501 * \brief A structure containing a template for a Periodic effect.
502 *
503 * The struct handles the following effects:
504 * - ::SDL_HAPTIC_SINE
505 * - ::SDL_HAPTIC_LEFTRIGHT
506 * - ::SDL_HAPTIC_TRIANGLE
507 * - ::SDL_HAPTIC_SAWTOOTHUP
508 * - ::SDL_HAPTIC_SAWTOOTHDOWN
509 *
510 * A periodic effect consists in a wave-shaped effect that repeats itself
511 * over time. The type determines the shape of the wave and the parameters
512 * determine the dimensions of the wave.
513 *
514 * Phase is given by hundredth of a degree meaning that giving the phase a value
515 * of 9000 will displace it 25% of its period. Here are sample values:
516 * - 0: No phase displacement.
517 * - 9000: Displaced 25% of its period.
518 * - 18000: Displaced 50% of its period.
519 * - 27000: Displaced 75% of its period.
520 * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
521 *
522 * Examples:
523 * \verbatim
524 SDL_HAPTIC_SINE
525 __ __ __ __
526 / \ / \ / \ /
527 / \__/ \__/ \__/
528
529 SDL_HAPTIC_SQUARE
530 __ __ __ __ __
531 | | | | | | | | | |
532 | |__| |__| |__| |__| |
533
534 SDL_HAPTIC_TRIANGLE
535 /\ /\ /\ /\ /\
536 / \ / \ / \ / \ /
537 / \/ \/ \/ \/
538
539 SDL_HAPTIC_SAWTOOTHUP
540 /| /| /| /| /| /| /|
541 / | / | / | / | / | / | / |
542 / |/ |/ |/ |/ |/ |/ |
543
544 SDL_HAPTIC_SAWTOOTHDOWN
545 \ |\ |\ |\ |\ |\ |\ |
546 \ | \ | \ | \ | \ | \ | \ |
547 \| \| \| \| \| \| \|
548 \endverbatim
549 *
550 * \sa SDL_HAPTIC_SINE
551 * \sa SDL_HAPTIC_LEFTRIGHT
552 * \sa SDL_HAPTIC_TRIANGLE
553 * \sa SDL_HAPTIC_SAWTOOTHUP
554 * \sa SDL_HAPTIC_SAWTOOTHDOWN
555 * \sa SDL_HapticEffect
556 */
557 typedef struct SDL_HapticPeriodic
558 {
559 /* Header */
560 Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
561 ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
562 ::SDL_HAPTIC_SAWTOOTHDOWN */
563 SDL_HapticDirection direction; /**< Direction of the effect. */
564
565 /* Replay */
566 Uint32 length; /**< Duration of the effect. */
567 Uint16 delay; /**< Delay before starting the effect. */
568
569 /* Trigger */
570 Uint16 button; /**< Button that triggers the effect. */
571 Uint16 interval; /**< How soon it can be triggered again after button. */
572
573 /* Periodic */
574 Uint16 period; /**< Period of the wave. */
575 Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
576 Sint16 offset; /**< Mean value of the wave. */
577 Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
578
579 /* Envelope */
580 Uint16 attack_length; /**< Duration of the attack. */
581 Uint16 attack_level; /**< Level at the start of the attack. */
582 Uint16 fade_length; /**< Duration of the fade. */
583 Uint16 fade_level; /**< Level at the end of the fade. */
584 } SDL_HapticPeriodic;
585
586 /**
587 * \brief A structure containing a template for a Condition effect.
588 *
589 * The struct handles the following effects:
590 * - ::SDL_HAPTIC_SPRING: Effect based on axes position.
591 * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
592 * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
593 * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
594 *
595 * Direction is handled by condition internals instead of a direction member.
596 * The condition effect specific members have three parameters. The first
597 * refers to the X axis, the second refers to the Y axis and the third
598 * refers to the Z axis. The right terms refer to the positive side of the
599 * axis and the left terms refer to the negative side of the axis. Please
600 * refer to the ::SDL_HapticDirection diagram for which side is positive and
601 * which is negative.
602 *
603 * \sa SDL_HapticDirection
604 * \sa SDL_HAPTIC_SPRING
605 * \sa SDL_HAPTIC_DAMPER
606 * \sa SDL_HAPTIC_INERTIA
607 * \sa SDL_HAPTIC_FRICTION
608 * \sa SDL_HapticEffect
609 */
610 typedef struct SDL_HapticCondition
611 {
612 /* Header */
613 Uint16 type; /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
614 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
615 SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */
616
617 /* Replay */
618 Uint32 length; /**< Duration of the effect. */
619 Uint16 delay; /**< Delay before starting the effect. */
620
621 /* Trigger */
622 Uint16 button; /**< Button that triggers the effect. */
623 Uint16 interval; /**< How soon it can be triggered again after button. */
624
625 /* Condition */
626 Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
627 Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
628 Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
629 Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
630 Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
631 Sint16 center[3]; /**< Position of the dead zone. */
632 } SDL_HapticCondition;
633
634 /**
635 * \brief A structure containing a template for a Ramp effect.
636 *
637 * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
638 *
639 * The ramp effect starts at start strength and ends at end strength.
640 * It augments in linear fashion. If you use attack and fade with a ramp
641 * the effects get added to the ramp effect making the effect become
642 * quadratic instead of linear.
643 *
644 * \sa SDL_HAPTIC_RAMP
645 * \sa SDL_HapticEffect
646 */
647 typedef struct SDL_HapticRamp
648 {
649 /* Header */
650 Uint16 type; /**< ::SDL_HAPTIC_RAMP */
651 SDL_HapticDirection direction; /**< Direction of the effect. */
652
653 /* Replay */
654 Uint32 length; /**< Duration of the effect. */
655 Uint16 delay; /**< Delay before starting the effect. */
656
657 /* Trigger */
658 Uint16 button; /**< Button that triggers the effect. */
659 Uint16 interval; /**< How soon it can be triggered again after button. */
660
661 /* Ramp */
662 Sint16 start; /**< Beginning strength level. */
663 Sint16 end; /**< Ending strength level. */
664
665 /* Envelope */
666 Uint16 attack_length; /**< Duration of the attack. */
667 Uint16 attack_level; /**< Level at the start of the attack. */
668 Uint16 fade_length; /**< Duration of the fade. */
669 Uint16 fade_level; /**< Level at the end of the fade. */
670 } SDL_HapticRamp;
671
672 /**
673 * \brief A structure containing a template for a Left/Right effect.
674 *
675 * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
676 *
677 * The Left/Right effect is used to explicitly control the large and small
678 * motors, commonly found in modern game controllers. The small (right) motor
679 * is high frequency, and the large (left) motor is low frequency.
680 *
681 * \sa SDL_HAPTIC_LEFTRIGHT
682 * \sa SDL_HapticEffect
683 */
684 typedef struct SDL_HapticLeftRight
685 {
686 /* Header */
687 Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
688
689 /* Replay */
690 Uint32 length; /**< Duration of the effect in milliseconds. */
691
692 /* Rumble */
693 Uint16 large_magnitude; /**< Control of the large controller motor. */
694 Uint16 small_magnitude; /**< Control of the small controller motor. */
695 } SDL_HapticLeftRight;
696
697 /**
698 * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
699 *
700 * This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
701 *
702 * A custom force feedback effect is much like a periodic effect, where the
703 * application can define its exact shape. You will have to allocate the
704 * data yourself. Data should consist of channels * samples Uint16 samples.
705 *
706 * If channels is one, the effect is rotated using the defined direction.
707 * Otherwise it uses the samples in data for the different axes.
708 *
709 * \sa SDL_HAPTIC_CUSTOM
710 * \sa SDL_HapticEffect
711 */
712 typedef struct SDL_HapticCustom
713 {
714 /* Header */
715 Uint16 type; /**< ::SDL_HAPTIC_CUSTOM */
716 SDL_HapticDirection direction; /**< Direction of the effect. */
717
718 /* Replay */
719 Uint32 length; /**< Duration of the effect. */
720 Uint16 delay; /**< Delay before starting the effect. */
721
722 /* Trigger */
723 Uint16 button; /**< Button that triggers the effect. */
724 Uint16 interval; /**< How soon it can be triggered again after button. */
725
726 /* Custom */
727 Uint8 channels; /**< Axes to use, minimum of one. */
728 Uint16 period; /**< Sample periods. */
729 Uint16 samples; /**< Amount of samples. */
730 Uint16 *data; /**< Should contain channels*samples items. */
731
732 /* Envelope */
733 Uint16 attack_length; /**< Duration of the attack. */
734 Uint16 attack_level; /**< Level at the start of the attack. */
735 Uint16 fade_length; /**< Duration of the fade. */
736 Uint16 fade_level; /**< Level at the end of the fade. */
737 } SDL_HapticCustom;
738
739 /**
740 * \brief The generic template for any haptic effect.
741 *
742 * All values max at 32767 (0x7FFF). Signed values also can be negative.
743 * Time values unless specified otherwise are in milliseconds.
744 *
745 * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
746 * value. Neither delay, interval, attack_length nor fade_length support
747 * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
748 *
749 * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
750 * ::SDL_HAPTIC_INFINITY.
751 *
752 * Button triggers may not be supported on all devices, it is advised to not
753 * use them if possible. Buttons start at index 1 instead of index 0 like
754 * the joystick.
755 *
756 * If both attack_length and fade_level are 0, the envelope is not used,
757 * otherwise both values are used.
758 *
759 * Common parts:
760 * \code
761 * // Replay - All effects have this
762 * Uint32 length; // Duration of effect (ms).
763 * Uint16 delay; // Delay before starting effect.
764 *
765 * // Trigger - All effects have this
766 * Uint16 button; // Button that triggers effect.
767 * Uint16 interval; // How soon before effect can be triggered again.
768 *
769 * // Envelope - All effects except condition effects have this
770 * Uint16 attack_length; // Duration of the attack (ms).
771 * Uint16 attack_level; // Level at the start of the attack.
772 * Uint16 fade_length; // Duration of the fade out (ms).
773 * Uint16 fade_level; // Level at the end of the fade.
774 * \endcode
775 *
776 *
777 * Here we have an example of a constant effect evolution in time:
778 * \verbatim
779 Strength
780 ^
781 |
782 | effect level --> _________________
783 | / \
784 | / \
785 | / \
786 | / \
787 | attack_level --> | \
788 | | | <--- fade_level
789 |
790 +--------------------------------------------------> Time
791 [--] [---]
792 attack_length fade_length
793
794 [------------------][-----------------------]
795 delay length
796 \endverbatim
797 *
798 * Note either the attack_level or the fade_level may be above the actual
799 * effect level.
800 *
801 * \sa SDL_HapticConstant
802 * \sa SDL_HapticPeriodic
803 * \sa SDL_HapticCondition
804 * \sa SDL_HapticRamp
805 * \sa SDL_HapticLeftRight
806 * \sa SDL_HapticCustom
807 */
808 typedef union SDL_HapticEffect
809 {
810 /* Common for all force feedback effects */
811 Uint16 type; /**< Effect type. */
812 SDL_HapticConstant constant; /**< Constant effect. */
813 SDL_HapticPeriodic periodic; /**< Periodic effect. */
814 SDL_HapticCondition condition; /**< Condition effect. */
815 SDL_HapticRamp ramp; /**< Ramp effect. */
816 SDL_HapticLeftRight leftright; /**< Left/Right effect. */
817 SDL_HapticCustom custom; /**< Custom effect. */
818 } SDL_HapticEffect;
819
820
821 /* Function prototypes */
822
823 /**
824 * Count the number of haptic devices attached to the system.
825 *
826 * \returns the number of haptic devices detected on the system or a negative
827 * error code on failure; call SDL_GetError() for more information.
828 *
829 * \since This function is available since SDL 2.0.0.
830 *
831 * \sa SDL_HapticName
832 */
833 extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
834
835 /**
836 * Get the implementation dependent name of a haptic device.
837 *
838 * This can be called before any joysticks are opened. If no name can be
839 * found, this function returns NULL.
840 *
841 * \param device_index index of the device to query.
842 * \returns the name of the device or NULL on failure; call SDL_GetError() for
843 * more information.
844 *
845 * \since This function is available since SDL 2.0.0.
846 *
847 * \sa SDL_NumHaptics
848 */
849 extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
850
851 /**
852 * Open a haptic device for use.
853 *
854 * The index passed as an argument refers to the N'th haptic device on this
855 * system.
856 *
857 * When opening a haptic device, its gain will be set to maximum and
858 * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
859 * and SDL_HapticSetAutocenter().
860 *
861 * \param device_index index of the device to open
862 * \returns the device identifier or NULL on failure; call SDL_GetError() for
863 * more information.
864 *
865 * \since This function is available since SDL 2.0.0.
866 *
867 * \sa SDL_HapticClose
868 * \sa SDL_HapticIndex
869 * \sa SDL_HapticOpenFromJoystick
870 * \sa SDL_HapticOpenFromMouse
871 * \sa SDL_HapticPause
872 * \sa SDL_HapticSetAutocenter
873 * \sa SDL_HapticSetGain
874 * \sa SDL_HapticStopAll
875 */
876 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
877
878 /**
879 * Check if the haptic device at the designated index has been opened.
880 *
881 * \param device_index the index of the device to query
882 * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
883 * SDL_GetError() for more information.
884 *
885 * \since This function is available since SDL 2.0.0.
886 *
887 * \sa SDL_HapticIndex
888 * \sa SDL_HapticOpen
889 */
890 extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
891
892 /**
893 * Get the index of a haptic device.
894 *
895 * \param haptic the SDL_Haptic device to query
896 * \returns the index of the specified haptic device or a negative error code
897 * on failure; call SDL_GetError() for more information.
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_HapticOpen
902 * \sa SDL_HapticOpened
903 */
904 extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
905
906 /**
907 * Query whether or not the current mouse has haptic capabilities.
908 *
909 * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_HapticOpenFromMouse
914 */
915 extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
916
917 /**
918 * Try to open a haptic device from the current mouse.
919 *
920 * \returns the haptic device identifier or NULL on failure; call
921 * SDL_GetError() for more information.
922 *
923 * \since This function is available since SDL 2.0.0.
924 *
925 * \sa SDL_HapticOpen
926 * \sa SDL_MouseIsHaptic
927 */
928 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
929
930 /**
931 * Query if a joystick has haptic features.
932 *
933 * \param joystick the SDL_Joystick to test for haptic capabilities
934 * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
935 * negative error code on failure; call SDL_GetError() for more
936 * information.
937 *
938 * \since This function is available since SDL 2.0.0.
939 *
940 * \sa SDL_HapticOpenFromJoystick
941 */
942 extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
943
944 /**
945 * Open a haptic device for use from a joystick device.
946 *
947 * You must still close the haptic device separately. It will not be closed
948 * with the joystick.
949 *
950 * When opened from a joystick you should first close the haptic device before
951 * closing the joystick device. If not, on some implementations the haptic
952 * device will also get unallocated and you'll be unable to use force feedback
953 * on that device.
954 *
955 * \param joystick the SDL_Joystick to create a haptic device from
956 * \returns a valid haptic device identifier on success or NULL on failure;
957 * call SDL_GetError() for more information.
958 *
959 * \since This function is available since SDL 2.0.0.
960 *
961 * \sa SDL_HapticClose
962 * \sa SDL_HapticOpen
963 * \sa SDL_JoystickIsHaptic
964 */
965 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
966 joystick);
967
968 /**
969 * Close a haptic device previously opened with SDL_HapticOpen().
970 *
971 * \param haptic the SDL_Haptic device to close
972 *
973 * \since This function is available since SDL 2.0.0.
974 *
975 * \sa SDL_HapticOpen
976 */
977 extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
978
979 /**
980 * Get the number of effects a haptic device can store.
981 *
982 * On some platforms this isn't fully supported, and therefore is an
983 * approximation. Always check to see if your created effect was actually
984 * created and do not rely solely on SDL_HapticNumEffects().
985 *
986 * \param haptic the SDL_Haptic device to query
987 * \returns the number of effects the haptic device can store or a negative
988 * error code on failure; call SDL_GetError() for more information.
989 *
990 * \since This function is available since SDL 2.0.0.
991 *
992 * \sa SDL_HapticNumEffectsPlaying
993 * \sa SDL_HapticQuery
994 */
995 extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
996
997 /**
998 * Get the number of effects a haptic device can play at the same time.
999 *
1000 * This is not supported on all platforms, but will always return a value.
1001 *
1002 * \param haptic the SDL_Haptic device to query maximum playing effects
1003 * \returns the number of effects the haptic device can play at the same time
1004 * or a negative error code on failure; call SDL_GetError() for more
1005 * information.
1006 *
1007 * \since This function is available since SDL 2.0.0.
1008 *
1009 * \sa SDL_HapticNumEffects
1010 * \sa SDL_HapticQuery
1011 */
1012 extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
1013
1014 /**
1015 * Get the haptic device's supported features in bitwise manner.
1016 *
1017 * \param haptic the SDL_Haptic device to query
1018 * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1019 * on failure; call SDL_GetError() for more information.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_HapticEffectSupported
1024 * \sa SDL_HapticNumEffects
1025 */
1026 extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
1027
1028
1029 /**
1030 * Get the number of haptic axes the device has.
1031 *
1032 * The number of haptic axes might be useful if working with the
1033 * SDL_HapticDirection effect.
1034 *
1035 * \param haptic the SDL_Haptic device to query
1036 * \returns the number of axes on success or a negative error code on failure;
1037 * call SDL_GetError() for more information.
1038 *
1039 * \since This function is available since SDL 2.0.0.
1040 */
1041 extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
1042
1043 /**
1044 * Check to see if an effect is supported by a haptic device.
1045 *
1046 * \param haptic the SDL_Haptic device to query
1047 * \param effect the desired effect to query
1048 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1049 * negative error code on failure; call SDL_GetError() for more
1050 * information.
1051 *
1052 * \since This function is available since SDL 2.0.0.
1053 *
1054 * \sa SDL_HapticNewEffect
1055 * \sa SDL_HapticQuery
1056 */
1057 extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
1058 SDL_HapticEffect *
1059 effect);
1060
1061 /**
1062 * Create a new haptic effect on a specified device.
1063 *
1064 * \param haptic an SDL_Haptic device to create the effect on
1065 * \param effect an SDL_HapticEffect structure containing the properties of
1066 * the effect to create
1067 * \returns the ID of the effect on success or a negative error code on
1068 * failure; call SDL_GetError() for more information.
1069 *
1070 * \since This function is available since SDL 2.0.0.
1071 *
1072 * \sa SDL_HapticDestroyEffect
1073 * \sa SDL_HapticRunEffect
1074 * \sa SDL_HapticUpdateEffect
1075 */
1076 extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
1077 SDL_HapticEffect * effect);
1078
1079 /**
1080 * Update the properties of an effect.
1081 *
1082 * Can be used dynamically, although behavior when dynamically changing
1083 * direction may be strange. Specifically the effect may re-upload itself and
1084 * start playing from the start. You also cannot change the type either when
1085 * running SDL_HapticUpdateEffect().
1086 *
1087 * \param haptic the SDL_Haptic device that has the effect
1088 * \param effect the identifier of the effect to update
1089 * \param data an SDL_HapticEffect structure containing the new effect
1090 * properties to use
1091 * \returns 0 on success or a negative error code on failure; call
1092 * SDL_GetError() for more information.
1093 *
1094 * \since This function is available since SDL 2.0.0.
1095 *
1096 * \sa SDL_HapticDestroyEffect
1097 * \sa SDL_HapticNewEffect
1098 * \sa SDL_HapticRunEffect
1099 */
1100 extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
1101 int effect,
1102 SDL_HapticEffect * data);
1103
1104 /**
1105 * Run the haptic effect on its associated haptic device.
1106 *
1107 * To repeat the effect over and over indefinitely, set `iterations` to
1108 * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1109 * one instance of the effect last indefinitely (so the effect does not fade),
1110 * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1111 * instead.
1112 *
1113 * \param haptic the SDL_Haptic device to run the effect on
1114 * \param effect the ID of the haptic effect to run
1115 * \param iterations the number of iterations to run the effect; use
1116 * `SDL_HAPTIC_INFINITY` to repeat forever
1117 * \returns 0 on success or a negative error code on failure; call
1118 * SDL_GetError() for more information.
1119 *
1120 * \since This function is available since SDL 2.0.0.
1121 *
1122 * \sa SDL_HapticDestroyEffect
1123 * \sa SDL_HapticGetEffectStatus
1124 * \sa SDL_HapticStopEffect
1125 */
1126 extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
1127 int effect,
1128 Uint32 iterations);
1129
1130 /**
1131 * Stop the haptic effect on its associated haptic device.
1132 *
1133 * *
1134 *
1135 * \param haptic the SDL_Haptic device to stop the effect on
1136 * \param effect the ID of the haptic effect to stop
1137 * \returns 0 on success or a negative error code on failure; call
1138 * SDL_GetError() for more information.
1139 *
1140 * \since This function is available since SDL 2.0.0.
1141 *
1142 * \sa SDL_HapticDestroyEffect
1143 * \sa SDL_HapticRunEffect
1144 */
1145 extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
1146 int effect);
1147
1148 /**
1149 * Destroy a haptic effect on the device.
1150 *
1151 * This will stop the effect if it's running. Effects are automatically
1152 * destroyed when the device is closed.
1153 *
1154 * \param haptic the SDL_Haptic device to destroy the effect on
1155 * \param effect the ID of the haptic effect to destroy
1156 *
1157 * \since This function is available since SDL 2.0.0.
1158 *
1159 * \sa SDL_HapticNewEffect
1160 */
1161 extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
1162 int effect);
1163
1164 /**
1165 * Get the status of the current effect on the specified haptic device.
1166 *
1167 * Device must support the SDL_HAPTIC_STATUS feature.
1168 *
1169 * \param haptic the SDL_Haptic device to query for the effect status on
1170 * \param effect the ID of the haptic effect to query its status
1171 * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
1172 * code on failure; call SDL_GetError() for more information.
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_HapticRunEffect
1177 * \sa SDL_HapticStopEffect
1178 */
1179 extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
1180 int effect);
1181
1182 /**
1183 * Set the global gain of the specified haptic device.
1184 *
1185 * Device must support the SDL_HAPTIC_GAIN feature.
1186 *
1187 * The user may specify the maximum gain by setting the environment variable
1188 * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1189 * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1190 * maximum.
1191 *
1192 * \param haptic the SDL_Haptic device to set the gain on
1193 * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
1194 * \returns 0 on success or a negative error code on failure; call
1195 * SDL_GetError() for more information.
1196 *
1197 * \since This function is available since SDL 2.0.0.
1198 *
1199 * \sa SDL_HapticQuery
1200 */
1201 extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
1202
1203 /**
1204 * Set the global autocenter of the device.
1205 *
1206 * Autocenter should be between 0 and 100. Setting it to 0 will disable
1207 * autocentering.
1208 *
1209 * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1210 *
1211 * \param haptic the SDL_Haptic device to set autocentering on
1212 * \param autocenter value to set autocenter to (0-100)
1213 * \returns 0 on success or a negative error code on failure; call
1214 * SDL_GetError() for more information.
1215 *
1216 * \since This function is available since SDL 2.0.0.
1217 *
1218 * \sa SDL_HapticQuery
1219 */
1220 extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
1221 int autocenter);
1222
1223 /**
1224 * Pause a haptic device.
1225 *
1226 * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
1227 * SDL_HapticUnpause() to resume playback.
1228 *
1229 * Do not modify the effects nor add new ones while the device is paused. That
1230 * can cause all sorts of weird errors.
1231 *
1232 * \param haptic the SDL_Haptic device to pause
1233 * \returns 0 on success or a negative error code on failure; call
1234 * SDL_GetError() for more information.
1235 *
1236 * \since This function is available since SDL 2.0.0.
1237 *
1238 * \sa SDL_HapticUnpause
1239 */
1240 extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
1241
1242 /**
1243 * Unpause a haptic device.
1244 *
1245 * Call to unpause after SDL_HapticPause().
1246 *
1247 * \param haptic the SDL_Haptic device to unpause
1248 * \returns 0 on success or a negative error code on failure; call
1249 * SDL_GetError() for more information.
1250 *
1251 * \since This function is available since SDL 2.0.0.
1252 *
1253 * \sa SDL_HapticPause
1254 */
1255 extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
1256
1257 /**
1258 * Stop all the currently playing effects on a haptic device.
1259 *
1260 * \param haptic the SDL_Haptic device to stop
1261 * \returns 0 on success or a negative error code on failure; call
1262 * SDL_GetError() for more information.
1263 *
1264 * \since This function is available since SDL 2.0.0.
1265 */
1266 extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
1267
1268 /**
1269 * Check whether rumble is supported on a haptic device.
1270 *
1271 * \param haptic haptic device to check for rumble support
1272 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1273 * negative error code on failure; call SDL_GetError() for more
1274 * information.
1275 *
1276 * \since This function is available since SDL 2.0.0.
1277 *
1278 * \sa SDL_HapticRumbleInit
1279 * \sa SDL_HapticRumblePlay
1280 * \sa SDL_HapticRumbleStop
1281 */
1282 extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
1283
1284 /**
1285 * Initialize a haptic device for simple rumble playback.
1286 *
1287 * \param haptic the haptic device to initialize for simple rumble playback
1288 * \returns 0 on success or a negative error code on failure; call
1289 * SDL_GetError() for more information.
1290 *
1291 * \since This function is available since SDL 2.0.0.
1292 *
1293 * \sa SDL_HapticOpen
1294 * \sa SDL_HapticRumblePlay
1295 * \sa SDL_HapticRumbleStop
1296 * \sa SDL_HapticRumbleSupported
1297 */
1298 extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
1299
1300 /**
1301 * Run a simple rumble effect on a haptic device.
1302 *
1303 * \param haptic the haptic device to play the rumble effect on
1304 * \param strength strength of the rumble to play as a 0-1 float value
1305 * \param length length of the rumble to play in milliseconds
1306 * \returns 0 on success or a negative error code on failure; call
1307 * SDL_GetError() for more information.
1308 *
1309 * \since This function is available since SDL 2.0.0.
1310 *
1311 * \sa SDL_HapticRumbleInit
1312 * \sa SDL_HapticRumbleStop
1313 * \sa SDL_HapticRumbleSupported
1314 */
1315 extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
1316
1317 /**
1318 * Stop the simple rumble on a haptic device.
1319 *
1320 * \param haptic the haptic device to stop the rumble effect on
1321 * \returns 0 on success or a negative error code on failure; call
1322 * SDL_GetError() for more information.
1323 *
1324 * \since This function is available since SDL 2.0.0.
1325 *
1326 * \sa SDL_HapticRumbleInit
1327 * \sa SDL_HapticRumblePlay
1328 * \sa SDL_HapticRumbleSupported
1329 */
1330 extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
1331
1332 /* Ends C function definitions when using C++ */
1333 #ifdef __cplusplus
1334 }
1335 #endif
1336 #include <SDL2/close_code.h>
1337
1338 #endif /* SDL_haptic_h_ */
1339
1340 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hidapi.h
23 *
24 * Header file for SDL HIDAPI functions.
25 *
26 * This is an adaptation of the original HIDAPI interface by Alan Ott,
27 * and includes source code licensed under the following BSD license:
28 *
29 Copyright (c) 2010, Alan Ott, Signal 11 Software
30 All rights reserved.
31
32 Redistribution and use in source and binary forms, with or without
33 modification, are permitted provided that the following conditions are met:
34
35 * Redistributions of source code must retain the above copyright notice,
36 this list of conditions and the following disclaimer.
37 * Redistributions in binary form must reproduce the above copyright
38 notice, this list of conditions and the following disclaimer in the
39 documentation and/or other materials provided with the distribution.
40 * Neither the name of Signal 11 Software nor the names of its
41 contributors may be used to endorse or promote products derived from
42 this software without specific prior written permission.
43
44 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
45 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
48 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
49 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
50 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
51 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54 POSSIBILITY OF SUCH DAMAGE.
55 *
56 * If you would like a version of SDL without this code, you can build SDL
57 * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
58 * on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
59 */
60
61 #ifndef SDL_hidapi_h_
62 #define SDL_hidapi_h_
63
64 #include <SDL2/SDL_stdinc.h>
65
66 #include <SDL2/begin_code.h>
67 /* Set up for C function definitions, even when using C++ */
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71
72 /**
73 * \brief A handle representing an open HID device
74 */
75 struct SDL_hid_device_;
76 typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
77
78 /** hidapi info structure */
79 /**
80 * \brief Information about a connected HID device
81 */
82 typedef struct SDL_hid_device_info
83 {
84 /** Platform-specific device path */
85 char *path;
86 /** Device Vendor ID */
87 unsigned short vendor_id;
88 /** Device Product ID */
89 unsigned short product_id;
90 /** Serial Number */
91 wchar_t *serial_number;
92 /** Device Release Number in binary-coded decimal,
93 also known as Device Version Number */
94 unsigned short release_number;
95 /** Manufacturer String */
96 wchar_t *manufacturer_string;
97 /** Product string */
98 wchar_t *product_string;
99 /** Usage Page for this Device/Interface
100 (Windows/Mac only). */
101 unsigned short usage_page;
102 /** Usage for this Device/Interface
103 (Windows/Mac only).*/
104 unsigned short usage;
105 /** The USB interface which this logical device
106 represents.
107
108 * Valid on both Linux implementations in all cases.
109 * Valid on the Windows implementation only if the device
110 contains more than one interface. */
111 int interface_number;
112
113 /** Additional information about the USB interface.
114 Valid on libusb and Android implementations. */
115 int interface_class;
116 int interface_subclass;
117 int interface_protocol;
118
119 /** Pointer to the next device */
120 struct SDL_hid_device_info *next;
121 } SDL_hid_device_info;
122
123
124 /**
125 * Initialize the HIDAPI library.
126 *
127 * This function initializes the HIDAPI library. Calling it is not strictly
128 * necessary, as it will be called automatically by SDL_hid_enumerate() and
129 * any of the SDL_hid_open_*() functions if it is needed. This function should
130 * be called at the beginning of execution however, if there is a chance of
131 * HIDAPI handles being opened by different threads simultaneously.
132 *
133 * Each call to this function should have a matching call to SDL_hid_exit()
134 *
135 * \returns 0 on success and -1 on error.
136 *
137 * \since This function is available since SDL 2.0.18.
138 *
139 * \sa SDL_hid_exit
140 */
141 extern DECLSPEC int SDLCALL SDL_hid_init(void);
142
143 /**
144 * Finalize the HIDAPI library.
145 *
146 * This function frees all of the static data associated with HIDAPI. It
147 * should be called at the end of execution to avoid memory leaks.
148 *
149 * \returns 0 on success and -1 on error.
150 *
151 * \since This function is available since SDL 2.0.18.
152 *
153 * \sa SDL_hid_init
154 */
155 extern DECLSPEC int SDLCALL SDL_hid_exit(void);
156
157 /**
158 * Check to see if devices may have been added or removed.
159 *
160 * Enumerating the HID devices is an expensive operation, so you can call this
161 * to see if there have been any system device changes since the last call to
162 * this function. A change in the counter returned doesn't necessarily mean
163 * that anything has changed, but you can call SDL_hid_enumerate() to get an
164 * updated device list.
165 *
166 * Calling this function for the first time may cause a thread or other system
167 * resource to be allocated to track device change notifications.
168 *
169 * \returns a change counter that is incremented with each potential device
170 * change, or 0 if device change detection isn't available.
171 *
172 * \since This function is available since SDL 2.0.18.
173 *
174 * \sa SDL_hid_enumerate
175 */
176 extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
177
178 /**
179 * Enumerate the HID Devices.
180 *
181 * This function returns a linked list of all the HID devices attached to the
182 * system which match vendor_id and product_id. If `vendor_id` is set to 0
183 * then any vendor matches. If `product_id` is set to 0 then any product
184 * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
185 * devices will be returned.
186 *
187 * \param vendor_id The Vendor ID (VID) of the types of device to open.
188 * \param product_id The Product ID (PID) of the types of device to open.
189 * \returns a pointer to a linked list of type SDL_hid_device_info, containing
190 * information about the HID devices attached to the system, or NULL
191 * in the case of failure. Free this linked list by calling
192 * SDL_hid_free_enumeration().
193 *
194 * \since This function is available since SDL 2.0.18.
195 *
196 * \sa SDL_hid_device_change_count
197 */
198 extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
199
200 /**
201 * Free an enumeration Linked List
202 *
203 * This function frees a linked list created by SDL_hid_enumerate().
204 *
205 * \param devs Pointer to a list of struct_device returned from
206 * SDL_hid_enumerate().
207 *
208 * \since This function is available since SDL 2.0.18.
209 */
210 extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
211
212 /**
213 * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
214 * a serial number.
215 *
216 * If `serial_number` is NULL, the first device with the specified VID and PID
217 * is opened.
218 *
219 * \param vendor_id The Vendor ID (VID) of the device to open.
220 * \param product_id The Product ID (PID) of the device to open.
221 * \param serial_number The Serial Number of the device to open (Optionally
222 * NULL).
223 * \returns a pointer to a SDL_hid_device object on success or NULL on
224 * failure.
225 *
226 * \since This function is available since SDL 2.0.18.
227 */
228 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
229
230 /**
231 * Open a HID device by its path name.
232 *
233 * The path name be determined by calling SDL_hid_enumerate(), or a
234 * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
235 *
236 * \param path The path name of the device to open
237 * \returns a pointer to a SDL_hid_device object on success or NULL on
238 * failure.
239 *
240 * \since This function is available since SDL 2.0.18.
241 */
242 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
243
244 /**
245 * Write an Output report to a HID device.
246 *
247 * The first byte of `data` must contain the Report ID. For devices which only
248 * support a single report, this must be set to 0x0. The remaining bytes
249 * contain the report data. Since the Report ID is mandatory, calls to
250 * SDL_hid_write() will always contain one more byte than the report contains.
251 * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
252 * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
253 * followed by the report data (16 bytes). In this example, the length passed
254 * in would be 17.
255 *
256 * SDL_hid_write() will send the data on the first OUT endpoint, if one
257 * exists. If it does not, it will send the data through the Control Endpoint
258 * (Endpoint 0).
259 *
260 * \param dev A device handle returned from SDL_hid_open().
261 * \param data The data to send, including the report number as the first
262 * byte.
263 * \param length The length in bytes of the data to send.
264 * \returns the actual number of bytes written and -1 on error.
265 *
266 * \since This function is available since SDL 2.0.18.
267 */
268 extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
269
270 /**
271 * Read an Input report from a HID device with timeout.
272 *
273 * Input reports are returned to the host through the INTERRUPT IN endpoint.
274 * The first byte will contain the Report number if the device uses numbered
275 * reports.
276 *
277 * \param dev A device handle returned from SDL_hid_open().
278 * \param data A buffer to put the read data into.
279 * \param length The number of bytes to read. For devices with multiple
280 * reports, make sure to read an extra byte for the report
281 * number.
282 * \param milliseconds timeout in milliseconds or -1 for blocking wait.
283 * \returns the actual number of bytes read and -1 on error. If no packet was
284 * available to be read within the timeout period, this function
285 * returns 0.
286 *
287 * \since This function is available since SDL 2.0.18.
288 */
289 extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
290
291 /**
292 * Read an Input report from a HID device.
293 *
294 * Input reports are returned to the host through the INTERRUPT IN endpoint.
295 * The first byte will contain the Report number if the device uses numbered
296 * reports.
297 *
298 * \param dev A device handle returned from SDL_hid_open().
299 * \param data A buffer to put the read data into.
300 * \param length The number of bytes to read. For devices with multiple
301 * reports, make sure to read an extra byte for the report
302 * number.
303 * \returns the actual number of bytes read and -1 on error. If no packet was
304 * available to be read and the handle is in non-blocking mode, this
305 * function returns 0.
306 *
307 * \since This function is available since SDL 2.0.18.
308 */
309 extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
310
311 /**
312 * Set the device handle to be non-blocking.
313 *
314 * In non-blocking mode calls to SDL_hid_read() will return immediately with a
315 * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
316 * will wait (block) until there is data to read before returning.
317 *
318 * Nonblocking can be turned on and off at any time.
319 *
320 * \param dev A device handle returned from SDL_hid_open().
321 * \param nonblock enable or not the nonblocking reads - 1 to enable
322 * nonblocking - 0 to disable nonblocking.
323 * \returns 0 on success and -1 on error.
324 *
325 * \since This function is available since SDL 2.0.18.
326 */
327 extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
328
329 /**
330 * Send a Feature report to the device.
331 *
332 * Feature reports are sent over the Control endpoint as a Set_Report
333 * transfer. The first byte of `data` must contain the Report ID. For devices
334 * which only support a single report, this must be set to 0x0. The remaining
335 * bytes contain the report data. Since the Report ID is mandatory, calls to
336 * SDL_hid_send_feature_report() will always contain one more byte than the
337 * report contains. For example, if a hid report is 16 bytes long, 17 bytes
338 * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
339 * devices which do not use numbered reports), followed by the report data (16
340 * bytes). In this example, the length passed in would be 17.
341 *
342 * \param dev A device handle returned from SDL_hid_open().
343 * \param data The data to send, including the report number as the first
344 * byte.
345 * \param length The length in bytes of the data to send, including the report
346 * number.
347 * \returns the actual number of bytes written and -1 on error.
348 *
349 * \since This function is available since SDL 2.0.18.
350 */
351 extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
352
353 /**
354 * Get a feature report from a HID device.
355 *
356 * Set the first byte of `data` to the Report ID of the report to be read.
357 * Make sure to allow space for this extra byte in `data`. Upon return, the
358 * first byte will still contain the Report ID, and the report data will start
359 * in data[1].
360 *
361 * \param dev A device handle returned from SDL_hid_open().
362 * \param data A buffer to put the read data into, including the Report ID.
363 * Set the first byte of `data` to the Report ID of the report to
364 * be read, or set it to zero if your device does not use numbered
365 * reports.
366 * \param length The number of bytes to read, including an extra byte for the
367 * report ID. The buffer can be longer than the actual report.
368 * \returns the number of bytes read plus one for the report ID (which is
369 * still in the first byte), or -1 on error.
370 *
371 * \since This function is available since SDL 2.0.18.
372 */
373 extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
374
375 /**
376 * Close a HID device.
377 *
378 * \param dev A device handle returned from SDL_hid_open().
379 *
380 * \since This function is available since SDL 2.0.18.
381 */
382 extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
383
384 /**
385 * Get The Manufacturer String from a HID device.
386 *
387 * \param dev A device handle returned from SDL_hid_open().
388 * \param string A wide string buffer to put the data into.
389 * \param maxlen The length of the buffer in multiples of wchar_t.
390 * \returns 0 on success and -1 on error.
391 *
392 * \since This function is available since SDL 2.0.18.
393 */
394 extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
395
396 /**
397 * Get The Product String from a HID device.
398 *
399 * \param dev A device handle returned from SDL_hid_open().
400 * \param string A wide string buffer to put the data into.
401 * \param maxlen The length of the buffer in multiples of wchar_t.
402 * \returns 0 on success and -1 on error.
403 *
404 * \since This function is available since SDL 2.0.18.
405 */
406 extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
407
408 /**
409 * Get The Serial Number String from a HID device.
410 *
411 * \param dev A device handle returned from SDL_hid_open().
412 * \param string A wide string buffer to put the data into.
413 * \param maxlen The length of the buffer in multiples of wchar_t.
414 * \returns 0 on success and -1 on error.
415 *
416 * \since This function is available since SDL 2.0.18.
417 */
418 extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
419
420 /**
421 * Get a string from a HID device, based on its string index.
422 *
423 * \param dev A device handle returned from SDL_hid_open().
424 * \param string_index The index of the string to get.
425 * \param string A wide string buffer to put the data into.
426 * \param maxlen The length of the buffer in multiples of wchar_t.
427 * \returns 0 on success and -1 on error.
428 *
429 * \since This function is available since SDL 2.0.18.
430 */
431 extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
432
433 /**
434 * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
435 *
436 * \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
437 *
438 * \since This function is available since SDL 2.0.18.
439 */
440 extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
441
442 /* Ends C function definitions when using C++ */
443 #ifdef __cplusplus
444 }
445 #endif
446 #include <SDL2/close_code.h>
447
448 #endif /* SDL_hidapi_h_ */
449
450 /* vi: set sts=4 ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hints.h
23 *
24 * Official documentation for SDL configuration variables
25 *
26 * This file contains functions to set and get configuration hints,
27 * as well as listing each of them alphabetically.
28 *
29 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
30 * the environment variable that can be used to override the default.
31 *
32 * In general these hints are just that - they may or may not be
33 * supported or applicable on any given platform, but they provide
34 * a way for an application or user to give the library a hint as
35 * to how they would like the library to work.
36 */
37
38 #ifndef SDL_hints_h_
39 #define SDL_hints_h_
40
41 #include <SDL2/SDL_stdinc.h>
42
43 #include <SDL2/begin_code.h>
44 /* Set up for C function definitions, even when using C++ */
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /**
50 * \brief A variable controlling whether the Android / iOS built-in
51 * accelerometer should be listed as a joystick device.
52 *
53 * This variable can be set to the following values:
54 * "0" - The accelerometer is not listed as a joystick
55 * "1" - The accelerometer is available as a 3 axis joystick (the default).
56 */
57 #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
58
59 /**
60 * \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
61 *
62 * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
63 * and your window is full-screen. This prevents the user from getting stuck in
64 * your application if you've enabled keyboard grab.
65 *
66 * The variable can be set to the following values:
67 * "0" - SDL will not handle Alt+Tab. Your application is responsible
68 for handling Alt+Tab while the keyboard is grabbed.
69 * "1" - SDL will minimize your window when Alt+Tab is pressed (default)
70 */
71 #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
72
73 /**
74 * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
75 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
76 *
77 * This variable can be set to the following values:
78 * "0" - don't allow topmost
79 * "1" - allow topmost
80 */
81 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
82
83 /**
84 * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
85 *
86 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
87 *
88 * If both hints were set then SDL_RWFromFile() will look into expansion files
89 * after a given relative path was not found in the internal storage and assets.
90 *
91 * By default this hint is not set and the APK expansion files are not searched.
92 */
93 #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
94
95 /**
96 * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
97 *
98 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
99 *
100 * If both hints were set then SDL_RWFromFile() will look into expansion files
101 * after a given relative path was not found in the internal storage and assets.
102 *
103 * By default this hint is not set and the APK expansion files are not searched.
104 */
105 #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
106
107 /**
108 * \brief A variable to control whether the event loop will block itself when the app is paused.
109 *
110 * The variable can be set to the following values:
111 * "0" - Non blocking.
112 * "1" - Blocking. (default)
113 *
114 * The value should be set before SDL is initialized.
115 */
116 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
117
118 /**
119 * \brief A variable to control whether SDL will pause audio in background
120 * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
121 *
122 * The variable can be set to the following values:
123 * "0" - Non paused.
124 * "1" - Paused. (default)
125 *
126 * The value should be set before SDL is initialized.
127 */
128 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
129
130 /**
131 * \brief A variable to control whether we trap the Android back button to handle it manually.
132 * This is necessary for the right mouse button to work on some Android devices, or
133 * to be able to trap the back button for use in your code reliably. If set to true,
134 * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
135 * SDL_SCANCODE_AC_BACK.
136 *
137 * The variable can be set to the following values:
138 * "0" - Back button will be handled as usual for system. (default)
139 * "1" - Back button will be trapped, allowing you to handle the key press
140 * manually. (This will also let right mouse click work on systems
141 * where the right mouse button functions as back.)
142 *
143 * The value of this hint is used at runtime, so it can be changed at any time.
144 */
145 #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
146
147 /**
148 * \brief Specify an application name.
149 *
150 * This hint lets you specify the application name sent to the OS when
151 * required. For example, this will often appear in volume control applets for
152 * audio streams, and in lists of applications which are inhibiting the
153 * screensaver. You should use a string that describes your program ("My Game
154 * 2: The Revenge")
155 *
156 * Setting this to "" or leaving it unset will have SDL use a reasonable
157 * default: probably the application's name or "SDL Application" if SDL
158 * doesn't have any better information.
159 *
160 * Note that, for audio streams, this can be overridden with
161 * SDL_HINT_AUDIO_DEVICE_APP_NAME.
162 *
163 * On targets where this is not supported, this hint does nothing.
164 */
165 #define SDL_HINT_APP_NAME "SDL_APP_NAME"
166
167 /**
168 * \brief A variable controlling whether controllers used with the Apple TV
169 * generate UI events.
170 *
171 * When UI events are generated by controller input, the app will be
172 * backgrounded when the Apple TV remote's menu button is pressed, and when the
173 * pause or B buttons on gamepads are pressed.
174 *
175 * More information about properly making use of controllers for the Apple TV
176 * can be found here:
177 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
178 *
179 * This variable can be set to the following values:
180 * "0" - Controller input does not generate UI events (the default).
181 * "1" - Controller input generates UI events.
182 */
183 #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
184
185 /**
186 * \brief A variable controlling whether the Apple TV remote's joystick axes
187 * will automatically match the rotation of the remote.
188 *
189 * This variable can be set to the following values:
190 * "0" - Remote orientation does not affect joystick axes (the default).
191 * "1" - Joystick axes are based on the orientation of the remote.
192 */
193 #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
194
195 /**
196 * \brief A variable controlling the audio category on iOS and Mac OS X
197 *
198 * This variable can be set to the following values:
199 *
200 * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
201 * "playback" - Use the AVAudioSessionCategoryPlayback category
202 *
203 * For more information, see Apple's documentation:
204 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
205 */
206 #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
207
208 /**
209 * \brief Specify an application name for an audio device.
210 *
211 * Some audio backends (such as PulseAudio) allow you to describe your audio
212 * stream. Among other things, this description might show up in a system
213 * control panel that lets the user adjust the volume on specific audio
214 * streams instead of using one giant master volume slider.
215 *
216 * This hints lets you transmit that information to the OS. The contents of
217 * this hint are used while opening an audio device. You should use a string
218 * that describes your program ("My Game 2: The Revenge")
219 *
220 * Setting this to "" or leaving it unset will have SDL use a reasonable
221 * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
222 * set. Otherwise, it'll probably the application's name or "SDL Application"
223 * if SDL doesn't have any better information.
224 *
225 * On targets where this is not supported, this hint does nothing.
226 */
227 #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
228
229 /**
230 * \brief Specify an application name for an audio device.
231 *
232 * Some audio backends (such as PulseAudio) allow you to describe your audio
233 * stream. Among other things, this description might show up in a system
234 * control panel that lets the user adjust the volume on specific audio
235 * streams instead of using one giant master volume slider.
236 *
237 * This hints lets you transmit that information to the OS. The contents of
238 * this hint are used while opening an audio device. You should use a string
239 * that describes your what your program is playing ("audio stream" is
240 * probably sufficient in many cases, but this could be useful for something
241 * like "team chat" if you have a headset playing VoIP audio separately).
242 *
243 * Setting this to "" or leaving it unset will have SDL use a reasonable
244 * default: "audio stream" or something similar.
245 *
246 * On targets where this is not supported, this hint does nothing.
247 */
248 #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
249
250 /**
251 * \brief Specify an application role for an audio device.
252 *
253 * Some audio backends (such as Pipewire) allow you to describe the role of
254 * your audio stream. Among other things, this description might show up in
255 * a system control panel or software for displaying and manipulating media
256 * playback/capture graphs.
257 *
258 * This hints lets you transmit that information to the OS. The contents of
259 * this hint are used while opening an audio device. You should use a string
260 * that describes your what your program is playing (Game, Music, Movie,
261 * etc...).
262 *
263 * Setting this to "" or leaving it unset will have SDL use a reasonable
264 * default: "Game" or something similar.
265 *
266 * On targets where this is not supported, this hint does nothing.
267 */
268 #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
269
270 /**
271 * \brief A variable controlling speed/quality tradeoff of audio resampling.
272 *
273 * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
274 * to handle audio resampling. There are different resampling modes available
275 * that produce different levels of quality, using more CPU.
276 *
277 * If this hint isn't specified to a valid setting, or libsamplerate isn't
278 * available, SDL will use the default, internal resampling algorithm.
279 *
280 * Note that this is currently only applicable to resampling audio that is
281 * being written to a device for playback or audio being read from a device
282 * for capture. SDL_AudioCVT always uses the default resampler (although this
283 * might change for SDL 2.1).
284 *
285 * This hint is currently only checked at audio subsystem initialization.
286 *
287 * This variable can be set to the following values:
288 *
289 * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
290 * "1" or "fast" - Use fast, slightly higher quality resampling, if available
291 * "2" or "medium" - Use medium quality resampling, if available
292 * "3" or "best" - Use high quality resampling, if available
293 */
294 #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
295
296 /**
297 * \brief A variable controlling whether SDL updates joystick state when getting input events
298 *
299 * This variable can be set to the following values:
300 *
301 * "0" - You'll call SDL_JoystickUpdate() manually
302 * "1" - SDL will automatically call SDL_JoystickUpdate() (default)
303 *
304 * This hint can be toggled on and off at runtime.
305 */
306 #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
307
308 /**
309 * \brief A variable controlling whether SDL updates sensor state when getting input events
310 *
311 * This variable can be set to the following values:
312 *
313 * "0" - You'll call SDL_SensorUpdate() manually
314 * "1" - SDL will automatically call SDL_SensorUpdate() (default)
315 *
316 * This hint can be toggled on and off at runtime.
317 */
318 #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
319
320 /**
321 * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
322 *
323 * The bitmap header version 4 is required for proper alpha channel support and
324 * SDL will use it when required. Should this not be desired, this hint can
325 * force the use of the 40 byte header version which is supported everywhere.
326 *
327 * The variable can be set to the following values:
328 * "0" - Surfaces with a colorkey or an alpha channel are saved to a
329 * 32-bit BMP file with an alpha mask. SDL will use the bitmap
330 * header version 4 and set the alpha mask accordingly.
331 * "1" - Surfaces with a colorkey or an alpha channel are saved to a
332 * 32-bit BMP file without an alpha mask. The alpha channel data
333 * will be in the file, but applications are going to ignore it.
334 *
335 * The default value is "0".
336 */
337 #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
338
339 /**
340 * \brief Override for SDL_GetDisplayUsableBounds()
341 *
342 * If set, this hint will override the expected results for
343 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
344 * to do this, but this allows an embedded system to request that some of the
345 * screen be reserved for other uses when paired with a well-behaved
346 * application.
347 *
348 * The contents of this hint must be 4 comma-separated integers, the first
349 * is the bounds x, then y, width and height, in that order.
350 */
351 #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
352
353 /**
354 * \brief Disable giving back control to the browser automatically
355 * when running with asyncify
356 *
357 * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
358 * such as refreshing the screen or polling events.
359 *
360 * This hint only applies to the emscripten platform
361 *
362 * The variable can be set to the following values:
363 * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
364 * "1" - Enable emscripten_sleep calls (the default)
365 */
366 #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
367
368 /**
369 * \brief override the binding element for keyboard inputs for Emscripten builds
370 *
371 * This hint only applies to the emscripten platform
372 *
373 * The variable can be one of
374 * "#window" - The javascript window object (this is the default)
375 * "#document" - The javascript document object
376 * "#screen" - the javascript window.screen object
377 * "#canvas" - the WebGL canvas element
378 * any other string without a leading # sign applies to the element on the page with that ID.
379 */
380 #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
381
382 /**
383 * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
384 *
385 * The variable can be set to the following values:
386 * "0" - Do not scan for Steam Controllers
387 * "1" - Scan for Steam Controllers (the default)
388 *
389 * The default value is "1". This hint must be set before initializing the joystick subsystem.
390 */
391 #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
392
393 /**
394 * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
395 *
396 * This variable can be set to the following values:
397 *
398 * "0" - Don't log any events (default)
399 * "1" - Log all events except mouse and finger motion, which are pretty spammy.
400 * "2" - Log all events.
401 *
402 * This is generally meant to be used to debug SDL itself, but can be useful
403 * for application developers that need better visibility into what is going
404 * on in the event queue. Logged events are sent through SDL_Log(), which
405 * means by default they appear on stdout on most platforms or maybe
406 * OutputDebugString() on Windows, and can be funneled by the app with
407 * SDL_LogSetOutputFunction(), etc.
408 *
409 * This hint can be toggled on and off at runtime, if you only need to log
410 * events for a small subset of program execution.
411 */
412 #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
413
414 /**
415 * \brief A variable controlling whether raising the window should be done more forcefully
416 *
417 * This variable can be set to the following values:
418 * "0" - No forcing (the default)
419 * "1" - Extra level of forcing
420 *
421 * At present, this is only an issue under MS Windows, which makes it nearly impossible to
422 * programmatically move a window to the foreground, for "security" reasons. See
423 * http://stackoverflow.com/a/34414846 for a discussion.
424 */
425 #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
426
427 /**
428 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
429 *
430 * SDL can try to accelerate the SDL screen surface by using streaming
431 * textures with a 3D rendering engine. This variable controls whether and
432 * how this is done.
433 *
434 * This variable can be set to the following values:
435 * "0" - Disable 3D acceleration
436 * "1" - Enable 3D acceleration, using the default renderer.
437 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
438 *
439 * By default SDL tries to make a best guess for each platform whether
440 * to use acceleration or not.
441 */
442 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
443
444 /**
445 * \brief A variable that lets you manually hint extra gamecontroller db entries.
446 *
447 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
448 *
449 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
450 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
451 */
452 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
453
454 /**
455 * \brief A variable that lets you provide a file with extra gamecontroller db entries.
456 *
457 * The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
458 *
459 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
460 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
461 */
462 #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
463
464 /**
465 * \brief A variable that overrides the automatic controller type detection
466 *
467 * The variable should be comma separated entries, in the form: VID/PID=type
468 *
469 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
470 *
471 * The type should be one of:
472 * Xbox360
473 * XboxOne
474 * PS3
475 * PS4
476 * PS5
477 * SwitchPro
478 *
479 * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
480 */
481 #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
482
483 /**
484 * \brief A variable containing a list of devices to skip when scanning for game controllers.
485 *
486 * The format of the string is a comma separated list of USB VID/PID pairs
487 * in hexadecimal form, e.g.
488 *
489 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
490 *
491 * The variable can also take the form of @file, in which case the named
492 * file will be loaded and interpreted as the value of the variable.
493 */
494 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
495
496 /**
497 * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
498 *
499 * The format of the string is a comma separated list of USB VID/PID pairs
500 * in hexadecimal form, e.g.
501 *
502 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
503 *
504 * The variable can also take the form of @file, in which case the named
505 * file will be loaded and interpreted as the value of the variable.
506 */
507 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
508
509 /**
510 * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
511 *
512 * For example, on Nintendo Switch controllers, normally you'd get:
513 *
514 * (Y)
515 * (X) (B)
516 * (A)
517 *
518 * but if this hint is set, you'll get:
519 *
520 * (X)
521 * (Y) (A)
522 * (B)
523 *
524 * The variable can be set to the following values:
525 * "0" - Report the face buttons by position, as though they were on an Xbox controller.
526 * "1" - Report the face buttons by label instead of position
527 *
528 * The default value is "1". This hint may be set at any time.
529 */
530 #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
531
532 /**
533 * \brief A variable controlling whether grabbing input grabs the keyboard
534 *
535 * This variable can be set to the following values:
536 * "0" - Grab will affect only the mouse
537 * "1" - Grab will affect mouse and keyboard
538 *
539 * By default SDL will not grab the keyboard so system shortcuts still work.
540 */
541 #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
542
543 /**
544 * \brief A variable controlling whether the idle timer is disabled on iOS.
545 *
546 * When an iOS app does not receive touches for some time, the screen is
547 * dimmed automatically. For games where the accelerometer is the only input
548 * this is problematic. This functionality can be disabled by setting this
549 * hint.
550 *
551 * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
552 * accomplish the same thing on iOS. They should be preferred over this hint.
553 *
554 * This variable can be set to the following values:
555 * "0" - Enable idle timer
556 * "1" - Disable idle timer
557 */
558 #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
559
560 /**
561 * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
562 *
563 * The variable can be set to the following values:
564 * "0" - SDL_TEXTEDITING events are sent, and it is the application's
565 * responsibility to render the text from these events and
566 * differentiate it somehow from committed text. (default)
567 * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
568 * and text that is being composed will be rendered in its own UI.
569 */
570 #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
571
572 /**
573 * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
574 *
575 * The variable can be set to the following values:
576 * "0" - Native UI components are not display. (default)
577 * "1" - Native UI components are displayed.
578 */
579 #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
580
581 /**
582 * \brief A variable to control if extended IME text support is enabled.
583 * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
584 * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
585 *
586 * The variable can be set to the following values:
587 * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
588 * "1" - Modern behavior.
589 */
590 #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
591
592 /**
593 * \brief A variable controlling whether the home indicator bar on iPhone X
594 * should be hidden.
595 *
596 * This variable can be set to the following values:
597 * "0" - The indicator bar is not hidden (default for windowed applications)
598 * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
599 * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
600 */
601 #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
602
603 /**
604 * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
605 *
606 * The variable can be set to the following values:
607 * "0" - Disable joystick & gamecontroller input events when the
608 * application is in the background.
609 * "1" - Enable joystick & gamecontroller input events when the
610 * application is in the background.
611 *
612 * The default value is "0". This hint may be set at any time.
613 */
614 #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
615
616 /**
617 * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
618 *
619 * This variable can be set to the following values:
620 * "0" - HIDAPI drivers are not used
621 * "1" - HIDAPI drivers are used (the default)
622 *
623 * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
624 */
625 #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
626
627 /**
628 * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
629 *
630 * This variable can be set to the following values:
631 * "0" - HIDAPI driver is not used
632 * "1" - HIDAPI driver is used
633 *
634 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
635 */
636 #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
637
638 /**
639 * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
640 * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
641 * this is useful for applications that need full compatibility for things like ADSR envelopes.
642 * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
643 * Rumble is both at any arbitrary value,
644 * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
645 *
646 * This variable can be set to the following values:
647 * "0" - Normal rumble behavior is behavior is used (default)
648 * "1" - Proper GameCube controller rumble behavior is used
649 *
650 */
651 #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
652
653 /**
654 * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
655 *
656 * This variable can be set to the following values:
657 * "0" - basic Joy-Con support with no analog input (the default)
658 * "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
659 *
660 * This does not combine Joy-Cons into a single controller. That's up to the user.
661 */
662 #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
663
664 /**
665 * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
666 *
667 * This variable can be set to the following values:
668 * "0" - HIDAPI driver is not used
669 * "1" - HIDAPI driver is used
670 *
671 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
672 */
673 #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
674
675 /**
676 * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
677 *
678 * This variable can be set to the following values:
679 * "0" - HIDAPI driver is not used
680 * "1" - HIDAPI driver is used
681 *
682 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
683 */
684 #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
685
686 /**
687 * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
688 *
689 * This variable can be set to the following values:
690 * "0" - extended reports are not enabled (the default)
691 * "1" - extended reports
692 *
693 * Extended input reports allow rumble on Bluetooth PS4 controllers, but
694 * break DirectInput handling for applications that don't use SDL.
695 *
696 * Once extended reports are enabled, they can not be disabled without
697 * power cycling the controller.
698 *
699 * For compatibility with applications written for versions of SDL prior
700 * to the introduction of PS5 controller support, this value will also
701 * control the state of extended reports on PS5 controllers when the
702 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
703 */
704 #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
705
706 /**
707 * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
708 *
709 * This variable can be set to the following values:
710 * "0" - HIDAPI driver is not used
711 * "1" - HIDAPI driver is used
712 *
713 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
714 */
715 #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
716
717 /**
718 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
719 *
720 * This variable can be set to the following values:
721 * "0" - player LEDs are not enabled
722 * "1" - player LEDs are enabled (the default)
723 */
724 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
725
726 /**
727 * \brief A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
728 *
729 * This variable can be set to the following values:
730 * "0" - extended reports are not enabled (the default)
731 * "1" - extended reports
732 *
733 * Extended input reports allow rumble on Bluetooth PS5 controllers, but
734 * break DirectInput handling for applications that don't use SDL.
735 *
736 * Once extended reports are enabled, they can not be disabled without
737 * power cycling the controller.
738 *
739 * For compatibility with applications written for versions of SDL prior
740 * to the introduction of PS5 controller support, this value defaults to
741 * the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
742 */
743 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
744
745 /**
746 * \brief A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
747 *
748 * This variable can be set to the following values:
749 * "0" - HIDAPI driver is not used
750 * "1" - HIDAPI driver is used
751 *
752 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
753 */
754 #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
755
756 /**
757 * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
758 *
759 * This variable can be set to the following values:
760 * "0" - HIDAPI driver is not used
761 * "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
762 * and may prompt the user for permission on iOS and Android.
763 *
764 * The default is "0"
765 */
766 #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
767
768 /**
769 * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
770 *
771 * This variable can be set to the following values:
772 * "0" - HIDAPI driver is not used
773 * "1" - HIDAPI driver is used
774 *
775 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
776 */
777 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
778
779 /**
780 * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
781 *
782 * This variable can be set to the following values:
783 * "0" - home button LED is turned off
784 * "1" - home button LED is turned on
785 *
786 * By default the Home button LED state is not changed.
787 */
788 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
789
790 /**
791 * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
792 *
793 * This variable can be set to the following values:
794 * "0" - HIDAPI driver is not used
795 * "1" - HIDAPI driver is used
796 *
797 * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
798 */
799 #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
800
801 /**
802 * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
803 *
804 * This variable can be set to the following values:
805 * "0" - RAWINPUT drivers are not used
806 * "1" - RAWINPUT drivers are used (the default)
807 */
808 #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
809
810 /**
811 * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
812 *
813 * This variable can be set to the following values:
814 * "0" - RAWINPUT driver will only use data from raw input APIs
815 * "1" - RAWINPUT driver will also pull data from XInput, providing
816 * better trigger axes, guide button presses, and rumble support
817 * for Xbox controllers
818 *
819 * The default is "1". This hint applies to any joysticks opened after setting the hint.
820 */
821 #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
822
823 /**
824 * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
825 *
826 * This variable can be set to the following values:
827 * "0" - ROG Chakram mice do not show up as joysticks (the default)
828 * "1" - ROG Chakram mice show up as joysticks
829 */
830 #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
831
832 /**
833 * \brief A variable controlling whether a separate thread should be used
834 * for handling joystick detection and raw input messages on Windows
835 *
836 * This variable can be set to the following values:
837 * "0" - A separate thread is not used (the default)
838 * "1" - A separate thread is used for handling raw input messages
839 *
840 */
841 #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
842
843 /**
844 * \brief Determines whether SDL enforces that DRM master is required in order
845 * to initialize the KMSDRM video backend.
846 *
847 * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
848 * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
849 * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
850 * is still able to process input and query attributes of attached displays,
851 * but it cannot change display state or draw to the screen directly.
852 *
853 * In some cases, it can be useful to have the KMSDRM backend even if it cannot
854 * be used for rendering. An app may want to use SDL for input processing while
855 * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
856 * using its own code to render to DRM overlays that SDL doesn't support.
857 *
858 * This hint must be set before initializing the video subsystem.
859 *
860 * This variable can be set to the following values:
861 * "0" - SDL will allow usage of the KMSDRM backend without DRM master
862 * "1" - SDL Will require DRM master to use the KMSDRM backend (default)
863 */
864 #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
865
866 /**
867 * \brief A comma separated list of devices to open as joysticks
868 *
869 * This variable is currently only used by the Linux joystick driver.
870 */
871 #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
872
873 /**
874 * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
875 *
876 * This variable can be set to the following values:
877 * "0" - Use /dev/input/event*
878 * "1" - Use /dev/input/js*
879 *
880 * By default the /dev/input/event* interfaces are used
881 */
882 #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
883
884 /**
885 * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
886 *
887 * This variable can be set to the following values:
888 * "0" - Return unfiltered joystick axis values (the default)
889 * "1" - Return axis values with deadzones taken into account
890 */
891 #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
892
893 /**
894 * \brief When set don't force the SDL app to become a foreground process
895 *
896 * This hint only applies to Mac OS X.
897 *
898 */
899 #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
900
901 /**
902 * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
903 *
904 * If present, holding ctrl while left clicking will generate a right click
905 * event when on Mac.
906 */
907 #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
908
909 /**
910 * \brief A variable setting the double click radius, in pixels.
911 */
912 #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
913
914 /**
915 * \brief A variable setting the double click time, in milliseconds.
916 */
917 #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
918
919 /**
920 * \brief Allow mouse click events when clicking to focus an SDL window
921 *
922 * This variable can be set to the following values:
923 * "0" - Ignore mouse clicks that activate a window
924 * "1" - Generate events for mouse clicks that activate a window
925 *
926 * By default SDL will ignore mouse clicks that activate a window
927 */
928 #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
929
930 /**
931 * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
932 */
933 #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
934
935 /**
936 * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
937 *
938 * This variable can be set to the following values:
939 * "0" - Relative mouse mode constrains the mouse to the window
940 * "1" - Relative mouse mode constrains the mouse to the center of the window
941 *
942 * Constraining to the center of the window works better for FPS games and when the
943 * application is running over RDP. Constraining to the whole window works better
944 * for 2D games and increases the chance that the mouse will be in the correct
945 * position when using high DPI mice.
946 *
947 * By default SDL will constrain the mouse to the center of the window
948 */
949 #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
950
951 /**
952 * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
953 *
954 * This variable can be set to the following values:
955 * "0" - Relative mouse mode uses raw input
956 * "1" - Relative mouse mode uses mouse warping
957 *
958 * By default SDL will use raw input for relative mouse mode
959 */
960 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
961
962 /**
963 * \brief A variable controlling whether relative mouse motion is affected by renderer scaling
964 *
965 * This variable can be set to the following values:
966 * "0" - Relative motion is unaffected by DPI or renderer's logical size
967 * "1" - Relative motion is scaled according to DPI scaling and logical size
968 *
969 * By default relative mouse deltas are affected by DPI and renderer scaling
970 */
971 #define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
972
973 /**
974 * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
975 */
976 #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
977
978 /**
979 * \brief A variable controlling whether mouse events should generate synthetic touch events
980 *
981 * This variable can be set to the following values:
982 * "0" - Mouse events will not generate touch events (default for desktop platforms)
983 * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
984 */
985 #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
986
987 /**
988 * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
989 *
990 * This variable can be set to the following values:
991 * "0" - The mouse is not captured while mouse buttons are pressed
992 * "1" - The mouse is captured while mouse buttons are pressed
993 *
994 * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
995 * outside the window, the application continues to receive mouse events until the button is
996 * released.
997 */
998 #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
999
1000 /**
1001 * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
1002 *
1003 * This hint only applies to Unix-like platforms, and should set before
1004 * any calls to SDL_Init()
1005 *
1006 * The variable can be set to the following values:
1007 * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
1008 * catches a signal, convert it into an SDL_QUIT event.
1009 * "1" - SDL will not install a signal handler at all.
1010 */
1011 #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
1012
1013 /**
1014 * \brief A variable controlling what driver to use for OpenGL ES contexts.
1015 *
1016 * On some platforms, currently Windows and X11, OpenGL drivers may support
1017 * creating contexts with an OpenGL ES profile. By default SDL uses these
1018 * profiles, when available, otherwise it attempts to load an OpenGL ES
1019 * library, e.g. that provided by the ANGLE project. This variable controls
1020 * whether SDL follows this default behaviour or will always load an
1021 * OpenGL ES library.
1022 *
1023 * Circumstances where this is useful include
1024 * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
1025 * or emulator, e.g. those from ARM, Imagination or Qualcomm.
1026 * - Resolving OpenGL ES function addresses at link time by linking with
1027 * the OpenGL ES library instead of querying them at run time with
1028 * SDL_GL_GetProcAddress().
1029 *
1030 * Caution: for an application to work with the default behaviour across
1031 * different OpenGL drivers it must query the OpenGL ES function
1032 * addresses at run time using SDL_GL_GetProcAddress().
1033 *
1034 * This variable is ignored on most platforms because OpenGL ES is native
1035 * or not supported.
1036 *
1037 * This variable can be set to the following values:
1038 * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
1039 * "1" - Load OpenGL ES library using the default library names.
1040 *
1041 */
1042 #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
1043
1044 /**
1045 * \brief A variable controlling which orientations are allowed on iOS/Android.
1046 *
1047 * In some circumstances it is necessary to be able to explicitly control
1048 * which UI orientations are allowed.
1049 *
1050 * This variable is a space delimited list of the following values:
1051 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
1052 */
1053 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
1054
1055 /**
1056 * \brief A variable controlling the use of a sentinel event when polling the event queue
1057 *
1058 * This variable can be set to the following values:
1059 * "0" - Disable poll sentinels
1060 * "1" - Enable poll sentinels
1061 *
1062 * When polling for events, SDL_PumpEvents is used to gather new events from devices.
1063 * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
1064 * become stuck until the new events stop.
1065 * This is most noticable when moving a high frequency mouse.
1066 *
1067 * By default, poll sentinels are enabled.
1068 */
1069 #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
1070
1071 /**
1072 * \brief Override for SDL_GetPreferredLocales()
1073 *
1074 * If set, this will be favored over anything the OS might report for the
1075 * user's preferred locales. Changing this hint at runtime will not generate
1076 * a SDL_LOCALECHANGED event (but if you can change the hint, you can push
1077 * your own event, if you want).
1078 *
1079 * The format of this hint is a comma-separated list of language and locale,
1080 * combined with an underscore, as is a common format: "en_GB". Locale is
1081 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
1082 */
1083 #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
1084
1085 /**
1086 * \brief A variable describing the content orientation on QtWayland-based platforms.
1087 *
1088 * On QtWayland platforms, windows are rotated client-side to allow for custom
1089 * transitions. In order to correctly position overlays (e.g. volume bar) and
1090 * gestures (e.g. events view, close/minimize gestures), the system needs to
1091 * know in which orientation the application is currently drawing its contents.
1092 *
1093 * This does not cause the window to be rotated or resized, the application
1094 * needs to take care of drawing the content in the right orientation (the
1095 * framebuffer is always in portrait mode).
1096 *
1097 * This variable can be one of the following values:
1098 * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
1099 */
1100 #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1101
1102 /**
1103 * \brief Flags to set on QtWayland windows to integrate with the native window manager.
1104 *
1105 * On QtWayland platforms, this hint controls the flags to set on the windows.
1106 * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
1107 *
1108 * This variable is a space-separated list of the following values (empty = no flags):
1109 * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
1110 */
1111 #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
1112
1113 /**
1114 * \brief A variable controlling whether the 2D render API is compatible or efficient.
1115 *
1116 * This variable can be set to the following values:
1117 *
1118 * "0" - Don't use batching to make rendering more efficient.
1119 * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
1120 *
1121 * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
1122 * it batches up draw requests and sends them all to the GPU only when forced
1123 * to (during SDL_RenderPresent, when changing render targets, by updating a
1124 * texture that the batch needs, etc). This is significantly more efficient,
1125 * but it can cause problems for apps that expect to render on top of the
1126 * render API's output. As such, SDL will disable batching if a specific
1127 * render backend is requested (since this might indicate that the app is
1128 * planning to use the underlying graphics API directly). This hint can
1129 * be used to explicitly request batching in this instance. It is a contract
1130 * that you will either never use the underlying graphics API directly, or
1131 * if you do, you will call SDL_RenderFlush() before you do so any current
1132 * batch goes to the GPU before your work begins. Not following this contract
1133 * will result in undefined behavior.
1134 */
1135 #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
1136
1137 /**
1138 * \brief A variable controlling how the 2D render API renders lines
1139 *
1140 * This variable can be set to the following values:
1141 * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
1142 * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
1143 * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
1144 * "3" - Use the driver geometry API (correct, draws thicker diagonal lines)
1145 *
1146 * This variable should be set when the renderer is created.
1147 */
1148 #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
1149
1150 /**
1151 * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
1152 *
1153 * This variable does not have any effect on the Direct3D 9 based renderer.
1154 *
1155 * This variable can be set to the following values:
1156 * "0" - Disable Debug Layer use
1157 * "1" - Enable Debug Layer use
1158 *
1159 * By default, SDL does not use Direct3D Debug Layer.
1160 */
1161 #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
1162
1163 /**
1164 * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
1165 *
1166 * This variable can be set to the following values:
1167 * "0" - Thread-safety is not enabled (faster)
1168 * "1" - Thread-safety is enabled
1169 *
1170 * By default the Direct3D device is created with thread-safety disabled.
1171 */
1172 #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
1173
1174 /**
1175 * \brief A variable specifying which render driver to use.
1176 *
1177 * If the application doesn't pick a specific renderer to use, this variable
1178 * specifies the name of the preferred renderer. If the preferred renderer
1179 * can't be initialized, the normal default renderer is used.
1180 *
1181 * This variable is case insensitive and can be set to the following values:
1182 * "direct3d"
1183 * "opengl"
1184 * "opengles2"
1185 * "opengles"
1186 * "metal"
1187 * "software"
1188 *
1189 * The default varies by platform, but it's the first one in the list that
1190 * is available on the current platform.
1191 */
1192 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
1193
1194 /**
1195 * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
1196 *
1197 * This variable can be set to the following values:
1198 * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
1199 * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
1200 *
1201 * By default letterbox is used
1202 */
1203 #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
1204
1205 /**
1206 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
1207 *
1208 * This variable can be set to the following values:
1209 * "0" - Disable shaders
1210 * "1" - Enable shaders
1211 *
1212 * By default shaders are used if OpenGL supports them.
1213 */
1214 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
1215
1216 /**
1217 * \brief A variable controlling the scaling quality
1218 *
1219 * This variable can be set to the following values:
1220 * "0" or "nearest" - Nearest pixel sampling
1221 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
1222 * "2" or "best" - Currently this is the same as "linear"
1223 *
1224 * By default nearest pixel sampling is used
1225 */
1226 #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
1227
1228 /**
1229 * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
1230 *
1231 * This variable can be set to the following values:
1232 * "0" - Disable vsync
1233 * "1" - Enable vsync
1234 *
1235 * By default SDL does not sync screen surface updates with vertical refresh.
1236 */
1237 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1238
1239 /**
1240 * \brief A variable to control whether the return key on the soft keyboard
1241 * should hide the soft keyboard on Android and iOS.
1242 *
1243 * The variable can be set to the following values:
1244 * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
1245 * "1" - The return key will hide the keyboard.
1246 *
1247 * The value of this hint is used at runtime, so it can be changed at any time.
1248 */
1249 #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
1250
1251 /**
1252 * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
1253 *
1254 * Also known as Z-order. The variable can take a negative or positive value.
1255 * The default is 10000.
1256 */
1257 #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
1258
1259 /**
1260 * \brief Specify an "activity name" for screensaver inhibition.
1261 *
1262 * Some platforms, notably Linux desktops, list the applications which are
1263 * inhibiting the screensaver or other power-saving features.
1264 *
1265 * This hint lets you specify the "activity name" sent to the OS when
1266 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
1267 * disabled). The contents of this hint are used when the screensaver is
1268 * disabled. You should use a string that describes what your program is doing
1269 * (and, therefore, why the screensaver is disabled). For example, "Playing a
1270 * game" or "Watching a video".
1271 *
1272 * Setting this to "" or leaving it unset will have SDL use a reasonable
1273 * default: "Playing a game" or something similar.
1274 *
1275 * On targets where this is not supported, this hint does nothing.
1276 */
1277 #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
1278
1279 /**
1280 * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
1281 *
1282 * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
1283 * that require special handling by the application. This hint exists to let SDL know that
1284 * the app is prepared to handle said restrictions.
1285 *
1286 * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
1287 * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
1288 * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
1289 * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
1290 * * Refer to the man pages for more information.
1291 *
1292 * This variable can be set to the following values:
1293 * "0" - default platform specific behaviour
1294 * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
1295 */
1296 #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
1297
1298 /**
1299 * \brief A string specifying additional information to use with SDL_SetThreadPriority.
1300 *
1301 * By default SDL_SetThreadPriority will make appropriate system changes in order to
1302 * apply a thread priority. For example on systems using pthreads the scheduler policy
1303 * is changed automatically to a policy that works well with a given priority.
1304 * Code which has specific requirements can override SDL's default behavior with this hint.
1305 *
1306 * pthread hint values are "current", "other", "fifo" and "rr".
1307 * Currently no other platform hint values are defined but may be in the future.
1308 *
1309 * \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
1310 * configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
1311 * after calling SDL_SetThreadPriority().
1312 */
1313 #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
1314
1315 /**
1316 * \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
1317 *
1318 * Use this hint in case you need to set SDL's threads stack size to other than the default.
1319 * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
1320 * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
1321 * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
1322 *
1323 * Instead of this hint, in 2.0.9 and later, you can use
1324 * SDL_CreateThreadWithStackSize(). This hint only works with the classic
1325 * SDL_CreateThread().
1326 */
1327 #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
1328
1329 /**
1330 * \brief A variable that controls the timer resolution, in milliseconds.
1331 *
1332 * The higher resolution the timer, the more frequently the CPU services
1333 * timer interrupts, and the more precise delays are, but this takes up
1334 * power and CPU time. This hint is only used on Windows.
1335 *
1336 * See this blog post for more information:
1337 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
1338 *
1339 * If this variable is set to "0", the system timer resolution is not set.
1340 *
1341 * The default value is "1". This hint may be set at any time.
1342 */
1343 #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
1344
1345 /**
1346 * \brief A variable controlling whether touch events should generate synthetic mouse events
1347 *
1348 * This variable can be set to the following values:
1349 * "0" - Touch events will not generate mouse events
1350 * "1" - Touch events will generate mouse events
1351 *
1352 * By default SDL will generate mouse events for touch events
1353 */
1354 #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
1355
1356 /**
1357 * \brief A variable controlling which touchpad should generate synthetic mouse events
1358 *
1359 * This variable can be set to the following values:
1360 * "0" - Only front touchpad should generate mouse events. Default
1361 * "1" - Only back touchpad should generate mouse events.
1362 * "2" - Both touchpads should generate mouse events.
1363 *
1364 * By default SDL will generate mouse events for all touch devices
1365 */
1366 #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
1367
1368 /**
1369 * \brief A variable controlling whether the Android / tvOS remotes
1370 * should be listed as joystick devices, instead of sending keyboard events.
1371 *
1372 * This variable can be set to the following values:
1373 * "0" - Remotes send enter/escape/arrow key events
1374 * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
1375 */
1376 #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
1377
1378 /**
1379 * \brief A variable controlling whether the screensaver is enabled.
1380 *
1381 * This variable can be set to the following values:
1382 * "0" - Disable screensaver
1383 * "1" - Enable screensaver
1384 *
1385 * By default SDL will disable the screensaver.
1386 */
1387 #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
1388
1389 /**
1390 * \brief Tell the video driver that we only want a double buffer.
1391 *
1392 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1393 * wastes no CPU time on waiting for vsync after issuing a flip, but
1394 * introduces a frame of latency. On the other hand, using a double buffer
1395 * scheme instead is recommended for cases where low latency is an important
1396 * factor because we save a whole frame of latency.
1397 * We do so by waiting for vsync immediately after issuing a flip, usually just
1398 * after eglSwapBuffers call in the backend's *_SwapWindow function.
1399 *
1400 * Since it's driver-specific, it's only supported where possible and
1401 * implemented. Currently supported the following drivers:
1402 *
1403 * - KMSDRM (kmsdrm)
1404 * - Raspberry Pi (raspberrypi)
1405 */
1406 #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
1407
1408 /**
1409 * \brief A variable controlling whether the EGL window is allowed to be
1410 * composited as transparent, rather than opaque.
1411 *
1412 * Most window systems will always render windows opaque, even if the surface
1413 * format has an alpha channel. This is not always true, however, so by default
1414 * SDL will try to enforce opaque composition. To override this behavior, you
1415 * can set this hint to "1".
1416 */
1417 #define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
1418
1419 /**
1420 * \brief A variable controlling whether the graphics context is externally managed.
1421 *
1422 * This variable can be set to the following values:
1423 * "0" - SDL will manage graphics contexts that are attached to windows.
1424 * "1" - Disable graphics context management on windows.
1425 *
1426 * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
1427 * context will be automatically saved and restored when pausing the application. Additionally, some
1428 * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
1429 * behavior, which is desireable when the application manages the graphics context, such as
1430 * an externally managed OpenGL context or attaching a Vulkan surface to the window.
1431 */
1432 #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
1433
1434 /**
1435 * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
1436 */
1437 #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
1438
1439 /**
1440 * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
1441 *
1442 * This hint only applies to Mac OS X.
1443 *
1444 * The variable can be set to the following values:
1445 * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
1446 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
1447 * button on their titlebars).
1448 * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
1449 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
1450 * button on their titlebars).
1451 *
1452 * The default value is "1". Spaces are disabled regardless of this hint if
1453 * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
1454 * any windows are created.
1455 */
1456 #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
1457
1458 /**
1459 * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
1460 * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
1461 * seeing if "true" causes more problems than it solves in modern times.
1462 *
1463 */
1464 #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
1465
1466 /**
1467 * \brief A variable controlling whether the libdecor Wayland backend is allowed to be used.
1468 *
1469 * This variable can be set to the following values:
1470 * "0" - libdecor use is disabled.
1471 * "1" - libdecor use is enabled (default).
1472 *
1473 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1474 */
1475 #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
1476
1477 /**
1478 * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
1479 *
1480 * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
1481 * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
1482 *
1483 * This variable can be set to the following values:
1484 * "0" - libdecor is enabled only if server-side decorations are unavailable.
1485 * "1" - libdecor is always enabled if available.
1486 *
1487 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1488 */
1489 #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
1490
1491 /**
1492 * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1493 *
1494 * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
1495 * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1496 * created SDL_Window:
1497 *
1498 * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
1499 * needed for example when sharing an OpenGL context across multiple windows.
1500 *
1501 * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
1502 * OpenGL rendering.
1503 *
1504 * This variable can be set to the following values:
1505 * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
1506 * share a pixel format with.
1507 */
1508 #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
1509
1510 /**
1511 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
1512 *
1513 * This variable can be set to the following values:
1514 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1515 * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
1516 *
1517 * By default SDL will not make the foreign window compatible with OpenGL.
1518 */
1519 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
1520
1521 /**
1522 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
1523 *
1524 * This variable can be set to the following values:
1525 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1526 * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
1527 *
1528 * By default SDL will not make the foreign window compatible with Vulkan.
1529 */
1530 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
1531
1532 /**
1533 * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
1534 *
1535 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
1536 * can use two different sets of binaries, those compiled by the user from source
1537 * or those provided by the Chrome browser. In the later case, these binaries require
1538 * that SDL loads a DLL providing the shader compiler.
1539 *
1540 * This variable can be set to the following values:
1541 * "d3dcompiler_46.dll" - default, best for Vista or later.
1542 * "d3dcompiler_43.dll" - for XP support.
1543 * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
1544 *
1545 */
1546 #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
1547
1548 /**
1549 * \brief A variable controlling whether X11 should use GLX or EGL by default
1550 *
1551 * This variable can be set to the following values:
1552 * "0" - Use GLX
1553 * "1" - Use EGL
1554 *
1555 * By default SDL will use GLX when both are present.
1556 */
1557 #define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
1558
1559 /**
1560 * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
1561 *
1562 * This variable can be set to the following values:
1563 * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
1564 * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
1565 *
1566 * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
1567 *
1568 */
1569 #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
1570
1571 /**
1572 * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
1573 *
1574 * This variable can be set to the following values:
1575 * "0" - Disable _NET_WM_PING
1576 * "1" - Enable _NET_WM_PING
1577 *
1578 * By default SDL will use _NET_WM_PING, but for applications that know they
1579 * will not always be able to respond to ping requests in a timely manner they can
1580 * turn it off to avoid the window manager thinking the app is hung.
1581 * The hint is checked in CreateWindow.
1582 */
1583 #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
1584
1585 /**
1586 * \brief A variable forcing the visual ID chosen for new X11 windows
1587 *
1588 */
1589 #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
1590
1591 /**
1592 * \brief A variable controlling whether the X11 Xinerama extension should be used.
1593 *
1594 * This variable can be set to the following values:
1595 * "0" - Disable Xinerama
1596 * "1" - Enable Xinerama
1597 *
1598 * By default SDL will use Xinerama if it is available.
1599 */
1600 #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
1601
1602 /**
1603 * \brief A variable controlling whether the X11 XRandR extension should be used.
1604 *
1605 * This variable can be set to the following values:
1606 * "0" - Disable XRandR
1607 * "1" - Enable XRandR
1608 *
1609 * By default SDL will not use XRandR because of window manager issues.
1610 */
1611 #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
1612
1613 /**
1614 * \brief A variable controlling whether the X11 VidMode extension should be used.
1615 *
1616 * This variable can be set to the following values:
1617 * "0" - Disable XVidMode
1618 * "1" - Enable XVidMode
1619 *
1620 * By default SDL will use XVidMode if it is available.
1621 */
1622 #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
1623
1624 /**
1625 * \brief Controls how the fact chunk affects the loading of a WAVE file.
1626 *
1627 * The fact chunk stores information about the number of samples of a WAVE
1628 * file. The Standards Update from Microsoft notes that this value can be used
1629 * to 'determine the length of the data in seconds'. This is especially useful
1630 * for compressed formats (for which this is a mandatory chunk) if they produce
1631 * multiple sample frames per block and truncating the block is not allowed.
1632 * The fact chunk can exactly specify how many sample frames there should be
1633 * in this case.
1634 *
1635 * Unfortunately, most application seem to ignore the fact chunk and so SDL
1636 * ignores it by default as well.
1637 *
1638 * This variable can be set to the following values:
1639 *
1640 * "truncate" - Use the number of samples to truncate the wave data if
1641 * the fact chunk is present and valid
1642 * "strict" - Like "truncate", but raise an error if the fact chunk
1643 * is invalid, not present for non-PCM formats, or if the
1644 * data chunk doesn't have that many samples
1645 * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
1646 * samples is zero
1647 * "ignore" - Ignore fact chunk entirely (default)
1648 */
1649 #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
1650
1651 /**
1652 * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
1653 *
1654 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
1655 * file) is not always reliable. In case the size is wrong, it's possible to
1656 * just ignore it and step through the chunks until a fixed limit is reached.
1657 *
1658 * Note that files that have trailing data unrelated to the WAVE file or
1659 * corrupt files may slow down the loading process without a reliable boundary.
1660 * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
1661 * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
1662 *
1663 * This variable can be set to the following values:
1664 *
1665 * "force" - Always use the RIFF chunk size as a boundary for the chunk search
1666 * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
1667 * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
1668 * "maximum" - Search for chunks until the end of file (not recommended)
1669 */
1670 #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
1671
1672 /**
1673 * \brief Controls how a truncated WAVE file is handled.
1674 *
1675 * A WAVE file is considered truncated if any of the chunks are incomplete or
1676 * the data chunk size is not a multiple of the block size. By default, SDL
1677 * decodes until the first incomplete block, as most applications seem to do.
1678 *
1679 * This variable can be set to the following values:
1680 *
1681 * "verystrict" - Raise an error if the file is truncated
1682 * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
1683 * "dropframe" - Decode until the first incomplete sample frame
1684 * "dropblock" - Decode until the first incomplete block (default)
1685 */
1686 #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
1687
1688 /**
1689 * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
1690 * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
1691 * thread's name, but it tends to cause problems with other debuggers,
1692 * and the .NET runtime. Note that SDL 2.0.6 and later will still use
1693 * the (safer) SetThreadDescription API, introduced in the Windows 10
1694 * Creators Update, if available.
1695 *
1696 * The variable can be set to the following values:
1697 * "0" - SDL will raise the 0x406D1388 Exception to name threads.
1698 * This is the default behavior of SDL <= 2.0.4.
1699 * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
1700 * This is necessary with .NET languages or debuggers that aren't Visual Studio.
1701 */
1702 #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
1703
1704 /**
1705 * \brief A variable controlling whether the windows message loop is processed by SDL
1706 *
1707 * This variable can be set to the following values:
1708 * "0" - The window message loop is not run
1709 * "1" - The window message loop is processed in SDL_PumpEvents()
1710 *
1711 * By default SDL will process the windows message loop
1712 */
1713 #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
1714
1715 /**
1716 * \brief Force SDL to use Critical Sections for mutexes on Windows.
1717 * On Windows 7 and newer, Slim Reader/Writer Locks are available.
1718 * They offer better performance, allocate no kernel ressources and
1719 * use less memory. SDL will fall back to Critical Sections on older
1720 * OS versions or if forced to by this hint.
1721 *
1722 * This variable can be set to the following values:
1723 * "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
1724 * "1" - Force the use of Critical Sections in all cases.
1725 *
1726 */
1727 #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
1728
1729 /**
1730 * \brief Force SDL to use Kernel Semaphores on Windows.
1731 * Kernel Semaphores are inter-process and require a context
1732 * switch on every interaction. On Windows 8 and newer, the
1733 * WaitOnAddress API is available. Using that and atomics to
1734 * implement semaphores increases performance.
1735 * SDL will fall back to Kernel Objects on older OS versions
1736 * or if forced to by this hint.
1737 *
1738 * This variable can be set to the following values:
1739 * "0" - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
1740 * "1" - Force the use of Kernel Objects in all cases.
1741 *
1742 */
1743 #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
1744
1745 /**
1746 * \brief A variable to specify custom icon resource id from RC file on Windows platform
1747 */
1748 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
1749 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
1750
1751 /**
1752 * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
1753 *
1754 * The variable can be set to the following values:
1755 * "0" - SDL will generate a window-close event when it sees Alt+F4.
1756 * "1" - SDL will only do normal key handling for Alt+F4.
1757 */
1758 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
1759
1760 /**
1761 * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
1762 * Direct3D 9Ex contains changes to state management that can eliminate device
1763 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
1764 * some changes to your application to cope with the new behavior, so this
1765 * is disabled by default.
1766 *
1767 * This hint must be set before initializing the video subsystem.
1768 *
1769 * For more information on Direct3D 9Ex, see:
1770 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
1771 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
1772 *
1773 * This variable can be set to the following values:
1774 * "0" - Use the original Direct3D 9 API (default)
1775 * "1" - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
1776 *
1777 */
1778 #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
1779
1780 /**
1781 * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
1782 *
1783 * This variable can be set to the following values:
1784 * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
1785 * "1" - The window frame is interactive when the cursor is hidden
1786 *
1787 * By default SDL will allow interaction with the window frame when the cursor is hidden
1788 */
1789 #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
1790
1791 /**
1792 * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
1793 *
1794 * This variable can be set to the following values:
1795 * "0" - The window is activated when the SDL_ShowWindow function is called
1796 * "1" - The window is not activated when the SDL_ShowWindow function is called
1797 *
1798 * By default SDL will activate the window when the SDL_ShowWindow function is called
1799 */
1800 #define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
1801
1802 /** \brief Allows back-button-press events on Windows Phone to be marked as handled
1803 *
1804 * Windows Phone devices typically feature a Back button. When pressed,
1805 * the OS will emit back-button-press events, which apps are expected to
1806 * handle in an appropriate manner. If apps do not explicitly mark these
1807 * events as 'Handled', then the OS will invoke its default behavior for
1808 * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
1809 * terminate the app (and attempt to switch to the previous app, or to the
1810 * device's home screen).
1811 *
1812 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
1813 * to mark back-button-press events as Handled, if and when one is sent to
1814 * the app.
1815 *
1816 * Internally, Windows Phone sends back button events as parameters to
1817 * special back-button-press callback functions. Apps that need to respond
1818 * to back-button-press events are expected to register one or more
1819 * callback functions for such, shortly after being launched (during the
1820 * app's initialization phase). After the back button is pressed, the OS
1821 * will invoke these callbacks. If the app's callback(s) do not explicitly
1822 * mark the event as handled by the time they return, or if the app never
1823 * registers one of these callback, the OS will consider the event
1824 * un-handled, and it will apply its default back button behavior (terminate
1825 * the app).
1826 *
1827 * SDL registers its own back-button-press callback with the Windows Phone
1828 * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
1829 * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
1830 * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
1831 * If the hint's value is set to "1", the back button event's Handled
1832 * property will get set to 'true'. If the hint's value is set to something
1833 * else, or if it is unset, SDL will leave the event's Handled property
1834 * alone. (By default, the OS sets this property to 'false', to note.)
1835 *
1836 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
1837 * back button is pressed, or can set it in direct-response to a back button
1838 * being pressed.
1839 *
1840 * In order to get notified when a back button is pressed, SDL apps should
1841 * register a callback function with SDL_AddEventWatch(), and have it listen
1842 * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
1843 * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
1844 * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
1845 * set by such a callback, will be applied to the OS' current
1846 * back-button-press event.
1847 *
1848 * More details on back button behavior in Windows Phone apps can be found
1849 * at the following page, on Microsoft's developer site:
1850 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
1851 */
1852 #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
1853
1854 /** \brief Label text for a WinRT app's privacy policy link
1855 *
1856 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
1857 * Microsoft mandates that this policy be available via the Windows Settings charm.
1858 * SDL provides code to add a link there, with its label text being set via the
1859 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1860 *
1861 * Please note that a privacy policy's contents are not set via this hint. A separate
1862 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
1863 * policy.
1864 *
1865 * The contents of this hint should be encoded as a UTF8 string.
1866 *
1867 * The default value is "Privacy Policy". This hint should only be set during app
1868 * initialization, preferably before any calls to SDL_Init().
1869 *
1870 * For additional information on linking to a privacy policy, see the documentation for
1871 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
1872 */
1873 #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
1874
1875 /**
1876 * \brief A URL to a WinRT app's privacy policy
1877 *
1878 * All network-enabled WinRT apps must make a privacy policy available to its
1879 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
1880 * be available in the Windows Settings charm, as accessed from within the app.
1881 * SDL provides code to add a URL-based link there, which can point to the app's
1882 * privacy policy.
1883 *
1884 * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
1885 * before calling any SDL_Init() functions. The contents of the hint should
1886 * be a valid URL. For example, "http://www.example.com".
1887 *
1888 * The default value is "", which will prevent SDL from adding a privacy policy
1889 * link to the Settings charm. This hint should only be set during app init.
1890 *
1891 * The label text of an app's "Privacy Policy" link may be customized via another
1892 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1893 *
1894 * Please note that on Windows Phone, Microsoft does not provide standard UI
1895 * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
1896 * will not get used on that platform. Network-enabled phone apps should display
1897 * their privacy policy through some other, in-app means.
1898 */
1899 #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
1900
1901 /**
1902 * \brief Mark X11 windows as override-redirect.
1903 *
1904 * If set, this _might_ increase framerate at the expense of the desktop
1905 * not working as expected. Override-redirect windows aren't noticed by the
1906 * window manager at all.
1907 *
1908 * You should probably only use this for fullscreen windows, and you probably
1909 * shouldn't even use it for that. But it's here if you want to try!
1910 */
1911 #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
1912
1913 /**
1914 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
1915 *
1916 * The variable can be set to the following values:
1917 * "0" - Disable XInput detection (only uses direct input)
1918 * "1" - Enable XInput detection (the default)
1919 */
1920 #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
1921
1922 /**
1923 * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
1924 *
1925 * This hint is for backwards compatibility only and will be removed in SDL 2.1
1926 *
1927 * The default value is "0". This hint must be set before SDL_Init()
1928 */
1929 #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
1930
1931 /**
1932 * \brief A variable that causes SDL to not ignore audio "monitors"
1933 *
1934 * This is currently only used for PulseAudio and ignored elsewhere.
1935 *
1936 * By default, SDL ignores audio devices that aren't associated with physical
1937 * hardware. Changing this hint to "1" will expose anything SDL sees that
1938 * appears to be an audio source or sink. This will add "devices" to the list
1939 * that the user probably doesn't want or need, but it can be useful in
1940 * scenarios where you want to hook up SDL to some sort of virtual device,
1941 * etc.
1942 *
1943 * The default value is "0". This hint must be set before SDL_Init().
1944 *
1945 * This hint is available since SDL 2.0.16. Before then, virtual devices are
1946 * always ignored.
1947 */
1948 #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
1949
1950 /**
1951 * \brief A variable that forces X11 windows to create as a custom type.
1952 *
1953 * This is currently only used for X11 and ignored elsewhere.
1954 *
1955 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
1956 * to report to the window manager the type of window it wants to create.
1957 * This might be set to various things if SDL_WINDOW_TOOLTIP or
1958 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
1959 * haven't set a specific type, this hint can be used to specify a custom
1960 * type. For example, a dock window might set this to
1961 * "_NET_WM_WINDOW_TYPE_DOCK".
1962 *
1963 * If not set or set to "", this hint is ignored. This hint must be set
1964 * before the SDL_CreateWindow() call that it is intended to affect.
1965 *
1966 * This hint is available since SDL 2.0.22.
1967 */
1968 #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
1969
1970 /**
1971 * \brief A variable that decides whether to send SDL_QUIT when closing the final window.
1972 *
1973 * By default, SDL sends an SDL_QUIT event when there is only one window
1974 * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
1975 * apps would also take the loss of this window as a signal to terminate the
1976 * program.
1977 *
1978 * However, it's not unreasonable in some cases to have the program continue
1979 * to live on, perhaps to create new windows later.
1980 *
1981 * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
1982 * when the final window is requesting to close. Note that in this case,
1983 * there are still other legitimate reasons one might get an SDL_QUIT
1984 * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
1985 * on Unix, etc.
1986 *
1987 * The default value is "1". This hint can be changed at any time.
1988 *
1989 * This hint is available since SDL 2.0.22. Before then, you always get
1990 * an SDL_QUIT event when closing the final window.
1991 */
1992 #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
1993
1994
1995 /**
1996 * \brief A variable that decides what video backend to use.
1997 *
1998 * By default, SDL will try all available video backends in a reasonable
1999 * order until it finds one that can work, but this hint allows the app
2000 * or user to force a specific target, such as "x11" if, say, you are
2001 * on Wayland but want to try talking to the X server instead.
2002 *
2003 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2004 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2005 * it was upgraded to a full SDL hint, so you can set the environment
2006 * variable as usual or programatically set the hint with SDL_SetHint,
2007 * which won't propagate to child processes.
2008 *
2009 * The default value is unset, in which case SDL will try to figure out
2010 * the best video backend on your behalf. This hint needs to be set
2011 * before SDL_Init() is called to be useful.
2012 *
2013 * This hint is available since SDL 2.0.22. Before then, you could set
2014 * the environment variable to get the same effect.
2015 */
2016 #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
2017
2018 /**
2019 * \brief A variable that decides what audio backend to use.
2020 *
2021 * By default, SDL will try all available audio backends in a reasonable
2022 * order until it finds one that can work, but this hint allows the app
2023 * or user to force a specific target, such as "alsa" if, say, you are
2024 * on PulseAudio but want to try talking to the lower level instead.
2025 *
2026 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2027 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2028 * it was upgraded to a full SDL hint, so you can set the environment
2029 * variable as usual or programatically set the hint with SDL_SetHint,
2030 * which won't propagate to child processes.
2031 *
2032 * The default value is unset, in which case SDL will try to figure out
2033 * the best audio backend on your behalf. This hint needs to be set
2034 * before SDL_Init() is called to be useful.
2035 *
2036 * This hint is available since SDL 2.0.22. Before then, you could set
2037 * the environment variable to get the same effect.
2038 */
2039 #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
2040
2041
2042 /**
2043 * \brief An enumeration of hint priorities
2044 */
2045 typedef enum
2046 {
2047 SDL_HINT_DEFAULT,
2048 SDL_HINT_NORMAL,
2049 SDL_HINT_OVERRIDE
2050 } SDL_HintPriority;
2051
2052
2053 /**
2054 * Set a hint with a specific priority.
2055 *
2056 * The priority controls the behavior when setting a hint that already has a
2057 * value. Hints will replace existing hints of their priority and lower.
2058 * Environment variables are considered to have override priority.
2059 *
2060 * \param name the hint to set
2061 * \param value the value of the hint variable
2062 * \param priority the SDL_HintPriority level for the hint
2063 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2064 *
2065 * \since This function is available since SDL 2.0.0.
2066 *
2067 * \sa SDL_GetHint
2068 * \sa SDL_SetHint
2069 */
2070 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
2071 const char *value,
2072 SDL_HintPriority priority);
2073
2074 /**
2075 * Set a hint with normal priority.
2076 *
2077 * Hints will not be set if there is an existing override hint or environment
2078 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
2079 * set the hint with override priority instead.
2080 *
2081 * \param name the hint to set
2082 * \param value the value of the hint variable
2083 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2084 *
2085 * \since This function is available since SDL 2.0.0.
2086 *
2087 * \sa SDL_GetHint
2088 * \sa SDL_SetHintWithPriority
2089 */
2090 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
2091 const char *value);
2092
2093 /**
2094 * Get the value of a hint.
2095 *
2096 * \param name the hint to query
2097 * \returns the string value of a hint or NULL if the hint isn't set.
2098 *
2099 * \since This function is available since SDL 2.0.0.
2100 *
2101 * \sa SDL_SetHint
2102 * \sa SDL_SetHintWithPriority
2103 */
2104 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
2105
2106 /**
2107 * Get the boolean value of a hint variable.
2108 *
2109 * \param name the name of the hint to get the boolean value from
2110 * \param default_value the value to return if the hint does not exist
2111 * \returns the boolean value of a hint or the provided default value if the
2112 * hint does not exist.
2113 *
2114 * \since This function is available since SDL 2.0.5.
2115 *
2116 * \sa SDL_GetHint
2117 * \sa SDL_SetHint
2118 */
2119 extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
2120
2121 /**
2122 * Type definition of the hint callback function.
2123 *
2124 * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
2125 * \param name what was passed as `name` to SDL_AddHintCallback()
2126 * \param oldValue the previous hint value
2127 * \param newValue the new value hint is to be set to
2128 */
2129 typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
2130
2131 /**
2132 * Add a function to watch a particular hint.
2133 *
2134 * \param name the hint to watch
2135 * \param callback An SDL_HintCallback function that will be called when the
2136 * hint value changes
2137 * \param userdata a pointer to pass to the callback function
2138 *
2139 * \since This function is available since SDL 2.0.0.
2140 *
2141 * \sa SDL_DelHintCallback
2142 */
2143 extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
2144 SDL_HintCallback callback,
2145 void *userdata);
2146
2147 /**
2148 * Remove a function watching a particular hint.
2149 *
2150 * \param name the hint being watched
2151 * \param callback An SDL_HintCallback function that will be called when the
2152 * hint value changes
2153 * \param userdata a pointer being passed to the callback function
2154 *
2155 * \since This function is available since SDL 2.0.0.
2156 *
2157 * \sa SDL_AddHintCallback
2158 */
2159 extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
2160 SDL_HintCallback callback,
2161 void *userdata);
2162
2163 /**
2164 * Clear all hints.
2165 *
2166 * This function is automatically called during SDL_Quit().
2167 *
2168 * \since This function is available since SDL 2.0.0.
2169 */
2170 extern DECLSPEC void SDLCALL SDL_ClearHints(void);
2171
2172
2173 /* Ends C function definitions when using C++ */
2174 #ifdef __cplusplus
2175 }
2176 #endif
2177 #include <SDL2/close_code.h>
2178
2179 #endif /* SDL_hints_h_ */
2180
2181 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_joystick.h
23 *
24 * Include file for SDL joystick event handling
25 *
26 * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
27 * behind a device_index changing as joysticks are plugged and unplugged.
28 *
29 * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
30 * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
31 *
32 * The term "player_index" is the number assigned to a player on a specific
33 * controller. For XInput controllers this returns the XInput user index.
34 * Many joysticks will not be able to supply this information.
35 *
36 * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
37 * the device (a X360 wired controller for example). This identifier is platform dependent.
38 */
39
40 #ifndef SDL_joystick_h_
41 #define SDL_joystick_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * \file SDL_joystick.h
54 *
55 * In order to use these functions, SDL_Init() must have been called
56 * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
57 * for joysticks, and load appropriate drivers.
58 *
59 * If you would like to receive joystick updates while the application
60 * is in the background, you should set the following hint before calling
61 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
62 */
63
64 /**
65 * The joystick structure used to identify an SDL joystick
66 */
67 struct _SDL_Joystick;
68 typedef struct _SDL_Joystick SDL_Joystick;
69
70 /* A structure that encodes the stable unique id for a joystick device */
71 typedef struct {
72 Uint8 data[16];
73 } SDL_JoystickGUID;
74
75 /**
76 * This is a unique ID for a joystick for the time it is connected to the system,
77 * and is never reused for the lifetime of the application. If the joystick is
78 * disconnected and reconnected, it will get a new ID.
79 *
80 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
81 */
82 typedef Sint32 SDL_JoystickID;
83
84 typedef enum
85 {
86 SDL_JOYSTICK_TYPE_UNKNOWN,
87 SDL_JOYSTICK_TYPE_GAMECONTROLLER,
88 SDL_JOYSTICK_TYPE_WHEEL,
89 SDL_JOYSTICK_TYPE_ARCADE_STICK,
90 SDL_JOYSTICK_TYPE_FLIGHT_STICK,
91 SDL_JOYSTICK_TYPE_DANCE_PAD,
92 SDL_JOYSTICK_TYPE_GUITAR,
93 SDL_JOYSTICK_TYPE_DRUM_KIT,
94 SDL_JOYSTICK_TYPE_ARCADE_PAD,
95 SDL_JOYSTICK_TYPE_THROTTLE
96 } SDL_JoystickType;
97
98 typedef enum
99 {
100 SDL_JOYSTICK_POWER_UNKNOWN = -1,
101 SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
102 SDL_JOYSTICK_POWER_LOW, /* <= 20% */
103 SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
104 SDL_JOYSTICK_POWER_FULL, /* <= 100% */
105 SDL_JOYSTICK_POWER_WIRED,
106 SDL_JOYSTICK_POWER_MAX
107 } SDL_JoystickPowerLevel;
108
109 /* Set max recognized G-force from accelerometer
110 See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
111 */
112 #define SDL_IPHONE_MAX_GFORCE 5.0
113
114
115 /* Function prototypes */
116
117 /**
118 * Locking for multi-threaded access to the joystick API
119 *
120 * If you are using the joystick API or handling events from multiple threads
121 * you should use these locking functions to protect access to the joysticks.
122 *
123 * In particular, you are guaranteed that the joystick list won't change, so
124 * the API functions that take a joystick index will be valid, and joystick
125 * and game controller events will not be delivered.
126 *
127 * \since This function is available since SDL 2.0.7.
128 */
129 extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
130
131
132 /**
133 * Unlocking for multi-threaded access to the joystick API
134 *
135 * If you are using the joystick API or handling events from multiple threads
136 * you should use these locking functions to protect access to the joysticks.
137 *
138 * In particular, you are guaranteed that the joystick list won't change, so
139 * the API functions that take a joystick index will be valid, and joystick
140 * and game controller events will not be delivered.
141 *
142 * \since This function is available since SDL 2.0.7.
143 */
144 extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
145
146 /**
147 * Count the number of joysticks attached to the system.
148 *
149 * \returns the number of attached joysticks on success or a negative error
150 * code on failure; call SDL_GetError() for more information.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_JoystickName
155 * \sa SDL_JoystickOpen
156 */
157 extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
158
159 /**
160 * Get the implementation dependent name of a joystick.
161 *
162 * This can be called before any joysticks are opened.
163 *
164 * \param device_index the index of the joystick to query (the N'th joystick
165 * on the system)
166 * \returns the name of the selected joystick. If no name can be found, this
167 * function returns NULL; call SDL_GetError() for more information.
168 *
169 * \since This function is available since SDL 2.0.0.
170 *
171 * \sa SDL_JoystickName
172 * \sa SDL_JoystickOpen
173 */
174 extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
175
176 /**
177 * Get the player index of a joystick, or -1 if it's not available This can be
178 * called before any joysticks are opened.
179 *
180 * \since This function is available since SDL 2.0.9.
181 */
182 extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
183
184 /**
185 * Get the implementation-dependent GUID for the joystick at a given device
186 * index.
187 *
188 * This function can be called before any joysticks are opened.
189 *
190 * \param device_index the index of the joystick to query (the N'th joystick
191 * on the system
192 * \returns the GUID of the selected joystick. If called on an invalid index,
193 * this function returns a zero GUID
194 *
195 * \since This function is available since SDL 2.0.0.
196 *
197 * \sa SDL_JoystickGetGUID
198 * \sa SDL_JoystickGetGUIDString
199 */
200 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
201
202 /**
203 * Get the USB vendor ID of a joystick, if available.
204 *
205 * This can be called before any joysticks are opened. If the vendor ID isn't
206 * available this function returns 0.
207 *
208 * \param device_index the index of the joystick to query (the N'th joystick
209 * on the system
210 * \returns the USB vendor ID of the selected joystick. If called on an
211 * invalid index, this function returns zero
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
216
217 /**
218 * Get the USB product ID of a joystick, if available.
219 *
220 * This can be called before any joysticks are opened. If the product ID isn't
221 * available this function returns 0.
222 *
223 * \param device_index the index of the joystick to query (the N'th joystick
224 * on the system
225 * \returns the USB product ID of the selected joystick. If called on an
226 * invalid index, this function returns zero
227 *
228 * \since This function is available since SDL 2.0.6.
229 */
230 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
231
232 /**
233 * Get the product version of a joystick, if available.
234 *
235 * This can be called before any joysticks are opened. If the product version
236 * isn't available this function returns 0.
237 *
238 * \param device_index the index of the joystick to query (the N'th joystick
239 * on the system
240 * \returns the product version of the selected joystick. If called on an
241 * invalid index, this function returns zero
242 *
243 * \since This function is available since SDL 2.0.6.
244 */
245 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
246
247 /**
248 * Get the type of a joystick, if available.
249 *
250 * This can be called before any joysticks are opened.
251 *
252 * \param device_index the index of the joystick to query (the N'th joystick
253 * on the system
254 * \returns the SDL_JoystickType of the selected joystick. If called on an
255 * invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
256 *
257 * \since This function is available since SDL 2.0.6.
258 */
259 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
260
261 /**
262 * Get the instance ID of a joystick.
263 *
264 * This can be called before any joysticks are opened. If the index is out of
265 * range, this function will return -1.
266 *
267 * \param device_index the index of the joystick to query (the N'th joystick
268 * on the system
269 * \returns the instance id of the selected joystick. If called on an invalid
270 * index, this function returns zero
271 *
272 * \since This function is available since SDL 2.0.6.
273 */
274 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
275
276 /**
277 * Open a joystick for use.
278 *
279 * The `device_index` argument refers to the N'th joystick presently
280 * recognized by SDL on the system. It is **NOT** the same as the instance ID
281 * used to identify the joystick in future events. See
282 * SDL_JoystickInstanceID() for more details about instance IDs.
283 *
284 * The joystick subsystem must be initialized before a joystick can be opened
285 * for use.
286 *
287 * \param device_index the index of the joystick to query
288 * \returns a joystick identifier or NULL if an error occurred; call
289 * SDL_GetError() for more information.
290 *
291 * \since This function is available since SDL 2.0.0.
292 *
293 * \sa SDL_JoystickClose
294 * \sa SDL_JoystickInstanceID
295 */
296 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
297
298 /**
299 * Get the SDL_Joystick associated with an instance id.
300 *
301 * \param instance_id the instance id to get the SDL_Joystick for
302 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
303 * for more information.
304 *
305 * \since This function is available since SDL 2.0.4.
306 */
307 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
308
309 /**
310 * Get the SDL_Joystick associated with a player index.
311 *
312 * \param player_index the player index to get the SDL_Joystick for
313 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
314 * for more information.
315 *
316 * \since This function is available since SDL 2.0.12.
317 */
318 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
319
320 /**
321 * Attach a new virtual joystick.
322 *
323 * \returns the joystick's device index, or -1 if an error occurred.
324 *
325 * \since This function is available since SDL 2.0.14.
326 */
327 extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
328 int naxes,
329 int nbuttons,
330 int nhats);
331
332 /**
333 * Detach a virtual joystick.
334 *
335 * \param device_index a value previously returned from
336 * SDL_JoystickAttachVirtual()
337 * \returns 0 on success, or -1 if an error occurred.
338 *
339 * \since This function is available since SDL 2.0.14.
340 */
341 extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
342
343 /**
344 * Query whether or not the joystick at a given device index is virtual.
345 *
346 * \param device_index a joystick device index.
347 * \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
348 *
349 * \since This function is available since SDL 2.0.14.
350 */
351 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
352
353 /**
354 * Set values on an opened, virtual-joystick's axis.
355 *
356 * Please note that values set here will not be applied until the next call to
357 * SDL_JoystickUpdate, which can either be called directly, or can be called
358 * indirectly through various other SDL APIs, including, but not limited to
359 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
360 * SDL_WaitEvent.
361 *
362 * \param joystick the virtual joystick on which to set state.
363 * \param axis the specific axis on the virtual joystick to set.
364 * \param value the new value for the specified axis.
365 * \returns 0 on success, -1 on error.
366 *
367 * \since This function is available since SDL 2.0.14.
368 */
369 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
370
371 /**
372 * Set values on an opened, virtual-joystick's button.
373 *
374 * Please note that values set here will not be applied until the next call to
375 * SDL_JoystickUpdate, which can either be called directly, or can be called
376 * indirectly through various other SDL APIs, including, but not limited to
377 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
378 * SDL_WaitEvent.
379 *
380 * \param joystick the virtual joystick on which to set state.
381 * \param button the specific button on the virtual joystick to set.
382 * \param value the new value for the specified button.
383 * \returns 0 on success, -1 on error.
384 *
385 * \since This function is available since SDL 2.0.14.
386 */
387 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
388
389 /**
390 * Set values on an opened, virtual-joystick's hat.
391 *
392 * Please note that values set here will not be applied until the next call to
393 * SDL_JoystickUpdate, which can either be called directly, or can be called
394 * indirectly through various other SDL APIs, including, but not limited to
395 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
396 * SDL_WaitEvent.
397 *
398 * \param joystick the virtual joystick on which to set state.
399 * \param hat the specific hat on the virtual joystick to set.
400 * \param value the new value for the specified hat.
401 * \returns 0 on success, -1 on error.
402 *
403 * \since This function is available since SDL 2.0.14.
404 */
405 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
406
407 /**
408 * Get the implementation dependent name of a joystick.
409 *
410 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
411 * \returns the name of the selected joystick. If no name can be found, this
412 * function returns NULL; call SDL_GetError() for more information.
413 *
414 * \since This function is available since SDL 2.0.0.
415 *
416 * \sa SDL_JoystickNameForIndex
417 * \sa SDL_JoystickOpen
418 */
419 extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
420
421 /**
422 * Get the player index of an opened joystick.
423 *
424 * For XInput controllers this returns the XInput user index. Many joysticks
425 * will not be able to supply this information.
426 *
427 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
428 * \returns the player index, or -1 if it's not available.
429 *
430 * \since This function is available since SDL 2.0.9.
431 */
432 extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
433
434 /**
435 * Set the player index of an opened joystick.
436 *
437 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
438 * \param player_index the player index to set.
439 *
440 * \since This function is available since SDL 2.0.12.
441 */
442 extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
443
444 /**
445 * Get the implementation-dependent GUID for the joystick.
446 *
447 * This function requires an open joystick.
448 *
449 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
450 * \returns the GUID of the given joystick. If called on an invalid index,
451 * this function returns a zero GUID; call SDL_GetError() for more
452 * information.
453 *
454 * \since This function is available since SDL 2.0.0.
455 *
456 * \sa SDL_JoystickGetDeviceGUID
457 * \sa SDL_JoystickGetGUIDString
458 */
459 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
460
461 /**
462 * Get the USB vendor ID of an opened joystick, if available.
463 *
464 * If the vendor ID isn't available this function returns 0.
465 *
466 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
467 * \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
468 *
469 * \since This function is available since SDL 2.0.6.
470 */
471 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
472
473 /**
474 * Get the USB product ID of an opened joystick, if available.
475 *
476 * If the product ID isn't available this function returns 0.
477 *
478 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
479 * \returns the USB product ID of the selected joystick, or 0 if unavailable.
480 *
481 * \since This function is available since SDL 2.0.6.
482 */
483 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
484
485 /**
486 * Get the product version of an opened joystick, if available.
487 *
488 * If the product version isn't available this function returns 0.
489 *
490 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
491 * \returns the product version of the selected joystick, or 0 if unavailable.
492 *
493 * \since This function is available since SDL 2.0.6.
494 */
495 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
496
497 /**
498 * Get the serial number of an opened joystick, if available.
499 *
500 * Returns the serial number of the joystick, or NULL if it is not available.
501 *
502 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
503 * \returns the serial number of the selected joystick, or NULL if
504 * unavailable.
505 *
506 * \since This function is available since SDL 2.0.14.
507 */
508 extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
509
510 /**
511 * Get the type of an opened joystick.
512 *
513 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
514 * \returns the SDL_JoystickType of the selected joystick.
515 *
516 * \since This function is available since SDL 2.0.6.
517 */
518 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
519
520 /**
521 * Get an ASCII string representation for a given SDL_JoystickGUID.
522 *
523 * You should supply at least 33 bytes for pszGUID.
524 *
525 * \param guid the SDL_JoystickGUID you wish to convert to string
526 * \param pszGUID buffer in which to write the ASCII string
527 * \param cbGUID the size of pszGUID
528 *
529 * \since This function is available since SDL 2.0.0.
530 *
531 * \sa SDL_JoystickGetDeviceGUID
532 * \sa SDL_JoystickGetGUID
533 * \sa SDL_JoystickGetGUIDFromString
534 */
535 extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
536
537 /**
538 * Convert a GUID string into a SDL_JoystickGUID structure.
539 *
540 * Performs no error checking. If this function is given a string containing
541 * an invalid GUID, the function will silently succeed, but the GUID generated
542 * will not be useful.
543 *
544 * \param pchGUID string containing an ASCII representation of a GUID
545 * \returns a SDL_JoystickGUID structure.
546 *
547 * \since This function is available since SDL 2.0.0.
548 *
549 * \sa SDL_JoystickGetGUIDString
550 */
551 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
552
553 /**
554 * Get the status of a specified joystick.
555 *
556 * \param joystick the joystick to query
557 * \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
558 * call SDL_GetError() for more information.
559 *
560 * \since This function is available since SDL 2.0.0.
561 *
562 * \sa SDL_JoystickClose
563 * \sa SDL_JoystickOpen
564 */
565 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
566
567 /**
568 * Get the instance ID of an opened joystick.
569 *
570 * \param joystick an SDL_Joystick structure containing joystick information
571 * \returns the instance ID of the specified joystick on success or a negative
572 * error code on failure; call SDL_GetError() for more information.
573 *
574 * \since This function is available since SDL 2.0.0.
575 *
576 * \sa SDL_JoystickOpen
577 */
578 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
579
580 /**
581 * Get the number of general axis controls on a joystick.
582 *
583 * Often, the directional pad on a game controller will either look like 4
584 * separate buttons or a POV hat, and not axes, but all of this is up to the
585 * device and platform.
586 *
587 * \param joystick an SDL_Joystick structure containing joystick information
588 * \returns the number of axis controls/number of axes on success or a
589 * negative error code on failure; call SDL_GetError() for more
590 * information.
591 *
592 * \since This function is available since SDL 2.0.0.
593 *
594 * \sa SDL_JoystickGetAxis
595 * \sa SDL_JoystickOpen
596 */
597 extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
598
599 /**
600 * Get the number of trackballs on a joystick.
601 *
602 * Joystick trackballs have only relative motion events associated with them
603 * and their state cannot be polled.
604 *
605 * Most joysticks do not have trackballs.
606 *
607 * \param joystick an SDL_Joystick structure containing joystick information
608 * \returns the number of trackballs on success or a negative error code on
609 * failure; call SDL_GetError() for more information.
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_JoystickGetBall
614 */
615 extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
616
617 /**
618 * Get the number of POV hats on a joystick.
619 *
620 * \param joystick an SDL_Joystick structure containing joystick information
621 * \returns the number of POV hats on success or a negative error code on
622 * failure; call SDL_GetError() for more information.
623 *
624 * \since This function is available since SDL 2.0.0.
625 *
626 * \sa SDL_JoystickGetHat
627 * \sa SDL_JoystickOpen
628 */
629 extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
630
631 /**
632 * Get the number of buttons on a joystick.
633 *
634 * \param joystick an SDL_Joystick structure containing joystick information
635 * \returns the number of buttons on success or a negative error code on
636 * failure; call SDL_GetError() for more information.
637 *
638 * \since This function is available since SDL 2.0.0.
639 *
640 * \sa SDL_JoystickGetButton
641 * \sa SDL_JoystickOpen
642 */
643 extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
644
645 /**
646 * Update the current state of the open joysticks.
647 *
648 * This is called automatically by the event loop if any joystick events are
649 * enabled.
650 *
651 * \since This function is available since SDL 2.0.0.
652 *
653 * \sa SDL_JoystickEventState
654 */
655 extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
656
657 /**
658 * Enable/disable joystick event polling.
659 *
660 * If joystick events are disabled, you must call SDL_JoystickUpdate()
661 * yourself and manually check the state of the joystick when you want
662 * joystick information.
663 *
664 * It is recommended that you leave joystick event handling enabled.
665 *
666 * **WARNING**: Calling this function may delete all events currently in SDL's
667 * event queue.
668 *
669 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
670 * \returns 1 if enabled, 0 if disabled, or a negative error code on failure;
671 * call SDL_GetError() for more information.
672 *
673 * If `state` is `SDL_QUERY` then the current state is returned,
674 * otherwise the new processing state is returned.
675 *
676 * \since This function is available since SDL 2.0.0.
677 *
678 * \sa SDL_GameControllerEventState
679 */
680 extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
681
682 #define SDL_JOYSTICK_AXIS_MAX 32767
683 #define SDL_JOYSTICK_AXIS_MIN -32768
684
685 /**
686 * Get the current state of an axis control on a joystick.
687 *
688 * SDL makes no promises about what part of the joystick any given axis refers
689 * to. Your game should have some sort of configuration UI to let users
690 * specify what each axis should be bound to. Alternately, SDL's higher-level
691 * Game Controller API makes a great effort to apply order to this lower-level
692 * interface, so you know that a specific axis is the "left thumb stick," etc.
693 *
694 * The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
695 * 32767) representing the current position of the axis. It may be necessary
696 * to impose certain tolerances on these values to account for jitter.
697 *
698 * \param joystick an SDL_Joystick structure containing joystick information
699 * \param axis the axis to query; the axis indices start at index 0
700 * \returns a 16-bit signed integer representing the current position of the
701 * axis or 0 on failure; call SDL_GetError() for more information.
702 *
703 * \since This function is available since SDL 2.0.0.
704 *
705 * \sa SDL_JoystickNumAxes
706 */
707 extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
708 int axis);
709
710 /**
711 * Get the initial state of an axis control on a joystick.
712 *
713 * The state is a value ranging from -32768 to 32767.
714 *
715 * The axis indices start at index 0.
716 *
717 * \param joystick an SDL_Joystick structure containing joystick information
718 * \param axis the axis to query; the axis indices start at index 0
719 * \param state Upon return, the initial value is supplied here.
720 * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
721 *
722 * \since This function is available since SDL 2.0.6.
723 */
724 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
725 int axis, Sint16 *state);
726
727 /**
728 * \name Hat positions
729 */
730 /* @{ */
731 #define SDL_HAT_CENTERED 0x00
732 #define SDL_HAT_UP 0x01
733 #define SDL_HAT_RIGHT 0x02
734 #define SDL_HAT_DOWN 0x04
735 #define SDL_HAT_LEFT 0x08
736 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
737 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
738 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
739 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
740 /* @} */
741
742 /**
743 * Get the current state of a POV hat on a joystick.
744 *
745 * The returned value will be one of the following positions:
746 *
747 * - `SDL_HAT_CENTERED`
748 * - `SDL_HAT_UP`
749 * - `SDL_HAT_RIGHT`
750 * - `SDL_HAT_DOWN`
751 * - `SDL_HAT_LEFT`
752 * - `SDL_HAT_RIGHTUP`
753 * - `SDL_HAT_RIGHTDOWN`
754 * - `SDL_HAT_LEFTUP`
755 * - `SDL_HAT_LEFTDOWN`
756 *
757 * \param joystick an SDL_Joystick structure containing joystick information
758 * \param hat the hat index to get the state from; indices start at index 0
759 * \returns the current hat position.
760 *
761 * \since This function is available since SDL 2.0.0.
762 *
763 * \sa SDL_JoystickNumHats
764 */
765 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
766 int hat);
767
768 /**
769 * Get the ball axis change since the last poll.
770 *
771 * Trackballs can only return relative motion since the last call to
772 * SDL_JoystickGetBall(), these motion deltas are placed into `dx` and `dy`.
773 *
774 * Most joysticks do not have trackballs.
775 *
776 * \param joystick the SDL_Joystick to query
777 * \param ball the ball index to query; ball indices start at index 0
778 * \param dx stores the difference in the x axis position since the last poll
779 * \param dy stores the difference in the y axis position since the last poll
780 * \returns 0 on success or a negative error code on failure; call
781 * SDL_GetError() for more information.
782 *
783 * \since This function is available since SDL 2.0.0.
784 *
785 * \sa SDL_JoystickNumBalls
786 */
787 extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
788 int ball, int *dx, int *dy);
789
790 /**
791 * Get the current state of a button on a joystick.
792 *
793 * \param joystick an SDL_Joystick structure containing joystick information
794 * \param button the button index to get the state from; indices start at
795 * index 0
796 * \returns 1 if the specified button is pressed, 0 otherwise.
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_JoystickNumButtons
801 */
802 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
803 int button);
804
805 /**
806 * Start a rumble effect.
807 *
808 * Each call to this function cancels any previous rumble effect, and calling
809 * it with 0 intensity stops any rumbling.
810 *
811 * \param joystick The joystick to vibrate
812 * \param low_frequency_rumble The intensity of the low frequency (left)
813 * rumble motor, from 0 to 0xFFFF
814 * \param high_frequency_rumble The intensity of the high frequency (right)
815 * rumble motor, from 0 to 0xFFFF
816 * \param duration_ms The duration of the rumble effect, in milliseconds
817 * \returns 0, or -1 if rumble isn't supported on this joystick
818 *
819 * \since This function is available since SDL 2.0.9.
820 *
821 * \sa SDL_JoystickHasRumble
822 */
823 extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
824
825 /**
826 * Start a rumble effect in the joystick's triggers
827 *
828 * Each call to this function cancels any previous trigger rumble effect, and
829 * calling it with 0 intensity stops any rumbling.
830 *
831 * Note that this is rumbling of the _triggers_ and not the game controller as
832 * a whole. This is currently only supported on Xbox One controllers. If you
833 * want the (more common) whole-controller rumble, use SDL_JoystickRumble()
834 * instead.
835 *
836 * \param joystick The joystick to vibrate
837 * \param left_rumble The intensity of the left trigger rumble motor, from 0
838 * to 0xFFFF
839 * \param right_rumble The intensity of the right trigger rumble motor, from 0
840 * to 0xFFFF
841 * \param duration_ms The duration of the rumble effect, in milliseconds
842 * \returns 0, or -1 if trigger rumble isn't supported on this joystick
843 *
844 * \since This function is available since SDL 2.0.14.
845 *
846 * \sa SDL_JoystickHasRumbleTriggers
847 */
848 extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
849
850 /**
851 * Query whether a joystick has an LED.
852 *
853 * An example of a joystick LED is the light on the back of a PlayStation 4's
854 * DualShock 4 controller.
855 *
856 * \param joystick The joystick to query
857 * \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
858 *
859 * \since This function is available since SDL 2.0.14.
860 */
861 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
862
863 /**
864 * Query whether a joystick has rumble support.
865 *
866 * \param joystick The joystick to query
867 * \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
868 *
869 * \since This function is available since SDL 2.0.18.
870 *
871 * \sa SDL_JoystickRumble
872 */
873 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
874
875 /**
876 * Query whether a joystick has rumble support on triggers.
877 *
878 * \param joystick The joystick to query
879 * \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
880 *
881 * \since This function is available since SDL 2.0.18.
882 *
883 * \sa SDL_JoystickRumbleTriggers
884 */
885 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
886
887 /**
888 * Update a joystick's LED color.
889 *
890 * An example of a joystick LED is the light on the back of a PlayStation 4's
891 * DualShock 4 controller.
892 *
893 * \param joystick The joystick to update
894 * \param red The intensity of the red LED
895 * \param green The intensity of the green LED
896 * \param blue The intensity of the blue LED
897 * \returns 0 on success, -1 if this joystick does not have a modifiable LED
898 *
899 * \since This function is available since SDL 2.0.14.
900 */
901 extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
902
903 /**
904 * Send a joystick specific effect packet
905 *
906 * \param joystick The joystick to affect
907 * \param data The data to send to the joystick
908 * \param size The size of the data to send to the joystick
909 * \returns 0, or -1 if this joystick or driver doesn't support effect packets
910 *
911 * \since This function is available since SDL 2.0.16.
912 */
913 extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
914
915 /**
916 * Close a joystick previously opened with SDL_JoystickOpen().
917 *
918 * \param joystick The joystick device to close
919 *
920 * \since This function is available since SDL 2.0.0.
921 *
922 * \sa SDL_JoystickOpen
923 */
924 extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
925
926 /**
927 * Get the battery level of a joystick as SDL_JoystickPowerLevel.
928 *
929 * \param joystick the SDL_Joystick to query
930 * \returns the current battery level as SDL_JoystickPowerLevel on success or
931 * `SDL_JOYSTICK_POWER_UNKNOWN` if it is unknown
932 *
933 * \since This function is available since SDL 2.0.4.
934 */
935 extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
936
937 /* Ends C function definitions when using C++ */
938 #ifdef __cplusplus
939 }
940 #endif
941 #include <SDL2/close_code.h>
942
943 #endif /* SDL_joystick_h_ */
944
945 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keyboard.h
23 *
24 * Include file for SDL keyboard event handling
25 */
26
27 #ifndef SDL_keyboard_h_
28 #define SDL_keyboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_keycode.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The SDL keysym structure, used in key events.
43 *
44 * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
45 */
46 typedef struct SDL_Keysym
47 {
48 SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */
49 SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */
50 Uint16 mod; /**< current key modifiers */
51 Uint32 unused;
52 } SDL_Keysym;
53
54 /* Function prototypes */
55
56 /**
57 * Query the window which currently has keyboard focus.
58 *
59 * \returns the window with keyboard focus.
60 *
61 * \since This function is available since SDL 2.0.0.
62 */
63 extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
64
65 /**
66 * Get a snapshot of the current state of the keyboard.
67 *
68 * The pointer returned is a pointer to an internal SDL array. It will be
69 * valid for the whole lifetime of the application and should not be freed by
70 * the caller.
71 *
72 * A array element with a value of 1 means that the key is pressed and a value
73 * of 0 means that it is not. Indexes into this array are obtained by using
74 * SDL_Scancode values.
75 *
76 * Use SDL_PumpEvents() to update the state array.
77 *
78 * This function gives you the current state after all events have been
79 * processed, so if a key or button has been pressed and released before you
80 * process events, then the pressed state will never show up in the
81 * SDL_GetKeyboardState() calls.
82 *
83 * Note: This function doesn't take into account whether shift has been
84 * pressed or not.
85 *
86 * \param numkeys if non-NULL, receives the length of the returned array
87 * \returns a pointer to an array of key states.
88 *
89 * \since This function is available since SDL 2.0.0.
90 *
91 * \sa SDL_PumpEvents
92 */
93 extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
94
95 /**
96 * Get the current key modifier state for the keyboard.
97 *
98 * \returns an OR'd combination of the modifier keys for the keyboard. See
99 * SDL_Keymod for details.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_GetKeyboardState
104 * \sa SDL_SetModState
105 */
106 extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
107
108 /**
109 * Set the current key modifier state for the keyboard.
110 *
111 * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
112 * modifier key states on your application. Simply pass your desired modifier
113 * states into `modstate`. This value may be a bitwise, OR'd combination of
114 * SDL_Keymod values.
115 *
116 * This does not change the keyboard state, only the key modifier flags that
117 * SDL reports.
118 *
119 * \param modstate the desired SDL_Keymod for the keyboard
120 *
121 * \since This function is available since SDL 2.0.0.
122 *
123 * \sa SDL_GetModState
124 */
125 extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
126
127 /**
128 * Get the key code corresponding to the given scancode according to the
129 * current keyboard layout.
130 *
131 * See SDL_Keycode for details.
132 *
133 * \param scancode the desired SDL_Scancode to query
134 * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
135 *
136 * \since This function is available since SDL 2.0.0.
137 *
138 * \sa SDL_GetKeyName
139 * \sa SDL_GetScancodeFromKey
140 */
141 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
142
143 /**
144 * Get the scancode corresponding to the given key code according to the
145 * current keyboard layout.
146 *
147 * See SDL_Scancode for details.
148 *
149 * \param key the desired SDL_Keycode to query
150 * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_GetKeyFromScancode
155 * \sa SDL_GetScancodeName
156 */
157 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
158
159 /**
160 * Get a human-readable name for a scancode.
161 *
162 * See SDL_Scancode for details.
163 *
164 * **Warning**: The returned name is by design not stable across platforms,
165 * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
166 * Windows" under Microsoft Windows, and some scancodes like
167 * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
168 * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
169 * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
170 * unsuitable for creating a stable cross-platform two-way mapping between
171 * strings and scancodes.
172 *
173 * \param scancode the desired SDL_Scancode to query
174 * \returns a pointer to the name for the scancode. If the scancode doesn't
175 * have a name this function returns an empty string ("").
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_GetScancodeFromKey
180 * \sa SDL_GetScancodeFromName
181 */
182 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
183
184 /**
185 * Get a scancode from a human-readable name.
186 *
187 * \param name the human-readable scancode name
188 * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
189 * recognized; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GetKeyFromName
194 * \sa SDL_GetScancodeFromKey
195 * \sa SDL_GetScancodeName
196 */
197 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
198
199 /**
200 * Get a human-readable name for a key.
201 *
202 * See SDL_Scancode and SDL_Keycode for details.
203 *
204 * \param key the desired SDL_Keycode to query
205 * \returns a pointer to a UTF-8 string that stays valid at least until the
206 * next call to this function. If you need it around any longer, you
207 * must copy it. If the key doesn't have a name, this function
208 * returns an empty string ("").
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_GetKeyFromName
213 * \sa SDL_GetKeyFromScancode
214 * \sa SDL_GetScancodeFromKey
215 */
216 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
217
218 /**
219 * Get a key code from a human-readable name.
220 *
221 * \param name the human-readable key name
222 * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
223 * SDL_GetError() for more information.
224 *
225 * \since This function is available since SDL 2.0.0.
226 *
227 * \sa SDL_GetKeyFromScancode
228 * \sa SDL_GetKeyName
229 * \sa SDL_GetScancodeFromName
230 */
231 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
232
233 /**
234 * Start accepting Unicode text input events.
235 *
236 * This function will start accepting Unicode text input events in the focused
237 * SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
238 * SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
239 * pair with SDL_StopTextInput().
240 *
241 * On some platforms using this function activates the screen keyboard.
242 *
243 * \since This function is available since SDL 2.0.0.
244 *
245 * \sa SDL_SetTextInputRect
246 * \sa SDL_StopTextInput
247 */
248 extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
249
250 /**
251 * Check whether or not Unicode text input events are enabled.
252 *
253 * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
254 *
255 * \since This function is available since SDL 2.0.0.
256 *
257 * \sa SDL_StartTextInput
258 */
259 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
260
261 /**
262 * Stop receiving any text input events.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_StartTextInput
267 */
268 extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
269
270 /**
271 * Dismiss the composition window/IME without disabling the subsystem.
272 *
273 * \since This function is available since SDL 2.0.22.
274 *
275 * \sa SDL_StartTextInput
276 * \sa SDL_StopTextInput
277 */
278 extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
279
280 /**
281 * Returns if an IME Composite or Candidate window is currently shown.
282 *
283 * \since This function is available since SDL 2.0.22.
284 */
285 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
286
287 /**
288 * Set the rectangle used to type Unicode text inputs.
289 *
290 * Note: If you want use system native IME window, try to set hint
291 * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
292 * any feedback.
293 *
294 * \param rect the SDL_Rect structure representing the rectangle to receive
295 * text (ignored if NULL)
296 *
297 * \since This function is available since SDL 2.0.0.
298 *
299 * \sa SDL_StartTextInput
300 */
301 extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
302
303 /**
304 * Check whether the platform has screen keyboard support.
305 *
306 * \returns SDL_TRUE if the platform has some screen keyboard support or
307 * SDL_FALSE if not.
308 *
309 * \since This function is available since SDL 2.0.0.
310 *
311 * \sa SDL_StartTextInput
312 * \sa SDL_IsScreenKeyboardShown
313 */
314 extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
315
316 /**
317 * Check whether the screen keyboard is shown for given window.
318 *
319 * \param window the window for which screen keyboard should be queried
320 * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
321 *
322 * \since This function is available since SDL 2.0.0.
323 *
324 * \sa SDL_HasScreenKeyboardSupport
325 */
326 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
327
328 /* Ends C function definitions when using C++ */
329 #ifdef __cplusplus
330 }
331 #endif
332 #include <SDL2/close_code.h>
333
334 #endif /* SDL_keyboard_h_ */
335
336 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keycode.h
23 *
24 * Defines constants which identify keyboard keys and modifiers.
25 */
26
27 #ifndef SDL_keycode_h_
28 #define SDL_keycode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_scancode.h>
32
33 /**
34 * \brief The SDL virtual key representation.
35 *
36 * Values of this type are used to represent keyboard keys using the current
37 * layout of the keyboard. These values include Unicode values representing
38 * the unmodified character that would be generated by pressing the key, or
39 * an SDLK_* constant for those keys that do not generate characters.
40 *
41 * A special exception is the number keys at the top of the keyboard which
42 * always map to SDLK_0...SDLK_9, regardless of layout.
43 */
44 typedef Sint32 SDL_Keycode;
45
46 #define SDLK_SCANCODE_MASK (1<<30)
47 #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
48
49 typedef enum
50 {
51 SDLK_UNKNOWN = 0,
52
53 SDLK_RETURN = '\r',
54 SDLK_ESCAPE = '\x1B',
55 SDLK_BACKSPACE = '\b',
56 SDLK_TAB = '\t',
57 SDLK_SPACE = ' ',
58 SDLK_EXCLAIM = '!',
59 SDLK_QUOTEDBL = '"',
60 SDLK_HASH = '#',
61 SDLK_PERCENT = '%',
62 SDLK_DOLLAR = '$',
63 SDLK_AMPERSAND = '&',
64 SDLK_QUOTE = '\'',
65 SDLK_LEFTPAREN = '(',
66 SDLK_RIGHTPAREN = ')',
67 SDLK_ASTERISK = '*',
68 SDLK_PLUS = '+',
69 SDLK_COMMA = ',',
70 SDLK_MINUS = '-',
71 SDLK_PERIOD = '.',
72 SDLK_SLASH = '/',
73 SDLK_0 = '0',
74 SDLK_1 = '1',
75 SDLK_2 = '2',
76 SDLK_3 = '3',
77 SDLK_4 = '4',
78 SDLK_5 = '5',
79 SDLK_6 = '6',
80 SDLK_7 = '7',
81 SDLK_8 = '8',
82 SDLK_9 = '9',
83 SDLK_COLON = ':',
84 SDLK_SEMICOLON = ';',
85 SDLK_LESS = '<',
86 SDLK_EQUALS = '=',
87 SDLK_GREATER = '>',
88 SDLK_QUESTION = '?',
89 SDLK_AT = '@',
90
91 /*
92 Skip uppercase letters
93 */
94
95 SDLK_LEFTBRACKET = '[',
96 SDLK_BACKSLASH = '\\',
97 SDLK_RIGHTBRACKET = ']',
98 SDLK_CARET = '^',
99 SDLK_UNDERSCORE = '_',
100 SDLK_BACKQUOTE = '`',
101 SDLK_a = 'a',
102 SDLK_b = 'b',
103 SDLK_c = 'c',
104 SDLK_d = 'd',
105 SDLK_e = 'e',
106 SDLK_f = 'f',
107 SDLK_g = 'g',
108 SDLK_h = 'h',
109 SDLK_i = 'i',
110 SDLK_j = 'j',
111 SDLK_k = 'k',
112 SDLK_l = 'l',
113 SDLK_m = 'm',
114 SDLK_n = 'n',
115 SDLK_o = 'o',
116 SDLK_p = 'p',
117 SDLK_q = 'q',
118 SDLK_r = 'r',
119 SDLK_s = 's',
120 SDLK_t = 't',
121 SDLK_u = 'u',
122 SDLK_v = 'v',
123 SDLK_w = 'w',
124 SDLK_x = 'x',
125 SDLK_y = 'y',
126 SDLK_z = 'z',
127
128 SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
129
130 SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
131 SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
132 SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
133 SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
134 SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
135 SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
136 SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
137 SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
138 SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
139 SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
140 SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
141 SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
142
143 SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
144 SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
145 SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
146 SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
147 SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
148 SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
149 SDLK_DELETE = '\x7F',
150 SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
151 SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
152 SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
153 SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
154 SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
155 SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
156
157 SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
158 SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
159 SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
160 SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
161 SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
162 SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
163 SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
164 SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
165 SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
166 SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
167 SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
168 SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
169 SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
170 SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
171 SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
172 SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
173 SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
174
175 SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
176 SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
177 SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
178 SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
179 SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
180 SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
181 SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
182 SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
183 SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
184 SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
185 SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
186 SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
187 SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
188 SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
189 SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
190 SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
191 SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
192 SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
193 SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
194 SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
195 SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
196 SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
197 SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
198 SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
199 SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
200 SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
201 SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
202 SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
203 SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
204 SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
205 SDLK_KP_EQUALSAS400 =
206 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
207
208 SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
209 SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
210 SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
211 SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
212 SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
213 SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
214 SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
215 SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
216 SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
217 SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
218 SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
219 SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
220
221 SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
222 SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
223 SDLK_THOUSANDSSEPARATOR =
224 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
225 SDLK_DECIMALSEPARATOR =
226 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
227 SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
228 SDLK_CURRENCYSUBUNIT =
229 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
230 SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
231 SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
232 SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
233 SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
234 SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
235 SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
236 SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
237 SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
238 SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
239 SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
240 SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
241 SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
242 SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
243 SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
244 SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
245 SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
246 SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
247 SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
248 SDLK_KP_DBLAMPERSAND =
249 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
250 SDLK_KP_VERTICALBAR =
251 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
252 SDLK_KP_DBLVERTICALBAR =
253 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
254 SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
255 SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
256 SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
257 SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
258 SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
259 SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
260 SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
261 SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
262 SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
263 SDLK_KP_MEMSUBTRACT =
264 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
265 SDLK_KP_MEMMULTIPLY =
266 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
267 SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
268 SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
269 SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
270 SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
271 SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
272 SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
273 SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
274 SDLK_KP_HEXADECIMAL =
275 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
276
277 SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
278 SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
279 SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
280 SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
281 SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
282 SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
283 SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
284 SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
285
286 SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
287
288 SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
289 SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
290 SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
291 SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
292 SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
293 SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
294 SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
295 SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
296 SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
297 SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
298 SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
299 SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
300 SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
301 SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
302 SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
303 SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
304 SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
305
306 SDLK_BRIGHTNESSDOWN =
307 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
308 SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
309 SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
310 SDLK_KBDILLUMTOGGLE =
311 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
312 SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
313 SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
314 SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
315 SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
316 SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
317 SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
318
319 SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
320 SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
321 } SDL_KeyCode;
322
323 /**
324 * \brief Enumeration of valid key mods (possibly OR'd together).
325 */
326 typedef enum
327 {
328 KMOD_NONE = 0x0000,
329 KMOD_LSHIFT = 0x0001,
330 KMOD_RSHIFT = 0x0002,
331 KMOD_LCTRL = 0x0040,
332 KMOD_RCTRL = 0x0080,
333 KMOD_LALT = 0x0100,
334 KMOD_RALT = 0x0200,
335 KMOD_LGUI = 0x0400,
336 KMOD_RGUI = 0x0800,
337 KMOD_NUM = 0x1000,
338 KMOD_CAPS = 0x2000,
339 KMOD_MODE = 0x4000,
340 KMOD_SCROLL = 0x8000,
341
342 KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
343 KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
344 KMOD_ALT = KMOD_LALT | KMOD_RALT,
345 KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
346
347 KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
348 } SDL_Keymod;
349
350 #endif /* SDL_keycode_h_ */
351
352 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_loadso.h
23 *
24 * System dependent library loading routines
25 *
26 * Some things to keep in mind:
27 * \li These functions only work on C function names. Other languages may
28 * have name mangling and intrinsic language support that varies from
29 * compiler to compiler.
30 * \li Make sure you declare your function pointers with the same calling
31 * convention as the actual library function. Your code will crash
32 * mysteriously if you do not do this.
33 * \li Avoid namespace collisions. If you load a symbol from the library,
34 * it is not defined whether or not it goes into the global symbol
35 * namespace for the application. If it does and it conflicts with
36 * symbols in your code or other shared libraries, you will not get
37 * the results you expect. :)
38 */
39
40 #ifndef SDL_loadso_h_
41 #define SDL_loadso_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * Dynamically load a shared object.
54 *
55 * \param sofile a system-dependent name of the object file
56 * \returns an opaque pointer to the object handle or NULL if there was an
57 * error; call SDL_GetError() for more information.
58 *
59 * \since This function is available since SDL 2.0.0.
60 *
61 * \sa SDL_LoadFunction
62 * \sa SDL_UnloadObject
63 */
64 extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
65
66 /**
67 * Look up the address of the named function in a shared object.
68 *
69 * This function pointer is no longer valid after calling SDL_UnloadObject().
70 *
71 * This function can only look up C function names. Other languages may have
72 * name mangling and intrinsic language support that varies from compiler to
73 * compiler.
74 *
75 * Make sure you declare your function pointers with the same calling
76 * convention as the actual library function. Your code will crash
77 * mysteriously if you do not do this.
78 *
79 * If the requested function doesn't exist, NULL is returned.
80 *
81 * \param handle a valid shared object handle returned by SDL_LoadObject()
82 * \param name the name of the function to look up
83 * \returns a pointer to the function or NULL if there was an error; call
84 * SDL_GetError() for more information.
85 *
86 * \since This function is available since SDL 2.0.0.
87 *
88 * \sa SDL_LoadObject
89 * \sa SDL_UnloadObject
90 */
91 extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
92 const char *name);
93
94 /**
95 * Unload a shared object from memory.
96 *
97 * \param handle a valid shared object handle returned by SDL_LoadObject()
98 *
99 * \since This function is available since SDL 2.0.0.
100 *
101 * \sa SDL_LoadFunction
102 * \sa SDL_LoadObject
103 */
104 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_loadso_h_ */
113
114 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_locale.h
23 *
24 * Include file for SDL locale services
25 */
26
27 #ifndef _SDL_locale_h
28 #define _SDL_locale_h
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 /* *INDENT-OFF* */
37 extern "C" {
38 /* *INDENT-ON* */
39 #endif
40
41
42 typedef struct SDL_Locale
43 {
44 const char *language; /**< A language name, like "en" for English. */
45 const char *country; /**< A country, like "US" for America. Can be NULL. */
46 } SDL_Locale;
47
48 /**
49 * Report the user's preferred locale.
50 *
51 * This returns an array of SDL_Locale structs, the final item zeroed out.
52 * When the caller is done with this array, it should call SDL_free() on the
53 * returned value; all the memory involved is allocated in a single block, so
54 * a single SDL_free() will suffice.
55 *
56 * Returned language strings are in the format xx, where 'xx' is an ISO-639
57 * language specifier (such as "en" for English, "de" for German, etc).
58 * Country strings are in the format YY, where "YY" is an ISO-3166 country
59 * code (such as "US" for the United States, "CA" for Canada, etc). Country
60 * might be NULL if there's no specific guidance on them (so you might get {
61 * "en", "US" } for American English, but { "en", NULL } means "English
62 * language, generically"). Language strings are never NULL, except to
63 * terminate the array.
64 *
65 * Please note that not all of these strings are 2 characters; some are three
66 * or more.
67 *
68 * The returned list of locales are in the order of the user's preference. For
69 * example, a German citizen that is fluent in US English and knows enough
70 * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
71 * "jp", NULL }. Someone from England might prefer British English (where
72 * "color" is spelled "colour", etc), but will settle for anything like it: {
73 * "en_GB", "en", NULL }.
74 *
75 * This function returns NULL on error, including when the platform does not
76 * supply this information at all.
77 *
78 * This might be a "slow" call that has to query the operating system. It's
79 * best to ask for this once and save the results. However, this list can
80 * change, usually because the user has changed a system preference outside of
81 * your program; SDL will send an SDL_LOCALECHANGED event in this case, if
82 * possible, and you can call this function again to get an updated copy of
83 * preferred locales.
84 *
85 * \return array of locales, terminated with a locale with a NULL language
86 * field. Will return NULL on error.
87 *
88 * \since This function is available since SDL 2.0.14.
89 */
90 extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
91
92 /* Ends C function definitions when using C++ */
93 #ifdef __cplusplus
94 /* *INDENT-OFF* */
95 }
96 /* *INDENT-ON* */
97 #endif
98 #include <SDL2/close_code.h>
99
100 #endif /* _SDL_locale_h */
101
102 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_log.h
23 *
24 * Simple log messages with categories and priorities.
25 *
26 * By default logs are quiet, but if you're debugging SDL you might want:
27 *
28 * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
29 *
30 * Here's where the messages go on different platforms:
31 * Windows: debug output stream
32 * Android: log output
33 * Others: standard error output (stderr)
34 */
35
36 #ifndef SDL_log_h_
37 #define SDL_log_h_
38
39 #include <SDL2/SDL_stdinc.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 /**
49 * \brief The maximum size of a log message
50 *
51 * Messages longer than the maximum size will be truncated
52 */
53 #define SDL_MAX_LOG_MESSAGE 4096
54
55 /**
56 * \brief The predefined log categories
57 *
58 * By default the application category is enabled at the INFO level,
59 * the assert category is enabled at the WARN level, test is enabled
60 * at the VERBOSE level and all other categories are enabled at the
61 * CRITICAL level.
62 */
63 typedef enum
64 {
65 SDL_LOG_CATEGORY_APPLICATION,
66 SDL_LOG_CATEGORY_ERROR,
67 SDL_LOG_CATEGORY_ASSERT,
68 SDL_LOG_CATEGORY_SYSTEM,
69 SDL_LOG_CATEGORY_AUDIO,
70 SDL_LOG_CATEGORY_VIDEO,
71 SDL_LOG_CATEGORY_RENDER,
72 SDL_LOG_CATEGORY_INPUT,
73 SDL_LOG_CATEGORY_TEST,
74
75 /* Reserved for future SDL library use */
76 SDL_LOG_CATEGORY_RESERVED1,
77 SDL_LOG_CATEGORY_RESERVED2,
78 SDL_LOG_CATEGORY_RESERVED3,
79 SDL_LOG_CATEGORY_RESERVED4,
80 SDL_LOG_CATEGORY_RESERVED5,
81 SDL_LOG_CATEGORY_RESERVED6,
82 SDL_LOG_CATEGORY_RESERVED7,
83 SDL_LOG_CATEGORY_RESERVED8,
84 SDL_LOG_CATEGORY_RESERVED9,
85 SDL_LOG_CATEGORY_RESERVED10,
86
87 /* Beyond this point is reserved for application use, e.g.
88 enum {
89 MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
90 MYAPP_CATEGORY_AWESOME2,
91 MYAPP_CATEGORY_AWESOME3,
92 ...
93 };
94 */
95 SDL_LOG_CATEGORY_CUSTOM
96 } SDL_LogCategory;
97
98 /**
99 * \brief The predefined log priorities
100 */
101 typedef enum
102 {
103 SDL_LOG_PRIORITY_VERBOSE = 1,
104 SDL_LOG_PRIORITY_DEBUG,
105 SDL_LOG_PRIORITY_INFO,
106 SDL_LOG_PRIORITY_WARN,
107 SDL_LOG_PRIORITY_ERROR,
108 SDL_LOG_PRIORITY_CRITICAL,
109 SDL_NUM_LOG_PRIORITIES
110 } SDL_LogPriority;
111
112
113 /**
114 * Set the priority of all log categories.
115 *
116 * \param priority the SDL_LogPriority to assign
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_LogSetPriority
121 */
122 extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
123
124 /**
125 * Set the priority of a particular log category.
126 *
127 * \param category the category to assign a priority to
128 * \param priority the SDL_LogPriority to assign
129 *
130 * \since This function is available since SDL 2.0.0.
131 *
132 * \sa SDL_LogGetPriority
133 * \sa SDL_LogSetAllPriority
134 */
135 extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
136 SDL_LogPriority priority);
137
138 /**
139 * Get the priority of a particular log category.
140 *
141 * \param category the category to query
142 * \returns the SDL_LogPriority for the requested category
143 *
144 * \since This function is available since SDL 2.0.0.
145 *
146 * \sa SDL_LogSetPriority
147 */
148 extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
149
150 /**
151 * Reset all priorities to default.
152 *
153 * This is called by SDL_Quit().
154 *
155 * \since This function is available since SDL 2.0.0.
156 *
157 * \sa SDL_LogSetAllPriority
158 * \sa SDL_LogSetPriority
159 */
160 extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
161
162 /**
163 * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
164 *
165 * = * \param fmt a printf() style message format string
166 *
167 * \param ... additional parameters matching % tokens in the `fmt` string, if
168 * any
169 *
170 * \since This function is available since SDL 2.0.0.
171 *
172 * \sa SDL_LogCritical
173 * \sa SDL_LogDebug
174 * \sa SDL_LogError
175 * \sa SDL_LogInfo
176 * \sa SDL_LogMessage
177 * \sa SDL_LogMessageV
178 * \sa SDL_LogVerbose
179 * \sa SDL_LogWarn
180 */
181 extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
182
183 /**
184 * Log a message with SDL_LOG_PRIORITY_VERBOSE.
185 *
186 * \param category the category of the message
187 * \param fmt a printf() style message format string
188 * \param ... additional parameters matching % tokens in the **fmt** string,
189 * if any
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_Log
194 * \sa SDL_LogCritical
195 * \sa SDL_LogDebug
196 * \sa SDL_LogError
197 * \sa SDL_LogInfo
198 * \sa SDL_LogMessage
199 * \sa SDL_LogMessageV
200 * \sa SDL_LogWarn
201 */
202 extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
203
204 /**
205 * Log a message with SDL_LOG_PRIORITY_DEBUG.
206 *
207 * \param category the category of the message
208 * \param fmt a printf() style message format string
209 * \param ... additional parameters matching % tokens in the **fmt** string,
210 * if any
211 *
212 * \since This function is available since SDL 2.0.0.
213 *
214 * \sa SDL_Log
215 * \sa SDL_LogCritical
216 * \sa SDL_LogError
217 * \sa SDL_LogInfo
218 * \sa SDL_LogMessage
219 * \sa SDL_LogMessageV
220 * \sa SDL_LogVerbose
221 * \sa SDL_LogWarn
222 */
223 extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
224
225 /**
226 * Log a message with SDL_LOG_PRIORITY_INFO.
227 *
228 * \param category the category of the message
229 * \param fmt a printf() style message format string
230 * \param ... additional parameters matching % tokens in the **fmt** string,
231 * if any
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_Log
236 * \sa SDL_LogCritical
237 * \sa SDL_LogDebug
238 * \sa SDL_LogError
239 * \sa SDL_LogMessage
240 * \sa SDL_LogMessageV
241 * \sa SDL_LogVerbose
242 * \sa SDL_LogWarn
243 */
244 extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
245
246 /**
247 * Log a message with SDL_LOG_PRIORITY_WARN.
248 *
249 * \param category the category of the message
250 * \param fmt a printf() style message format string
251 * \param ... additional parameters matching % tokens in the **fmt** string,
252 * if any
253 *
254 * \since This function is available since SDL 2.0.0.
255 *
256 * \sa SDL_Log
257 * \sa SDL_LogCritical
258 * \sa SDL_LogDebug
259 * \sa SDL_LogError
260 * \sa SDL_LogInfo
261 * \sa SDL_LogMessage
262 * \sa SDL_LogMessageV
263 * \sa SDL_LogVerbose
264 */
265 extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
266
267 /**
268 * Log a message with SDL_LOG_PRIORITY_ERROR.
269 *
270 * \param category the category of the message
271 * \param fmt a printf() style message format string
272 * \param ... additional parameters matching % tokens in the **fmt** string,
273 * if any
274 *
275 * \since This function is available since SDL 2.0.0.
276 *
277 * \sa SDL_Log
278 * \sa SDL_LogCritical
279 * \sa SDL_LogDebug
280 * \sa SDL_LogInfo
281 * \sa SDL_LogMessage
282 * \sa SDL_LogMessageV
283 * \sa SDL_LogVerbose
284 * \sa SDL_LogWarn
285 */
286 extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
287
288 /**
289 * Log a message with SDL_LOG_PRIORITY_CRITICAL.
290 *
291 * \param category the category of the message
292 * \param fmt a printf() style message format string
293 * \param ... additional parameters matching % tokens in the **fmt** string,
294 * if any
295 *
296 * \since This function is available since SDL 2.0.0.
297 *
298 * \sa SDL_Log
299 * \sa SDL_LogDebug
300 * \sa SDL_LogError
301 * \sa SDL_LogInfo
302 * \sa SDL_LogMessage
303 * \sa SDL_LogMessageV
304 * \sa SDL_LogVerbose
305 * \sa SDL_LogWarn
306 */
307 extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
308
309 /**
310 * Log a message with the specified category and priority.
311 *
312 * \param category the category of the message
313 * \param priority the priority of the message
314 * \param fmt a printf() style message format string
315 * \param ... additional parameters matching % tokens in the **fmt** string,
316 * if any
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_Log
321 * \sa SDL_LogCritical
322 * \sa SDL_LogDebug
323 * \sa SDL_LogError
324 * \sa SDL_LogInfo
325 * \sa SDL_LogMessageV
326 * \sa SDL_LogVerbose
327 * \sa SDL_LogWarn
328 */
329 extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
330 SDL_LogPriority priority,
331 SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
332
333 /**
334 * Log a message with the specified category and priority.
335 *
336 * \param category the category of the message
337 * \param priority the priority of the message
338 * \param fmt a printf() style message format string
339 * \param ap a variable argument list
340 *
341 * \since This function is available since SDL 2.0.0.
342 *
343 * \sa SDL_Log
344 * \sa SDL_LogCritical
345 * \sa SDL_LogDebug
346 * \sa SDL_LogError
347 * \sa SDL_LogInfo
348 * \sa SDL_LogMessage
349 * \sa SDL_LogVerbose
350 * \sa SDL_LogWarn
351 */
352 extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
353 SDL_LogPriority priority,
354 const char *fmt, va_list ap);
355
356 /**
357 * The prototype for the log output callback function.
358 *
359 * This function is called by SDL when there is new text to be logged.
360 *
361 * \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
362 * \param category the category of the message
363 * \param priority the priority of the message
364 * \param message the message being output
365 */
366 typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
367
368 /**
369 * Get the current log output function.
370 *
371 * \param callback an SDL_LogOutputFunction filled in with the current log
372 * callback
373 * \param userdata a pointer filled in with the pointer that is passed to
374 * `callback`
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_LogSetOutputFunction
379 */
380 extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
381
382 /**
383 * Replace the default log output function with one of your own.
384 *
385 * \param callback an SDL_LogOutputFunction to call instead of the default
386 * \param userdata a pointer that is passed to `callback`
387 *
388 * \since This function is available since SDL 2.0.0.
389 *
390 * \sa SDL_LogGetOutputFunction
391 */
392 extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
393
394
395 /* Ends C function definitions when using C++ */
396 #ifdef __cplusplus
397 }
398 #endif
399 #include <SDL2/close_code.h>
400
401 #endif /* SDL_log_h_ */
402
403 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_main_h_
22 #define SDL_main_h_
23
24 #include <SDL2/SDL_stdinc.h>
25
26 /**
27 * \file SDL_main.h
28 *
29 * Redefine main() on some platforms so that it is called by SDL.
30 */
31
32 #ifndef SDL_MAIN_HANDLED
33 #if defined(__WIN32__)
34 /* On Windows SDL provides WinMain(), which parses the command line and passes
35 the arguments to your main function.
36
37 If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
38 */
39 #define SDL_MAIN_AVAILABLE
40
41 #elif defined(__WINRT__)
42 /* On WinRT, SDL provides a main function that initializes CoreApplication,
43 creating an instance of IFrameworkView in the process.
44
45 Please note that #include'ing SDL_main.h is not enough to get a main()
46 function working. In non-XAML apps, the file,
47 src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
48 into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
49 called, with a pointer to the Direct3D-hosted XAML control passed in.
50 */
51 #define SDL_MAIN_NEEDED
52
53 #elif defined(__IPHONEOS__)
54 /* On iOS SDL provides a main function that creates an application delegate
55 and starts the iOS application run loop.
56
57 If you link with SDL dynamically on iOS, the main function can't be in a
58 shared library, so you need to link with libSDLmain.a, which includes a
59 stub main function that calls into the shared library to start execution.
60
61 See src/video/uikit/SDL_uikitappdelegate.m for more details.
62 */
63 #define SDL_MAIN_NEEDED
64
65 #elif defined(__ANDROID__)
66 /* On Android SDL provides a Java class in SDLActivity.java that is the
67 main activity entry point.
68
69 See docs/README-android.md for more details on extending that class.
70 */
71 #define SDL_MAIN_NEEDED
72
73 /* We need to export SDL_main so it can be launched from Java */
74 #define SDLMAIN_DECLSPEC DECLSPEC
75
76 #elif defined(__NACL__)
77 /* On NACL we use ppapi_simple to set up the application helper code,
78 then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
79 starting the user main function.
80 All user code is run in a separate thread by ppapi_simple, thus
81 allowing for blocking io to take place via nacl_io
82 */
83 #define SDL_MAIN_NEEDED
84
85 #elif defined(__PSP__)
86 /* On PSP SDL provides a main function that sets the module info,
87 activates the GPU and starts the thread required to be able to exit
88 the software.
89
90 If you provide this yourself, you may define SDL_MAIN_HANDLED
91 */
92 #define SDL_MAIN_AVAILABLE
93
94 #endif
95 #endif /* SDL_MAIN_HANDLED */
96
97 #ifndef SDLMAIN_DECLSPEC
98 #define SDLMAIN_DECLSPEC
99 #endif
100
101 /**
102 * \file SDL_main.h
103 *
104 * The application's main() function must be called with C linkage,
105 * and should be declared like this:
106 * \code
107 * #ifdef __cplusplus
108 * extern "C"
109 * #endif
110 * int main(int argc, char *argv[])
111 * {
112 * }
113 * \endcode
114 */
115
116 #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
117 #define main SDL_main
118 #endif
119
120 #include <SDL2/begin_code.h>
121 #ifdef __cplusplus
122 extern "C" {
123 #endif
124
125 /**
126 * The prototype for the application's main() function
127 */
128 typedef int (*SDL_main_func)(int argc, char *argv[]);
129 extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
130
131
132 /**
133 * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
134 * point.
135 *
136 * This function is defined in SDL_main.h, along with the preprocessor rule to
137 * redefine main() as SDL_main(). Thus to ensure that your main() function
138 * will not be changed it is necessary to define SDL_MAIN_HANDLED before
139 * including SDL.h.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_Init
144 */
145 extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
146
147 #ifdef __WIN32__
148
149 /**
150 * Register a win32 window class for SDL's use.
151 *
152 * This can be called to set the application window class at startup. It is
153 * safe to call this multiple times, as long as every call is eventually
154 * paired with a call to SDL_UnregisterApp, but a second registration attempt
155 * while a previous registration is still active will be ignored, other than
156 * to increment a counter.
157 *
158 * Most applications do not need to, and should not, call this directly; SDL
159 * will call it when initializing the video subsystem.
160 *
161 * \param name the window class name, in UTF-8 encoding. If NULL, SDL
162 * currently uses "SDL_app" but this isn't guaranteed.
163 * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
164 * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
165 * what is specified here.
166 * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
167 * will use `GetModuleHandle(NULL)` instead.
168 * \returns 0 on success, -1 on error. SDL_GetError() may have details.
169 *
170 * \since This function is available since SDL 2.0.2.
171 */
172 extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
173
174 /**
175 * Deregister the win32 window class from an SDL_RegisterApp call.
176 *
177 * This can be called to undo the effects of SDL_RegisterApp.
178 *
179 * Most applications do not need to, and should not, call this directly; SDL
180 * will call it when deinitializing the video subsystem.
181 *
182 * It is safe to call this multiple times, as long as every call is eventually
183 * paired with a prior call to SDL_RegisterApp. The window class will only be
184 * deregistered when the registration counter in SDL_RegisterApp decrements to
185 * zero through calls to this function.
186 *
187 * \since This function is available since SDL 2.0.2.
188 */
189 extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
190
191 #endif /* __WIN32__ */
192
193
194 #ifdef __WINRT__
195
196 /**
197 * Initialize and launch an SDL/WinRT application.
198 *
199 * \param mainFunction the SDL app's C-style main(), an SDL_main_func
200 * \param reserved reserved for future use; should be NULL
201 * \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
202 * more information on the failure.
203 *
204 * \since This function is available since SDL 2.0.3.
205 */
206 extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
207
208 #endif /* __WINRT__ */
209
210 #if defined(__IPHONEOS__)
211
212 /**
213 * Initializes and launches an SDL application.
214 *
215 * \param argc The argc parameter from the application's main() function
216 * \param argv The argv parameter from the application's main() function
217 * \param mainFunction The SDL app's C-style main(), an SDL_main_func
218 * \return the return value from mainFunction
219 *
220 * \since This function is available since SDL 2.0.10.
221 */
222 extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
223
224 #endif /* __IPHONEOS__ */
225
226
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_main_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_messagebox_h_
22 #define SDL_messagebox_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_video.h> /* For SDL_Window */
26
27 #include <SDL2/begin_code.h>
28 /* Set up for C function definitions, even when using C++ */
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34 * SDL_MessageBox flags. If supported will display warning icon, etc.
35 */
36 typedef enum
37 {
38 SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
39 SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
40 SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
41 SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
42 SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
43 } SDL_MessageBoxFlags;
44
45 /**
46 * Flags for SDL_MessageBoxButtonData.
47 */
48 typedef enum
49 {
50 SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */
51 SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */
52 } SDL_MessageBoxButtonFlags;
53
54 /**
55 * Individual button data.
56 */
57 typedef struct
58 {
59 Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */
60 int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */
61 const char * text; /**< The UTF-8 button text */
62 } SDL_MessageBoxButtonData;
63
64 /**
65 * RGB value used in a message box color scheme
66 */
67 typedef struct
68 {
69 Uint8 r, g, b;
70 } SDL_MessageBoxColor;
71
72 typedef enum
73 {
74 SDL_MESSAGEBOX_COLOR_BACKGROUND,
75 SDL_MESSAGEBOX_COLOR_TEXT,
76 SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
77 SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
78 SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
79 SDL_MESSAGEBOX_COLOR_MAX
80 } SDL_MessageBoxColorType;
81
82 /**
83 * A set of colors to use for message box dialogs
84 */
85 typedef struct
86 {
87 SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
88 } SDL_MessageBoxColorScheme;
89
90 /**
91 * MessageBox structure containing title, text, window, etc.
92 */
93 typedef struct
94 {
95 Uint32 flags; /**< ::SDL_MessageBoxFlags */
96 SDL_Window *window; /**< Parent window, can be NULL */
97 const char *title; /**< UTF-8 title */
98 const char *message; /**< UTF-8 message text */
99
100 int numbuttons;
101 const SDL_MessageBoxButtonData *buttons;
102
103 const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
104 } SDL_MessageBoxData;
105
106 /**
107 * Create a modal message box.
108 *
109 * If your needs aren't complex, it might be easier to use
110 * SDL_ShowSimpleMessageBox.
111 *
112 * This function should be called on the thread that created the parent
113 * window, or on the main thread if the messagebox has no parent. It will
114 * block execution of that thread until the user clicks a button or closes the
115 * messagebox.
116 *
117 * This function may be called at any time, even before SDL_Init(). This makes
118 * it useful for reporting errors like a failure to create a renderer or
119 * OpenGL context.
120 *
121 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
122 * formal toolkit like GTK+ or Qt.
123 *
124 * Note that if SDL_Init() would fail because there isn't any available video
125 * target, this function is likely to fail for the same reasons. If this is a
126 * concern, check the return value from this function and fall back to writing
127 * to stderr if you can.
128 *
129 * \param messageboxdata the SDL_MessageBoxData structure with title, text and
130 * other options
131 * \param buttonid the pointer to which user id of hit button should be copied
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_ShowSimpleMessageBox
138 */
139 extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
140
141 /**
142 * Display a simple modal message box.
143 *
144 * If your needs aren't complex, this function is preferred over
145 * SDL_ShowMessageBox.
146 *
147 * `flags` may be any of the following:
148 *
149 * - `SDL_MESSAGEBOX_ERROR`: error dialog
150 * - `SDL_MESSAGEBOX_WARNING`: warning dialog
151 * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
152 *
153 * This function should be called on the thread that created the parent
154 * window, or on the main thread if the messagebox has no parent. It will
155 * block execution of that thread until the user clicks a button or closes the
156 * messagebox.
157 *
158 * This function may be called at any time, even before SDL_Init(). This makes
159 * it useful for reporting errors like a failure to create a renderer or
160 * OpenGL context.
161 *
162 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
163 * formal toolkit like GTK+ or Qt.
164 *
165 * Note that if SDL_Init() would fail because there isn't any available video
166 * target, this function is likely to fail for the same reasons. If this is a
167 * concern, check the return value from this function and fall back to writing
168 * to stderr if you can.
169 *
170 * \param flags an SDL_MessageBoxFlags value
171 * \param title UTF-8 title text
172 * \param message UTF-8 message text
173 * \param window the parent window, or NULL for no parent
174 * \returns 0 on success or a negative error code on failure; call
175 * SDL_GetError() for more information.
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_ShowMessageBox
180 */
181 extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
182
183
184 /* Ends C function definitions when using C++ */
185 #ifdef __cplusplus
186 }
187 #endif
188 #include <SDL2/close_code.h>
189
190 #endif /* SDL_messagebox_h_ */
191
192 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_metal.h
23 *
24 * Header file for functions to creating Metal layers and views on SDL windows.
25 */
26
27 #ifndef SDL_metal_h_
28 #define SDL_metal_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
40 *
41 * \note This can be cast directly to an NSView or UIView.
42 */
43 typedef void *SDL_MetalView;
44
45 /**
46 * \name Metal support functions
47 */
48 /* @{ */
49
50 /**
51 * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
52 * window.
53 *
54 * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
55 * its own. It is up to user code to do that.
56 *
57 * The returned handle can be casted directly to a NSView or UIView. To access
58 * the backing CAMetalLayer, call SDL_Metal_GetLayer().
59 *
60 * \since This function is available since SDL 2.0.12.
61 *
62 * \sa SDL_Metal_DestroyView
63 * \sa SDL_Metal_GetLayer
64 */
65 extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
66
67 /**
68 * Destroy an existing SDL_MetalView object.
69 *
70 * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
71 * called after SDL_CreateWindow.
72 *
73 * \since This function is available since SDL 2.0.12.
74 *
75 * \sa SDL_Metal_CreateView
76 */
77 extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
78
79 /**
80 * Get a pointer to the backing CAMetalLayer for the given view.
81 *
82 * \since This function is available since SDL 2.0.14.
83 *
84 * \sa SDL_MetalCreateView
85 */
86 extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
87
88 /**
89 * Get the size of a window's underlying drawable in pixels (for use with
90 * setting viewport, scissor & etc).
91 *
92 * \param window SDL_Window from which the drawable size should be queried
93 * \param w Pointer to variable for storing the width in pixels, may be NULL
94 * \param h Pointer to variable for storing the height in pixels, may be NULL
95 *
96 * \since This function is available since SDL 2.0.14.
97 *
98 * \sa SDL_GetWindowSize
99 * \sa SDL_CreateWindow
100 */
101 extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
102 int *h);
103
104 /* @} *//* Metal support functions */
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_metal_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_misc.h
23 *
24 * \brief Include file for SDL API functions that don't fit elsewhere.
25 */
26
27 #ifndef SDL_misc_h_
28 #define SDL_misc_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Open a URL/URI in the browser or other appropriate external application.
41 *
42 * Open a URL in a separate, system-provided application. How this works will
43 * vary wildly depending on the platform. This will likely launch what makes
44 * sense to handle a specific URL's protocol (a web browser for `http://`,
45 * etc), but it might also be able to launch file managers for directories and
46 * other things.
47 *
48 * What happens when you open a URL varies wildly as well: your game window
49 * may lose focus (and may or may not lose focus if your game was fullscreen
50 * or grabbing input at the time). On mobile devices, your app will likely
51 * move to the background or your process might be paused. Any given platform
52 * may or may not handle a given URL.
53 *
54 * If this is unimplemented (or simply unavailable) for a platform, this will
55 * fail with an error. A successful result does not mean the URL loaded, just
56 * that we launched _something_ to handle it (or at least believe we did).
57 *
58 * All this to say: this function can be useful, but you should definitely
59 * test it on every platform you target.
60 *
61 * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for
62 * local files, if supported.
63 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
64 * information.
65 *
66 * \since This function is available since SDL 2.0.14.
67 */
68 extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
69
70 /* Ends C function definitions when using C++ */
71 #ifdef __cplusplus
72 }
73 #endif
74 #include <SDL2/close_code.h>
75
76 #endif /* SDL_misc_h_ */
77
78 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_mouse.h
23 *
24 * Include file for SDL mouse event handling.
25 */
26
27 #ifndef SDL_mouse_h_
28 #define SDL_mouse_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
41
42 /**
43 * \brief Cursor types for SDL_CreateSystemCursor().
44 */
45 typedef enum
46 {
47 SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */
48 SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */
49 SDL_SYSTEM_CURSOR_WAIT, /**< Wait */
50 SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
51 SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
52 SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */
53 SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */
54 SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */
55 SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */
56 SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */
57 SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */
58 SDL_SYSTEM_CURSOR_HAND, /**< Hand */
59 SDL_NUM_SYSTEM_CURSORS
60 } SDL_SystemCursor;
61
62 /**
63 * \brief Scroll direction types for the Scroll event
64 */
65 typedef enum
66 {
67 SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
68 SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
69 } SDL_MouseWheelDirection;
70
71 /* Function prototypes */
72
73 /**
74 * Get the window which currently has mouse focus.
75 *
76 * \returns the window with mouse focus.
77 *
78 * \since This function is available since SDL 2.0.0.
79 */
80 extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
81
82 /**
83 * Retrieve the current state of the mouse.
84 *
85 * The current button state is returned as a button bitmask, which can be
86 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
87 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
88 * mouse cursor position relative to the focus window. You can pass NULL for
89 * either `x` or `y`.
90 *
91 * \param x the x coordinate of the mouse cursor position relative to the
92 * focus window
93 * \param y the y coordinate of the mouse cursor position relative to the
94 * focus window
95 * \returns a 32-bit button bitmask of the current button state.
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_GetGlobalMouseState
100 * \sa SDL_GetRelativeMouseState
101 * \sa SDL_PumpEvents
102 */
103 extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
104
105 /**
106 * Get the current state of the mouse in relation to the desktop.
107 *
108 * This works similarly to SDL_GetMouseState(), but the coordinates will be
109 * reported relative to the top-left of the desktop. This can be useful if you
110 * need to track the mouse outside of a specific window and SDL_CaptureMouse()
111 * doesn't fit your needs. For example, it could be useful if you need to
112 * track the mouse while dragging a window, where coordinates relative to a
113 * window might not be in sync at all times.
114 *
115 * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
116 * from the last pump of the event queue. This function, however, queries the
117 * OS for the current mouse position, and as such, might be a slightly less
118 * efficient function. Unless you know what you're doing and have a good
119 * reason to use this function, you probably want SDL_GetMouseState() instead.
120 *
121 * \param x filled in with the current X coord relative to the desktop; can be
122 * NULL
123 * \param y filled in with the current Y coord relative to the desktop; can be
124 * NULL
125 * \returns the current button state as a bitmask which can be tested using
126 * the SDL_BUTTON(X) macros.
127 *
128 * \since This function is available since SDL 2.0.4.
129 *
130 * \sa SDL_CaptureMouse
131 */
132 extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
133
134 /**
135 * Retrieve the relative state of the mouse.
136 *
137 * The current button state is returned as a button bitmask, which can be
138 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
139 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
140 * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
141 * event initialization. You can pass NULL for either `x` or `y`.
142 *
143 * \param x a pointer filled with the last recorded x coordinate of the mouse
144 * \param y a pointer filled with the last recorded y coordinate of the mouse
145 * \returns a 32-bit button bitmask of the relative button state.
146 *
147 * \since This function is available since SDL 2.0.0.
148 *
149 * \sa SDL_GetMouseState
150 */
151 extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
152
153 /**
154 * Move the mouse cursor to the given position within the window.
155 *
156 * This function generates a mouse motion event.
157 *
158 * Note that this function will appear to succeed, but not actually move the
159 * mouse when used over Microsoft Remote Desktop.
160 *
161 * \param window the window to move the mouse into, or NULL for the current
162 * mouse focus
163 * \param x the x coordinate within the window
164 * \param y the y coordinate within the window
165 *
166 * \since This function is available since SDL 2.0.0.
167 *
168 * \sa SDL_WarpMouseGlobal
169 */
170 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
171 int x, int y);
172
173 /**
174 * Move the mouse to the given position in global screen space.
175 *
176 * This function generates a mouse motion event.
177 *
178 * A failure of this function usually means that it is unsupported by a
179 * platform.
180 *
181 * Note that this function will appear to succeed, but not actually move the
182 * mouse when used over Microsoft Remote Desktop.
183 *
184 * \param x the x coordinate
185 * \param y the y coordinate
186 * \returns 0 on success or a negative error code on failure; call
187 * SDL_GetError() for more information.
188 *
189 * \since This function is available since SDL 2.0.4.
190 *
191 * \sa SDL_WarpMouseInWindow
192 */
193 extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
194
195 /**
196 * Set relative mouse mode.
197 *
198 * While the mouse is in relative mode, the cursor is hidden, and the driver
199 * will try to report continuous motion in the current window. Only relative
200 * motion events will be delivered, the mouse position will not change.
201 *
202 * Note that this function will not be able to provide continuous relative
203 * motion when used over Microsoft Remote Desktop, instead motion is limited
204 * to the bounds of the screen.
205 *
206 * This function will flush any pending mouse motion.
207 *
208 * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
209 * \returns 0 on success or a negative error code on failure; call
210 * SDL_GetError() for more information.
211 *
212 * If relative mode is not supported, this returns -1.
213 *
214 * \since This function is available since SDL 2.0.0.
215 *
216 * \sa SDL_GetRelativeMouseMode
217 */
218 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
219
220 /**
221 * Capture the mouse and to track input outside an SDL window.
222 *
223 * Capturing enables your app to obtain mouse events globally, instead of just
224 * within your window. Not all video targets support this function. When
225 * capturing is enabled, the current window will get all mouse events, but
226 * unlike relative mode, no change is made to the cursor and it is not
227 * restrained to your window.
228 *
229 * This function may also deny mouse input to other windows--both those in
230 * your application and others on the system--so you should use this function
231 * sparingly, and in small bursts. For example, you might want to track the
232 * mouse while the user is dragging something, until the user releases a mouse
233 * button. It is not recommended that you capture the mouse for long periods
234 * of time, such as the entire time your app is running. For that, you should
235 * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowGrab(), depending
236 * on your goals.
237 *
238 * While captured, mouse events still report coordinates relative to the
239 * current (foreground) window, but those coordinates may be outside the
240 * bounds of the window (including negative values). Capturing is only allowed
241 * for the foreground window. If the window loses focus while capturing, the
242 * capture will be disabled automatically.
243 *
244 * While capturing is enabled, the current window will have the
245 * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
246 *
247 * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
248 * \returns 0 on success or -1 if not supported; call SDL_GetError() for more
249 * information.
250 *
251 * \since This function is available since SDL 2.0.4.
252 *
253 * \sa SDL_GetGlobalMouseState
254 */
255 extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
256
257 /**
258 * Query whether relative mouse mode is enabled.
259 *
260 * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
261 *
262 * \since This function is available since SDL 2.0.0.
263 *
264 * \sa SDL_SetRelativeMouseMode
265 */
266 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
267
268 /**
269 * Create a cursor using the specified bitmap data and mask (in MSB format).
270 *
271 * `mask` has to be in MSB (Most Significant Bit) format.
272 *
273 * The cursor width (`w`) must be a multiple of 8 bits.
274 *
275 * The cursor is created in black and white according to the following:
276 *
277 * - data=0, mask=1: white
278 * - data=1, mask=1: black
279 * - data=0, mask=0: transparent
280 * - data=1, mask=0: inverted color if possible, black if not.
281 *
282 * Cursors created with this function must be freed with SDL_FreeCursor().
283 *
284 * If you want to have a color cursor, or create your cursor from an
285 * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
286 * hide the cursor and draw your own as part of your game's rendering, but it
287 * will be bound to the framerate.
288 *
289 * Also, since SDL 2.0.0, SDL_CreateSystemCursor() is available, which
290 * provides twelve readily available system cursors to pick from.
291 *
292 * \param data the color value for each pixel of the cursor
293 * \param mask the mask value for each pixel of the cursor
294 * \param w the width of the cursor
295 * \param h the height of the cursor
296 * \param hot_x the X-axis location of the upper left corner of the cursor
297 * relative to the actual mouse position
298 * \param hot_y the Y-axis location of the upper left corner of the cursor
299 * relative to the actual mouse position
300 * \returns a new cursor with the specified parameters on success or NULL on
301 * failure; call SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_FreeCursor
306 * \sa SDL_SetCursor
307 * \sa SDL_ShowCursor
308 */
309 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
310 const Uint8 * mask,
311 int w, int h, int hot_x,
312 int hot_y);
313
314 /**
315 * Create a color cursor.
316 *
317 * \param surface an SDL_Surface structure representing the cursor image
318 * \param hot_x the x position of the cursor hot spot
319 * \param hot_y the y position of the cursor hot spot
320 * \returns the new cursor on success or NULL on failure; call SDL_GetError()
321 * for more information.
322 *
323 * \since This function is available since SDL 2.0.0.
324 *
325 * \sa SDL_CreateCursor
326 * \sa SDL_FreeCursor
327 */
328 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
329 int hot_x,
330 int hot_y);
331
332 /**
333 * Create a system cursor.
334 *
335 * \param id an SDL_SystemCursor enum value
336 * \returns a cursor on success or NULL on failure; call SDL_GetError() for
337 * more information.
338 *
339 * \since This function is available since SDL 2.0.0.
340 *
341 * \sa SDL_FreeCursor
342 */
343 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
344
345 /**
346 * Set the active cursor.
347 *
348 * This function sets the currently active cursor to the specified one. If the
349 * cursor is currently visible, the change will be immediately represented on
350 * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
351 * this is desired for any reason.
352 *
353 * \param cursor a cursor to make active
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateCursor
358 * \sa SDL_GetCursor
359 * \sa SDL_ShowCursor
360 */
361 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
362
363 /**
364 * Get the active cursor.
365 *
366 * This function returns a pointer to the current cursor which is owned by the
367 * library. It is not necessary to free the cursor with SDL_FreeCursor().
368 *
369 * \returns the active cursor or NULL if there is no mouse.
370 *
371 * \since This function is available since SDL 2.0.0.
372 *
373 * \sa SDL_SetCursor
374 */
375 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
376
377 /**
378 * Get the default cursor.
379 *
380 * \returns the default cursor on success or NULL on failure.
381 *
382 * \since This function is available since SDL 2.0.0.
383 *
384 * \sa SDL_CreateSystemCursor
385 */
386 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
387
388 /**
389 * Free a previously-created cursor.
390 *
391 * Use this function to free cursor resources created with SDL_CreateCursor(),
392 * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
393 *
394 * \param cursor the cursor to free
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_CreateColorCursor
399 * \sa SDL_CreateCursor
400 * \sa SDL_CreateSystemCursor
401 */
402 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
403
404 /**
405 * Toggle whether or not the cursor is shown.
406 *
407 * The cursor starts off displayed but can be turned off. Passing `SDL_ENABLE`
408 * displays the cursor and passing `SDL_DISABLE` hides it.
409 *
410 * The current state of the mouse cursor can be queried by passing
411 * `SDL_QUERY`; either `SDL_DISABLE` or `SDL_ENABLE` will be returned.
412 *
413 * \param toggle `SDL_ENABLE` to show the cursor, `SDL_DISABLE` to hide it,
414 * `SDL_QUERY` to query the current state without changing it.
415 * \returns `SDL_ENABLE` if the cursor is shown, or `SDL_DISABLE` if the
416 * cursor is hidden, or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CreateCursor
422 * \sa SDL_SetCursor
423 */
424 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
425
426 /**
427 * Used as a mask when testing buttons in buttonstate.
428 *
429 * - Button 1: Left mouse button
430 * - Button 2: Middle mouse button
431 * - Button 3: Right mouse button
432 */
433 #define SDL_BUTTON(X) (1 << ((X)-1))
434 #define SDL_BUTTON_LEFT 1
435 #define SDL_BUTTON_MIDDLE 2
436 #define SDL_BUTTON_RIGHT 3
437 #define SDL_BUTTON_X1 4
438 #define SDL_BUTTON_X2 5
439 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
440 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
441 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
442 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
443 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
444
445 /* Ends C function definitions when using C++ */
446 #ifdef __cplusplus
447 }
448 #endif
449 #include <SDL2/close_code.h>
450
451 #endif /* SDL_mouse_h_ */
452
453 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_mutex_h_
22 #define SDL_mutex_h_
23
24 /**
25 * \file SDL_mutex.h
26 *
27 * Functions to provide thread synchronization primitives.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Synchronization functions which can time out return this value
41 * if they time out.
42 */
43 #define SDL_MUTEX_TIMEDOUT 1
44
45 /**
46 * This is the timeout value which corresponds to never time out.
47 */
48 #define SDL_MUTEX_MAXWAIT (~(Uint32)0)
49
50
51 /**
52 * \name Mutex functions
53 */
54 /* @{ */
55
56 /* The SDL mutex structure, defined in SDL_sysmutex.c */
57 struct SDL_mutex;
58 typedef struct SDL_mutex SDL_mutex;
59
60 /**
61 * Create a new mutex.
62 *
63 * All newly-created mutexes begin in the _unlocked_ state.
64 *
65 * Calls to SDL_LockMutex() will not return while the mutex is locked by
66 * another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
67 *
68 * SDL mutexes are reentrant.
69 *
70 * \returns the initialized and unlocked mutex or NULL on failure; call
71 * SDL_GetError() for more information.
72 *
73 * \since This function is available since SDL 2.0.0.
74 *
75 * \sa SDL_DestroyMutex
76 * \sa SDL_LockMutex
77 * \sa SDL_TryLockMutex
78 * \sa SDL_UnlockMutex
79 */
80 extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
81
82 /**
83 * Lock the mutex.
84 *
85 * This will block until the mutex is available, which is to say it is in the
86 * unlocked state and the OS has chosen the caller as the next thread to lock
87 * it. Of all threads waiting to lock the mutex, only one may do so at a time.
88 *
89 * It is legal for the owning thread to lock an already-locked mutex. It must
90 * unlock it the same number of times before it is actually made available for
91 * other threads in the system (this is known as a "recursive mutex").
92 *
93 * \param mutex the mutex to lock
94 * \return 0, or -1 on error.
95 *
96 * \since This function is available since SDL 2.0.0.
97 */
98 extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
99 #define SDL_mutexP(m) SDL_LockMutex(m)
100
101 /**
102 * Try to lock a mutex without blocking.
103 *
104 * This works just like SDL_LockMutex(), but if the mutex is not available,
105 * this function returns `SDL_MUTEX_TIMEOUT` immediately.
106 *
107 * This technique is useful if you need exclusive access to a resource but
108 * don't want to wait for it, and will return to it to try again later.
109 *
110 * \param mutex the mutex to try to lock
111 * \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
112 * more information.
113 *
114 * \since This function is available since SDL 2.0.0.
115 *
116 * \sa SDL_CreateMutex
117 * \sa SDL_DestroyMutex
118 * \sa SDL_LockMutex
119 * \sa SDL_UnlockMutex
120 */
121 extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
122
123 /**
124 * Unlock the mutex.
125 *
126 * It is legal for the owning thread to lock an already-locked mutex. It must
127 * unlock it the same number of times before it is actually made available for
128 * other threads in the system (this is known as a "recursive mutex").
129 *
130 * It is an error to unlock a mutex that has not been locked by the current
131 * thread, and doing so results in undefined behavior.
132 *
133 * It is also an error to unlock a mutex that isn't locked at all.
134 *
135 * \param mutex the mutex to unlock.
136 * \returns 0, or -1 on error.
137 *
138 * \since This function is available since SDL 2.0.0.
139 */
140 extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
141 #define SDL_mutexV(m) SDL_UnlockMutex(m)
142
143 /**
144 * Destroy a mutex created with SDL_CreateMutex().
145 *
146 * This function must be called on any mutex that is no longer needed. Failure
147 * to destroy a mutex will result in a system memory or resource leak. While
148 * it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
149 * to destroy a locked mutex, and may result in undefined behavior depending
150 * on the platform.
151 *
152 * \param mutex the mutex to destroy
153 *
154 * \since This function is available since SDL 2.0.0.
155 *
156 * \sa SDL_CreateMutex
157 * \sa SDL_LockMutex
158 * \sa SDL_TryLockMutex
159 * \sa SDL_UnlockMutex
160 */
161 extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
162
163 /* @} *//* Mutex functions */
164
165
166 /**
167 * \name Semaphore functions
168 */
169 /* @{ */
170
171 /* The SDL semaphore structure, defined in SDL_syssem.c */
172 struct SDL_semaphore;
173 typedef struct SDL_semaphore SDL_sem;
174
175 /**
176 * Create a semaphore.
177 *
178 * This function creates a new semaphore and initializes it with the value
179 * `initial_value`. Each wait operation on the semaphore will atomically
180 * decrement the semaphore value and potentially block if the semaphore value
181 * is 0. Each post operation will atomically increment the semaphore value and
182 * wake waiting threads and allow them to retry the wait operation.
183 *
184 * \param initial_value the starting value of the semaphore
185 * \returns a new semaphore or NULL on failure; call SDL_GetError() for more
186 * information.
187 *
188 * \since This function is available since SDL 2.0.0.
189 *
190 * \sa SDL_DestroySemaphore
191 * \sa SDL_SemPost
192 * \sa SDL_SemTryWait
193 * \sa SDL_SemValue
194 * \sa SDL_SemWait
195 * \sa SDL_SemWaitTimeout
196 */
197 extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
198
199 /**
200 * Destroy a semaphore.
201 *
202 * It is not safe to destroy a semaphore if there are threads currently
203 * waiting on it.
204 *
205 * \param sem the semaphore to destroy
206 *
207 * \since This function is available since SDL 2.0.0.
208 *
209 * \sa SDL_CreateSemaphore
210 * \sa SDL_SemPost
211 * \sa SDL_SemTryWait
212 * \sa SDL_SemValue
213 * \sa SDL_SemWait
214 * \sa SDL_SemWaitTimeout
215 */
216 extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
217
218 /**
219 * Wait until a semaphore has a positive value and then decrements it.
220 *
221 * This function suspends the calling thread until either the semaphore
222 * pointed to by `sem` has a positive value or the call is interrupted by a
223 * signal or error. If the call is successful it will atomically decrement the
224 * semaphore value.
225 *
226 * This function is the equivalent of calling SDL_SemWaitTimeout() with a time
227 * length of `SDL_MUTEX_MAXWAIT`.
228 *
229 * \param sem the semaphore wait on
230 * \returns 0 on success or a negative error code on failure; call
231 * SDL_GetError() for more information.
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_CreateSemaphore
236 * \sa SDL_DestroySemaphore
237 * \sa SDL_SemPost
238 * \sa SDL_SemTryWait
239 * \sa SDL_SemValue
240 * \sa SDL_SemWait
241 * \sa SDL_SemWaitTimeout
242 */
243 extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
244
245 /**
246 * See if a semaphore has a positive value and decrement it if it does.
247 *
248 * This function checks to see if the semaphore pointed to by `sem` has a
249 * positive value and atomically decrements the semaphore value if it does. If
250 * the semaphore doesn't have a positive value, the function immediately
251 * returns SDL_MUTEX_TIMEDOUT.
252 *
253 * \param sem the semaphore to wait on
254 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
255 * block, or a negative error code on failure; call SDL_GetError()
256 * for more information.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_CreateSemaphore
261 * \sa SDL_DestroySemaphore
262 * \sa SDL_SemPost
263 * \sa SDL_SemValue
264 * \sa SDL_SemWait
265 * \sa SDL_SemWaitTimeout
266 */
267 extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
268
269 /**
270 * Wait until a semaphore has a positive value and then decrements it.
271 *
272 * This function suspends the calling thread until either the semaphore
273 * pointed to by `sem` has a positive value, the call is interrupted by a
274 * signal or error, or the specified time has elapsed. If the call is
275 * successful it will atomically decrement the semaphore value.
276 *
277 * \param sem the semaphore to wait on
278 * \param ms the length of the timeout, in milliseconds
279 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
280 * succeed in the allotted time, or a negative error code on failure;
281 * call SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateSemaphore
286 * \sa SDL_DestroySemaphore
287 * \sa SDL_SemPost
288 * \sa SDL_SemTryWait
289 * \sa SDL_SemValue
290 * \sa SDL_SemWait
291 */
292 extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
293
294 /**
295 * Atomically increment a semaphore's value and wake waiting threads.
296 *
297 * \param sem the semaphore to increment
298 * \returns 0 on success or a negative error code on failure; call
299 * SDL_GetError() for more information.
300 *
301 * \since This function is available since SDL 2.0.0.
302 *
303 * \sa SDL_CreateSemaphore
304 * \sa SDL_DestroySemaphore
305 * \sa SDL_SemTryWait
306 * \sa SDL_SemValue
307 * \sa SDL_SemWait
308 * \sa SDL_SemWaitTimeout
309 */
310 extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
311
312 /**
313 * Get the current value of a semaphore.
314 *
315 * \param sem the semaphore to query
316 * \returns the current value of the semaphore.
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_CreateSemaphore
321 */
322 extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
323
324 /* @} *//* Semaphore functions */
325
326
327 /**
328 * \name Condition variable functions
329 */
330 /* @{ */
331
332 /* The SDL condition variable structure, defined in SDL_syscond.c */
333 struct SDL_cond;
334 typedef struct SDL_cond SDL_cond;
335
336 /**
337 * Create a condition variable.
338 *
339 * \returns a new condition variable or NULL on failure; call SDL_GetError()
340 * for more information.
341 *
342 * \since This function is available since SDL 2.0.0.
343 *
344 * \sa SDL_CondBroadcast
345 * \sa SDL_CondSignal
346 * \sa SDL_CondWait
347 * \sa SDL_CondWaitTimeout
348 * \sa SDL_DestroyCond
349 */
350 extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
351
352 /**
353 * Destroy a condition variable.
354 *
355 * \param cond the condition variable to destroy
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_CondBroadcast
360 * \sa SDL_CondSignal
361 * \sa SDL_CondWait
362 * \sa SDL_CondWaitTimeout
363 * \sa SDL_CreateCond
364 */
365 extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
366
367 /**
368 * Restart one of the threads that are waiting on the condition variable.
369 *
370 * \param cond the condition variable to signal
371 * \returns 0 on success or a negative error code on failure; call
372 * SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_CondBroadcast
377 * \sa SDL_CondWait
378 * \sa SDL_CondWaitTimeout
379 * \sa SDL_CreateCond
380 * \sa SDL_DestroyCond
381 */
382 extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
383
384 /**
385 * Restart all threads that are waiting on the condition variable.
386 *
387 * \param cond the condition variable to signal
388 * \returns 0 on success or a negative error code on failure; call
389 * SDL_GetError() for more information.
390 *
391 * \since This function is available since SDL 2.0.0.
392 *
393 * \sa SDL_CondSignal
394 * \sa SDL_CondWait
395 * \sa SDL_CondWaitTimeout
396 * \sa SDL_CreateCond
397 * \sa SDL_DestroyCond
398 */
399 extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
400
401 /**
402 * Wait until a condition variable is signaled.
403 *
404 * This function unlocks the specified `mutex` and waits for another thread to
405 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
406 * `cond`. Once the condition variable is signaled, the mutex is re-locked and
407 * the function returns.
408 *
409 * The mutex must be locked before calling this function.
410 *
411 * This function is the equivalent of calling SDL_CondWaitTimeout() with a
412 * time length of `SDL_MUTEX_MAXWAIT`.
413 *
414 * \param cond the condition variable to wait on
415 * \param mutex the mutex used to coordinate thread access
416 * \returns 0 when it is signaled or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CondBroadcast
422 * \sa SDL_CondSignal
423 * \sa SDL_CondWaitTimeout
424 * \sa SDL_CreateCond
425 * \sa SDL_DestroyCond
426 */
427 extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
428
429 /**
430 * Wait until a condition variable is signaled or a certain time has passed.
431 *
432 * This function unlocks the specified `mutex` and waits for another thread to
433 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
434 * `cond`, or for the specified time to elapse. Once the condition variable is
435 * signaled or the time elapsed, the mutex is re-locked and the function
436 * returns.
437 *
438 * The mutex must be locked before calling this function.
439 *
440 * \param cond the condition variable to wait on
441 * \param mutex the mutex used to coordinate thread access
442 * \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
443 * to wait indefinitely
444 * \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
445 * the condition is not signaled in the allotted time, or a negative
446 * error code on failure; call SDL_GetError() for more information.
447 *
448 * \since This function is available since SDL 2.0.0.
449 *
450 * \sa SDL_CondBroadcast
451 * \sa SDL_CondSignal
452 * \sa SDL_CondWait
453 * \sa SDL_CreateCond
454 * \sa SDL_DestroyCond
455 */
456 extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
457 SDL_mutex * mutex, Uint32 ms);
458
459 /* @} *//* Condition variable functions */
460
461
462 /* Ends C function definitions when using C++ */
463 #ifdef __cplusplus
464 }
465 #endif
466 #include <SDL2/close_code.h>
467
468 #endif /* SDL_mutex_h_ */
469
470 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDLname_h_
22 #define SDLname_h_
23
24 #if defined(__STDC__) || defined(__cplusplus)
25 #define NeedFunctionPrototypes 1
26 #endif
27
28 #define SDL_NAME(X) SDL_##X
29
30 #endif /* SDLname_h_ */
31
32 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengl.h
23 *
24 * This is a simple file to encapsulate the OpenGL API headers.
25 */
26
27 /**
28 * \def NO_SDL_GLEXT
29 *
30 * Define this if you have your own version of glext.h and want to disable the
31 * version included in SDL_opengl.h.
32 */
33
34 #ifndef SDL_opengl_h_
35 #define SDL_opengl_h_
36
37 #include <SDL2/SDL_config.h>
38
39 #ifndef __IPHONEOS__ /* No OpenGL on iOS. */
40
41 /*
42 * Mesa 3-D graphics library
43 *
44 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
45 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
46 *
47 * Permission is hereby granted, free of charge, to any person obtaining a
48 * copy of this software and associated documentation files (the "Software"),
49 * to deal in the Software without restriction, including without limitation
50 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
51 * and/or sell copies of the Software, and to permit persons to whom the
52 * Software is furnished to do so, subject to the following conditions:
53 *
54 * The above copyright notice and this permission notice shall be included
55 * in all copies or substantial portions of the Software.
56 *
57 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
60 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
61 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
62 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
63 * OTHER DEALINGS IN THE SOFTWARE.
64 */
65
66
67 #ifndef __gl_h_
68 #define __gl_h_
69
70 #if defined(USE_MGL_NAMESPACE)
71 #include <SDL2/gl_mangle.h>
72 #endif
73
74
75 /**********************************************************************
76 * Begin system-specific stuff.
77 */
78
79 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
80 #define __WIN32__
81 #endif
82
83 #if defined(__WIN32__) && !defined(__CYGWIN__)
84 # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
85 # define GLAPI __declspec(dllexport)
86 # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
87 # define GLAPI __declspec(dllimport)
88 # else /* for use with static link lib build of Win32 edition only */
89 # define GLAPI extern
90 # endif /* _STATIC_MESA support */
91 # if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
92 # define GLAPIENTRY
93 # else
94 # define GLAPIENTRY __stdcall
95 # endif
96 #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
97 # define GLAPI extern
98 # define GLAPIENTRY __stdcall
99 #elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */
100 # define GLAPI extern
101 # define GLAPIENTRY _System
102 # define APIENTRY _System
103 # if defined(__GNUC__) && !defined(_System)
104 # define _System
105 # endif
106 #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
107 # define GLAPI __attribute__((visibility("default")))
108 # define GLAPIENTRY
109 #endif /* WIN32 && !CYGWIN */
110
111 /*
112 * WINDOWS: Include windows.h here to define APIENTRY.
113 * It is also useful when applications include this file by
114 * including only glut.h, since glut.h depends on windows.h.
115 * Applications needing to include windows.h with parms other
116 * than "WIN32_LEAN_AND_MEAN" may include windows.h before
117 * glut.h or gl.h.
118 */
119 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
120 #ifndef WIN32_LEAN_AND_MEAN
121 #define WIN32_LEAN_AND_MEAN 1
122 #endif
123 #ifndef NOMINMAX /* don't define min() and max(). */
124 #define NOMINMAX
125 #endif
126 #include <windows.h>
127 #endif
128
129 #ifndef GLAPI
130 #define GLAPI extern
131 #endif
132
133 #ifndef GLAPIENTRY
134 #define GLAPIENTRY
135 #endif
136
137 #ifndef APIENTRY
138 #define APIENTRY GLAPIENTRY
139 #endif
140
141 /* "P" suffix to be used for a pointer to a function */
142 #ifndef APIENTRYP
143 #define APIENTRYP APIENTRY *
144 #endif
145
146 #ifndef GLAPIENTRYP
147 #define GLAPIENTRYP GLAPIENTRY *
148 #endif
149
150 #if defined(PRAGMA_EXPORT_SUPPORTED)
151 #pragma export on
152 #endif
153
154 /*
155 * End system-specific stuff.
156 **********************************************************************/
157
158
159
160 #ifdef __cplusplus
161 extern "C" {
162 #endif
163
164
165
166 #define GL_VERSION_1_1 1
167 #define GL_VERSION_1_2 1
168 #define GL_VERSION_1_3 1
169 #define GL_ARB_imaging 1
170
171
172 /*
173 * Datatypes
174 */
175 typedef unsigned int GLenum;
176 typedef unsigned char GLboolean;
177 typedef unsigned int GLbitfield;
178 typedef void GLvoid;
179 typedef signed char GLbyte; /* 1-byte signed */
180 typedef short GLshort; /* 2-byte signed */
181 typedef int GLint; /* 4-byte signed */
182 typedef unsigned char GLubyte; /* 1-byte unsigned */
183 typedef unsigned short GLushort; /* 2-byte unsigned */
184 typedef unsigned int GLuint; /* 4-byte unsigned */
185 typedef int GLsizei; /* 4-byte signed */
186 typedef float GLfloat; /* single precision float */
187 typedef float GLclampf; /* single precision float in [0,1] */
188 typedef double GLdouble; /* double precision float */
189 typedef double GLclampd; /* double precision float in [0,1] */
190
191
192
193 /*
194 * Constants
195 */
196
197 /* Boolean values */
198 #define GL_FALSE 0
199 #define GL_TRUE 1
200
201 /* Data types */
202 #define GL_BYTE 0x1400
203 #define GL_UNSIGNED_BYTE 0x1401
204 #define GL_SHORT 0x1402
205 #define GL_UNSIGNED_SHORT 0x1403
206 #define GL_INT 0x1404
207 #define GL_UNSIGNED_INT 0x1405
208 #define GL_FLOAT 0x1406
209 #define GL_2_BYTES 0x1407
210 #define GL_3_BYTES 0x1408
211 #define GL_4_BYTES 0x1409
212 #define GL_DOUBLE 0x140A
213
214 /* Primitives */
215 #define GL_POINTS 0x0000
216 #define GL_LINES 0x0001
217 #define GL_LINE_LOOP 0x0002
218 #define GL_LINE_STRIP 0x0003
219 #define GL_TRIANGLES 0x0004
220 #define GL_TRIANGLE_STRIP 0x0005
221 #define GL_TRIANGLE_FAN 0x0006
222 #define GL_QUADS 0x0007
223 #define GL_QUAD_STRIP 0x0008
224 #define GL_POLYGON 0x0009
225
226 /* Vertex Arrays */
227 #define GL_VERTEX_ARRAY 0x8074
228 #define GL_NORMAL_ARRAY 0x8075
229 #define GL_COLOR_ARRAY 0x8076
230 #define GL_INDEX_ARRAY 0x8077
231 #define GL_TEXTURE_COORD_ARRAY 0x8078
232 #define GL_EDGE_FLAG_ARRAY 0x8079
233 #define GL_VERTEX_ARRAY_SIZE 0x807A
234 #define GL_VERTEX_ARRAY_TYPE 0x807B
235 #define GL_VERTEX_ARRAY_STRIDE 0x807C
236 #define GL_NORMAL_ARRAY_TYPE 0x807E
237 #define GL_NORMAL_ARRAY_STRIDE 0x807F
238 #define GL_COLOR_ARRAY_SIZE 0x8081
239 #define GL_COLOR_ARRAY_TYPE 0x8082
240 #define GL_COLOR_ARRAY_STRIDE 0x8083
241 #define GL_INDEX_ARRAY_TYPE 0x8085
242 #define GL_INDEX_ARRAY_STRIDE 0x8086
243 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
244 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
245 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
246 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
247 #define GL_VERTEX_ARRAY_POINTER 0x808E
248 #define GL_NORMAL_ARRAY_POINTER 0x808F
249 #define GL_COLOR_ARRAY_POINTER 0x8090
250 #define GL_INDEX_ARRAY_POINTER 0x8091
251 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
252 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
253 #define GL_V2F 0x2A20
254 #define GL_V3F 0x2A21
255 #define GL_C4UB_V2F 0x2A22
256 #define GL_C4UB_V3F 0x2A23
257 #define GL_C3F_V3F 0x2A24
258 #define GL_N3F_V3F 0x2A25
259 #define GL_C4F_N3F_V3F 0x2A26
260 #define GL_T2F_V3F 0x2A27
261 #define GL_T4F_V4F 0x2A28
262 #define GL_T2F_C4UB_V3F 0x2A29
263 #define GL_T2F_C3F_V3F 0x2A2A
264 #define GL_T2F_N3F_V3F 0x2A2B
265 #define GL_T2F_C4F_N3F_V3F 0x2A2C
266 #define GL_T4F_C4F_N3F_V4F 0x2A2D
267
268 /* Matrix Mode */
269 #define GL_MATRIX_MODE 0x0BA0
270 #define GL_MODELVIEW 0x1700
271 #define GL_PROJECTION 0x1701
272 #define GL_TEXTURE 0x1702
273
274 /* Points */
275 #define GL_POINT_SMOOTH 0x0B10
276 #define GL_POINT_SIZE 0x0B11
277 #define GL_POINT_SIZE_GRANULARITY 0x0B13
278 #define GL_POINT_SIZE_RANGE 0x0B12
279
280 /* Lines */
281 #define GL_LINE_SMOOTH 0x0B20
282 #define GL_LINE_STIPPLE 0x0B24
283 #define GL_LINE_STIPPLE_PATTERN 0x0B25
284 #define GL_LINE_STIPPLE_REPEAT 0x0B26
285 #define GL_LINE_WIDTH 0x0B21
286 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
287 #define GL_LINE_WIDTH_RANGE 0x0B22
288
289 /* Polygons */
290 #define GL_POINT 0x1B00
291 #define GL_LINE 0x1B01
292 #define GL_FILL 0x1B02
293 #define GL_CW 0x0900
294 #define GL_CCW 0x0901
295 #define GL_FRONT 0x0404
296 #define GL_BACK 0x0405
297 #define GL_POLYGON_MODE 0x0B40
298 #define GL_POLYGON_SMOOTH 0x0B41
299 #define GL_POLYGON_STIPPLE 0x0B42
300 #define GL_EDGE_FLAG 0x0B43
301 #define GL_CULL_FACE 0x0B44
302 #define GL_CULL_FACE_MODE 0x0B45
303 #define GL_FRONT_FACE 0x0B46
304 #define GL_POLYGON_OFFSET_FACTOR 0x8038
305 #define GL_POLYGON_OFFSET_UNITS 0x2A00
306 #define GL_POLYGON_OFFSET_POINT 0x2A01
307 #define GL_POLYGON_OFFSET_LINE 0x2A02
308 #define GL_POLYGON_OFFSET_FILL 0x8037
309
310 /* Display Lists */
311 #define GL_COMPILE 0x1300
312 #define GL_COMPILE_AND_EXECUTE 0x1301
313 #define GL_LIST_BASE 0x0B32
314 #define GL_LIST_INDEX 0x0B33
315 #define GL_LIST_MODE 0x0B30
316
317 /* Depth buffer */
318 #define GL_NEVER 0x0200
319 #define GL_LESS 0x0201
320 #define GL_EQUAL 0x0202
321 #define GL_LEQUAL 0x0203
322 #define GL_GREATER 0x0204
323 #define GL_NOTEQUAL 0x0205
324 #define GL_GEQUAL 0x0206
325 #define GL_ALWAYS 0x0207
326 #define GL_DEPTH_TEST 0x0B71
327 #define GL_DEPTH_BITS 0x0D56
328 #define GL_DEPTH_CLEAR_VALUE 0x0B73
329 #define GL_DEPTH_FUNC 0x0B74
330 #define GL_DEPTH_RANGE 0x0B70
331 #define GL_DEPTH_WRITEMASK 0x0B72
332 #define GL_DEPTH_COMPONENT 0x1902
333
334 /* Lighting */
335 #define GL_LIGHTING 0x0B50
336 #define GL_LIGHT0 0x4000
337 #define GL_LIGHT1 0x4001
338 #define GL_LIGHT2 0x4002
339 #define GL_LIGHT3 0x4003
340 #define GL_LIGHT4 0x4004
341 #define GL_LIGHT5 0x4005
342 #define GL_LIGHT6 0x4006
343 #define GL_LIGHT7 0x4007
344 #define GL_SPOT_EXPONENT 0x1205
345 #define GL_SPOT_CUTOFF 0x1206
346 #define GL_CONSTANT_ATTENUATION 0x1207
347 #define GL_LINEAR_ATTENUATION 0x1208
348 #define GL_QUADRATIC_ATTENUATION 0x1209
349 #define GL_AMBIENT 0x1200
350 #define GL_DIFFUSE 0x1201
351 #define GL_SPECULAR 0x1202
352 #define GL_SHININESS 0x1601
353 #define GL_EMISSION 0x1600
354 #define GL_POSITION 0x1203
355 #define GL_SPOT_DIRECTION 0x1204
356 #define GL_AMBIENT_AND_DIFFUSE 0x1602
357 #define GL_COLOR_INDEXES 0x1603
358 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
359 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
360 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
361 #define GL_FRONT_AND_BACK 0x0408
362 #define GL_SHADE_MODEL 0x0B54
363 #define GL_FLAT 0x1D00
364 #define GL_SMOOTH 0x1D01
365 #define GL_COLOR_MATERIAL 0x0B57
366 #define GL_COLOR_MATERIAL_FACE 0x0B55
367 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
368 #define GL_NORMALIZE 0x0BA1
369
370 /* User clipping planes */
371 #define GL_CLIP_PLANE0 0x3000
372 #define GL_CLIP_PLANE1 0x3001
373 #define GL_CLIP_PLANE2 0x3002
374 #define GL_CLIP_PLANE3 0x3003
375 #define GL_CLIP_PLANE4 0x3004
376 #define GL_CLIP_PLANE5 0x3005
377
378 /* Accumulation buffer */
379 #define GL_ACCUM_RED_BITS 0x0D58
380 #define GL_ACCUM_GREEN_BITS 0x0D59
381 #define GL_ACCUM_BLUE_BITS 0x0D5A
382 #define GL_ACCUM_ALPHA_BITS 0x0D5B
383 #define GL_ACCUM_CLEAR_VALUE 0x0B80
384 #define GL_ACCUM 0x0100
385 #define GL_ADD 0x0104
386 #define GL_LOAD 0x0101
387 #define GL_MULT 0x0103
388 #define GL_RETURN 0x0102
389
390 /* Alpha testing */
391 #define GL_ALPHA_TEST 0x0BC0
392 #define GL_ALPHA_TEST_REF 0x0BC2
393 #define GL_ALPHA_TEST_FUNC 0x0BC1
394
395 /* Blending */
396 #define GL_BLEND 0x0BE2
397 #define GL_BLEND_SRC 0x0BE1
398 #define GL_BLEND_DST 0x0BE0
399 #define GL_ZERO 0
400 #define GL_ONE 1
401 #define GL_SRC_COLOR 0x0300
402 #define GL_ONE_MINUS_SRC_COLOR 0x0301
403 #define GL_SRC_ALPHA 0x0302
404 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
405 #define GL_DST_ALPHA 0x0304
406 #define GL_ONE_MINUS_DST_ALPHA 0x0305
407 #define GL_DST_COLOR 0x0306
408 #define GL_ONE_MINUS_DST_COLOR 0x0307
409 #define GL_SRC_ALPHA_SATURATE 0x0308
410
411 /* Render Mode */
412 #define GL_FEEDBACK 0x1C01
413 #define GL_RENDER 0x1C00
414 #define GL_SELECT 0x1C02
415
416 /* Feedback */
417 #define GL_2D 0x0600
418 #define GL_3D 0x0601
419 #define GL_3D_COLOR 0x0602
420 #define GL_3D_COLOR_TEXTURE 0x0603
421 #define GL_4D_COLOR_TEXTURE 0x0604
422 #define GL_POINT_TOKEN 0x0701
423 #define GL_LINE_TOKEN 0x0702
424 #define GL_LINE_RESET_TOKEN 0x0707
425 #define GL_POLYGON_TOKEN 0x0703
426 #define GL_BITMAP_TOKEN 0x0704
427 #define GL_DRAW_PIXEL_TOKEN 0x0705
428 #define GL_COPY_PIXEL_TOKEN 0x0706
429 #define GL_PASS_THROUGH_TOKEN 0x0700
430 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
431 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
432 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
433
434 /* Selection */
435 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
436 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
437
438 /* Fog */
439 #define GL_FOG 0x0B60
440 #define GL_FOG_MODE 0x0B65
441 #define GL_FOG_DENSITY 0x0B62
442 #define GL_FOG_COLOR 0x0B66
443 #define GL_FOG_INDEX 0x0B61
444 #define GL_FOG_START 0x0B63
445 #define GL_FOG_END 0x0B64
446 #define GL_LINEAR 0x2601
447 #define GL_EXP 0x0800
448 #define GL_EXP2 0x0801
449
450 /* Logic Ops */
451 #define GL_LOGIC_OP 0x0BF1
452 #define GL_INDEX_LOGIC_OP 0x0BF1
453 #define GL_COLOR_LOGIC_OP 0x0BF2
454 #define GL_LOGIC_OP_MODE 0x0BF0
455 #define GL_CLEAR 0x1500
456 #define GL_SET 0x150F
457 #define GL_COPY 0x1503
458 #define GL_COPY_INVERTED 0x150C
459 #define GL_NOOP 0x1505
460 #define GL_INVERT 0x150A
461 #define GL_AND 0x1501
462 #define GL_NAND 0x150E
463 #define GL_OR 0x1507
464 #define GL_NOR 0x1508
465 #define GL_XOR 0x1506
466 #define GL_EQUIV 0x1509
467 #define GL_AND_REVERSE 0x1502
468 #define GL_AND_INVERTED 0x1504
469 #define GL_OR_REVERSE 0x150B
470 #define GL_OR_INVERTED 0x150D
471
472 /* Stencil */
473 #define GL_STENCIL_BITS 0x0D57
474 #define GL_STENCIL_TEST 0x0B90
475 #define GL_STENCIL_CLEAR_VALUE 0x0B91
476 #define GL_STENCIL_FUNC 0x0B92
477 #define GL_STENCIL_VALUE_MASK 0x0B93
478 #define GL_STENCIL_FAIL 0x0B94
479 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
480 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
481 #define GL_STENCIL_REF 0x0B97
482 #define GL_STENCIL_WRITEMASK 0x0B98
483 #define GL_STENCIL_INDEX 0x1901
484 #define GL_KEEP 0x1E00
485 #define GL_REPLACE 0x1E01
486 #define GL_INCR 0x1E02
487 #define GL_DECR 0x1E03
488
489 /* Buffers, Pixel Drawing/Reading */
490 #define GL_NONE 0
491 #define GL_LEFT 0x0406
492 #define GL_RIGHT 0x0407
493 /*GL_FRONT 0x0404 */
494 /*GL_BACK 0x0405 */
495 /*GL_FRONT_AND_BACK 0x0408 */
496 #define GL_FRONT_LEFT 0x0400
497 #define GL_FRONT_RIGHT 0x0401
498 #define GL_BACK_LEFT 0x0402
499 #define GL_BACK_RIGHT 0x0403
500 #define GL_AUX0 0x0409
501 #define GL_AUX1 0x040A
502 #define GL_AUX2 0x040B
503 #define GL_AUX3 0x040C
504 #define GL_COLOR_INDEX 0x1900
505 #define GL_RED 0x1903
506 #define GL_GREEN 0x1904
507 #define GL_BLUE 0x1905
508 #define GL_ALPHA 0x1906
509 #define GL_LUMINANCE 0x1909
510 #define GL_LUMINANCE_ALPHA 0x190A
511 #define GL_ALPHA_BITS 0x0D55
512 #define GL_RED_BITS 0x0D52
513 #define GL_GREEN_BITS 0x0D53
514 #define GL_BLUE_BITS 0x0D54
515 #define GL_INDEX_BITS 0x0D51
516 #define GL_SUBPIXEL_BITS 0x0D50
517 #define GL_AUX_BUFFERS 0x0C00
518 #define GL_READ_BUFFER 0x0C02
519 #define GL_DRAW_BUFFER 0x0C01
520 #define GL_DOUBLEBUFFER 0x0C32
521 #define GL_STEREO 0x0C33
522 #define GL_BITMAP 0x1A00
523 #define GL_COLOR 0x1800
524 #define GL_DEPTH 0x1801
525 #define GL_STENCIL 0x1802
526 #define GL_DITHER 0x0BD0
527 #define GL_RGB 0x1907
528 #define GL_RGBA 0x1908
529
530 /* Implementation limits */
531 #define GL_MAX_LIST_NESTING 0x0B31
532 #define GL_MAX_EVAL_ORDER 0x0D30
533 #define GL_MAX_LIGHTS 0x0D31
534 #define GL_MAX_CLIP_PLANES 0x0D32
535 #define GL_MAX_TEXTURE_SIZE 0x0D33
536 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
537 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
538 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
539 #define GL_MAX_NAME_STACK_DEPTH 0x0D37
540 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
541 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
542 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
543 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
544
545 /* Gets */
546 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
547 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
548 #define GL_COLOR_CLEAR_VALUE 0x0C22
549 #define GL_COLOR_WRITEMASK 0x0C23
550 #define GL_CURRENT_INDEX 0x0B01
551 #define GL_CURRENT_COLOR 0x0B00
552 #define GL_CURRENT_NORMAL 0x0B02
553 #define GL_CURRENT_RASTER_COLOR 0x0B04
554 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
555 #define GL_CURRENT_RASTER_INDEX 0x0B05
556 #define GL_CURRENT_RASTER_POSITION 0x0B07
557 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
558 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
559 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
560 #define GL_INDEX_CLEAR_VALUE 0x0C20
561 #define GL_INDEX_MODE 0x0C30
562 #define GL_INDEX_WRITEMASK 0x0C21
563 #define GL_MODELVIEW_MATRIX 0x0BA6
564 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
565 #define GL_NAME_STACK_DEPTH 0x0D70
566 #define GL_PROJECTION_MATRIX 0x0BA7
567 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
568 #define GL_RENDER_MODE 0x0C40
569 #define GL_RGBA_MODE 0x0C31
570 #define GL_TEXTURE_MATRIX 0x0BA8
571 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
572 #define GL_VIEWPORT 0x0BA2
573
574 /* Evaluators */
575 #define GL_AUTO_NORMAL 0x0D80
576 #define GL_MAP1_COLOR_4 0x0D90
577 #define GL_MAP1_INDEX 0x0D91
578 #define GL_MAP1_NORMAL 0x0D92
579 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
580 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
581 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
582 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
583 #define GL_MAP1_VERTEX_3 0x0D97
584 #define GL_MAP1_VERTEX_4 0x0D98
585 #define GL_MAP2_COLOR_4 0x0DB0
586 #define GL_MAP2_INDEX 0x0DB1
587 #define GL_MAP2_NORMAL 0x0DB2
588 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
589 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
590 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
591 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
592 #define GL_MAP2_VERTEX_3 0x0DB7
593 #define GL_MAP2_VERTEX_4 0x0DB8
594 #define GL_MAP1_GRID_DOMAIN 0x0DD0
595 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
596 #define GL_MAP2_GRID_DOMAIN 0x0DD2
597 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
598 #define GL_COEFF 0x0A00
599 #define GL_ORDER 0x0A01
600 #define GL_DOMAIN 0x0A02
601
602 /* Hints */
603 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
604 #define GL_POINT_SMOOTH_HINT 0x0C51
605 #define GL_LINE_SMOOTH_HINT 0x0C52
606 #define GL_POLYGON_SMOOTH_HINT 0x0C53
607 #define GL_FOG_HINT 0x0C54
608 #define GL_DONT_CARE 0x1100
609 #define GL_FASTEST 0x1101
610 #define GL_NICEST 0x1102
611
612 /* Scissor box */
613 #define GL_SCISSOR_BOX 0x0C10
614 #define GL_SCISSOR_TEST 0x0C11
615
616 /* Pixel Mode / Transfer */
617 #define GL_MAP_COLOR 0x0D10
618 #define GL_MAP_STENCIL 0x0D11
619 #define GL_INDEX_SHIFT 0x0D12
620 #define GL_INDEX_OFFSET 0x0D13
621 #define GL_RED_SCALE 0x0D14
622 #define GL_RED_BIAS 0x0D15
623 #define GL_GREEN_SCALE 0x0D18
624 #define GL_GREEN_BIAS 0x0D19
625 #define GL_BLUE_SCALE 0x0D1A
626 #define GL_BLUE_BIAS 0x0D1B
627 #define GL_ALPHA_SCALE 0x0D1C
628 #define GL_ALPHA_BIAS 0x0D1D
629 #define GL_DEPTH_SCALE 0x0D1E
630 #define GL_DEPTH_BIAS 0x0D1F
631 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
632 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
633 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
634 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
635 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
636 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
637 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
638 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
639 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
640 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
641 #define GL_PIXEL_MAP_S_TO_S 0x0C71
642 #define GL_PIXEL_MAP_I_TO_I 0x0C70
643 #define GL_PIXEL_MAP_I_TO_R 0x0C72
644 #define GL_PIXEL_MAP_I_TO_G 0x0C73
645 #define GL_PIXEL_MAP_I_TO_B 0x0C74
646 #define GL_PIXEL_MAP_I_TO_A 0x0C75
647 #define GL_PIXEL_MAP_R_TO_R 0x0C76
648 #define GL_PIXEL_MAP_G_TO_G 0x0C77
649 #define GL_PIXEL_MAP_B_TO_B 0x0C78
650 #define GL_PIXEL_MAP_A_TO_A 0x0C79
651 #define GL_PACK_ALIGNMENT 0x0D05
652 #define GL_PACK_LSB_FIRST 0x0D01
653 #define GL_PACK_ROW_LENGTH 0x0D02
654 #define GL_PACK_SKIP_PIXELS 0x0D04
655 #define GL_PACK_SKIP_ROWS 0x0D03
656 #define GL_PACK_SWAP_BYTES 0x0D00
657 #define GL_UNPACK_ALIGNMENT 0x0CF5
658 #define GL_UNPACK_LSB_FIRST 0x0CF1
659 #define GL_UNPACK_ROW_LENGTH 0x0CF2
660 #define GL_UNPACK_SKIP_PIXELS 0x0CF4
661 #define GL_UNPACK_SKIP_ROWS 0x0CF3
662 #define GL_UNPACK_SWAP_BYTES 0x0CF0
663 #define GL_ZOOM_X 0x0D16
664 #define GL_ZOOM_Y 0x0D17
665
666 /* Texture mapping */
667 #define GL_TEXTURE_ENV 0x2300
668 #define GL_TEXTURE_ENV_MODE 0x2200
669 #define GL_TEXTURE_1D 0x0DE0
670 #define GL_TEXTURE_2D 0x0DE1
671 #define GL_TEXTURE_WRAP_S 0x2802
672 #define GL_TEXTURE_WRAP_T 0x2803
673 #define GL_TEXTURE_MAG_FILTER 0x2800
674 #define GL_TEXTURE_MIN_FILTER 0x2801
675 #define GL_TEXTURE_ENV_COLOR 0x2201
676 #define GL_TEXTURE_GEN_S 0x0C60
677 #define GL_TEXTURE_GEN_T 0x0C61
678 #define GL_TEXTURE_GEN_R 0x0C62
679 #define GL_TEXTURE_GEN_Q 0x0C63
680 #define GL_TEXTURE_GEN_MODE 0x2500
681 #define GL_TEXTURE_BORDER_COLOR 0x1004
682 #define GL_TEXTURE_WIDTH 0x1000
683 #define GL_TEXTURE_HEIGHT 0x1001
684 #define GL_TEXTURE_BORDER 0x1005
685 #define GL_TEXTURE_COMPONENTS 0x1003
686 #define GL_TEXTURE_RED_SIZE 0x805C
687 #define GL_TEXTURE_GREEN_SIZE 0x805D
688 #define GL_TEXTURE_BLUE_SIZE 0x805E
689 #define GL_TEXTURE_ALPHA_SIZE 0x805F
690 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
691 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
692 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
693 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
694 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
695 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
696 #define GL_OBJECT_LINEAR 0x2401
697 #define GL_OBJECT_PLANE 0x2501
698 #define GL_EYE_LINEAR 0x2400
699 #define GL_EYE_PLANE 0x2502
700 #define GL_SPHERE_MAP 0x2402
701 #define GL_DECAL 0x2101
702 #define GL_MODULATE 0x2100
703 #define GL_NEAREST 0x2600
704 #define GL_REPEAT 0x2901
705 #define GL_CLAMP 0x2900
706 #define GL_S 0x2000
707 #define GL_T 0x2001
708 #define GL_R 0x2002
709 #define GL_Q 0x2003
710
711 /* Utility */
712 #define GL_VENDOR 0x1F00
713 #define GL_RENDERER 0x1F01
714 #define GL_VERSION 0x1F02
715 #define GL_EXTENSIONS 0x1F03
716
717 /* Errors */
718 #define GL_NO_ERROR 0
719 #define GL_INVALID_ENUM 0x0500
720 #define GL_INVALID_VALUE 0x0501
721 #define GL_INVALID_OPERATION 0x0502
722 #define GL_STACK_OVERFLOW 0x0503
723 #define GL_STACK_UNDERFLOW 0x0504
724 #define GL_OUT_OF_MEMORY 0x0505
725
726 /* glPush/PopAttrib bits */
727 #define GL_CURRENT_BIT 0x00000001
728 #define GL_POINT_BIT 0x00000002
729 #define GL_LINE_BIT 0x00000004
730 #define GL_POLYGON_BIT 0x00000008
731 #define GL_POLYGON_STIPPLE_BIT 0x00000010
732 #define GL_PIXEL_MODE_BIT 0x00000020
733 #define GL_LIGHTING_BIT 0x00000040
734 #define GL_FOG_BIT 0x00000080
735 #define GL_DEPTH_BUFFER_BIT 0x00000100
736 #define GL_ACCUM_BUFFER_BIT 0x00000200
737 #define GL_STENCIL_BUFFER_BIT 0x00000400
738 #define GL_VIEWPORT_BIT 0x00000800
739 #define GL_TRANSFORM_BIT 0x00001000
740 #define GL_ENABLE_BIT 0x00002000
741 #define GL_COLOR_BUFFER_BIT 0x00004000
742 #define GL_HINT_BIT 0x00008000
743 #define GL_EVAL_BIT 0x00010000
744 #define GL_LIST_BIT 0x00020000
745 #define GL_TEXTURE_BIT 0x00040000
746 #define GL_SCISSOR_BIT 0x00080000
747 #define GL_ALL_ATTRIB_BITS 0x000FFFFF
748
749
750 /* OpenGL 1.1 */
751 #define GL_PROXY_TEXTURE_1D 0x8063
752 #define GL_PROXY_TEXTURE_2D 0x8064
753 #define GL_TEXTURE_PRIORITY 0x8066
754 #define GL_TEXTURE_RESIDENT 0x8067
755 #define GL_TEXTURE_BINDING_1D 0x8068
756 #define GL_TEXTURE_BINDING_2D 0x8069
757 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
758 #define GL_ALPHA4 0x803B
759 #define GL_ALPHA8 0x803C
760 #define GL_ALPHA12 0x803D
761 #define GL_ALPHA16 0x803E
762 #define GL_LUMINANCE4 0x803F
763 #define GL_LUMINANCE8 0x8040
764 #define GL_LUMINANCE12 0x8041
765 #define GL_LUMINANCE16 0x8042
766 #define GL_LUMINANCE4_ALPHA4 0x8043
767 #define GL_LUMINANCE6_ALPHA2 0x8044
768 #define GL_LUMINANCE8_ALPHA8 0x8045
769 #define GL_LUMINANCE12_ALPHA4 0x8046
770 #define GL_LUMINANCE12_ALPHA12 0x8047
771 #define GL_LUMINANCE16_ALPHA16 0x8048
772 #define GL_INTENSITY 0x8049
773 #define GL_INTENSITY4 0x804A
774 #define GL_INTENSITY8 0x804B
775 #define GL_INTENSITY12 0x804C
776 #define GL_INTENSITY16 0x804D
777 #define GL_R3_G3_B2 0x2A10
778 #define GL_RGB4 0x804F
779 #define GL_RGB5 0x8050
780 #define GL_RGB8 0x8051
781 #define GL_RGB10 0x8052
782 #define GL_RGB12 0x8053
783 #define GL_RGB16 0x8054
784 #define GL_RGBA2 0x8055
785 #define GL_RGBA4 0x8056
786 #define GL_RGB5_A1 0x8057
787 #define GL_RGBA8 0x8058
788 #define GL_RGB10_A2 0x8059
789 #define GL_RGBA12 0x805A
790 #define GL_RGBA16 0x805B
791 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
792 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
793 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
794 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
795
796
797
798 /*
799 * Miscellaneous
800 */
801
802 GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
803
804 GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
805
806 GLAPI void GLAPIENTRY glClear( GLbitfield mask );
807
808 GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
809
810 GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
811
812 GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
813
814 GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
815
816 GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
817
818 GLAPI void GLAPIENTRY glCullFace( GLenum mode );
819
820 GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
821
822 GLAPI void GLAPIENTRY glPointSize( GLfloat size );
823
824 GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
825
826 GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
827
828 GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
829
830 GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
831
832 GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
833
834 GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
835
836 GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
837
838 GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
839
840 GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
841
842 GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
843
844 GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
845
846 GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
847
848 GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
849
850 GLAPI void GLAPIENTRY glEnable( GLenum cap );
851
852 GLAPI void GLAPIENTRY glDisable( GLenum cap );
853
854 GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
855
856
857 GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
858
859 GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
860
861
862 GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
863
864 GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
865
866 GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
867
868 GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
869
870
871 GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
872
873 GLAPI void GLAPIENTRY glPopAttrib( void );
874
875
876 GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
877
878 GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
879
880
881 GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
882
883 GLAPI GLenum GLAPIENTRY glGetError( void );
884
885 GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
886
887 GLAPI void GLAPIENTRY glFinish( void );
888
889 GLAPI void GLAPIENTRY glFlush( void );
890
891 GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
892
893
894 /*
895 * Depth Buffer
896 */
897
898 GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
899
900 GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
901
902 GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
903
904 GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
905
906
907 /*
908 * Accumulation Buffer
909 */
910
911 GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
912
913 GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
914
915
916 /*
917 * Transformation
918 */
919
920 GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
921
922 GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
923 GLdouble bottom, GLdouble top,
924 GLdouble near_val, GLdouble far_val );
925
926 GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
927 GLdouble bottom, GLdouble top,
928 GLdouble near_val, GLdouble far_val );
929
930 GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
931 GLsizei width, GLsizei height );
932
933 GLAPI void GLAPIENTRY glPushMatrix( void );
934
935 GLAPI void GLAPIENTRY glPopMatrix( void );
936
937 GLAPI void GLAPIENTRY glLoadIdentity( void );
938
939 GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
940 GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
941
942 GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
943 GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
944
945 GLAPI void GLAPIENTRY glRotated( GLdouble angle,
946 GLdouble x, GLdouble y, GLdouble z );
947 GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
948 GLfloat x, GLfloat y, GLfloat z );
949
950 GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
951 GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
952
953 GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
954 GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
955
956
957 /*
958 * Display Lists
959 */
960
961 GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
962
963 GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
964
965 GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
966
967 GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
968
969 GLAPI void GLAPIENTRY glEndList( void );
970
971 GLAPI void GLAPIENTRY glCallList( GLuint list );
972
973 GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
974 const GLvoid *lists );
975
976 GLAPI void GLAPIENTRY glListBase( GLuint base );
977
978
979 /*
980 * Drawing Functions
981 */
982
983 GLAPI void GLAPIENTRY glBegin( GLenum mode );
984
985 GLAPI void GLAPIENTRY glEnd( void );
986
987
988 GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
989 GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
990 GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
991 GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
992
993 GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
994 GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
995 GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
996 GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
997
998 GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
999 GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1000 GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
1001 GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
1002
1003 GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
1004 GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
1005 GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
1006 GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
1007
1008 GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
1009 GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
1010 GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
1011 GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
1012
1013 GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
1014 GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
1015 GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
1016 GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
1017
1018
1019 GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
1020 GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
1021 GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
1022 GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
1023 GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
1024
1025 GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
1026 GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
1027 GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
1028 GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
1029 GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
1030
1031
1032 GLAPI void GLAPIENTRY glIndexd( GLdouble c );
1033 GLAPI void GLAPIENTRY glIndexf( GLfloat c );
1034 GLAPI void GLAPIENTRY glIndexi( GLint c );
1035 GLAPI void GLAPIENTRY glIndexs( GLshort c );
1036 GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
1037
1038 GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
1039 GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
1040 GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
1041 GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
1042 GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
1043
1044 GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
1045 GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
1046 GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
1047 GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
1048 GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
1049 GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
1050 GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
1051 GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
1052
1053 GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
1054 GLbyte blue, GLbyte alpha );
1055 GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
1056 GLdouble blue, GLdouble alpha );
1057 GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
1058 GLfloat blue, GLfloat alpha );
1059 GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
1060 GLint blue, GLint alpha );
1061 GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
1062 GLshort blue, GLshort alpha );
1063 GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
1064 GLubyte blue, GLubyte alpha );
1065 GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
1066 GLuint blue, GLuint alpha );
1067 GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
1068 GLushort blue, GLushort alpha );
1069
1070
1071 GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
1072 GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
1073 GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
1074 GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
1075 GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
1076 GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
1077 GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
1078 GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
1079
1080 GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
1081 GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
1082 GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
1083 GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
1084 GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
1085 GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
1086 GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
1087 GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
1088
1089
1090 GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
1091 GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
1092 GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
1093 GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
1094
1095 GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
1096 GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
1097 GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
1098 GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
1099
1100 GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
1101 GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
1102 GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
1103 GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
1104
1105 GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1106 GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1107 GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
1108 GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
1109
1110 GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
1111 GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
1112 GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
1113 GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
1114
1115 GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
1116 GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
1117 GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
1118 GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
1119
1120 GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
1121 GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
1122 GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
1123 GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
1124
1125 GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
1126 GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
1127 GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
1128 GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
1129
1130
1131 GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
1132 GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
1133 GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
1134 GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
1135
1136 GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
1137 GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
1138 GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
1139 GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
1140
1141 GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1142 GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1143 GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
1144 GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
1145
1146 GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
1147 GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
1148 GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
1149 GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
1150
1151 GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
1152 GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
1153 GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
1154 GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
1155
1156 GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
1157 GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
1158 GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
1159 GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
1160
1161
1162 GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1163 GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1164 GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
1165 GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1166
1167
1168 GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
1169 GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
1170 GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
1171 GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
1172
1173
1174 /*
1175 * Vertex Arrays (1.1)
1176 */
1177
1178 GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
1179 GLsizei stride, const GLvoid *ptr );
1180
1181 GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
1182 const GLvoid *ptr );
1183
1184 GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
1185 GLsizei stride, const GLvoid *ptr );
1186
1187 GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
1188 const GLvoid *ptr );
1189
1190 GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
1191 GLsizei stride, const GLvoid *ptr );
1192
1193 GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
1194
1195 GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
1196
1197 GLAPI void GLAPIENTRY glArrayElement( GLint i );
1198
1199 GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
1200
1201 GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
1202 GLenum type, const GLvoid *indices );
1203
1204 GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
1205 const GLvoid *pointer );
1206
1207 /*
1208 * Lighting
1209 */
1210
1211 GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
1212
1213 GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
1214 GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
1215 GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
1216 const GLfloat *params );
1217 GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
1218 const GLint *params );
1219
1220 GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
1221 GLfloat *params );
1222 GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
1223 GLint *params );
1224
1225 GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
1226 GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
1227 GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
1228 GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
1229
1230 GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
1231 GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
1232 GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
1233 GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
1234
1235 GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
1236 GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
1237
1238 GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
1239
1240
1241 /*
1242 * Raster functions
1243 */
1244
1245 GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
1246
1247 GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
1248 GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
1249
1250 GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
1251 GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
1252
1253 GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
1254 const GLfloat *values );
1255 GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
1256 const GLuint *values );
1257 GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
1258 const GLushort *values );
1259
1260 GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
1261 GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
1262 GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
1263
1264 GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
1265 GLfloat xorig, GLfloat yorig,
1266 GLfloat xmove, GLfloat ymove,
1267 const GLubyte *bitmap );
1268
1269 GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
1270 GLsizei width, GLsizei height,
1271 GLenum format, GLenum type,
1272 GLvoid *pixels );
1273
1274 GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
1275 GLenum format, GLenum type,
1276 const GLvoid *pixels );
1277
1278 GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
1279 GLsizei width, GLsizei height,
1280 GLenum type );
1281
1282 /*
1283 * Stenciling
1284 */
1285
1286 GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
1287
1288 GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
1289
1290 GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
1291
1292 GLAPI void GLAPIENTRY glClearStencil( GLint s );
1293
1294
1295
1296 /*
1297 * Texture mapping
1298 */
1299
1300 GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
1301 GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
1302 GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
1303
1304 GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
1305 GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
1306 GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
1307
1308 GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
1309 GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
1310 GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
1311
1312
1313 GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
1314 GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
1315
1316 GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
1317 GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
1318
1319 GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
1320 GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
1321
1322
1323 GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
1324 GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
1325
1326 GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
1327 const GLfloat *params );
1328 GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
1329 const GLint *params );
1330
1331 GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
1332 GLenum pname, GLfloat *params);
1333 GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
1334 GLenum pname, GLint *params );
1335
1336 GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
1337 GLenum pname, GLfloat *params );
1338 GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
1339 GLenum pname, GLint *params );
1340
1341
1342 GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
1343 GLint internalFormat,
1344 GLsizei width, GLint border,
1345 GLenum format, GLenum type,
1346 const GLvoid *pixels );
1347
1348 GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
1349 GLint internalFormat,
1350 GLsizei width, GLsizei height,
1351 GLint border, GLenum format, GLenum type,
1352 const GLvoid *pixels );
1353
1354 GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
1355 GLenum format, GLenum type,
1356 GLvoid *pixels );
1357
1358
1359 /* 1.1 functions */
1360
1361 GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
1362
1363 GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
1364
1365 GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
1366
1367 GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
1368 const GLuint *textures,
1369 const GLclampf *priorities );
1370
1371 GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
1372 const GLuint *textures,
1373 GLboolean *residences );
1374
1375 GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
1376
1377
1378 GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
1379 GLint xoffset,
1380 GLsizei width, GLenum format,
1381 GLenum type, const GLvoid *pixels );
1382
1383
1384 GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
1385 GLint xoffset, GLint yoffset,
1386 GLsizei width, GLsizei height,
1387 GLenum format, GLenum type,
1388 const GLvoid *pixels );
1389
1390
1391 GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
1392 GLenum internalformat,
1393 GLint x, GLint y,
1394 GLsizei width, GLint border );
1395
1396
1397 GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
1398 GLenum internalformat,
1399 GLint x, GLint y,
1400 GLsizei width, GLsizei height,
1401 GLint border );
1402
1403
1404 GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
1405 GLint xoffset, GLint x, GLint y,
1406 GLsizei width );
1407
1408
1409 GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
1410 GLint xoffset, GLint yoffset,
1411 GLint x, GLint y,
1412 GLsizei width, GLsizei height );
1413
1414
1415 /*
1416 * Evaluators
1417 */
1418
1419 GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
1420 GLint stride,
1421 GLint order, const GLdouble *points );
1422 GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
1423 GLint stride,
1424 GLint order, const GLfloat *points );
1425
1426 GLAPI void GLAPIENTRY glMap2d( GLenum target,
1427 GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
1428 GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
1429 const GLdouble *points );
1430 GLAPI void GLAPIENTRY glMap2f( GLenum target,
1431 GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
1432 GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
1433 const GLfloat *points );
1434
1435 GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
1436 GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
1437 GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
1438
1439 GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
1440 GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
1441
1442 GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
1443 GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
1444
1445 GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
1446 GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
1447
1448 GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
1449 GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
1450
1451 GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
1452 GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
1453
1454 GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
1455 GLint vn, GLdouble v1, GLdouble v2 );
1456 GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
1457 GLint vn, GLfloat v1, GLfloat v2 );
1458
1459 GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
1460
1461 GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
1462
1463 GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
1464
1465 GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1466
1467
1468 /*
1469 * Fog
1470 */
1471
1472 GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
1473
1474 GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
1475
1476 GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
1477
1478 GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
1479
1480
1481 /*
1482 * Selection and Feedback
1483 */
1484
1485 GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
1486
1487 GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
1488
1489 GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
1490
1491 GLAPI void GLAPIENTRY glInitNames( void );
1492
1493 GLAPI void GLAPIENTRY glLoadName( GLuint name );
1494
1495 GLAPI void GLAPIENTRY glPushName( GLuint name );
1496
1497 GLAPI void GLAPIENTRY glPopName( void );
1498
1499
1500
1501 /*
1502 * OpenGL 1.2
1503 */
1504
1505 #define GL_RESCALE_NORMAL 0x803A
1506 #define GL_CLAMP_TO_EDGE 0x812F
1507 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
1508 #define GL_MAX_ELEMENTS_INDICES 0x80E9
1509 #define GL_BGR 0x80E0
1510 #define GL_BGRA 0x80E1
1511 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
1512 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
1513 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
1514 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
1515 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
1516 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
1517 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
1518 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
1519 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
1520 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
1521 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
1522 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
1523 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
1524 #define GL_SINGLE_COLOR 0x81F9
1525 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
1526 #define GL_TEXTURE_MIN_LOD 0x813A
1527 #define GL_TEXTURE_MAX_LOD 0x813B
1528 #define GL_TEXTURE_BASE_LEVEL 0x813C
1529 #define GL_TEXTURE_MAX_LEVEL 0x813D
1530 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
1531 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
1532 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
1533 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
1534 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1535 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1536 #define GL_PACK_SKIP_IMAGES 0x806B
1537 #define GL_PACK_IMAGE_HEIGHT 0x806C
1538 #define GL_UNPACK_SKIP_IMAGES 0x806D
1539 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
1540 #define GL_TEXTURE_3D 0x806F
1541 #define GL_PROXY_TEXTURE_3D 0x8070
1542 #define GL_TEXTURE_DEPTH 0x8071
1543 #define GL_TEXTURE_WRAP_R 0x8072
1544 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
1545 #define GL_TEXTURE_BINDING_3D 0x806A
1546
1547 GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
1548 GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
1549
1550 GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
1551 GLint internalFormat,
1552 GLsizei width, GLsizei height,
1553 GLsizei depth, GLint border,
1554 GLenum format, GLenum type,
1555 const GLvoid *pixels );
1556
1557 GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
1558 GLint xoffset, GLint yoffset,
1559 GLint zoffset, GLsizei width,
1560 GLsizei height, GLsizei depth,
1561 GLenum format,
1562 GLenum type, const GLvoid *pixels);
1563
1564 GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
1565 GLint xoffset, GLint yoffset,
1566 GLint zoffset, GLint x,
1567 GLint y, GLsizei width,
1568 GLsizei height );
1569
1570 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
1571 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
1572 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
1573 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1574
1575
1576 /*
1577 * GL_ARB_imaging
1578 */
1579
1580 #define GL_CONSTANT_COLOR 0x8001
1581 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1582 #define GL_CONSTANT_ALPHA 0x8003
1583 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1584 #define GL_COLOR_TABLE 0x80D0
1585 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
1586 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
1587 #define GL_PROXY_COLOR_TABLE 0x80D3
1588 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
1589 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
1590 #define GL_COLOR_TABLE_SCALE 0x80D6
1591 #define GL_COLOR_TABLE_BIAS 0x80D7
1592 #define GL_COLOR_TABLE_FORMAT 0x80D8
1593 #define GL_COLOR_TABLE_WIDTH 0x80D9
1594 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
1595 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
1596 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
1597 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
1598 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
1599 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
1600 #define GL_CONVOLUTION_1D 0x8010
1601 #define GL_CONVOLUTION_2D 0x8011
1602 #define GL_SEPARABLE_2D 0x8012
1603 #define GL_CONVOLUTION_BORDER_MODE 0x8013
1604 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
1605 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
1606 #define GL_REDUCE 0x8016
1607 #define GL_CONVOLUTION_FORMAT 0x8017
1608 #define GL_CONVOLUTION_WIDTH 0x8018
1609 #define GL_CONVOLUTION_HEIGHT 0x8019
1610 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
1611 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
1612 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
1613 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
1614 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
1615 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
1616 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
1617 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
1618 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
1619 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
1620 #define GL_CONSTANT_BORDER 0x8151
1621 #define GL_REPLICATE_BORDER 0x8153
1622 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
1623 #define GL_COLOR_MATRIX 0x80B1
1624 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
1625 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
1626 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
1627 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
1628 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
1629 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
1630 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
1631 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
1632 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
1633 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
1634 #define GL_HISTOGRAM 0x8024
1635 #define GL_PROXY_HISTOGRAM 0x8025
1636 #define GL_HISTOGRAM_WIDTH 0x8026
1637 #define GL_HISTOGRAM_FORMAT 0x8027
1638 #define GL_HISTOGRAM_RED_SIZE 0x8028
1639 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
1640 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
1641 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
1642 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
1643 #define GL_HISTOGRAM_SINK 0x802D
1644 #define GL_MINMAX 0x802E
1645 #define GL_MINMAX_FORMAT 0x802F
1646 #define GL_MINMAX_SINK 0x8030
1647 #define GL_TABLE_TOO_LARGE 0x8031
1648 #define GL_BLEND_EQUATION 0x8009
1649 #define GL_MIN 0x8007
1650 #define GL_MAX 0x8008
1651 #define GL_FUNC_ADD 0x8006
1652 #define GL_FUNC_SUBTRACT 0x800A
1653 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1654 #define GL_BLEND_COLOR 0x8005
1655
1656
1657 GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
1658 GLsizei width, GLenum format,
1659 GLenum type, const GLvoid *table );
1660
1661 GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
1662 GLsizei start, GLsizei count,
1663 GLenum format, GLenum type,
1664 const GLvoid *data );
1665
1666 GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
1667 const GLint *params);
1668
1669 GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
1670 const GLfloat *params);
1671
1672 GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
1673 GLint x, GLint y, GLsizei width );
1674
1675 GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
1676 GLint x, GLint y, GLsizei width );
1677
1678 GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
1679 GLenum type, GLvoid *table );
1680
1681 GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
1682 GLfloat *params );
1683
1684 GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
1685 GLint *params );
1686
1687 GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
1688
1689 GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
1690 GLclampf blue, GLclampf alpha );
1691
1692 GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
1693 GLenum internalformat, GLboolean sink );
1694
1695 GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
1696
1697 GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
1698 GLenum format, GLenum type,
1699 GLvoid *values );
1700
1701 GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
1702 GLfloat *params );
1703
1704 GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
1705 GLint *params );
1706
1707 GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
1708 GLboolean sink );
1709
1710 GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
1711
1712 GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
1713 GLenum format, GLenum types,
1714 GLvoid *values );
1715
1716 GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
1717 GLfloat *params );
1718
1719 GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
1720 GLint *params );
1721
1722 GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
1723 GLenum internalformat, GLsizei width, GLenum format, GLenum type,
1724 const GLvoid *image );
1725
1726 GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
1727 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1728 GLenum type, const GLvoid *image );
1729
1730 GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
1731 GLfloat params );
1732
1733 GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
1734 const GLfloat *params );
1735
1736 GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
1737 GLint params );
1738
1739 GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
1740 const GLint *params );
1741
1742 GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
1743 GLenum internalformat, GLint x, GLint y, GLsizei width );
1744
1745 GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
1746 GLenum internalformat, GLint x, GLint y, GLsizei width,
1747 GLsizei height);
1748
1749 GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
1750 GLenum type, GLvoid *image );
1751
1752 GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
1753 GLfloat *params );
1754
1755 GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
1756 GLint *params );
1757
1758 GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
1759 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1760 GLenum type, const GLvoid *row, const GLvoid *column );
1761
1762 GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
1763 GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
1764
1765
1766
1767
1768 /*
1769 * OpenGL 1.3
1770 */
1771
1772 /* multitexture */
1773 #define GL_TEXTURE0 0x84C0
1774 #define GL_TEXTURE1 0x84C1
1775 #define GL_TEXTURE2 0x84C2
1776 #define GL_TEXTURE3 0x84C3
1777 #define GL_TEXTURE4 0x84C4
1778 #define GL_TEXTURE5 0x84C5
1779 #define GL_TEXTURE6 0x84C6
1780 #define GL_TEXTURE7 0x84C7
1781 #define GL_TEXTURE8 0x84C8
1782 #define GL_TEXTURE9 0x84C9
1783 #define GL_TEXTURE10 0x84CA
1784 #define GL_TEXTURE11 0x84CB
1785 #define GL_TEXTURE12 0x84CC
1786 #define GL_TEXTURE13 0x84CD
1787 #define GL_TEXTURE14 0x84CE
1788 #define GL_TEXTURE15 0x84CF
1789 #define GL_TEXTURE16 0x84D0
1790 #define GL_TEXTURE17 0x84D1
1791 #define GL_TEXTURE18 0x84D2
1792 #define GL_TEXTURE19 0x84D3
1793 #define GL_TEXTURE20 0x84D4
1794 #define GL_TEXTURE21 0x84D5
1795 #define GL_TEXTURE22 0x84D6
1796 #define GL_TEXTURE23 0x84D7
1797 #define GL_TEXTURE24 0x84D8
1798 #define GL_TEXTURE25 0x84D9
1799 #define GL_TEXTURE26 0x84DA
1800 #define GL_TEXTURE27 0x84DB
1801 #define GL_TEXTURE28 0x84DC
1802 #define GL_TEXTURE29 0x84DD
1803 #define GL_TEXTURE30 0x84DE
1804 #define GL_TEXTURE31 0x84DF
1805 #define GL_ACTIVE_TEXTURE 0x84E0
1806 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
1807 #define GL_MAX_TEXTURE_UNITS 0x84E2
1808 /* texture_cube_map */
1809 #define GL_NORMAL_MAP 0x8511
1810 #define GL_REFLECTION_MAP 0x8512
1811 #define GL_TEXTURE_CUBE_MAP 0x8513
1812 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
1813 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
1814 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
1815 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
1816 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
1817 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
1818 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
1819 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
1820 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1821 /* texture_compression */
1822 #define GL_COMPRESSED_ALPHA 0x84E9
1823 #define GL_COMPRESSED_LUMINANCE 0x84EA
1824 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
1825 #define GL_COMPRESSED_INTENSITY 0x84EC
1826 #define GL_COMPRESSED_RGB 0x84ED
1827 #define GL_COMPRESSED_RGBA 0x84EE
1828 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
1829 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
1830 #define GL_TEXTURE_COMPRESSED 0x86A1
1831 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1832 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1833 /* multisample */
1834 #define GL_MULTISAMPLE 0x809D
1835 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1836 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
1837 #define GL_SAMPLE_COVERAGE 0x80A0
1838 #define GL_SAMPLE_BUFFERS 0x80A8
1839 #define GL_SAMPLES 0x80A9
1840 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1841 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1842 #define GL_MULTISAMPLE_BIT 0x20000000
1843 /* transpose_matrix */
1844 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
1845 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
1846 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
1847 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
1848 /* texture_env_combine */
1849 #define GL_COMBINE 0x8570
1850 #define GL_COMBINE_RGB 0x8571
1851 #define GL_COMBINE_ALPHA 0x8572
1852 #define GL_SOURCE0_RGB 0x8580
1853 #define GL_SOURCE1_RGB 0x8581
1854 #define GL_SOURCE2_RGB 0x8582
1855 #define GL_SOURCE0_ALPHA 0x8588
1856 #define GL_SOURCE1_ALPHA 0x8589
1857 #define GL_SOURCE2_ALPHA 0x858A
1858 #define GL_OPERAND0_RGB 0x8590
1859 #define GL_OPERAND1_RGB 0x8591
1860 #define GL_OPERAND2_RGB 0x8592
1861 #define GL_OPERAND0_ALPHA 0x8598
1862 #define GL_OPERAND1_ALPHA 0x8599
1863 #define GL_OPERAND2_ALPHA 0x859A
1864 #define GL_RGB_SCALE 0x8573
1865 #define GL_ADD_SIGNED 0x8574
1866 #define GL_INTERPOLATE 0x8575
1867 #define GL_SUBTRACT 0x84E7
1868 #define GL_CONSTANT 0x8576
1869 #define GL_PRIMARY_COLOR 0x8577
1870 #define GL_PREVIOUS 0x8578
1871 /* texture_env_dot3 */
1872 #define GL_DOT3_RGB 0x86AE
1873 #define GL_DOT3_RGBA 0x86AF
1874 /* texture_border_clamp */
1875 #define GL_CLAMP_TO_BORDER 0x812D
1876
1877 GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
1878
1879 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
1880
1881 GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
1882
1883 GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
1884
1885 GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
1886
1887 GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
1888
1889 GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
1890
1891 GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
1892
1893 GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
1894
1895 GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
1896
1897 GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
1898
1899 GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
1900
1901 GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
1902
1903 GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
1904
1905 GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
1906
1907 GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
1908
1909 GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
1910
1911 GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
1912
1913 GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
1914
1915 GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
1916
1917 GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
1918
1919 GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
1920
1921 GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
1922
1923 GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
1924
1925 GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
1926
1927 GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
1928
1929 GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
1930
1931 GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
1932
1933 GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
1934
1935 GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
1936
1937 GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
1938
1939 GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
1940
1941 GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
1942
1943 GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1944
1945 GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
1946
1947 GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1948
1949 GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
1950
1951 GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
1952
1953 GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
1954
1955 GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
1956
1957 GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
1958
1959
1960 GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
1961
1962 GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
1963
1964 GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
1965
1966 GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
1967
1968 GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
1969
1970
1971 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
1972 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
1973 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
1974 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
1975 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
1976 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
1977 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
1978 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
1979 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
1980
1981
1982
1983 /*
1984 * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
1985 */
1986 #ifndef GL_ARB_multitexture
1987 #define GL_ARB_multitexture 1
1988
1989 #define GL_TEXTURE0_ARB 0x84C0
1990 #define GL_TEXTURE1_ARB 0x84C1
1991 #define GL_TEXTURE2_ARB 0x84C2
1992 #define GL_TEXTURE3_ARB 0x84C3
1993 #define GL_TEXTURE4_ARB 0x84C4
1994 #define GL_TEXTURE5_ARB 0x84C5
1995 #define GL_TEXTURE6_ARB 0x84C6
1996 #define GL_TEXTURE7_ARB 0x84C7
1997 #define GL_TEXTURE8_ARB 0x84C8
1998 #define GL_TEXTURE9_ARB 0x84C9
1999 #define GL_TEXTURE10_ARB 0x84CA
2000 #define GL_TEXTURE11_ARB 0x84CB
2001 #define GL_TEXTURE12_ARB 0x84CC
2002 #define GL_TEXTURE13_ARB 0x84CD
2003 #define GL_TEXTURE14_ARB 0x84CE
2004 #define GL_TEXTURE15_ARB 0x84CF
2005 #define GL_TEXTURE16_ARB 0x84D0
2006 #define GL_TEXTURE17_ARB 0x84D1
2007 #define GL_TEXTURE18_ARB 0x84D2
2008 #define GL_TEXTURE19_ARB 0x84D3
2009 #define GL_TEXTURE20_ARB 0x84D4
2010 #define GL_TEXTURE21_ARB 0x84D5
2011 #define GL_TEXTURE22_ARB 0x84D6
2012 #define GL_TEXTURE23_ARB 0x84D7
2013 #define GL_TEXTURE24_ARB 0x84D8
2014 #define GL_TEXTURE25_ARB 0x84D9
2015 #define GL_TEXTURE26_ARB 0x84DA
2016 #define GL_TEXTURE27_ARB 0x84DB
2017 #define GL_TEXTURE28_ARB 0x84DC
2018 #define GL_TEXTURE29_ARB 0x84DD
2019 #define GL_TEXTURE30_ARB 0x84DE
2020 #define GL_TEXTURE31_ARB 0x84DF
2021 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
2022 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
2023 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
2024
2025 GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
2026 GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
2027 GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
2028 GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
2029 GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
2030 GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
2031 GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
2032 GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
2033 GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
2034 GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
2035 GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
2036 GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
2037 GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
2038 GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
2039 GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
2040 GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
2041 GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
2042 GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
2043 GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
2044 GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
2045 GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
2046 GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
2047 GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
2048 GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
2049 GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
2050 GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
2051 GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2052 GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
2053 GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2054 GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
2055 GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
2056 GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
2057 GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2058 GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
2059
2060 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
2061 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
2062 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
2063 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
2064 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
2065 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
2066 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
2067 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
2068 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
2069 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
2070 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
2071 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
2072 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
2073 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
2074 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
2075 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
2076 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
2077 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
2078 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
2079 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
2080 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
2081 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
2082 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
2083 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
2084 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
2085 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
2086 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2087 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
2088 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2089 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
2090 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
2091 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
2092 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2093 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
2094
2095 #endif /* GL_ARB_multitexture */
2096
2097
2098
2099 /*
2100 * Define this token if you want "old-style" header file behaviour (extensions
2101 * defined in gl.h). Otherwise, extensions will be included from glext.h.
2102 */
2103 #if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
2104 #include <SDL2/SDL_opengl_glext.h>
2105 #endif /* GL_GLEXT_LEGACY */
2106
2107
2108
2109 /*
2110 * ???. GL_MESA_packed_depth_stencil
2111 * XXX obsolete
2112 */
2113 #ifndef GL_MESA_packed_depth_stencil
2114 #define GL_MESA_packed_depth_stencil 1
2115
2116 #define GL_DEPTH_STENCIL_MESA 0x8750
2117 #define GL_UNSIGNED_INT_24_8_MESA 0x8751
2118 #define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
2119 #define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
2120 #define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
2121
2122 #endif /* GL_MESA_packed_depth_stencil */
2123
2124
2125 #ifndef GL_ATI_blend_equation_separate
2126 #define GL_ATI_blend_equation_separate 1
2127
2128 #define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
2129
2130 GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
2131 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
2132
2133 #endif /* GL_ATI_blend_equation_separate */
2134
2135
2136 /* GL_OES_EGL_image */
2137 #ifndef GL_OES_EGL_image
2138 typedef void* GLeglImageOES;
2139 #endif
2140
2141 #ifndef GL_OES_EGL_image
2142 #define GL_OES_EGL_image 1
2143 #ifdef GL_GLEXT_PROTOTYPES
2144 GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
2145 GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
2146 #endif
2147 typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
2148 typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
2149 #endif
2150
2151
2152 /**
2153 ** NOTE!!!!! If you add new functions to this file, or update
2154 ** glext.h be sure to regenerate the gl_mangle.h file. See comments
2155 ** in that file for details.
2156 **/
2157
2158
2159
2160 /**********************************************************************
2161 * Begin system-specific stuff
2162 */
2163 #if defined(PRAGMA_EXPORT_SUPPORTED)
2164 #pragma export off
2165 #endif
2166
2167 /*
2168 * End system-specific stuff
2169 **********************************************************************/
2170
2171
2172 #ifdef __cplusplus
2173 }
2174 #endif
2175
2176 #endif /* __gl_h_ */
2177
2178 #endif /* !__IPHONEOS__ */
2179
2180 #endif /* SDL_opengl_h_ */
2181
2182 /* vi: set ts=4 sw=4 expandtab: */
0 #ifndef __glext_h_
1 #define __glext_h_ 1
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 /*
8 ** Copyright (c) 2013-2014 The Khronos Group Inc.
9 **
10 ** Permission is hereby granted, free of charge, to any person obtaining a
11 ** copy of this software and/or associated documentation files (the
12 ** "Materials"), to deal in the Materials without restriction, including
13 ** without limitation the rights to use, copy, modify, merge, publish,
14 ** distribute, sublicense, and/or sell copies of the Materials, and to
15 ** permit persons to whom the Materials are furnished to do so, subject to
16 ** the following conditions:
17 **
18 ** The above copyright notice and this permission notice shall be included
19 ** in all copies or substantial portions of the Materials.
20 **
21 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28 */
29 /*
30 ** This header is generated from the Khronos OpenGL / OpenGL ES XML
31 ** API Registry. The current version of the Registry, generator scripts
32 ** used to make the header, and the header can be found at
33 ** http://www.opengl.org/registry/
34 **
35 ** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $
36 */
37
38 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
39 #ifndef WIN32_LEAN_AND_MEAN
40 #define WIN32_LEAN_AND_MEAN 1
41 #endif
42 #ifndef NOMINMAX /* don't define min() and max(). */
43 #define NOMINMAX
44 #endif
45 #include <windows.h>
46 #endif
47
48 #ifndef APIENTRY
49 #define APIENTRY
50 #endif
51 #ifndef APIENTRYP
52 #define APIENTRYP APIENTRY *
53 #endif
54 #ifndef GLAPI
55 #define GLAPI extern
56 #endif
57
58 #define GL_GLEXT_VERSION 20140521
59
60 /* Generated C header for:
61 * API: gl
62 * Profile: compatibility
63 * Versions considered: .*
64 * Versions emitted: 1\.[2-9]|[234]\.[0-9]
65 * Default extensions included: gl
66 * Additional extensions included: _nomatch_^
67 * Extensions removed: _nomatch_^
68 */
69
70 #ifndef GL_VERSION_1_2
71 #define GL_VERSION_1_2 1
72 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
73 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
74 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
75 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
76 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
77 #define GL_TEXTURE_BINDING_3D 0x806A
78 #define GL_PACK_SKIP_IMAGES 0x806B
79 #define GL_PACK_IMAGE_HEIGHT 0x806C
80 #define GL_UNPACK_SKIP_IMAGES 0x806D
81 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
82 #define GL_TEXTURE_3D 0x806F
83 #define GL_PROXY_TEXTURE_3D 0x8070
84 #define GL_TEXTURE_DEPTH 0x8071
85 #define GL_TEXTURE_WRAP_R 0x8072
86 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
87 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
88 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
89 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
90 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
91 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
92 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
93 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
94 #define GL_BGR 0x80E0
95 #define GL_BGRA 0x80E1
96 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
97 #define GL_MAX_ELEMENTS_INDICES 0x80E9
98 #define GL_CLAMP_TO_EDGE 0x812F
99 #define GL_TEXTURE_MIN_LOD 0x813A
100 #define GL_TEXTURE_MAX_LOD 0x813B
101 #define GL_TEXTURE_BASE_LEVEL 0x813C
102 #define GL_TEXTURE_MAX_LEVEL 0x813D
103 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
104 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
105 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
106 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
107 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
108 #define GL_RESCALE_NORMAL 0x803A
109 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
110 #define GL_SINGLE_COLOR 0x81F9
111 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
112 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
113 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
114 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
115 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
116 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
117 #ifdef GL_GLEXT_PROTOTYPES
118 GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
119 GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
120 GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
121 GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
122 #endif
123 #endif /* GL_VERSION_1_2 */
124
125 #ifndef GL_VERSION_1_3
126 #define GL_VERSION_1_3 1
127 #define GL_TEXTURE0 0x84C0
128 #define GL_TEXTURE1 0x84C1
129 #define GL_TEXTURE2 0x84C2
130 #define GL_TEXTURE3 0x84C3
131 #define GL_TEXTURE4 0x84C4
132 #define GL_TEXTURE5 0x84C5
133 #define GL_TEXTURE6 0x84C6
134 #define GL_TEXTURE7 0x84C7
135 #define GL_TEXTURE8 0x84C8
136 #define GL_TEXTURE9 0x84C9
137 #define GL_TEXTURE10 0x84CA
138 #define GL_TEXTURE11 0x84CB
139 #define GL_TEXTURE12 0x84CC
140 #define GL_TEXTURE13 0x84CD
141 #define GL_TEXTURE14 0x84CE
142 #define GL_TEXTURE15 0x84CF
143 #define GL_TEXTURE16 0x84D0
144 #define GL_TEXTURE17 0x84D1
145 #define GL_TEXTURE18 0x84D2
146 #define GL_TEXTURE19 0x84D3
147 #define GL_TEXTURE20 0x84D4
148 #define GL_TEXTURE21 0x84D5
149 #define GL_TEXTURE22 0x84D6
150 #define GL_TEXTURE23 0x84D7
151 #define GL_TEXTURE24 0x84D8
152 #define GL_TEXTURE25 0x84D9
153 #define GL_TEXTURE26 0x84DA
154 #define GL_TEXTURE27 0x84DB
155 #define GL_TEXTURE28 0x84DC
156 #define GL_TEXTURE29 0x84DD
157 #define GL_TEXTURE30 0x84DE
158 #define GL_TEXTURE31 0x84DF
159 #define GL_ACTIVE_TEXTURE 0x84E0
160 #define GL_MULTISAMPLE 0x809D
161 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
162 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
163 #define GL_SAMPLE_COVERAGE 0x80A0
164 #define GL_SAMPLE_BUFFERS 0x80A8
165 #define GL_SAMPLES 0x80A9
166 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
167 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
168 #define GL_TEXTURE_CUBE_MAP 0x8513
169 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
170 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
171 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
172 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
173 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
174 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
175 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
176 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
177 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
178 #define GL_COMPRESSED_RGB 0x84ED
179 #define GL_COMPRESSED_RGBA 0x84EE
180 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
181 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
182 #define GL_TEXTURE_COMPRESSED 0x86A1
183 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
184 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
185 #define GL_CLAMP_TO_BORDER 0x812D
186 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
187 #define GL_MAX_TEXTURE_UNITS 0x84E2
188 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
189 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
190 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
191 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
192 #define GL_MULTISAMPLE_BIT 0x20000000
193 #define GL_NORMAL_MAP 0x8511
194 #define GL_REFLECTION_MAP 0x8512
195 #define GL_COMPRESSED_ALPHA 0x84E9
196 #define GL_COMPRESSED_LUMINANCE 0x84EA
197 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
198 #define GL_COMPRESSED_INTENSITY 0x84EC
199 #define GL_COMBINE 0x8570
200 #define GL_COMBINE_RGB 0x8571
201 #define GL_COMBINE_ALPHA 0x8572
202 #define GL_SOURCE0_RGB 0x8580
203 #define GL_SOURCE1_RGB 0x8581
204 #define GL_SOURCE2_RGB 0x8582
205 #define GL_SOURCE0_ALPHA 0x8588
206 #define GL_SOURCE1_ALPHA 0x8589
207 #define GL_SOURCE2_ALPHA 0x858A
208 #define GL_OPERAND0_RGB 0x8590
209 #define GL_OPERAND1_RGB 0x8591
210 #define GL_OPERAND2_RGB 0x8592
211 #define GL_OPERAND0_ALPHA 0x8598
212 #define GL_OPERAND1_ALPHA 0x8599
213 #define GL_OPERAND2_ALPHA 0x859A
214 #define GL_RGB_SCALE 0x8573
215 #define GL_ADD_SIGNED 0x8574
216 #define GL_INTERPOLATE 0x8575
217 #define GL_SUBTRACT 0x84E7
218 #define GL_CONSTANT 0x8576
219 #define GL_PRIMARY_COLOR 0x8577
220 #define GL_PREVIOUS 0x8578
221 #define GL_DOT3_RGB 0x86AE
222 #define GL_DOT3_RGBA 0x86AF
223 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
224 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
225 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
226 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
227 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
228 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
229 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
230 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
231 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
232 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
233 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
234 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
235 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
236 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
237 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
238 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
239 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
240 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
241 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
242 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
243 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
244 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
245 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
246 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
247 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
248 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
249 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
250 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
251 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
252 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
253 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
254 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
255 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
256 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
257 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
258 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
259 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
260 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
261 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
262 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
263 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
264 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
265 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
266 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
267 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
268 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
269 #ifdef GL_GLEXT_PROTOTYPES
270 GLAPI void APIENTRY glActiveTexture (GLenum texture);
271 GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
272 GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
273 GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
274 GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
275 GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
276 GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
277 GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
278 GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
279 GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
280 GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
281 GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
282 GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
283 GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
284 GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
285 GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
286 GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
287 GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
288 GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
289 GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
290 GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
291 GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
292 GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
293 GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
294 GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
295 GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
296 GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
297 GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
298 GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
299 GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
300 GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
301 GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
302 GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
303 GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
304 GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
305 GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
306 GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
307 GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
308 GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
309 GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
310 GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
311 GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
312 GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
313 GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
314 GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
315 GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
316 #endif
317 #endif /* GL_VERSION_1_3 */
318
319 #ifndef GL_VERSION_1_4
320 #define GL_VERSION_1_4 1
321 #define GL_BLEND_DST_RGB 0x80C8
322 #define GL_BLEND_SRC_RGB 0x80C9
323 #define GL_BLEND_DST_ALPHA 0x80CA
324 #define GL_BLEND_SRC_ALPHA 0x80CB
325 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
326 #define GL_DEPTH_COMPONENT16 0x81A5
327 #define GL_DEPTH_COMPONENT24 0x81A6
328 #define GL_DEPTH_COMPONENT32 0x81A7
329 #define GL_MIRRORED_REPEAT 0x8370
330 #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
331 #define GL_TEXTURE_LOD_BIAS 0x8501
332 #define GL_INCR_WRAP 0x8507
333 #define GL_DECR_WRAP 0x8508
334 #define GL_TEXTURE_DEPTH_SIZE 0x884A
335 #define GL_TEXTURE_COMPARE_MODE 0x884C
336 #define GL_TEXTURE_COMPARE_FUNC 0x884D
337 #define GL_POINT_SIZE_MIN 0x8126
338 #define GL_POINT_SIZE_MAX 0x8127
339 #define GL_POINT_DISTANCE_ATTENUATION 0x8129
340 #define GL_GENERATE_MIPMAP 0x8191
341 #define GL_GENERATE_MIPMAP_HINT 0x8192
342 #define GL_FOG_COORDINATE_SOURCE 0x8450
343 #define GL_FOG_COORDINATE 0x8451
344 #define GL_FRAGMENT_DEPTH 0x8452
345 #define GL_CURRENT_FOG_COORDINATE 0x8453
346 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
347 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
348 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
349 #define GL_FOG_COORDINATE_ARRAY 0x8457
350 #define GL_COLOR_SUM 0x8458
351 #define GL_CURRENT_SECONDARY_COLOR 0x8459
352 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
353 #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
354 #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
355 #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
356 #define GL_SECONDARY_COLOR_ARRAY 0x845E
357 #define GL_TEXTURE_FILTER_CONTROL 0x8500
358 #define GL_DEPTH_TEXTURE_MODE 0x884B
359 #define GL_COMPARE_R_TO_TEXTURE 0x884E
360 #define GL_FUNC_ADD 0x8006
361 #define GL_FUNC_SUBTRACT 0x800A
362 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
363 #define GL_MIN 0x8007
364 #define GL_MAX 0x8008
365 #define GL_CONSTANT_COLOR 0x8001
366 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
367 #define GL_CONSTANT_ALPHA 0x8003
368 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
369 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
370 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
371 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
372 typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
373 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
374 typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
375 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
376 typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
377 typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
378 typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
379 typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
380 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
381 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
382 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
383 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
384 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
385 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
386 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
387 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
388 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
389 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
390 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
391 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
392 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
393 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
394 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
395 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
396 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
397 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
398 typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
399 typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
400 typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
401 typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
402 typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
403 typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
404 typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
405 typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
406 typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
407 typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
408 typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
409 typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
410 typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
411 typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
412 typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
413 typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
414 typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
415 typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
416 #ifdef GL_GLEXT_PROTOTYPES
417 GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
418 GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
419 GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
420 GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
421 GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
422 GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
423 GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
424 GLAPI void APIENTRY glFogCoordf (GLfloat coord);
425 GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
426 GLAPI void APIENTRY glFogCoordd (GLdouble coord);
427 GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
428 GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
429 GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
430 GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
431 GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
432 GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
433 GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
434 GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
435 GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
436 GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
437 GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
438 GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
439 GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
440 GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
441 GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
442 GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
443 GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
444 GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
445 GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
446 GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
447 GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
448 GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
449 GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
450 GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
451 GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
452 GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
453 GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
454 GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
455 GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
456 GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
457 GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
458 GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
459 GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
460 GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
461 GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
462 GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
463 GLAPI void APIENTRY glBlendEquation (GLenum mode);
464 #endif
465 #endif /* GL_VERSION_1_4 */
466
467 #ifndef GL_VERSION_1_5
468 #define GL_VERSION_1_5 1
469 #include <stddef.h>
470 #ifdef __MACOSX__
471 typedef long GLsizeiptr;
472 typedef long GLintptr;
473 #else
474 typedef ptrdiff_t GLsizeiptr;
475 typedef ptrdiff_t GLintptr;
476 #endif
477 #define GL_BUFFER_SIZE 0x8764
478 #define GL_BUFFER_USAGE 0x8765
479 #define GL_QUERY_COUNTER_BITS 0x8864
480 #define GL_CURRENT_QUERY 0x8865
481 #define GL_QUERY_RESULT 0x8866
482 #define GL_QUERY_RESULT_AVAILABLE 0x8867
483 #define GL_ARRAY_BUFFER 0x8892
484 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
485 #define GL_ARRAY_BUFFER_BINDING 0x8894
486 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
487 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
488 #define GL_READ_ONLY 0x88B8
489 #define GL_WRITE_ONLY 0x88B9
490 #define GL_READ_WRITE 0x88BA
491 #define GL_BUFFER_ACCESS 0x88BB
492 #define GL_BUFFER_MAPPED 0x88BC
493 #define GL_BUFFER_MAP_POINTER 0x88BD
494 #define GL_STREAM_DRAW 0x88E0
495 #define GL_STREAM_READ 0x88E1
496 #define GL_STREAM_COPY 0x88E2
497 #define GL_STATIC_DRAW 0x88E4
498 #define GL_STATIC_READ 0x88E5
499 #define GL_STATIC_COPY 0x88E6
500 #define GL_DYNAMIC_DRAW 0x88E8
501 #define GL_DYNAMIC_READ 0x88E9
502 #define GL_DYNAMIC_COPY 0x88EA
503 #define GL_SAMPLES_PASSED 0x8914
504 #define GL_SRC1_ALPHA 0x8589
505 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
506 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
507 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
508 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
509 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
510 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
511 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
512 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
513 #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
514 #define GL_FOG_COORD_SRC 0x8450
515 #define GL_FOG_COORD 0x8451
516 #define GL_CURRENT_FOG_COORD 0x8453
517 #define GL_FOG_COORD_ARRAY_TYPE 0x8454
518 #define GL_FOG_COORD_ARRAY_STRIDE 0x8455
519 #define GL_FOG_COORD_ARRAY_POINTER 0x8456
520 #define GL_FOG_COORD_ARRAY 0x8457
521 #define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
522 #define GL_SRC0_RGB 0x8580
523 #define GL_SRC1_RGB 0x8581
524 #define GL_SRC2_RGB 0x8582
525 #define GL_SRC0_ALPHA 0x8588
526 #define GL_SRC2_ALPHA 0x858A
527 typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
528 typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
529 typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
530 typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
531 typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
532 typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
533 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
534 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
535 typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
536 typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
537 typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
538 typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
539 typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
540 typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
541 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
542 typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
543 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
544 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
545 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
546 #ifdef GL_GLEXT_PROTOTYPES
547 GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
548 GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
549 GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
550 GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
551 GLAPI void APIENTRY glEndQuery (GLenum target);
552 GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
553 GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
554 GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
555 GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
556 GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
557 GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
558 GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
559 GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
560 GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
561 GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
562 GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
563 GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
564 GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
565 GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
566 #endif
567 #endif /* GL_VERSION_1_5 */
568
569 #ifndef GL_VERSION_2_0
570 #define GL_VERSION_2_0 1
571 typedef char GLchar;
572 #define GL_BLEND_EQUATION_RGB 0x8009
573 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
574 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
575 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
576 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
577 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
578 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
579 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
580 #define GL_STENCIL_BACK_FUNC 0x8800
581 #define GL_STENCIL_BACK_FAIL 0x8801
582 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
583 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
584 #define GL_MAX_DRAW_BUFFERS 0x8824
585 #define GL_DRAW_BUFFER0 0x8825
586 #define GL_DRAW_BUFFER1 0x8826
587 #define GL_DRAW_BUFFER2 0x8827
588 #define GL_DRAW_BUFFER3 0x8828
589 #define GL_DRAW_BUFFER4 0x8829
590 #define GL_DRAW_BUFFER5 0x882A
591 #define GL_DRAW_BUFFER6 0x882B
592 #define GL_DRAW_BUFFER7 0x882C
593 #define GL_DRAW_BUFFER8 0x882D
594 #define GL_DRAW_BUFFER9 0x882E
595 #define GL_DRAW_BUFFER10 0x882F
596 #define GL_DRAW_BUFFER11 0x8830
597 #define GL_DRAW_BUFFER12 0x8831
598 #define GL_DRAW_BUFFER13 0x8832
599 #define GL_DRAW_BUFFER14 0x8833
600 #define GL_DRAW_BUFFER15 0x8834
601 #define GL_BLEND_EQUATION_ALPHA 0x883D
602 #define GL_MAX_VERTEX_ATTRIBS 0x8869
603 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
604 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
605 #define GL_FRAGMENT_SHADER 0x8B30
606 #define GL_VERTEX_SHADER 0x8B31
607 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
608 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
609 #define GL_MAX_VARYING_FLOATS 0x8B4B
610 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
611 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
612 #define GL_SHADER_TYPE 0x8B4F
613 #define GL_FLOAT_VEC2 0x8B50
614 #define GL_FLOAT_VEC3 0x8B51
615 #define GL_FLOAT_VEC4 0x8B52
616 #define GL_INT_VEC2 0x8B53
617 #define GL_INT_VEC3 0x8B54
618 #define GL_INT_VEC4 0x8B55
619 #define GL_BOOL 0x8B56
620 #define GL_BOOL_VEC2 0x8B57
621 #define GL_BOOL_VEC3 0x8B58
622 #define GL_BOOL_VEC4 0x8B59
623 #define GL_FLOAT_MAT2 0x8B5A
624 #define GL_FLOAT_MAT3 0x8B5B
625 #define GL_FLOAT_MAT4 0x8B5C
626 #define GL_SAMPLER_1D 0x8B5D
627 #define GL_SAMPLER_2D 0x8B5E
628 #define GL_SAMPLER_3D 0x8B5F
629 #define GL_SAMPLER_CUBE 0x8B60
630 #define GL_SAMPLER_1D_SHADOW 0x8B61
631 #define GL_SAMPLER_2D_SHADOW 0x8B62
632 #define GL_DELETE_STATUS 0x8B80
633 #define GL_COMPILE_STATUS 0x8B81
634 #define GL_LINK_STATUS 0x8B82
635 #define GL_VALIDATE_STATUS 0x8B83
636 #define GL_INFO_LOG_LENGTH 0x8B84
637 #define GL_ATTACHED_SHADERS 0x8B85
638 #define GL_ACTIVE_UNIFORMS 0x8B86
639 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
640 #define GL_SHADER_SOURCE_LENGTH 0x8B88
641 #define GL_ACTIVE_ATTRIBUTES 0x8B89
642 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
643 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
644 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
645 #define GL_CURRENT_PROGRAM 0x8B8D
646 #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
647 #define GL_LOWER_LEFT 0x8CA1
648 #define GL_UPPER_LEFT 0x8CA2
649 #define GL_STENCIL_BACK_REF 0x8CA3
650 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
651 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
652 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
653 #define GL_POINT_SPRITE 0x8861
654 #define GL_COORD_REPLACE 0x8862
655 #define GL_MAX_TEXTURE_COORDS 0x8871
656 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
657 typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
658 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
659 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
660 typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
661 typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
662 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
663 typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
664 typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
665 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
666 typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
667 typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
668 typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
669 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
670 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
671 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
672 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
673 typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
674 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
675 typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
676 typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
677 typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
678 typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
679 typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
680 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
681 typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
682 typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
683 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
684 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
685 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
686 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
687 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
688 typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
689 typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
690 typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
691 typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
692 typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
693 typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
694 typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
695 typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
696 typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
697 typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
698 typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
699 typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
700 typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
701 typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
702 typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
703 typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
704 typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
705 typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
706 typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
707 typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
708 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
709 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
710 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
711 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
712 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
713 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
714 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
715 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
716 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
717 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
718 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
719 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
720 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
721 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
722 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
723 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
724 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
725 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
726 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
727 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
728 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
729 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
730 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
731 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
732 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
733 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
734 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
735 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
736 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
737 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
738 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
739 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
740 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
741 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
742 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
743 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
744 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
745 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
746 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
747 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
748 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
749 #ifdef GL_GLEXT_PROTOTYPES
750 GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
751 GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
752 GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
753 GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
754 GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
755 GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
756 GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
757 GLAPI void APIENTRY glCompileShader (GLuint shader);
758 GLAPI GLuint APIENTRY glCreateProgram (void);
759 GLAPI GLuint APIENTRY glCreateShader (GLenum type);
760 GLAPI void APIENTRY glDeleteProgram (GLuint program);
761 GLAPI void APIENTRY glDeleteShader (GLuint shader);
762 GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
763 GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
764 GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
765 GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
766 GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
767 GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
768 GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
769 GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
770 GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
771 GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
772 GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
773 GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
774 GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
775 GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
776 GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
777 GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
778 GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
779 GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
780 GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
781 GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
782 GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
783 GLAPI void APIENTRY glLinkProgram (GLuint program);
784 GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
785 GLAPI void APIENTRY glUseProgram (GLuint program);
786 GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
787 GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
788 GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
789 GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
790 GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
791 GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
792 GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
793 GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
794 GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
795 GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
796 GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
797 GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
798 GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
799 GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
800 GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
801 GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
802 GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
803 GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
804 GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
805 GLAPI void APIENTRY glValidateProgram (GLuint program);
806 GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
807 GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
808 GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
809 GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
810 GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
811 GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
812 GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
813 GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
814 GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
815 GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
816 GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
817 GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
818 GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
819 GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
820 GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
821 GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
822 GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
823 GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
824 GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
825 GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
826 GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
827 GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
828 GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
829 GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
830 GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
831 GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
832 GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
833 GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
834 GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
835 GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
836 GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
837 GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
838 GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
839 GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
840 GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
841 GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
842 GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
843 #endif
844 #endif /* GL_VERSION_2_0 */
845
846 #ifndef GL_VERSION_2_1
847 #define GL_VERSION_2_1 1
848 #define GL_PIXEL_PACK_BUFFER 0x88EB
849 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
850 #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
851 #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
852 #define GL_FLOAT_MAT2x3 0x8B65
853 #define GL_FLOAT_MAT2x4 0x8B66
854 #define GL_FLOAT_MAT3x2 0x8B67
855 #define GL_FLOAT_MAT3x4 0x8B68
856 #define GL_FLOAT_MAT4x2 0x8B69
857 #define GL_FLOAT_MAT4x3 0x8B6A
858 #define GL_SRGB 0x8C40
859 #define GL_SRGB8 0x8C41
860 #define GL_SRGB_ALPHA 0x8C42
861 #define GL_SRGB8_ALPHA8 0x8C43
862 #define GL_COMPRESSED_SRGB 0x8C48
863 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49
864 #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
865 #define GL_SLUMINANCE_ALPHA 0x8C44
866 #define GL_SLUMINANCE8_ALPHA8 0x8C45
867 #define GL_SLUMINANCE 0x8C46
868 #define GL_SLUMINANCE8 0x8C47
869 #define GL_COMPRESSED_SLUMINANCE 0x8C4A
870 #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
871 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
872 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
873 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
874 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
875 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
876 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
877 #ifdef GL_GLEXT_PROTOTYPES
878 GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
879 GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
880 GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
881 GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
882 GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
883 GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
884 #endif
885 #endif /* GL_VERSION_2_1 */
886
887 #ifndef GL_VERSION_3_0
888 #define GL_VERSION_3_0 1
889 typedef unsigned short GLhalf;
890 #define GL_COMPARE_REF_TO_TEXTURE 0x884E
891 #define GL_CLIP_DISTANCE0 0x3000
892 #define GL_CLIP_DISTANCE1 0x3001
893 #define GL_CLIP_DISTANCE2 0x3002
894 #define GL_CLIP_DISTANCE3 0x3003
895 #define GL_CLIP_DISTANCE4 0x3004
896 #define GL_CLIP_DISTANCE5 0x3005
897 #define GL_CLIP_DISTANCE6 0x3006
898 #define GL_CLIP_DISTANCE7 0x3007
899 #define GL_MAX_CLIP_DISTANCES 0x0D32
900 #define GL_MAJOR_VERSION 0x821B
901 #define GL_MINOR_VERSION 0x821C
902 #define GL_NUM_EXTENSIONS 0x821D
903 #define GL_CONTEXT_FLAGS 0x821E
904 #define GL_COMPRESSED_RED 0x8225
905 #define GL_COMPRESSED_RG 0x8226
906 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
907 #define GL_RGBA32F 0x8814
908 #define GL_RGB32F 0x8815
909 #define GL_RGBA16F 0x881A
910 #define GL_RGB16F 0x881B
911 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
912 #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
913 #define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
914 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
915 #define GL_CLAMP_READ_COLOR 0x891C
916 #define GL_FIXED_ONLY 0x891D
917 #define GL_MAX_VARYING_COMPONENTS 0x8B4B
918 #define GL_TEXTURE_1D_ARRAY 0x8C18
919 #define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
920 #define GL_TEXTURE_2D_ARRAY 0x8C1A
921 #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
922 #define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
923 #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
924 #define GL_R11F_G11F_B10F 0x8C3A
925 #define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
926 #define GL_RGB9_E5 0x8C3D
927 #define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
928 #define GL_TEXTURE_SHARED_SIZE 0x8C3F
929 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
930 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
931 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
932 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
933 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
934 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
935 #define GL_PRIMITIVES_GENERATED 0x8C87
936 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
937 #define GL_RASTERIZER_DISCARD 0x8C89
938 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
939 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
940 #define GL_INTERLEAVED_ATTRIBS 0x8C8C
941 #define GL_SEPARATE_ATTRIBS 0x8C8D
942 #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
943 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
944 #define GL_RGBA32UI 0x8D70
945 #define GL_RGB32UI 0x8D71
946 #define GL_RGBA16UI 0x8D76
947 #define GL_RGB16UI 0x8D77
948 #define GL_RGBA8UI 0x8D7C
949 #define GL_RGB8UI 0x8D7D
950 #define GL_RGBA32I 0x8D82
951 #define GL_RGB32I 0x8D83
952 #define GL_RGBA16I 0x8D88
953 #define GL_RGB16I 0x8D89
954 #define GL_RGBA8I 0x8D8E
955 #define GL_RGB8I 0x8D8F
956 #define GL_RED_INTEGER 0x8D94
957 #define GL_GREEN_INTEGER 0x8D95
958 #define GL_BLUE_INTEGER 0x8D96
959 #define GL_RGB_INTEGER 0x8D98
960 #define GL_RGBA_INTEGER 0x8D99
961 #define GL_BGR_INTEGER 0x8D9A
962 #define GL_BGRA_INTEGER 0x8D9B
963 #define GL_SAMPLER_1D_ARRAY 0x8DC0
964 #define GL_SAMPLER_2D_ARRAY 0x8DC1
965 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
966 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
967 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5
968 #define GL_UNSIGNED_INT_VEC2 0x8DC6
969 #define GL_UNSIGNED_INT_VEC3 0x8DC7
970 #define GL_UNSIGNED_INT_VEC4 0x8DC8
971 #define GL_INT_SAMPLER_1D 0x8DC9
972 #define GL_INT_SAMPLER_2D 0x8DCA
973 #define GL_INT_SAMPLER_3D 0x8DCB
974 #define GL_INT_SAMPLER_CUBE 0x8DCC
975 #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
976 #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
977 #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
978 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
979 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
980 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
981 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
982 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
983 #define GL_QUERY_WAIT 0x8E13
984 #define GL_QUERY_NO_WAIT 0x8E14
985 #define GL_QUERY_BY_REGION_WAIT 0x8E15
986 #define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
987 #define GL_BUFFER_ACCESS_FLAGS 0x911F
988 #define GL_BUFFER_MAP_LENGTH 0x9120
989 #define GL_BUFFER_MAP_OFFSET 0x9121
990 #define GL_DEPTH_COMPONENT32F 0x8CAC
991 #define GL_DEPTH32F_STENCIL8 0x8CAD
992 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
993 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
994 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
995 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
996 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
997 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
998 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
999 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
1000 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
1001 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
1002 #define GL_FRAMEBUFFER_DEFAULT 0x8218
1003 #define GL_FRAMEBUFFER_UNDEFINED 0x8219
1004 #define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
1005 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1006 #define GL_DEPTH_STENCIL 0x84F9
1007 #define GL_UNSIGNED_INT_24_8 0x84FA
1008 #define GL_DEPTH24_STENCIL8 0x88F0
1009 #define GL_TEXTURE_STENCIL_SIZE 0x88F1
1010 #define GL_TEXTURE_RED_TYPE 0x8C10
1011 #define GL_TEXTURE_GREEN_TYPE 0x8C11
1012 #define GL_TEXTURE_BLUE_TYPE 0x8C12
1013 #define GL_TEXTURE_ALPHA_TYPE 0x8C13
1014 #define GL_TEXTURE_DEPTH_TYPE 0x8C16
1015 #define GL_UNSIGNED_NORMALIZED 0x8C17
1016 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1017 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
1018 #define GL_RENDERBUFFER_BINDING 0x8CA7
1019 #define GL_READ_FRAMEBUFFER 0x8CA8
1020 #define GL_DRAW_FRAMEBUFFER 0x8CA9
1021 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
1022 #define GL_RENDERBUFFER_SAMPLES 0x8CAB
1023 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1024 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1025 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1026 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1027 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
1028 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1029 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1030 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1031 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
1032 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
1033 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1034 #define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
1035 #define GL_COLOR_ATTACHMENT0 0x8CE0
1036 #define GL_COLOR_ATTACHMENT1 0x8CE1
1037 #define GL_COLOR_ATTACHMENT2 0x8CE2
1038 #define GL_COLOR_ATTACHMENT3 0x8CE3
1039 #define GL_COLOR_ATTACHMENT4 0x8CE4
1040 #define GL_COLOR_ATTACHMENT5 0x8CE5
1041 #define GL_COLOR_ATTACHMENT6 0x8CE6
1042 #define GL_COLOR_ATTACHMENT7 0x8CE7
1043 #define GL_COLOR_ATTACHMENT8 0x8CE8
1044 #define GL_COLOR_ATTACHMENT9 0x8CE9
1045 #define GL_COLOR_ATTACHMENT10 0x8CEA
1046 #define GL_COLOR_ATTACHMENT11 0x8CEB
1047 #define GL_COLOR_ATTACHMENT12 0x8CEC
1048 #define GL_COLOR_ATTACHMENT13 0x8CED
1049 #define GL_COLOR_ATTACHMENT14 0x8CEE
1050 #define GL_COLOR_ATTACHMENT15 0x8CEF
1051 #define GL_DEPTH_ATTACHMENT 0x8D00
1052 #define GL_STENCIL_ATTACHMENT 0x8D20
1053 #define GL_FRAMEBUFFER 0x8D40
1054 #define GL_RENDERBUFFER 0x8D41
1055 #define GL_RENDERBUFFER_WIDTH 0x8D42
1056 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1057 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1058 #define GL_STENCIL_INDEX1 0x8D46
1059 #define GL_STENCIL_INDEX4 0x8D47
1060 #define GL_STENCIL_INDEX8 0x8D48
1061 #define GL_STENCIL_INDEX16 0x8D49
1062 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1063 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1064 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1065 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1066 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1067 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1068 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
1069 #define GL_MAX_SAMPLES 0x8D57
1070 #define GL_INDEX 0x8222
1071 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
1072 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15
1073 #define GL_FRAMEBUFFER_SRGB 0x8DB9
1074 #define GL_HALF_FLOAT 0x140B
1075 #define GL_MAP_READ_BIT 0x0001
1076 #define GL_MAP_WRITE_BIT 0x0002
1077 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
1078 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
1079 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
1080 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
1081 #define GL_COMPRESSED_RED_RGTC1 0x8DBB
1082 #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
1083 #define GL_COMPRESSED_RG_RGTC2 0x8DBD
1084 #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
1085 #define GL_RG 0x8227
1086 #define GL_RG_INTEGER 0x8228
1087 #define GL_R8 0x8229
1088 #define GL_R16 0x822A
1089 #define GL_RG8 0x822B
1090 #define GL_RG16 0x822C
1091 #define GL_R16F 0x822D
1092 #define GL_R32F 0x822E
1093 #define GL_RG16F 0x822F
1094 #define GL_RG32F 0x8230
1095 #define GL_R8I 0x8231
1096 #define GL_R8UI 0x8232
1097 #define GL_R16I 0x8233
1098 #define GL_R16UI 0x8234
1099 #define GL_R32I 0x8235
1100 #define GL_R32UI 0x8236
1101 #define GL_RG8I 0x8237
1102 #define GL_RG8UI 0x8238
1103 #define GL_RG16I 0x8239
1104 #define GL_RG16UI 0x823A
1105 #define GL_RG32I 0x823B
1106 #define GL_RG32UI 0x823C
1107 #define GL_VERTEX_ARRAY_BINDING 0x85B5
1108 #define GL_CLAMP_VERTEX_COLOR 0x891A
1109 #define GL_CLAMP_FRAGMENT_COLOR 0x891B
1110 #define GL_ALPHA_INTEGER 0x8D97
1111 typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1112 typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
1113 typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
1114 typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
1115 typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
1116 typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
1117 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
1118 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
1119 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1120 typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
1121 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1122 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1123 typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
1124 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
1125 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
1126 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1127 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
1128 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
1129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
1130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
1131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
1132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
1133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
1134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
1135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
1136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
1138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
1139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
1140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
1141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
1142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
1143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
1144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
1145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
1146 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
1147 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
1148 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
1149 typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
1150 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
1151 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
1152 typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
1153 typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
1154 typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
1155 typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1156 typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1157 typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1158 typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1159 typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1160 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
1161 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
1162 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
1163 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
1164 typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
1165 typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
1166 typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1167 typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1168 typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
1169 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
1170 typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
1171 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
1172 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
1173 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1174 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
1175 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
1176 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
1177 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
1178 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
1179 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
1180 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1181 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1182 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1183 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1184 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1185 typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
1186 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1187 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1188 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1189 typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1190 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1191 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
1192 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
1193 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
1194 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
1195 #ifdef GL_GLEXT_PROTOTYPES
1196 GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1197 GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
1198 GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
1199 GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
1200 GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
1201 GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
1202 GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
1203 GLAPI void APIENTRY glEndTransformFeedback (void);
1204 GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1205 GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
1206 GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1207 GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1208 GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
1209 GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
1210 GLAPI void APIENTRY glEndConditionalRender (void);
1211 GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1212 GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
1213 GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
1214 GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
1215 GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
1216 GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
1217 GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
1218 GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
1219 GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
1220 GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
1221 GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1222 GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
1223 GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
1224 GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
1225 GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
1226 GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
1227 GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
1228 GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
1229 GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
1230 GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
1231 GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
1232 GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
1233 GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
1234 GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
1235 GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
1236 GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
1237 GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
1238 GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
1239 GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
1240 GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1241 GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
1242 GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
1243 GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
1244 GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
1245 GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
1246 GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
1247 GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
1248 GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
1249 GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
1250 GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
1251 GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1252 GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1253 GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
1254 GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
1255 GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
1256 GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
1257 GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
1258 GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1259 GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
1260 GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
1261 GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
1262 GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
1263 GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
1264 GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
1265 GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1266 GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1267 GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1268 GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1269 GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1270 GLAPI void APIENTRY glGenerateMipmap (GLenum target);
1271 GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1272 GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1273 GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1274 GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1275 GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
1276 GLAPI void APIENTRY glBindVertexArray (GLuint array);
1277 GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
1278 GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
1279 GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
1280 #endif
1281 #endif /* GL_VERSION_3_0 */
1282
1283 #ifndef GL_VERSION_3_1
1284 #define GL_VERSION_3_1 1
1285 #define GL_SAMPLER_2D_RECT 0x8B63
1286 #define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
1287 #define GL_SAMPLER_BUFFER 0x8DC2
1288 #define GL_INT_SAMPLER_2D_RECT 0x8DCD
1289 #define GL_INT_SAMPLER_BUFFER 0x8DD0
1290 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
1291 #define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
1292 #define GL_TEXTURE_BUFFER 0x8C2A
1293 #define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
1294 #define GL_TEXTURE_BINDING_BUFFER 0x8C2C
1295 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
1296 #define GL_TEXTURE_RECTANGLE 0x84F5
1297 #define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
1298 #define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
1299 #define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
1300 #define GL_R8_SNORM 0x8F94
1301 #define GL_RG8_SNORM 0x8F95
1302 #define GL_RGB8_SNORM 0x8F96
1303 #define GL_RGBA8_SNORM 0x8F97
1304 #define GL_R16_SNORM 0x8F98
1305 #define GL_RG16_SNORM 0x8F99
1306 #define GL_RGB16_SNORM 0x8F9A
1307 #define GL_RGBA16_SNORM 0x8F9B
1308 #define GL_SIGNED_NORMALIZED 0x8F9C
1309 #define GL_PRIMITIVE_RESTART 0x8F9D
1310 #define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
1311 #define GL_COPY_READ_BUFFER 0x8F36
1312 #define GL_COPY_WRITE_BUFFER 0x8F37
1313 #define GL_UNIFORM_BUFFER 0x8A11
1314 #define GL_UNIFORM_BUFFER_BINDING 0x8A28
1315 #define GL_UNIFORM_BUFFER_START 0x8A29
1316 #define GL_UNIFORM_BUFFER_SIZE 0x8A2A
1317 #define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
1318 #define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
1319 #define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
1320 #define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
1321 #define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
1322 #define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
1323 #define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
1324 #define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
1325 #define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
1326 #define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
1327 #define GL_UNIFORM_TYPE 0x8A37
1328 #define GL_UNIFORM_SIZE 0x8A38
1329 #define GL_UNIFORM_NAME_LENGTH 0x8A39
1330 #define GL_UNIFORM_BLOCK_INDEX 0x8A3A
1331 #define GL_UNIFORM_OFFSET 0x8A3B
1332 #define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
1333 #define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
1334 #define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
1335 #define GL_UNIFORM_BLOCK_BINDING 0x8A3F
1336 #define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
1337 #define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
1338 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
1339 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
1340 #define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
1341 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
1342 #define GL_INVALID_INDEX 0xFFFFFFFFu
1343 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1344 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1345 typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
1346 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
1347 typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1348 typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1349 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1350 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1351 typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
1352 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1353 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1354 typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1355 #ifdef GL_GLEXT_PROTOTYPES
1356 GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1357 GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1358 GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
1359 GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
1360 GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1361 GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1362 GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1363 GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1364 GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
1365 GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1366 GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1367 GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1368 #endif
1369 #endif /* GL_VERSION_3_1 */
1370
1371 #ifndef GL_VERSION_3_2
1372 #define GL_VERSION_3_2 1
1373 typedef struct __GLsync *GLsync;
1374 #ifndef GLEXT_64_TYPES_DEFINED
1375 /* This code block is duplicated in glxext.h, so must be protected */
1376 #define GLEXT_64_TYPES_DEFINED
1377 /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
1378 /* (as used in the GL_EXT_timer_query extension). */
1379 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1380 #include <inttypes.h>
1381 #elif defined(__sun__) || defined(__digital__)
1382 #include <inttypes.h>
1383 #if defined(__STDC__)
1384 #if defined(__arch64__) || defined(_LP64)
1385 typedef long int int64_t;
1386 typedef unsigned long int uint64_t;
1387 #else
1388 typedef long long int int64_t;
1389 typedef unsigned long long int uint64_t;
1390 #endif /* __arch64__ */
1391 #endif /* __STDC__ */
1392 #elif defined( __VMS ) || defined(__sgi)
1393 #include <inttypes.h>
1394 #elif defined(__SCO__) || defined(__USLC__)
1395 #include <stdint.h>
1396 #elif defined(__UNIXOS2__) || defined(__SOL64__)
1397 typedef long int int32_t;
1398 typedef long long int int64_t;
1399 typedef unsigned long long int uint64_t;
1400 #elif defined(_WIN32) && defined(__GNUC__)
1401 #include <stdint.h>
1402 #elif defined(_WIN32)
1403 typedef __int32 int32_t;
1404 typedef __int64 int64_t;
1405 typedef unsigned __int64 uint64_t;
1406 #else
1407 /* Fallback if nothing above works */
1408 #include <inttypes.h>
1409 #endif
1410 #endif
1411 typedef uint64_t GLuint64;
1412 typedef int64_t GLint64;
1413 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
1414 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
1415 #define GL_LINES_ADJACENCY 0x000A
1416 #define GL_LINE_STRIP_ADJACENCY 0x000B
1417 #define GL_TRIANGLES_ADJACENCY 0x000C
1418 #define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
1419 #define GL_PROGRAM_POINT_SIZE 0x8642
1420 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
1421 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
1422 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
1423 #define GL_GEOMETRY_SHADER 0x8DD9
1424 #define GL_GEOMETRY_VERTICES_OUT 0x8916
1425 #define GL_GEOMETRY_INPUT_TYPE 0x8917
1426 #define GL_GEOMETRY_OUTPUT_TYPE 0x8918
1427 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
1428 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
1429 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
1430 #define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
1431 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
1432 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
1433 #define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
1434 #define GL_CONTEXT_PROFILE_MASK 0x9126
1435 #define GL_DEPTH_CLAMP 0x864F
1436 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
1437 #define GL_FIRST_VERTEX_CONVENTION 0x8E4D
1438 #define GL_LAST_VERTEX_CONVENTION 0x8E4E
1439 #define GL_PROVOKING_VERTEX 0x8E4F
1440 #define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
1441 #define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
1442 #define GL_OBJECT_TYPE 0x9112
1443 #define GL_SYNC_CONDITION 0x9113
1444 #define GL_SYNC_STATUS 0x9114
1445 #define GL_SYNC_FLAGS 0x9115
1446 #define GL_SYNC_FENCE 0x9116
1447 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
1448 #define GL_UNSIGNALED 0x9118
1449 #define GL_SIGNALED 0x9119
1450 #define GL_ALREADY_SIGNALED 0x911A
1451 #define GL_TIMEOUT_EXPIRED 0x911B
1452 #define GL_CONDITION_SATISFIED 0x911C
1453 #define GL_WAIT_FAILED 0x911D
1454 #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
1455 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
1456 #define GL_SAMPLE_POSITION 0x8E50
1457 #define GL_SAMPLE_MASK 0x8E51
1458 #define GL_SAMPLE_MASK_VALUE 0x8E52
1459 #define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
1460 #define GL_TEXTURE_2D_MULTISAMPLE 0x9100
1461 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
1462 #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
1463 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
1464 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
1465 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
1466 #define GL_TEXTURE_SAMPLES 0x9106
1467 #define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
1468 #define GL_SAMPLER_2D_MULTISAMPLE 0x9108
1469 #define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
1470 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
1471 #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
1472 #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
1473 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
1474 #define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
1475 #define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
1476 #define GL_MAX_INTEGER_SAMPLES 0x9110
1477 typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1478 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1479 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1480 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1481 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
1482 typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
1483 typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
1484 typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
1485 typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1486 typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1487 typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
1488 typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1489 typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
1490 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
1491 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
1492 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1493 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1494 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
1495 typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
1496 #ifdef GL_GLEXT_PROTOTYPES
1497 GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1498 GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1499 GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1500 GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1501 GLAPI void APIENTRY glProvokingVertex (GLenum mode);
1502 GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
1503 GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
1504 GLAPI void APIENTRY glDeleteSync (GLsync sync);
1505 GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1506 GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1507 GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
1508 GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1509 GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
1510 GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
1511 GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
1512 GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1513 GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1514 GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
1515 GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
1516 #endif
1517 #endif /* GL_VERSION_3_2 */
1518
1519 #ifndef GL_VERSION_3_3
1520 #define GL_VERSION_3_3 1
1521 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
1522 #define GL_SRC1_COLOR 0x88F9
1523 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA
1524 #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
1525 #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
1526 #define GL_ANY_SAMPLES_PASSED 0x8C2F
1527 #define GL_SAMPLER_BINDING 0x8919
1528 #define GL_RGB10_A2UI 0x906F
1529 #define GL_TEXTURE_SWIZZLE_R 0x8E42
1530 #define GL_TEXTURE_SWIZZLE_G 0x8E43
1531 #define GL_TEXTURE_SWIZZLE_B 0x8E44
1532 #define GL_TEXTURE_SWIZZLE_A 0x8E45
1533 #define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
1534 #define GL_TIME_ELAPSED 0x88BF
1535 #define GL_TIMESTAMP 0x8E28
1536 #define GL_INT_2_10_10_10_REV 0x8D9F
1537 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1538 typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
1539 typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
1540 typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
1541 typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
1542 typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
1543 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
1544 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1545 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
1546 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
1547 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1548 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
1549 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1550 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1551 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
1552 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
1553 typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
1554 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
1555 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
1556 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
1557 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1558 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1559 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1560 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1561 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1562 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1563 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1564 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1565 typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
1566 typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
1567 typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
1568 typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
1569 typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
1570 typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
1571 typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
1572 typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
1573 typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
1574 typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
1575 typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
1576 typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
1577 typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
1578 typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
1579 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
1580 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1581 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
1582 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1583 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
1584 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1585 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
1586 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1587 typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
1588 typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
1589 typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
1590 typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1591 typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
1592 typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
1593 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
1594 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1595 #ifdef GL_GLEXT_PROTOTYPES
1596 GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1597 GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
1598 GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
1599 GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
1600 GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
1601 GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
1602 GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
1603 GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
1604 GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
1605 GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
1606 GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
1607 GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
1608 GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
1609 GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
1610 GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
1611 GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
1612 GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
1613 GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
1614 GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
1615 GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
1616 GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1617 GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1618 GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1619 GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1620 GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1621 GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1622 GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1623 GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1624 GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
1625 GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
1626 GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
1627 GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
1628 GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
1629 GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
1630 GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
1631 GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
1632 GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
1633 GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
1634 GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
1635 GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
1636 GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
1637 GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
1638 GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
1639 GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
1640 GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
1641 GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
1642 GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
1643 GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
1644 GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
1645 GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
1646 GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
1647 GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
1648 GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
1649 GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
1650 GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
1651 GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
1652 GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
1653 GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
1654 #endif
1655 #endif /* GL_VERSION_3_3 */
1656
1657 #ifndef GL_VERSION_4_0
1658 #define GL_VERSION_4_0 1
1659 #define GL_SAMPLE_SHADING 0x8C36
1660 #define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
1661 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
1662 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
1663 #define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
1664 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
1665 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
1666 #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
1667 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
1668 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
1669 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
1670 #define GL_DRAW_INDIRECT_BUFFER 0x8F3F
1671 #define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
1672 #define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
1673 #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
1674 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
1675 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
1676 #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
1677 #define GL_MAX_VERTEX_STREAMS 0x8E71
1678 #define GL_DOUBLE_VEC2 0x8FFC
1679 #define GL_DOUBLE_VEC3 0x8FFD
1680 #define GL_DOUBLE_VEC4 0x8FFE
1681 #define GL_DOUBLE_MAT2 0x8F46
1682 #define GL_DOUBLE_MAT3 0x8F47
1683 #define GL_DOUBLE_MAT4 0x8F48
1684 #define GL_DOUBLE_MAT2x3 0x8F49
1685 #define GL_DOUBLE_MAT2x4 0x8F4A
1686 #define GL_DOUBLE_MAT3x2 0x8F4B
1687 #define GL_DOUBLE_MAT3x4 0x8F4C
1688 #define GL_DOUBLE_MAT4x2 0x8F4D
1689 #define GL_DOUBLE_MAT4x3 0x8F4E
1690 #define GL_ACTIVE_SUBROUTINES 0x8DE5
1691 #define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
1692 #define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
1693 #define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
1694 #define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
1695 #define GL_MAX_SUBROUTINES 0x8DE7
1696 #define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
1697 #define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
1698 #define GL_COMPATIBLE_SUBROUTINES 0x8E4B
1699 #define GL_PATCHES 0x000E
1700 #define GL_PATCH_VERTICES 0x8E72
1701 #define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
1702 #define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
1703 #define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
1704 #define GL_TESS_GEN_MODE 0x8E76
1705 #define GL_TESS_GEN_SPACING 0x8E77
1706 #define GL_TESS_GEN_VERTEX_ORDER 0x8E78
1707 #define GL_TESS_GEN_POINT_MODE 0x8E79
1708 #define GL_ISOLINES 0x8E7A
1709 #define GL_FRACTIONAL_ODD 0x8E7B
1710 #define GL_FRACTIONAL_EVEN 0x8E7C
1711 #define GL_MAX_PATCH_VERTICES 0x8E7D
1712 #define GL_MAX_TESS_GEN_LEVEL 0x8E7E
1713 #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
1714 #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
1715 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
1716 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
1717 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
1718 #define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
1719 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
1720 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
1721 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
1722 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
1723 #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
1724 #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
1725 #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
1726 #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
1727 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
1728 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
1729 #define GL_TESS_EVALUATION_SHADER 0x8E87
1730 #define GL_TESS_CONTROL_SHADER 0x8E88
1731 #define GL_TRANSFORM_FEEDBACK 0x8E22
1732 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
1733 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
1734 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
1735 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
1736 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
1737 typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
1738 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1739 typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
1740 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1741 typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
1742 typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
1743 typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
1744 typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
1745 typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
1746 typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1747 typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1748 typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1749 typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1750 typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1751 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1752 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1753 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1754 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1755 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1756 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1757 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1758 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1759 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1760 typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
1761 typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1762 typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1763 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1764 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1765 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1766 typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
1767 typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
1768 typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1769 typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
1770 typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
1771 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
1772 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
1773 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
1774 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
1775 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
1776 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
1777 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
1778 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
1779 typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
1780 typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
1781 typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
1782 #ifdef GL_GLEXT_PROTOTYPES
1783 GLAPI void APIENTRY glMinSampleShading (GLfloat value);
1784 GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
1785 GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1786 GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
1787 GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1788 GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
1789 GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
1790 GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
1791 GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
1792 GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
1793 GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1794 GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
1795 GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
1796 GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
1797 GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
1798 GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1799 GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1800 GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1801 GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1802 GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1803 GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1804 GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1805 GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1806 GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1807 GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
1808 GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
1809 GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
1810 GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1811 GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1812 GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1813 GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
1814 GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
1815 GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1816 GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
1817 GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
1818 GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
1819 GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
1820 GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
1821 GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
1822 GLAPI void APIENTRY glPauseTransformFeedback (void);
1823 GLAPI void APIENTRY glResumeTransformFeedback (void);
1824 GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
1825 GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
1826 GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
1827 GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
1828 GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
1829 #endif
1830 #endif /* GL_VERSION_4_0 */
1831
1832 #ifndef GL_VERSION_4_1
1833 #define GL_VERSION_4_1 1
1834 #define GL_FIXED 0x140C
1835 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1836 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1837 #define GL_LOW_FLOAT 0x8DF0
1838 #define GL_MEDIUM_FLOAT 0x8DF1
1839 #define GL_HIGH_FLOAT 0x8DF2
1840 #define GL_LOW_INT 0x8DF3
1841 #define GL_MEDIUM_INT 0x8DF4
1842 #define GL_HIGH_INT 0x8DF5
1843 #define GL_SHADER_COMPILER 0x8DFA
1844 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1845 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1846 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1847 #define GL_MAX_VARYING_VECTORS 0x8DFC
1848 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1849 #define GL_RGB565 0x8D62
1850 #define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
1851 #define GL_PROGRAM_BINARY_LENGTH 0x8741
1852 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
1853 #define GL_PROGRAM_BINARY_FORMATS 0x87FF
1854 #define GL_VERTEX_SHADER_BIT 0x00000001
1855 #define GL_FRAGMENT_SHADER_BIT 0x00000002
1856 #define GL_GEOMETRY_SHADER_BIT 0x00000004
1857 #define GL_TESS_CONTROL_SHADER_BIT 0x00000008
1858 #define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
1859 #define GL_ALL_SHADER_BITS 0xFFFFFFFF
1860 #define GL_PROGRAM_SEPARABLE 0x8258
1861 #define GL_ACTIVE_PROGRAM 0x8259
1862 #define GL_PROGRAM_PIPELINE_BINDING 0x825A
1863 #define GL_MAX_VIEWPORTS 0x825B
1864 #define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
1865 #define GL_VIEWPORT_BOUNDS_RANGE 0x825D
1866 #define GL_LAYER_PROVOKING_VERTEX 0x825E
1867 #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
1868 #define GL_UNDEFINED_VERTEX 0x8260
1869 typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
1870 typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1871 typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1872 typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
1873 typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
1874 typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1875 typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1876 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
1877 typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1878 typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
1879 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
1880 typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
1881 typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
1882 typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
1883 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
1884 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
1885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
1886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
1888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
1890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
1892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1893 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
1894 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1895 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1896 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1897 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1898 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1899 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
1900 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1901 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1902 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1903 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1904 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1905 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1906 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1907 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1908 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1909 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1910 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1911 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1912 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1913 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
1914 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1915 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1916 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1917 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1918 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1919 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1920 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1921 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1922 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1923 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1924 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1925 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1926 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1927 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1928 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1929 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1930 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1931 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1932 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1933 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1934 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1935 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
1936 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1937 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
1938 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
1939 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
1940 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1941 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
1942 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
1943 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
1944 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
1945 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1946 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
1947 typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
1948 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
1949 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
1950 typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
1951 typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
1952 typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
1953 typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
1954 typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
1955 typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
1956 typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
1957 #ifdef GL_GLEXT_PROTOTYPES
1958 GLAPI void APIENTRY glReleaseShaderCompiler (void);
1959 GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1960 GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1961 GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
1962 GLAPI void APIENTRY glClearDepthf (GLfloat d);
1963 GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1964 GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1965 GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
1966 GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
1967 GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
1968 GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
1969 GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
1970 GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
1971 GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
1972 GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
1973 GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
1974 GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
1975 GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1976 GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
1977 GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1978 GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
1979 GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1980 GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
1981 GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1982 GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
1983 GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1984 GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1985 GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1986 GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1987 GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1988 GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
1989 GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1990 GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1991 GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1992 GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1993 GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1994 GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1995 GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1996 GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1997 GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1998 GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1999 GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2000 GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
2001 GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2002 GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
2003 GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2004 GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
2005 GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2006 GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2007 GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2008 GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2009 GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2010 GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2011 GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2012 GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2013 GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2014 GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2015 GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2016 GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2017 GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2018 GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2019 GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2020 GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2021 GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2022 GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2023 GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2024 GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
2025 GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
2026 GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
2027 GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
2028 GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
2029 GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2030 GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
2031 GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
2032 GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
2033 GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
2034 GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
2035 GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
2036 GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
2037 GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
2038 GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
2039 GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
2040 GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
2041 GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
2042 GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
2043 GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
2044 GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
2045 GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
2046 #endif
2047 #endif /* GL_VERSION_4_1 */
2048
2049 #ifndef GL_VERSION_4_2
2050 #define GL_VERSION_4_2 1
2051 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
2052 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
2053 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
2054 #define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
2055 #define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
2056 #define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
2057 #define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
2058 #define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
2059 #define GL_NUM_SAMPLE_COUNTS 0x9380
2060 #define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
2061 #define GL_ATOMIC_COUNTER_BUFFER 0x92C0
2062 #define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
2063 #define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
2064 #define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
2065 #define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
2066 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
2067 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
2068 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
2069 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
2070 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
2071 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
2072 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
2073 #define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
2074 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
2075 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
2076 #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
2077 #define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
2078 #define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
2079 #define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
2080 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
2081 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
2082 #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
2083 #define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
2084 #define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
2085 #define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
2086 #define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
2087 #define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
2088 #define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
2089 #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
2090 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
2091 #define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
2092 #define GL_UNIFORM_BARRIER_BIT 0x00000004
2093 #define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
2094 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
2095 #define GL_COMMAND_BARRIER_BIT 0x00000040
2096 #define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
2097 #define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
2098 #define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
2099 #define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
2100 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
2101 #define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
2102 #define GL_ALL_BARRIER_BITS 0xFFFFFFFF
2103 #define GL_MAX_IMAGE_UNITS 0x8F38
2104 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
2105 #define GL_IMAGE_BINDING_NAME 0x8F3A
2106 #define GL_IMAGE_BINDING_LEVEL 0x8F3B
2107 #define GL_IMAGE_BINDING_LAYERED 0x8F3C
2108 #define GL_IMAGE_BINDING_LAYER 0x8F3D
2109 #define GL_IMAGE_BINDING_ACCESS 0x8F3E
2110 #define GL_IMAGE_1D 0x904C
2111 #define GL_IMAGE_2D 0x904D
2112 #define GL_IMAGE_3D 0x904E
2113 #define GL_IMAGE_2D_RECT 0x904F
2114 #define GL_IMAGE_CUBE 0x9050
2115 #define GL_IMAGE_BUFFER 0x9051
2116 #define GL_IMAGE_1D_ARRAY 0x9052
2117 #define GL_IMAGE_2D_ARRAY 0x9053
2118 #define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
2119 #define GL_IMAGE_2D_MULTISAMPLE 0x9055
2120 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
2121 #define GL_INT_IMAGE_1D 0x9057
2122 #define GL_INT_IMAGE_2D 0x9058
2123 #define GL_INT_IMAGE_3D 0x9059
2124 #define GL_INT_IMAGE_2D_RECT 0x905A
2125 #define GL_INT_IMAGE_CUBE 0x905B
2126 #define GL_INT_IMAGE_BUFFER 0x905C
2127 #define GL_INT_IMAGE_1D_ARRAY 0x905D
2128 #define GL_INT_IMAGE_2D_ARRAY 0x905E
2129 #define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
2130 #define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
2131 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
2132 #define GL_UNSIGNED_INT_IMAGE_1D 0x9062
2133 #define GL_UNSIGNED_INT_IMAGE_2D 0x9063
2134 #define GL_UNSIGNED_INT_IMAGE_3D 0x9064
2135 #define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
2136 #define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
2137 #define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
2138 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
2139 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
2140 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
2141 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
2142 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
2143 #define GL_MAX_IMAGE_SAMPLES 0x906D
2144 #define GL_IMAGE_BINDING_FORMAT 0x906E
2145 #define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
2146 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
2147 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
2148 #define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
2149 #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
2150 #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
2151 #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
2152 #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
2153 #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
2154 #define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
2155 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
2156 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
2157 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
2158 #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
2159 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2160 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2161 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2162 typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2163 typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2164 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2165 typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
2166 typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2167 typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2168 typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2169 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
2170 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2171 #ifdef GL_GLEXT_PROTOTYPES
2172 GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2173 GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2174 GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2175 GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2176 GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2177 GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2178 GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
2179 GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2180 GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2181 GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2182 GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
2183 GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2184 #endif
2185 #endif /* GL_VERSION_4_2 */
2186
2187 #ifndef GL_VERSION_4_3
2188 #define GL_VERSION_4_3 1
2189 typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2190 #define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
2191 #define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
2192 #define GL_COMPRESSED_RGB8_ETC2 0x9274
2193 #define GL_COMPRESSED_SRGB8_ETC2 0x9275
2194 #define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
2195 #define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
2196 #define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
2197 #define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
2198 #define GL_COMPRESSED_R11_EAC 0x9270
2199 #define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
2200 #define GL_COMPRESSED_RG11_EAC 0x9272
2201 #define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
2202 #define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
2203 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
2204 #define GL_MAX_ELEMENT_INDEX 0x8D6B
2205 #define GL_COMPUTE_SHADER 0x91B9
2206 #define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
2207 #define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
2208 #define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
2209 #define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
2210 #define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
2211 #define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
2212 #define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
2213 #define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
2214 #define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
2215 #define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
2216 #define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
2217 #define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
2218 #define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
2219 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
2220 #define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
2221 #define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
2222 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
2223 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
2224 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244
2225 #define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
2226 #define GL_DEBUG_SOURCE_API 0x8246
2227 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
2228 #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
2229 #define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
2230 #define GL_DEBUG_SOURCE_APPLICATION 0x824A
2231 #define GL_DEBUG_SOURCE_OTHER 0x824B
2232 #define GL_DEBUG_TYPE_ERROR 0x824C
2233 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
2234 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
2235 #define GL_DEBUG_TYPE_PORTABILITY 0x824F
2236 #define GL_DEBUG_TYPE_PERFORMANCE 0x8250
2237 #define GL_DEBUG_TYPE_OTHER 0x8251
2238 #define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
2239 #define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
2240 #define GL_DEBUG_LOGGED_MESSAGES 0x9145
2241 #define GL_DEBUG_SEVERITY_HIGH 0x9146
2242 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147
2243 #define GL_DEBUG_SEVERITY_LOW 0x9148
2244 #define GL_DEBUG_TYPE_MARKER 0x8268
2245 #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
2246 #define GL_DEBUG_TYPE_POP_GROUP 0x826A
2247 #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
2248 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
2249 #define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
2250 #define GL_BUFFER 0x82E0
2251 #define GL_SHADER 0x82E1
2252 #define GL_PROGRAM 0x82E2
2253 #define GL_QUERY 0x82E3
2254 #define GL_PROGRAM_PIPELINE 0x82E4
2255 #define GL_SAMPLER 0x82E6
2256 #define GL_MAX_LABEL_LENGTH 0x82E8
2257 #define GL_DEBUG_OUTPUT 0x92E0
2258 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
2259 #define GL_MAX_UNIFORM_LOCATIONS 0x826E
2260 #define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
2261 #define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
2262 #define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
2263 #define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
2264 #define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
2265 #define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
2266 #define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
2267 #define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
2268 #define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
2269 #define GL_INTERNALFORMAT_SUPPORTED 0x826F
2270 #define GL_INTERNALFORMAT_PREFERRED 0x8270
2271 #define GL_INTERNALFORMAT_RED_SIZE 0x8271
2272 #define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
2273 #define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
2274 #define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
2275 #define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
2276 #define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
2277 #define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
2278 #define GL_INTERNALFORMAT_RED_TYPE 0x8278
2279 #define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
2280 #define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
2281 #define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
2282 #define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
2283 #define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
2284 #define GL_MAX_WIDTH 0x827E
2285 #define GL_MAX_HEIGHT 0x827F
2286 #define GL_MAX_DEPTH 0x8280
2287 #define GL_MAX_LAYERS 0x8281
2288 #define GL_MAX_COMBINED_DIMENSIONS 0x8282
2289 #define GL_COLOR_COMPONENTS 0x8283
2290 #define GL_DEPTH_COMPONENTS 0x8284
2291 #define GL_STENCIL_COMPONENTS 0x8285
2292 #define GL_COLOR_RENDERABLE 0x8286
2293 #define GL_DEPTH_RENDERABLE 0x8287
2294 #define GL_STENCIL_RENDERABLE 0x8288
2295 #define GL_FRAMEBUFFER_RENDERABLE 0x8289
2296 #define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
2297 #define GL_FRAMEBUFFER_BLEND 0x828B
2298 #define GL_READ_PIXELS 0x828C
2299 #define GL_READ_PIXELS_FORMAT 0x828D
2300 #define GL_READ_PIXELS_TYPE 0x828E
2301 #define GL_TEXTURE_IMAGE_FORMAT 0x828F
2302 #define GL_TEXTURE_IMAGE_TYPE 0x8290
2303 #define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
2304 #define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
2305 #define GL_MIPMAP 0x8293
2306 #define GL_MANUAL_GENERATE_MIPMAP 0x8294
2307 #define GL_AUTO_GENERATE_MIPMAP 0x8295
2308 #define GL_COLOR_ENCODING 0x8296
2309 #define GL_SRGB_READ 0x8297
2310 #define GL_SRGB_WRITE 0x8298
2311 #define GL_FILTER 0x829A
2312 #define GL_VERTEX_TEXTURE 0x829B
2313 #define GL_TESS_CONTROL_TEXTURE 0x829C
2314 #define GL_TESS_EVALUATION_TEXTURE 0x829D
2315 #define GL_GEOMETRY_TEXTURE 0x829E
2316 #define GL_FRAGMENT_TEXTURE 0x829F
2317 #define GL_COMPUTE_TEXTURE 0x82A0
2318 #define GL_TEXTURE_SHADOW 0x82A1
2319 #define GL_TEXTURE_GATHER 0x82A2
2320 #define GL_TEXTURE_GATHER_SHADOW 0x82A3
2321 #define GL_SHADER_IMAGE_LOAD 0x82A4
2322 #define GL_SHADER_IMAGE_STORE 0x82A5
2323 #define GL_SHADER_IMAGE_ATOMIC 0x82A6
2324 #define GL_IMAGE_TEXEL_SIZE 0x82A7
2325 #define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
2326 #define GL_IMAGE_PIXEL_FORMAT 0x82A9
2327 #define GL_IMAGE_PIXEL_TYPE 0x82AA
2328 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
2329 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
2330 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
2331 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
2332 #define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
2333 #define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
2334 #define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
2335 #define GL_CLEAR_BUFFER 0x82B4
2336 #define GL_TEXTURE_VIEW 0x82B5
2337 #define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
2338 #define GL_FULL_SUPPORT 0x82B7
2339 #define GL_CAVEAT_SUPPORT 0x82B8
2340 #define GL_IMAGE_CLASS_4_X_32 0x82B9
2341 #define GL_IMAGE_CLASS_2_X_32 0x82BA
2342 #define GL_IMAGE_CLASS_1_X_32 0x82BB
2343 #define GL_IMAGE_CLASS_4_X_16 0x82BC
2344 #define GL_IMAGE_CLASS_2_X_16 0x82BD
2345 #define GL_IMAGE_CLASS_1_X_16 0x82BE
2346 #define GL_IMAGE_CLASS_4_X_8 0x82BF
2347 #define GL_IMAGE_CLASS_2_X_8 0x82C0
2348 #define GL_IMAGE_CLASS_1_X_8 0x82C1
2349 #define GL_IMAGE_CLASS_11_11_10 0x82C2
2350 #define GL_IMAGE_CLASS_10_10_10_2 0x82C3
2351 #define GL_VIEW_CLASS_128_BITS 0x82C4
2352 #define GL_VIEW_CLASS_96_BITS 0x82C5
2353 #define GL_VIEW_CLASS_64_BITS 0x82C6
2354 #define GL_VIEW_CLASS_48_BITS 0x82C7
2355 #define GL_VIEW_CLASS_32_BITS 0x82C8
2356 #define GL_VIEW_CLASS_24_BITS 0x82C9
2357 #define GL_VIEW_CLASS_16_BITS 0x82CA
2358 #define GL_VIEW_CLASS_8_BITS 0x82CB
2359 #define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
2360 #define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
2361 #define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
2362 #define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
2363 #define GL_VIEW_CLASS_RGTC1_RED 0x82D0
2364 #define GL_VIEW_CLASS_RGTC2_RG 0x82D1
2365 #define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
2366 #define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
2367 #define GL_UNIFORM 0x92E1
2368 #define GL_UNIFORM_BLOCK 0x92E2
2369 #define GL_PROGRAM_INPUT 0x92E3
2370 #define GL_PROGRAM_OUTPUT 0x92E4
2371 #define GL_BUFFER_VARIABLE 0x92E5
2372 #define GL_SHADER_STORAGE_BLOCK 0x92E6
2373 #define GL_VERTEX_SUBROUTINE 0x92E8
2374 #define GL_TESS_CONTROL_SUBROUTINE 0x92E9
2375 #define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
2376 #define GL_GEOMETRY_SUBROUTINE 0x92EB
2377 #define GL_FRAGMENT_SUBROUTINE 0x92EC
2378 #define GL_COMPUTE_SUBROUTINE 0x92ED
2379 #define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
2380 #define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
2381 #define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
2382 #define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
2383 #define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
2384 #define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
2385 #define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
2386 #define GL_ACTIVE_RESOURCES 0x92F5
2387 #define GL_MAX_NAME_LENGTH 0x92F6
2388 #define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
2389 #define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
2390 #define GL_NAME_LENGTH 0x92F9
2391 #define GL_TYPE 0x92FA
2392 #define GL_ARRAY_SIZE 0x92FB
2393 #define GL_OFFSET 0x92FC
2394 #define GL_BLOCK_INDEX 0x92FD
2395 #define GL_ARRAY_STRIDE 0x92FE
2396 #define GL_MATRIX_STRIDE 0x92FF
2397 #define GL_IS_ROW_MAJOR 0x9300
2398 #define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
2399 #define GL_BUFFER_BINDING 0x9302
2400 #define GL_BUFFER_DATA_SIZE 0x9303
2401 #define GL_NUM_ACTIVE_VARIABLES 0x9304
2402 #define GL_ACTIVE_VARIABLES 0x9305
2403 #define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
2404 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
2405 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
2406 #define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
2407 #define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
2408 #define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
2409 #define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
2410 #define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
2411 #define GL_LOCATION 0x930E
2412 #define GL_LOCATION_INDEX 0x930F
2413 #define GL_IS_PER_PATCH 0x92E7
2414 #define GL_SHADER_STORAGE_BUFFER 0x90D2
2415 #define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
2416 #define GL_SHADER_STORAGE_BUFFER_START 0x90D4
2417 #define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
2418 #define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
2419 #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
2420 #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
2421 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
2422 #define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
2423 #define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
2424 #define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
2425 #define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
2426 #define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
2427 #define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
2428 #define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
2429 #define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
2430 #define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
2431 #define GL_TEXTURE_BUFFER_OFFSET 0x919D
2432 #define GL_TEXTURE_BUFFER_SIZE 0x919E
2433 #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
2434 #define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
2435 #define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
2436 #define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
2437 #define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
2438 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
2439 #define GL_VERTEX_ATTRIB_BINDING 0x82D4
2440 #define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
2441 #define GL_VERTEX_BINDING_DIVISOR 0x82D6
2442 #define GL_VERTEX_BINDING_OFFSET 0x82D7
2443 #define GL_VERTEX_BINDING_STRIDE 0x82D8
2444 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
2445 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
2446 #define GL_VERTEX_BINDING_BUFFER 0x8F4F
2447 #define GL_DISPLAY_LIST 0x82E7
2448 typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2449 typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2450 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2451 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
2452 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2453 typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
2454 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
2455 typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2456 typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2457 typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
2458 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
2459 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
2460 typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2461 typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2462 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2463 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2464 typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2465 typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2466 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2467 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2468 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2469 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2470 typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2471 typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2472 typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2473 typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2474 typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2475 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2476 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2477 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2478 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2479 typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
2480 typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
2481 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2482 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2483 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
2484 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2485 typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2486 typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
2487 typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2488 typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2489 typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
2490 typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2491 #ifdef GL_GLEXT_PROTOTYPES
2492 GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2493 GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2494 GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2495 GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
2496 GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2497 GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
2498 GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
2499 GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2500 GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2501 GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
2502 GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
2503 GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
2504 GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2505 GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2506 GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2507 GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2508 GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2509 GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
2510 GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2511 GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2512 GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
2513 GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
2514 GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2515 GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2516 GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2517 GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2518 GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2519 GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2520 GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2521 GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2522 GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2523 GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
2524 GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
2525 GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2526 GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2527 GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
2528 GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2529 GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2530 GLAPI void APIENTRY glPopDebugGroup (void);
2531 GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2532 GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2533 GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
2534 GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2535 #endif
2536 #endif /* GL_VERSION_4_3 */
2537
2538 #ifndef GL_VERSION_4_4
2539 #define GL_VERSION_4_4 1
2540 #define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
2541 #define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
2542 #define GL_TEXTURE_BUFFER_BINDING 0x8C2A
2543 #define GL_MAP_PERSISTENT_BIT 0x0040
2544 #define GL_MAP_COHERENT_BIT 0x0080
2545 #define GL_DYNAMIC_STORAGE_BIT 0x0100
2546 #define GL_CLIENT_STORAGE_BIT 0x0200
2547 #define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
2548 #define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
2549 #define GL_BUFFER_STORAGE_FLAGS 0x8220
2550 #define GL_CLEAR_TEXTURE 0x9365
2551 #define GL_LOCATION_COMPONENT 0x934A
2552 #define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
2553 #define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
2554 #define GL_QUERY_BUFFER 0x9192
2555 #define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
2556 #define GL_QUERY_BUFFER_BINDING 0x9193
2557 #define GL_QUERY_RESULT_NO_WAIT 0x9194
2558 #define GL_MIRROR_CLAMP_TO_EDGE 0x8743
2559 typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2560 typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2561 typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2562 typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2563 typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2564 typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2565 typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
2566 typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2567 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2568 #ifdef GL_GLEXT_PROTOTYPES
2569 GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2570 GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2571 GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2572 GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2573 GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2574 GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
2575 GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
2576 GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
2577 GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2578 #endif
2579 #endif /* GL_VERSION_4_4 */
2580
2581 #ifndef GL_ARB_ES2_compatibility
2582 #define GL_ARB_ES2_compatibility 1
2583 #endif /* GL_ARB_ES2_compatibility */
2584
2585 #ifndef GL_ARB_ES3_compatibility
2586 #define GL_ARB_ES3_compatibility 1
2587 #endif /* GL_ARB_ES3_compatibility */
2588
2589 #ifndef GL_ARB_arrays_of_arrays
2590 #define GL_ARB_arrays_of_arrays 1
2591 #endif /* GL_ARB_arrays_of_arrays */
2592
2593 #ifndef GL_ARB_base_instance
2594 #define GL_ARB_base_instance 1
2595 #endif /* GL_ARB_base_instance */
2596
2597 #ifndef GL_ARB_bindless_texture
2598 #define GL_ARB_bindless_texture 1
2599 typedef uint64_t GLuint64EXT;
2600 #define GL_UNSIGNED_INT64_ARB 0x140F
2601 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
2602 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
2603 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2604 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2605 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2606 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
2607 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2608 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
2609 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
2610 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
2611 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2612 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2613 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
2614 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
2615 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
2616 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
2617 #ifdef GL_GLEXT_PROTOTYPES
2618 GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
2619 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
2620 GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
2621 GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
2622 GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2623 GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
2624 GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
2625 GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
2626 GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
2627 GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
2628 GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2629 GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
2630 GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
2631 GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
2632 GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
2633 GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
2634 #endif
2635 #endif /* GL_ARB_bindless_texture */
2636
2637 #ifndef GL_ARB_blend_func_extended
2638 #define GL_ARB_blend_func_extended 1
2639 #endif /* GL_ARB_blend_func_extended */
2640
2641 #ifndef GL_ARB_buffer_storage
2642 #define GL_ARB_buffer_storage 1
2643 #endif /* GL_ARB_buffer_storage */
2644
2645 #ifndef GL_ARB_cl_event
2646 #define GL_ARB_cl_event 1
2647 struct _cl_context;
2648 struct _cl_event;
2649 #define GL_SYNC_CL_EVENT_ARB 0x8240
2650 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
2651 typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2652 #ifdef GL_GLEXT_PROTOTYPES
2653 GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2654 #endif
2655 #endif /* GL_ARB_cl_event */
2656
2657 #ifndef GL_ARB_clear_buffer_object
2658 #define GL_ARB_clear_buffer_object 1
2659 #endif /* GL_ARB_clear_buffer_object */
2660
2661 #ifndef GL_ARB_clear_texture
2662 #define GL_ARB_clear_texture 1
2663 #endif /* GL_ARB_clear_texture */
2664
2665 #ifndef GL_ARB_color_buffer_float
2666 #define GL_ARB_color_buffer_float 1
2667 #define GL_RGBA_FLOAT_MODE_ARB 0x8820
2668 #define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
2669 #define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
2670 #define GL_CLAMP_READ_COLOR_ARB 0x891C
2671 #define GL_FIXED_ONLY_ARB 0x891D
2672 typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
2673 #ifdef GL_GLEXT_PROTOTYPES
2674 GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
2675 #endif
2676 #endif /* GL_ARB_color_buffer_float */
2677
2678 #ifndef GL_ARB_compatibility
2679 #define GL_ARB_compatibility 1
2680 #endif /* GL_ARB_compatibility */
2681
2682 #ifndef GL_ARB_compressed_texture_pixel_storage
2683 #define GL_ARB_compressed_texture_pixel_storage 1
2684 #endif /* GL_ARB_compressed_texture_pixel_storage */
2685
2686 #ifndef GL_ARB_compute_shader
2687 #define GL_ARB_compute_shader 1
2688 #define GL_COMPUTE_SHADER_BIT 0x00000020
2689 #endif /* GL_ARB_compute_shader */
2690
2691 #ifndef GL_ARB_compute_variable_group_size
2692 #define GL_ARB_compute_variable_group_size 1
2693 #define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
2694 #define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
2695 #define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
2696 #define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
2697 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2698 #ifdef GL_GLEXT_PROTOTYPES
2699 GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2700 #endif
2701 #endif /* GL_ARB_compute_variable_group_size */
2702
2703 #ifndef GL_ARB_conservative_depth
2704 #define GL_ARB_conservative_depth 1
2705 #endif /* GL_ARB_conservative_depth */
2706
2707 #ifndef GL_ARB_copy_buffer
2708 #define GL_ARB_copy_buffer 1
2709 #define GL_COPY_READ_BUFFER_BINDING 0x8F36
2710 #define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
2711 #endif /* GL_ARB_copy_buffer */
2712
2713 #ifndef GL_ARB_copy_image
2714 #define GL_ARB_copy_image 1
2715 #endif /* GL_ARB_copy_image */
2716
2717 #ifndef GL_ARB_debug_output
2718 #define GL_ARB_debug_output 1
2719 typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2720 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
2721 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
2722 #define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
2723 #define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
2724 #define GL_DEBUG_SOURCE_API_ARB 0x8246
2725 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
2726 #define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
2727 #define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
2728 #define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
2729 #define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
2730 #define GL_DEBUG_TYPE_ERROR_ARB 0x824C
2731 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
2732 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
2733 #define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
2734 #define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
2735 #define GL_DEBUG_TYPE_OTHER_ARB 0x8251
2736 #define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
2737 #define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
2738 #define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
2739 #define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
2740 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
2741 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
2742 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2743 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2744 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
2745 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2746 #ifdef GL_GLEXT_PROTOTYPES
2747 GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2748 GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2749 GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
2750 GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2751 #endif
2752 #endif /* GL_ARB_debug_output */
2753
2754 #ifndef GL_ARB_depth_buffer_float
2755 #define GL_ARB_depth_buffer_float 1
2756 #endif /* GL_ARB_depth_buffer_float */
2757
2758 #ifndef GL_ARB_depth_clamp
2759 #define GL_ARB_depth_clamp 1
2760 #endif /* GL_ARB_depth_clamp */
2761
2762 #ifndef GL_ARB_depth_texture
2763 #define GL_ARB_depth_texture 1
2764 #define GL_DEPTH_COMPONENT16_ARB 0x81A5
2765 #define GL_DEPTH_COMPONENT24_ARB 0x81A6
2766 #define GL_DEPTH_COMPONENT32_ARB 0x81A7
2767 #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
2768 #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
2769 #endif /* GL_ARB_depth_texture */
2770
2771 #ifndef GL_ARB_draw_buffers
2772 #define GL_ARB_draw_buffers 1
2773 #define GL_MAX_DRAW_BUFFERS_ARB 0x8824
2774 #define GL_DRAW_BUFFER0_ARB 0x8825
2775 #define GL_DRAW_BUFFER1_ARB 0x8826
2776 #define GL_DRAW_BUFFER2_ARB 0x8827
2777 #define GL_DRAW_BUFFER3_ARB 0x8828
2778 #define GL_DRAW_BUFFER4_ARB 0x8829
2779 #define GL_DRAW_BUFFER5_ARB 0x882A
2780 #define GL_DRAW_BUFFER6_ARB 0x882B
2781 #define GL_DRAW_BUFFER7_ARB 0x882C
2782 #define GL_DRAW_BUFFER8_ARB 0x882D
2783 #define GL_DRAW_BUFFER9_ARB 0x882E
2784 #define GL_DRAW_BUFFER10_ARB 0x882F
2785 #define GL_DRAW_BUFFER11_ARB 0x8830
2786 #define GL_DRAW_BUFFER12_ARB 0x8831
2787 #define GL_DRAW_BUFFER13_ARB 0x8832
2788 #define GL_DRAW_BUFFER14_ARB 0x8833
2789 #define GL_DRAW_BUFFER15_ARB 0x8834
2790 typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
2791 #ifdef GL_GLEXT_PROTOTYPES
2792 GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
2793 #endif
2794 #endif /* GL_ARB_draw_buffers */
2795
2796 #ifndef GL_ARB_draw_buffers_blend
2797 #define GL_ARB_draw_buffers_blend 1
2798 typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
2799 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2800 typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
2801 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2802 #ifdef GL_GLEXT_PROTOTYPES
2803 GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
2804 GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2805 GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
2806 GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2807 #endif
2808 #endif /* GL_ARB_draw_buffers_blend */
2809
2810 #ifndef GL_ARB_draw_elements_base_vertex
2811 #define GL_ARB_draw_elements_base_vertex 1
2812 #endif /* GL_ARB_draw_elements_base_vertex */
2813
2814 #ifndef GL_ARB_draw_indirect
2815 #define GL_ARB_draw_indirect 1
2816 #endif /* GL_ARB_draw_indirect */
2817
2818 #ifndef GL_ARB_draw_instanced
2819 #define GL_ARB_draw_instanced 1
2820 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2821 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2822 #ifdef GL_GLEXT_PROTOTYPES
2823 GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2824 GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2825 #endif
2826 #endif /* GL_ARB_draw_instanced */
2827
2828 #ifndef GL_ARB_enhanced_layouts
2829 #define GL_ARB_enhanced_layouts 1
2830 #endif /* GL_ARB_enhanced_layouts */
2831
2832 #ifndef GL_ARB_explicit_attrib_location
2833 #define GL_ARB_explicit_attrib_location 1
2834 #endif /* GL_ARB_explicit_attrib_location */
2835
2836 #ifndef GL_ARB_explicit_uniform_location
2837 #define GL_ARB_explicit_uniform_location 1
2838 #endif /* GL_ARB_explicit_uniform_location */
2839
2840 #ifndef GL_ARB_fragment_coord_conventions
2841 #define GL_ARB_fragment_coord_conventions 1
2842 #endif /* GL_ARB_fragment_coord_conventions */
2843
2844 #ifndef GL_ARB_fragment_layer_viewport
2845 #define GL_ARB_fragment_layer_viewport 1
2846 #endif /* GL_ARB_fragment_layer_viewport */
2847
2848 #ifndef GL_ARB_fragment_program
2849 #define GL_ARB_fragment_program 1
2850 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
2851 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
2852 #define GL_PROGRAM_LENGTH_ARB 0x8627
2853 #define GL_PROGRAM_FORMAT_ARB 0x8876
2854 #define GL_PROGRAM_BINDING_ARB 0x8677
2855 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
2856 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
2857 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
2858 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
2859 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
2860 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
2861 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
2862 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
2863 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8
2864 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
2865 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
2866 #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
2867 #define GL_PROGRAM_ATTRIBS_ARB 0x88AC
2868 #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
2869 #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
2870 #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
2871 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
2872 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
2873 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
2874 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
2875 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
2876 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
2877 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
2878 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
2879 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
2880 #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
2881 #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
2882 #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
2883 #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
2884 #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
2885 #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
2886 #define GL_PROGRAM_STRING_ARB 0x8628
2887 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
2888 #define GL_CURRENT_MATRIX_ARB 0x8641
2889 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
2890 #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
2891 #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
2892 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
2893 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871
2894 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
2895 #define GL_PROGRAM_ERROR_STRING_ARB 0x8874
2896 #define GL_MATRIX0_ARB 0x88C0
2897 #define GL_MATRIX1_ARB 0x88C1
2898 #define GL_MATRIX2_ARB 0x88C2
2899 #define GL_MATRIX3_ARB 0x88C3
2900 #define GL_MATRIX4_ARB 0x88C4
2901 #define GL_MATRIX5_ARB 0x88C5
2902 #define GL_MATRIX6_ARB 0x88C6
2903 #define GL_MATRIX7_ARB 0x88C7
2904 #define GL_MATRIX8_ARB 0x88C8
2905 #define GL_MATRIX9_ARB 0x88C9
2906 #define GL_MATRIX10_ARB 0x88CA
2907 #define GL_MATRIX11_ARB 0x88CB
2908 #define GL_MATRIX12_ARB 0x88CC
2909 #define GL_MATRIX13_ARB 0x88CD
2910 #define GL_MATRIX14_ARB 0x88CE
2911 #define GL_MATRIX15_ARB 0x88CF
2912 #define GL_MATRIX16_ARB 0x88D0
2913 #define GL_MATRIX17_ARB 0x88D1
2914 #define GL_MATRIX18_ARB 0x88D2
2915 #define GL_MATRIX19_ARB 0x88D3
2916 #define GL_MATRIX20_ARB 0x88D4
2917 #define GL_MATRIX21_ARB 0x88D5
2918 #define GL_MATRIX22_ARB 0x88D6
2919 #define GL_MATRIX23_ARB 0x88D7
2920 #define GL_MATRIX24_ARB 0x88D8
2921 #define GL_MATRIX25_ARB 0x88D9
2922 #define GL_MATRIX26_ARB 0x88DA
2923 #define GL_MATRIX27_ARB 0x88DB
2924 #define GL_MATRIX28_ARB 0x88DC
2925 #define GL_MATRIX29_ARB 0x88DD
2926 #define GL_MATRIX30_ARB 0x88DE
2927 #define GL_MATRIX31_ARB 0x88DF
2928 typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
2929 typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
2930 typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
2931 typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
2932 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2933 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2934 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2935 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2936 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2937 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2938 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2939 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2940 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2941 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2942 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2943 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2944 typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
2945 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
2946 typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
2947 #ifdef GL_GLEXT_PROTOTYPES
2948 GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
2949 GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
2950 GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
2951 GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
2952 GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2953 GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2954 GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2955 GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2956 GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2957 GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2958 GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2959 GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2960 GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2961 GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2962 GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2963 GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2964 GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
2965 GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
2966 GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
2967 #endif
2968 #endif /* GL_ARB_fragment_program */
2969
2970 #ifndef GL_ARB_fragment_program_shadow
2971 #define GL_ARB_fragment_program_shadow 1
2972 #endif /* GL_ARB_fragment_program_shadow */
2973
2974 #ifndef GL_ARB_fragment_shader
2975 #define GL_ARB_fragment_shader 1
2976 #define GL_FRAGMENT_SHADER_ARB 0x8B30
2977 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
2978 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
2979 #endif /* GL_ARB_fragment_shader */
2980
2981 #ifndef GL_ARB_framebuffer_no_attachments
2982 #define GL_ARB_framebuffer_no_attachments 1
2983 #endif /* GL_ARB_framebuffer_no_attachments */
2984
2985 #ifndef GL_ARB_framebuffer_object
2986 #define GL_ARB_framebuffer_object 1
2987 #endif /* GL_ARB_framebuffer_object */
2988
2989 #ifndef GL_ARB_framebuffer_sRGB
2990 #define GL_ARB_framebuffer_sRGB 1
2991 #endif /* GL_ARB_framebuffer_sRGB */
2992
2993 #ifndef GL_KHR_context_flush_control
2994 #define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
2995 #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
2996 #endif /* GL_KHR_context_flush_control */
2997
2998 #ifndef GL_ARB_geometry_shader4
2999 #define GL_ARB_geometry_shader4 1
3000 #define GL_LINES_ADJACENCY_ARB 0x000A
3001 #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
3002 #define GL_TRIANGLES_ADJACENCY_ARB 0x000C
3003 #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
3004 #define GL_PROGRAM_POINT_SIZE_ARB 0x8642
3005 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
3006 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
3007 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
3008 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
3009 #define GL_GEOMETRY_SHADER_ARB 0x8DD9
3010 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
3011 #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
3012 #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
3013 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
3014 #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
3015 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
3016 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
3017 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
3018 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
3019 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
3020 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3021 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3022 #ifdef GL_GLEXT_PROTOTYPES
3023 GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
3024 GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
3025 GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3026 GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3027 #endif
3028 #endif /* GL_ARB_geometry_shader4 */
3029
3030 #ifndef GL_ARB_get_program_binary
3031 #define GL_ARB_get_program_binary 1
3032 #endif /* GL_ARB_get_program_binary */
3033
3034 #ifndef GL_ARB_gpu_shader5
3035 #define GL_ARB_gpu_shader5 1
3036 #endif /* GL_ARB_gpu_shader5 */
3037
3038 #ifndef GL_ARB_gpu_shader_fp64
3039 #define GL_ARB_gpu_shader_fp64 1
3040 #endif /* GL_ARB_gpu_shader_fp64 */
3041
3042 #ifndef GL_ARB_half_float_pixel
3043 #define GL_ARB_half_float_pixel 1
3044 typedef unsigned short GLhalfARB;
3045 #define GL_HALF_FLOAT_ARB 0x140B
3046 #endif /* GL_ARB_half_float_pixel */
3047
3048 #ifndef GL_ARB_half_float_vertex
3049 #define GL_ARB_half_float_vertex 1
3050 #endif /* GL_ARB_half_float_vertex */
3051
3052 #ifndef GL_ARB_imaging
3053 #define GL_ARB_imaging 1
3054 #define GL_BLEND_COLOR 0x8005
3055 #define GL_BLEND_EQUATION 0x8009
3056 #define GL_CONVOLUTION_1D 0x8010
3057 #define GL_CONVOLUTION_2D 0x8011
3058 #define GL_SEPARABLE_2D 0x8012
3059 #define GL_CONVOLUTION_BORDER_MODE 0x8013
3060 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
3061 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
3062 #define GL_REDUCE 0x8016
3063 #define GL_CONVOLUTION_FORMAT 0x8017
3064 #define GL_CONVOLUTION_WIDTH 0x8018
3065 #define GL_CONVOLUTION_HEIGHT 0x8019
3066 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
3067 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
3068 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
3069 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
3070 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
3071 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
3072 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
3073 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
3074 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
3075 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
3076 #define GL_HISTOGRAM 0x8024
3077 #define GL_PROXY_HISTOGRAM 0x8025
3078 #define GL_HISTOGRAM_WIDTH 0x8026
3079 #define GL_HISTOGRAM_FORMAT 0x8027
3080 #define GL_HISTOGRAM_RED_SIZE 0x8028
3081 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
3082 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
3083 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
3084 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
3085 #define GL_HISTOGRAM_SINK 0x802D
3086 #define GL_MINMAX 0x802E
3087 #define GL_MINMAX_FORMAT 0x802F
3088 #define GL_MINMAX_SINK 0x8030
3089 #define GL_TABLE_TOO_LARGE 0x8031
3090 #define GL_COLOR_MATRIX 0x80B1
3091 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
3092 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
3093 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
3094 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
3095 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
3096 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
3097 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
3098 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
3099 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
3100 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
3101 #define GL_COLOR_TABLE 0x80D0
3102 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
3103 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
3104 #define GL_PROXY_COLOR_TABLE 0x80D3
3105 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
3106 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
3107 #define GL_COLOR_TABLE_SCALE 0x80D6
3108 #define GL_COLOR_TABLE_BIAS 0x80D7
3109 #define GL_COLOR_TABLE_FORMAT 0x80D8
3110 #define GL_COLOR_TABLE_WIDTH 0x80D9
3111 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
3112 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
3113 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
3114 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
3115 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
3116 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
3117 #define GL_CONSTANT_BORDER 0x8151
3118 #define GL_REPLICATE_BORDER 0x8153
3119 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
3120 typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3121 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3122 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3123 typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3124 typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
3125 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3126 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3127 typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3128 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3129 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3130 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3131 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
3132 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3133 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
3134 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3135 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3136 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3137 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
3138 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3139 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3140 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3141 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3142 typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3143 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3144 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3145 typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3146 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3147 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3148 typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3149 typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
3150 typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
3151 typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
3152 #ifdef GL_GLEXT_PROTOTYPES
3153 GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3154 GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3155 GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
3156 GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3157 GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
3158 GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
3159 GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
3160 GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3161 GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3162 GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3163 GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3164 GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
3165 GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3166 GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
3167 GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
3168 GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3169 GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3170 GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
3171 GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
3172 GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
3173 GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3174 GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3175 GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3176 GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
3177 GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
3178 GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3179 GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
3180 GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
3181 GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3182 GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
3183 GLAPI void APIENTRY glResetHistogram (GLenum target);
3184 GLAPI void APIENTRY glResetMinmax (GLenum target);
3185 #endif
3186 #endif /* GL_ARB_imaging */
3187
3188 #ifndef GL_ARB_indirect_parameters
3189 #define GL_ARB_indirect_parameters 1
3190 #define GL_PARAMETER_BUFFER_ARB 0x80EE
3191 #define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
3192 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3193 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3194 #ifdef GL_GLEXT_PROTOTYPES
3195 GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3196 GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3197 #endif
3198 #endif /* GL_ARB_indirect_parameters */
3199
3200 #ifndef GL_ARB_instanced_arrays
3201 #define GL_ARB_instanced_arrays 1
3202 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
3203 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
3204 #ifdef GL_GLEXT_PROTOTYPES
3205 GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
3206 #endif
3207 #endif /* GL_ARB_instanced_arrays */
3208
3209 #ifndef GL_ARB_internalformat_query
3210 #define GL_ARB_internalformat_query 1
3211 #endif /* GL_ARB_internalformat_query */
3212
3213 #ifndef GL_ARB_internalformat_query2
3214 #define GL_ARB_internalformat_query2 1
3215 #define GL_SRGB_DECODE_ARB 0x8299
3216 #endif /* GL_ARB_internalformat_query2 */
3217
3218 #ifndef GL_ARB_invalidate_subdata
3219 #define GL_ARB_invalidate_subdata 1
3220 #endif /* GL_ARB_invalidate_subdata */
3221
3222 #ifndef GL_ARB_map_buffer_alignment
3223 #define GL_ARB_map_buffer_alignment 1
3224 #endif /* GL_ARB_map_buffer_alignment */
3225
3226 #ifndef GL_ARB_map_buffer_range
3227 #define GL_ARB_map_buffer_range 1
3228 #endif /* GL_ARB_map_buffer_range */
3229
3230 #ifndef GL_ARB_matrix_palette
3231 #define GL_ARB_matrix_palette 1
3232 #define GL_MATRIX_PALETTE_ARB 0x8840
3233 #define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
3234 #define GL_MAX_PALETTE_MATRICES_ARB 0x8842
3235 #define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
3236 #define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
3237 #define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
3238 #define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
3239 #define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
3240 #define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
3241 #define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
3242 typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
3243 typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
3244 typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
3245 typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
3246 typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
3247 #ifdef GL_GLEXT_PROTOTYPES
3248 GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
3249 GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
3250 GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
3251 GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
3252 GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
3253 #endif
3254 #endif /* GL_ARB_matrix_palette */
3255
3256 #ifndef GL_ARB_multi_bind
3257 #define GL_ARB_multi_bind 1
3258 #endif /* GL_ARB_multi_bind */
3259
3260 #ifndef GL_ARB_multi_draw_indirect
3261 #define GL_ARB_multi_draw_indirect 1
3262 #endif /* GL_ARB_multi_draw_indirect */
3263
3264 #ifndef GL_ARB_multisample
3265 #define GL_ARB_multisample 1
3266 #define GL_MULTISAMPLE_ARB 0x809D
3267 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
3268 #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
3269 #define GL_SAMPLE_COVERAGE_ARB 0x80A0
3270 #define GL_SAMPLE_BUFFERS_ARB 0x80A8
3271 #define GL_SAMPLES_ARB 0x80A9
3272 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
3273 #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
3274 #define GL_MULTISAMPLE_BIT_ARB 0x20000000
3275 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
3276 #ifdef GL_GLEXT_PROTOTYPES
3277 GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
3278 #endif
3279 #endif /* GL_ARB_multisample */
3280
3281 #ifndef GL_ARB_multitexture
3282 #define GL_ARB_multitexture 1
3283 #define GL_TEXTURE0_ARB 0x84C0
3284 #define GL_TEXTURE1_ARB 0x84C1
3285 #define GL_TEXTURE2_ARB 0x84C2
3286 #define GL_TEXTURE3_ARB 0x84C3
3287 #define GL_TEXTURE4_ARB 0x84C4
3288 #define GL_TEXTURE5_ARB 0x84C5
3289 #define GL_TEXTURE6_ARB 0x84C6
3290 #define GL_TEXTURE7_ARB 0x84C7
3291 #define GL_TEXTURE8_ARB 0x84C8
3292 #define GL_TEXTURE9_ARB 0x84C9
3293 #define GL_TEXTURE10_ARB 0x84CA
3294 #define GL_TEXTURE11_ARB 0x84CB
3295 #define GL_TEXTURE12_ARB 0x84CC
3296 #define GL_TEXTURE13_ARB 0x84CD
3297 #define GL_TEXTURE14_ARB 0x84CE
3298 #define GL_TEXTURE15_ARB 0x84CF
3299 #define GL_TEXTURE16_ARB 0x84D0
3300 #define GL_TEXTURE17_ARB 0x84D1
3301 #define GL_TEXTURE18_ARB 0x84D2
3302 #define GL_TEXTURE19_ARB 0x84D3
3303 #define GL_TEXTURE20_ARB 0x84D4
3304 #define GL_TEXTURE21_ARB 0x84D5
3305 #define GL_TEXTURE22_ARB 0x84D6
3306 #define GL_TEXTURE23_ARB 0x84D7
3307 #define GL_TEXTURE24_ARB 0x84D8
3308 #define GL_TEXTURE25_ARB 0x84D9
3309 #define GL_TEXTURE26_ARB 0x84DA
3310 #define GL_TEXTURE27_ARB 0x84DB
3311 #define GL_TEXTURE28_ARB 0x84DC
3312 #define GL_TEXTURE29_ARB 0x84DD
3313 #define GL_TEXTURE30_ARB 0x84DE
3314 #define GL_TEXTURE31_ARB 0x84DF
3315 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
3316 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
3317 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
3318 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
3319 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
3320 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
3321 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
3322 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
3323 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
3324 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
3325 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
3326 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
3327 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
3328 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
3329 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
3330 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
3331 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
3332 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
3333 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
3334 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
3335 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
3336 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3337 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
3338 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3339 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
3340 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
3341 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
3342 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
3343 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
3344 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3345 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
3346 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3347 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
3348 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
3349 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
3350 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3351 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
3352 #ifdef GL_GLEXT_PROTOTYPES
3353 GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
3354 GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
3355 GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
3356 GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
3357 GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
3358 GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
3359 GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
3360 GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
3361 GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
3362 GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
3363 GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
3364 GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
3365 GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
3366 GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
3367 GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
3368 GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
3369 GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
3370 GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
3371 GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3372 GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
3373 GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3374 GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
3375 GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
3376 GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
3377 GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
3378 GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
3379 GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3380 GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
3381 GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3382 GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
3383 GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
3384 GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
3385 GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3386 GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
3387 #endif
3388 #endif /* GL_ARB_multitexture */
3389
3390 #ifndef GL_ARB_occlusion_query
3391 #define GL_ARB_occlusion_query 1
3392 #define GL_QUERY_COUNTER_BITS_ARB 0x8864
3393 #define GL_CURRENT_QUERY_ARB 0x8865
3394 #define GL_QUERY_RESULT_ARB 0x8866
3395 #define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
3396 #define GL_SAMPLES_PASSED_ARB 0x8914
3397 typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
3398 typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
3399 typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
3400 typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
3401 typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
3402 typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
3403 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
3404 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
3405 #ifdef GL_GLEXT_PROTOTYPES
3406 GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
3407 GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
3408 GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
3409 GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
3410 GLAPI void APIENTRY glEndQueryARB (GLenum target);
3411 GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
3412 GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
3413 GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
3414 #endif
3415 #endif /* GL_ARB_occlusion_query */
3416
3417 #ifndef GL_ARB_occlusion_query2
3418 #define GL_ARB_occlusion_query2 1
3419 #endif /* GL_ARB_occlusion_query2 */
3420
3421 #ifndef GL_ARB_pixel_buffer_object
3422 #define GL_ARB_pixel_buffer_object 1
3423 #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
3424 #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
3425 #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
3426 #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
3427 #endif /* GL_ARB_pixel_buffer_object */
3428
3429 #ifndef GL_ARB_point_parameters
3430 #define GL_ARB_point_parameters 1
3431 #define GL_POINT_SIZE_MIN_ARB 0x8126
3432 #define GL_POINT_SIZE_MAX_ARB 0x8127
3433 #define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
3434 #define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
3435 typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
3436 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
3437 #ifdef GL_GLEXT_PROTOTYPES
3438 GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
3439 GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
3440 #endif
3441 #endif /* GL_ARB_point_parameters */
3442
3443 #ifndef GL_ARB_point_sprite
3444 #define GL_ARB_point_sprite 1
3445 #define GL_POINT_SPRITE_ARB 0x8861
3446 #define GL_COORD_REPLACE_ARB 0x8862
3447 #endif /* GL_ARB_point_sprite */
3448
3449 #ifndef GL_ARB_program_interface_query
3450 #define GL_ARB_program_interface_query 1
3451 #endif /* GL_ARB_program_interface_query */
3452
3453 #ifndef GL_ARB_provoking_vertex
3454 #define GL_ARB_provoking_vertex 1
3455 #endif /* GL_ARB_provoking_vertex */
3456
3457 #ifndef GL_ARB_query_buffer_object
3458 #define GL_ARB_query_buffer_object 1
3459 #endif /* GL_ARB_query_buffer_object */
3460
3461 #ifndef GL_ARB_robust_buffer_access_behavior
3462 #define GL_ARB_robust_buffer_access_behavior 1
3463 #endif /* GL_ARB_robust_buffer_access_behavior */
3464
3465 #ifndef GL_ARB_robustness
3466 #define GL_ARB_robustness 1
3467 #define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
3468 #define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
3469 #define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
3470 #define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
3471 #define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
3472 #define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
3473 #define GL_NO_RESET_NOTIFICATION_ARB 0x8261
3474 typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
3475 typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3476 typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3477 typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
3478 typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3479 typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3480 typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3481 typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3482 typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3483 typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3484 typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3485 typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
3486 typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
3487 typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
3488 typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
3489 typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3490 typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3491 typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3492 typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3493 typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3494 #ifdef GL_GLEXT_PROTOTYPES
3495 GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
3496 GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3497 GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3498 GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
3499 GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3500 GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3501 GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3502 GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3503 GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3504 GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3505 GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3506 GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
3507 GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
3508 GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
3509 GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
3510 GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3511 GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3512 GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3513 GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3514 GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3515 #endif
3516 #endif /* GL_ARB_robustness */
3517
3518 #ifndef GL_ARB_robustness_isolation
3519 #define GL_ARB_robustness_isolation 1
3520 #endif /* GL_ARB_robustness_isolation */
3521
3522 #ifndef GL_ARB_sample_shading
3523 #define GL_ARB_sample_shading 1
3524 #define GL_SAMPLE_SHADING_ARB 0x8C36
3525 #define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
3526 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
3527 #ifdef GL_GLEXT_PROTOTYPES
3528 GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
3529 #endif
3530 #endif /* GL_ARB_sample_shading */
3531
3532 #ifndef GL_ARB_sampler_objects
3533 #define GL_ARB_sampler_objects 1
3534 #endif /* GL_ARB_sampler_objects */
3535
3536 #ifndef GL_ARB_seamless_cube_map
3537 #define GL_ARB_seamless_cube_map 1
3538 #endif /* GL_ARB_seamless_cube_map */
3539
3540 #ifndef GL_ARB_seamless_cubemap_per_texture
3541 #define GL_ARB_seamless_cubemap_per_texture 1
3542 #endif /* GL_ARB_seamless_cubemap_per_texture */
3543
3544 #ifndef GL_ARB_separate_shader_objects
3545 #define GL_ARB_separate_shader_objects 1
3546 #endif /* GL_ARB_separate_shader_objects */
3547
3548 #ifndef GL_ARB_shader_atomic_counters
3549 #define GL_ARB_shader_atomic_counters 1
3550 #endif /* GL_ARB_shader_atomic_counters */
3551
3552 #ifndef GL_ARB_shader_bit_encoding
3553 #define GL_ARB_shader_bit_encoding 1
3554 #endif /* GL_ARB_shader_bit_encoding */
3555
3556 #ifndef GL_ARB_shader_draw_parameters
3557 #define GL_ARB_shader_draw_parameters 1
3558 #endif /* GL_ARB_shader_draw_parameters */
3559
3560 #ifndef GL_ARB_shader_group_vote
3561 #define GL_ARB_shader_group_vote 1
3562 #endif /* GL_ARB_shader_group_vote */
3563
3564 #ifndef GL_ARB_shader_image_load_store
3565 #define GL_ARB_shader_image_load_store 1
3566 #endif /* GL_ARB_shader_image_load_store */
3567
3568 #ifndef GL_ARB_shader_image_size
3569 #define GL_ARB_shader_image_size 1
3570 #endif /* GL_ARB_shader_image_size */
3571
3572 #ifndef GL_ARB_shader_objects
3573 #define GL_ARB_shader_objects 1
3574 #ifdef __APPLE__
3575 typedef void *GLhandleARB;
3576 #else
3577 typedef unsigned int GLhandleARB;
3578 #endif
3579 typedef char GLcharARB;
3580 #define GL_PROGRAM_OBJECT_ARB 0x8B40
3581 #define GL_SHADER_OBJECT_ARB 0x8B48
3582 #define GL_OBJECT_TYPE_ARB 0x8B4E
3583 #define GL_OBJECT_SUBTYPE_ARB 0x8B4F
3584 #define GL_FLOAT_VEC2_ARB 0x8B50
3585 #define GL_FLOAT_VEC3_ARB 0x8B51
3586 #define GL_FLOAT_VEC4_ARB 0x8B52
3587 #define GL_INT_VEC2_ARB 0x8B53
3588 #define GL_INT_VEC3_ARB 0x8B54
3589 #define GL_INT_VEC4_ARB 0x8B55
3590 #define GL_BOOL_ARB 0x8B56
3591 #define GL_BOOL_VEC2_ARB 0x8B57
3592 #define GL_BOOL_VEC3_ARB 0x8B58
3593 #define GL_BOOL_VEC4_ARB 0x8B59
3594 #define GL_FLOAT_MAT2_ARB 0x8B5A
3595 #define GL_FLOAT_MAT3_ARB 0x8B5B
3596 #define GL_FLOAT_MAT4_ARB 0x8B5C
3597 #define GL_SAMPLER_1D_ARB 0x8B5D
3598 #define GL_SAMPLER_2D_ARB 0x8B5E
3599 #define GL_SAMPLER_3D_ARB 0x8B5F
3600 #define GL_SAMPLER_CUBE_ARB 0x8B60
3601 #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
3602 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
3603 #define GL_SAMPLER_2D_RECT_ARB 0x8B63
3604 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
3605 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
3606 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
3607 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82
3608 #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
3609 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
3610 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
3611 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
3612 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
3613 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
3614 typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
3615 typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
3616 typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
3617 typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
3618 typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3619 typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
3620 typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
3621 typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
3622 typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
3623 typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
3624 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
3625 typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
3626 typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
3627 typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3628 typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3629 typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
3630 typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
3631 typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
3632 typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3633 typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3634 typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3635 typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3636 typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3637 typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3638 typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3639 typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3640 typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3641 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3642 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3643 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3644 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
3645 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
3646 typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3647 typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3648 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
3649 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3650 typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
3651 typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
3652 typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3653 #ifdef GL_GLEXT_PROTOTYPES
3654 GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
3655 GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
3656 GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
3657 GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
3658 GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3659 GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
3660 GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
3661 GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
3662 GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
3663 GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
3664 GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
3665 GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
3666 GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
3667 GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3668 GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3669 GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
3670 GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
3671 GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
3672 GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3673 GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
3674 GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
3675 GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
3676 GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
3677 GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
3678 GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
3679 GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
3680 GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
3681 GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3682 GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3683 GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3684 GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
3685 GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
3686 GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3687 GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3688 GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
3689 GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3690 GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
3691 GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
3692 GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3693 #endif
3694 #endif /* GL_ARB_shader_objects */
3695
3696 #ifndef GL_ARB_shader_precision
3697 #define GL_ARB_shader_precision 1
3698 #endif /* GL_ARB_shader_precision */
3699
3700 #ifndef GL_ARB_shader_stencil_export
3701 #define GL_ARB_shader_stencil_export 1
3702 #endif /* GL_ARB_shader_stencil_export */
3703
3704 #ifndef GL_ARB_shader_storage_buffer_object
3705 #define GL_ARB_shader_storage_buffer_object 1
3706 #endif /* GL_ARB_shader_storage_buffer_object */
3707
3708 #ifndef GL_ARB_shader_subroutine
3709 #define GL_ARB_shader_subroutine 1
3710 #endif /* GL_ARB_shader_subroutine */
3711
3712 #ifndef GL_ARB_shader_texture_lod
3713 #define GL_ARB_shader_texture_lod 1
3714 #endif /* GL_ARB_shader_texture_lod */
3715
3716 #ifndef GL_ARB_shading_language_100
3717 #define GL_ARB_shading_language_100 1
3718 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
3719 #endif /* GL_ARB_shading_language_100 */
3720
3721 #ifndef GL_ARB_shading_language_420pack
3722 #define GL_ARB_shading_language_420pack 1
3723 #endif /* GL_ARB_shading_language_420pack */
3724
3725 #ifndef GL_ARB_shading_language_include
3726 #define GL_ARB_shading_language_include 1
3727 #define GL_SHADER_INCLUDE_ARB 0x8DAE
3728 #define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
3729 #define GL_NAMED_STRING_TYPE_ARB 0x8DEA
3730 typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3731 typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3732 typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3733 typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3734 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3735 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3736 #ifdef GL_GLEXT_PROTOTYPES
3737 GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3738 GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
3739 GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3740 GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
3741 GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3742 GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3743 #endif
3744 #endif /* GL_ARB_shading_language_include */
3745
3746 #ifndef GL_ARB_shading_language_packing
3747 #define GL_ARB_shading_language_packing 1
3748 #endif /* GL_ARB_shading_language_packing */
3749
3750 #ifndef GL_ARB_shadow
3751 #define GL_ARB_shadow 1
3752 #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
3753 #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
3754 #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
3755 #endif /* GL_ARB_shadow */
3756
3757 #ifndef GL_ARB_shadow_ambient
3758 #define GL_ARB_shadow_ambient 1
3759 #define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
3760 #endif /* GL_ARB_shadow_ambient */
3761
3762 #ifndef GL_ARB_sparse_texture
3763 #define GL_ARB_sparse_texture 1
3764 #define GL_TEXTURE_SPARSE_ARB 0x91A6
3765 #define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
3766 #define GL_MIN_SPARSE_LEVEL_ARB 0x919B
3767 #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
3768 #define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
3769 #define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
3770 #define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
3771 #define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
3772 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
3773 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
3774 #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
3775 typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3776 #ifdef GL_GLEXT_PROTOTYPES
3777 GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3778 #endif
3779 #endif /* GL_ARB_sparse_texture */
3780
3781 #ifndef GL_ARB_stencil_texturing
3782 #define GL_ARB_stencil_texturing 1
3783 #endif /* GL_ARB_stencil_texturing */
3784
3785 #ifndef GL_ARB_sync
3786 #define GL_ARB_sync 1
3787 #endif /* GL_ARB_sync */
3788
3789 #ifndef GL_ARB_tessellation_shader
3790 #define GL_ARB_tessellation_shader 1
3791 #endif /* GL_ARB_tessellation_shader */
3792
3793 #ifndef GL_ARB_texture_border_clamp
3794 #define GL_ARB_texture_border_clamp 1
3795 #define GL_CLAMP_TO_BORDER_ARB 0x812D
3796 #endif /* GL_ARB_texture_border_clamp */
3797
3798 #ifndef GL_ARB_texture_buffer_object
3799 #define GL_ARB_texture_buffer_object 1
3800 #define GL_TEXTURE_BUFFER_ARB 0x8C2A
3801 #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
3802 #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
3803 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
3804 #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
3805 typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
3806 #ifdef GL_GLEXT_PROTOTYPES
3807 GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
3808 #endif
3809 #endif /* GL_ARB_texture_buffer_object */
3810
3811 #ifndef GL_ARB_texture_buffer_object_rgb32
3812 #define GL_ARB_texture_buffer_object_rgb32 1
3813 #endif /* GL_ARB_texture_buffer_object_rgb32 */
3814
3815 #ifndef GL_ARB_texture_buffer_range
3816 #define GL_ARB_texture_buffer_range 1
3817 #endif /* GL_ARB_texture_buffer_range */
3818
3819 #ifndef GL_ARB_texture_compression
3820 #define GL_ARB_texture_compression 1
3821 #define GL_COMPRESSED_ALPHA_ARB 0x84E9
3822 #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
3823 #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
3824 #define GL_COMPRESSED_INTENSITY_ARB 0x84EC
3825 #define GL_COMPRESSED_RGB_ARB 0x84ED
3826 #define GL_COMPRESSED_RGBA_ARB 0x84EE
3827 #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
3828 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
3829 #define GL_TEXTURE_COMPRESSED_ARB 0x86A1
3830 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
3831 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
3832 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3833 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3834 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3835 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3836 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3837 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3838 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
3839 #ifdef GL_GLEXT_PROTOTYPES
3840 GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3841 GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3842 GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3843 GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3844 GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3845 GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3846 GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
3847 #endif
3848 #endif /* GL_ARB_texture_compression */
3849
3850 #ifndef GL_ARB_texture_compression_bptc
3851 #define GL_ARB_texture_compression_bptc 1
3852 #define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
3853 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
3854 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
3855 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
3856 #endif /* GL_ARB_texture_compression_bptc */
3857
3858 #ifndef GL_ARB_texture_compression_rgtc
3859 #define GL_ARB_texture_compression_rgtc 1
3860 #endif /* GL_ARB_texture_compression_rgtc */
3861
3862 #ifndef GL_ARB_texture_cube_map
3863 #define GL_ARB_texture_cube_map 1
3864 #define GL_NORMAL_MAP_ARB 0x8511
3865 #define GL_REFLECTION_MAP_ARB 0x8512
3866 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513
3867 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
3868 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
3869 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
3870 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
3871 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
3872 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
3873 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
3874 #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
3875 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
3876 #endif /* GL_ARB_texture_cube_map */
3877
3878 #ifndef GL_ARB_texture_cube_map_array
3879 #define GL_ARB_texture_cube_map_array 1
3880 #define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
3881 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
3882 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
3883 #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
3884 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
3885 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
3886 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
3887 #endif /* GL_ARB_texture_cube_map_array */
3888
3889 #ifndef GL_ARB_texture_env_add
3890 #define GL_ARB_texture_env_add 1
3891 #endif /* GL_ARB_texture_env_add */
3892
3893 #ifndef GL_ARB_texture_env_combine
3894 #define GL_ARB_texture_env_combine 1
3895 #define GL_COMBINE_ARB 0x8570
3896 #define GL_COMBINE_RGB_ARB 0x8571
3897 #define GL_COMBINE_ALPHA_ARB 0x8572
3898 #define GL_SOURCE0_RGB_ARB 0x8580
3899 #define GL_SOURCE1_RGB_ARB 0x8581
3900 #define GL_SOURCE2_RGB_ARB 0x8582
3901 #define GL_SOURCE0_ALPHA_ARB 0x8588
3902 #define GL_SOURCE1_ALPHA_ARB 0x8589
3903 #define GL_SOURCE2_ALPHA_ARB 0x858A
3904 #define GL_OPERAND0_RGB_ARB 0x8590
3905 #define GL_OPERAND1_RGB_ARB 0x8591
3906 #define GL_OPERAND2_RGB_ARB 0x8592
3907 #define GL_OPERAND0_ALPHA_ARB 0x8598
3908 #define GL_OPERAND1_ALPHA_ARB 0x8599
3909 #define GL_OPERAND2_ALPHA_ARB 0x859A
3910 #define GL_RGB_SCALE_ARB 0x8573
3911 #define GL_ADD_SIGNED_ARB 0x8574
3912 #define GL_INTERPOLATE_ARB 0x8575
3913 #define GL_SUBTRACT_ARB 0x84E7
3914 #define GL_CONSTANT_ARB 0x8576
3915 #define GL_PRIMARY_COLOR_ARB 0x8577
3916 #define GL_PREVIOUS_ARB 0x8578
3917 #endif /* GL_ARB_texture_env_combine */
3918
3919 #ifndef GL_ARB_texture_env_crossbar
3920 #define GL_ARB_texture_env_crossbar 1
3921 #endif /* GL_ARB_texture_env_crossbar */
3922
3923 #ifndef GL_ARB_texture_env_dot3
3924 #define GL_ARB_texture_env_dot3 1
3925 #define GL_DOT3_RGB_ARB 0x86AE
3926 #define GL_DOT3_RGBA_ARB 0x86AF
3927 #endif /* GL_ARB_texture_env_dot3 */
3928
3929 #ifndef GL_ARB_texture_float
3930 #define GL_ARB_texture_float 1
3931 #define GL_TEXTURE_RED_TYPE_ARB 0x8C10
3932 #define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
3933 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
3934 #define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
3935 #define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
3936 #define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
3937 #define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
3938 #define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
3939 #define GL_RGBA32F_ARB 0x8814
3940 #define GL_RGB32F_ARB 0x8815
3941 #define GL_ALPHA32F_ARB 0x8816
3942 #define GL_INTENSITY32F_ARB 0x8817
3943 #define GL_LUMINANCE32F_ARB 0x8818
3944 #define GL_LUMINANCE_ALPHA32F_ARB 0x8819
3945 #define GL_RGBA16F_ARB 0x881A
3946 #define GL_RGB16F_ARB 0x881B
3947 #define GL_ALPHA16F_ARB 0x881C
3948 #define GL_INTENSITY16F_ARB 0x881D
3949 #define GL_LUMINANCE16F_ARB 0x881E
3950 #define GL_LUMINANCE_ALPHA16F_ARB 0x881F
3951 #endif /* GL_ARB_texture_float */
3952
3953 #ifndef GL_ARB_texture_gather
3954 #define GL_ARB_texture_gather 1
3955 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
3956 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
3957 #define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
3958 #endif /* GL_ARB_texture_gather */
3959
3960 #ifndef GL_ARB_texture_mirror_clamp_to_edge
3961 #define GL_ARB_texture_mirror_clamp_to_edge 1
3962 #endif /* GL_ARB_texture_mirror_clamp_to_edge */
3963
3964 #ifndef GL_ARB_texture_mirrored_repeat
3965 #define GL_ARB_texture_mirrored_repeat 1
3966 #define GL_MIRRORED_REPEAT_ARB 0x8370
3967 #endif /* GL_ARB_texture_mirrored_repeat */
3968
3969 #ifndef GL_ARB_texture_multisample
3970 #define GL_ARB_texture_multisample 1
3971 #endif /* GL_ARB_texture_multisample */
3972
3973 #ifndef GL_ARB_texture_non_power_of_two
3974 #define GL_ARB_texture_non_power_of_two 1
3975 #endif /* GL_ARB_texture_non_power_of_two */
3976
3977 #ifndef GL_ARB_texture_query_levels
3978 #define GL_ARB_texture_query_levels 1
3979 #endif /* GL_ARB_texture_query_levels */
3980
3981 #ifndef GL_ARB_texture_query_lod
3982 #define GL_ARB_texture_query_lod 1
3983 #endif /* GL_ARB_texture_query_lod */
3984
3985 #ifndef GL_ARB_texture_rectangle
3986 #define GL_ARB_texture_rectangle 1
3987 #define GL_TEXTURE_RECTANGLE_ARB 0x84F5
3988 #define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
3989 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
3990 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
3991 #endif /* GL_ARB_texture_rectangle */
3992
3993 #ifndef GL_ARB_texture_rg
3994 #define GL_ARB_texture_rg 1
3995 #endif /* GL_ARB_texture_rg */
3996
3997 #ifndef GL_ARB_texture_rgb10_a2ui
3998 #define GL_ARB_texture_rgb10_a2ui 1
3999 #endif /* GL_ARB_texture_rgb10_a2ui */
4000
4001 #ifndef GL_ARB_texture_stencil8
4002 #define GL_ARB_texture_stencil8 1
4003 #endif /* GL_ARB_texture_stencil8 */
4004
4005 #ifndef GL_ARB_texture_storage
4006 #define GL_ARB_texture_storage 1
4007 #endif /* GL_ARB_texture_storage */
4008
4009 #ifndef GL_ARB_texture_storage_multisample
4010 #define GL_ARB_texture_storage_multisample 1
4011 #endif /* GL_ARB_texture_storage_multisample */
4012
4013 #ifndef GL_ARB_texture_swizzle
4014 #define GL_ARB_texture_swizzle 1
4015 #endif /* GL_ARB_texture_swizzle */
4016
4017 #ifndef GL_ARB_texture_view
4018 #define GL_ARB_texture_view 1
4019 #endif /* GL_ARB_texture_view */
4020
4021 #ifndef GL_ARB_timer_query
4022 #define GL_ARB_timer_query 1
4023 #endif /* GL_ARB_timer_query */
4024
4025 #ifndef GL_ARB_transform_feedback2
4026 #define GL_ARB_transform_feedback2 1
4027 #define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
4028 #define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
4029 #endif /* GL_ARB_transform_feedback2 */
4030
4031 #ifndef GL_ARB_transform_feedback3
4032 #define GL_ARB_transform_feedback3 1
4033 #endif /* GL_ARB_transform_feedback3 */
4034
4035 #ifndef GL_ARB_transform_feedback_instanced
4036 #define GL_ARB_transform_feedback_instanced 1
4037 #endif /* GL_ARB_transform_feedback_instanced */
4038
4039 #ifndef GL_ARB_transpose_matrix
4040 #define GL_ARB_transpose_matrix 1
4041 #define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
4042 #define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
4043 #define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
4044 #define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
4045 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4046 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4047 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4048 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4049 #ifdef GL_GLEXT_PROTOTYPES
4050 GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
4051 GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
4052 GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
4053 GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
4054 #endif
4055 #endif /* GL_ARB_transpose_matrix */
4056
4057 #ifndef GL_ARB_uniform_buffer_object
4058 #define GL_ARB_uniform_buffer_object 1
4059 #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
4060 #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
4061 #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
4062 #endif /* GL_ARB_uniform_buffer_object */
4063
4064 #ifndef GL_ARB_vertex_array_bgra
4065 #define GL_ARB_vertex_array_bgra 1
4066 #endif /* GL_ARB_vertex_array_bgra */
4067
4068 #ifndef GL_ARB_vertex_array_object
4069 #define GL_ARB_vertex_array_object 1
4070 #endif /* GL_ARB_vertex_array_object */
4071
4072 #ifndef GL_ARB_vertex_attrib_64bit
4073 #define GL_ARB_vertex_attrib_64bit 1
4074 #endif /* GL_ARB_vertex_attrib_64bit */
4075
4076 #ifndef GL_ARB_vertex_attrib_binding
4077 #define GL_ARB_vertex_attrib_binding 1
4078 #endif /* GL_ARB_vertex_attrib_binding */
4079
4080 #ifndef GL_ARB_vertex_blend
4081 #define GL_ARB_vertex_blend 1
4082 #define GL_MAX_VERTEX_UNITS_ARB 0x86A4
4083 #define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
4084 #define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
4085 #define GL_VERTEX_BLEND_ARB 0x86A7
4086 #define GL_CURRENT_WEIGHT_ARB 0x86A8
4087 #define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
4088 #define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
4089 #define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
4090 #define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
4091 #define GL_WEIGHT_ARRAY_ARB 0x86AD
4092 #define GL_MODELVIEW0_ARB 0x1700
4093 #define GL_MODELVIEW1_ARB 0x850A
4094 #define GL_MODELVIEW2_ARB 0x8722
4095 #define GL_MODELVIEW3_ARB 0x8723
4096 #define GL_MODELVIEW4_ARB 0x8724
4097 #define GL_MODELVIEW5_ARB 0x8725
4098 #define GL_MODELVIEW6_ARB 0x8726
4099 #define GL_MODELVIEW7_ARB 0x8727
4100 #define GL_MODELVIEW8_ARB 0x8728
4101 #define GL_MODELVIEW9_ARB 0x8729
4102 #define GL_MODELVIEW10_ARB 0x872A
4103 #define GL_MODELVIEW11_ARB 0x872B
4104 #define GL_MODELVIEW12_ARB 0x872C
4105 #define GL_MODELVIEW13_ARB 0x872D
4106 #define GL_MODELVIEW14_ARB 0x872E
4107 #define GL_MODELVIEW15_ARB 0x872F
4108 #define GL_MODELVIEW16_ARB 0x8730
4109 #define GL_MODELVIEW17_ARB 0x8731
4110 #define GL_MODELVIEW18_ARB 0x8732
4111 #define GL_MODELVIEW19_ARB 0x8733
4112 #define GL_MODELVIEW20_ARB 0x8734
4113 #define GL_MODELVIEW21_ARB 0x8735
4114 #define GL_MODELVIEW22_ARB 0x8736
4115 #define GL_MODELVIEW23_ARB 0x8737
4116 #define GL_MODELVIEW24_ARB 0x8738
4117 #define GL_MODELVIEW25_ARB 0x8739
4118 #define GL_MODELVIEW26_ARB 0x873A
4119 #define GL_MODELVIEW27_ARB 0x873B
4120 #define GL_MODELVIEW28_ARB 0x873C
4121 #define GL_MODELVIEW29_ARB 0x873D
4122 #define GL_MODELVIEW30_ARB 0x873E
4123 #define GL_MODELVIEW31_ARB 0x873F
4124 typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
4125 typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
4126 typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
4127 typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
4128 typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
4129 typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
4130 typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
4131 typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
4132 typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
4133 typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
4134 #ifdef GL_GLEXT_PROTOTYPES
4135 GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
4136 GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
4137 GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
4138 GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
4139 GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
4140 GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
4141 GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
4142 GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
4143 GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
4144 GLAPI void APIENTRY glVertexBlendARB (GLint count);
4145 #endif
4146 #endif /* GL_ARB_vertex_blend */
4147
4148 #ifndef GL_ARB_vertex_buffer_object
4149 #define GL_ARB_vertex_buffer_object 1
4150 #ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
4151 typedef long GLsizeiptrARB;
4152 typedef long GLintptrARB;
4153 #else
4154 typedef ptrdiff_t GLsizeiptrARB;
4155 typedef ptrdiff_t GLintptrARB;
4156 #endif
4157 #define GL_BUFFER_SIZE_ARB 0x8764
4158 #define GL_BUFFER_USAGE_ARB 0x8765
4159 #define GL_ARRAY_BUFFER_ARB 0x8892
4160 #define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
4161 #define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
4162 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
4163 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
4164 #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
4165 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
4166 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
4167 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
4168 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
4169 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
4170 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
4171 #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
4172 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
4173 #define GL_READ_ONLY_ARB 0x88B8
4174 #define GL_WRITE_ONLY_ARB 0x88B9
4175 #define GL_READ_WRITE_ARB 0x88BA
4176 #define GL_BUFFER_ACCESS_ARB 0x88BB
4177 #define GL_BUFFER_MAPPED_ARB 0x88BC
4178 #define GL_BUFFER_MAP_POINTER_ARB 0x88BD
4179 #define GL_STREAM_DRAW_ARB 0x88E0
4180 #define GL_STREAM_READ_ARB 0x88E1
4181 #define GL_STREAM_COPY_ARB 0x88E2
4182 #define GL_STATIC_DRAW_ARB 0x88E4
4183 #define GL_STATIC_READ_ARB 0x88E5
4184 #define GL_STATIC_COPY_ARB 0x88E6
4185 #define GL_DYNAMIC_DRAW_ARB 0x88E8
4186 #define GL_DYNAMIC_READ_ARB 0x88E9
4187 #define GL_DYNAMIC_COPY_ARB 0x88EA
4188 typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
4189 typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
4190 typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
4191 typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
4192 typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4193 typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4194 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4195 typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
4196 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
4197 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
4198 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
4199 #ifdef GL_GLEXT_PROTOTYPES
4200 GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
4201 GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
4202 GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
4203 GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
4204 GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4205 GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4206 GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4207 GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
4208 GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
4209 GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
4210 GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
4211 #endif
4212 #endif /* GL_ARB_vertex_buffer_object */
4213
4214 #ifndef GL_ARB_vertex_program
4215 #define GL_ARB_vertex_program 1
4216 #define GL_COLOR_SUM_ARB 0x8458
4217 #define GL_VERTEX_PROGRAM_ARB 0x8620
4218 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
4219 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
4220 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
4221 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
4222 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
4223 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
4224 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
4225 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
4226 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
4227 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
4228 #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
4229 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
4230 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
4231 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
4232 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
4233 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
4234 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
4235 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
4236 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
4237 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
4238 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
4239 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
4240 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
4241 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
4242 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
4243 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
4244 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4245 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
4246 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4247 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
4248 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
4249 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
4250 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
4251 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
4252 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
4253 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4254 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
4255 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
4256 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
4257 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
4258 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4259 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
4260 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4261 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
4262 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
4263 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4264 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
4265 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
4266 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
4267 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
4268 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4269 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4270 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4271 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
4272 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
4273 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
4274 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
4275 #ifdef GL_GLEXT_PROTOTYPES
4276 GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
4277 GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
4278 GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
4279 GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
4280 GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
4281 GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
4282 GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
4283 GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
4284 GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
4285 GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
4286 GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
4287 GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
4288 GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4289 GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
4290 GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4291 GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
4292 GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
4293 GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
4294 GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
4295 GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
4296 GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
4297 GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4298 GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
4299 GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
4300 GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
4301 GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
4302 GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4303 GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
4304 GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4305 GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
4306 GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
4307 GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4308 GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
4309 GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
4310 GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
4311 GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
4312 GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4313 GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
4314 GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
4315 GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
4316 GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
4317 GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
4318 GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
4319 #endif
4320 #endif /* GL_ARB_vertex_program */
4321
4322 #ifndef GL_ARB_vertex_shader
4323 #define GL_ARB_vertex_shader 1
4324 #define GL_VERTEX_SHADER_ARB 0x8B31
4325 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
4326 #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
4327 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
4328 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
4329 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
4330 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
4331 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4332 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4333 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
4334 #ifdef GL_GLEXT_PROTOTYPES
4335 GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4336 GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4337 GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
4338 #endif
4339 #endif /* GL_ARB_vertex_shader */
4340
4341 #ifndef GL_ARB_vertex_type_10f_11f_11f_rev
4342 #define GL_ARB_vertex_type_10f_11f_11f_rev 1
4343 #endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
4344
4345 #ifndef GL_ARB_vertex_type_2_10_10_10_rev
4346 #define GL_ARB_vertex_type_2_10_10_10_rev 1
4347 #endif /* GL_ARB_vertex_type_2_10_10_10_rev */
4348
4349 #ifndef GL_ARB_viewport_array
4350 #define GL_ARB_viewport_array 1
4351 #endif /* GL_ARB_viewport_array */
4352
4353 #ifndef GL_ARB_window_pos
4354 #define GL_ARB_window_pos 1
4355 typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
4356 typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
4357 typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
4358 typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
4359 typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
4360 typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
4361 typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
4362 typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
4363 typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
4364 typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
4365 typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
4366 typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
4367 typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
4368 typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
4369 typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
4370 typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
4371 #ifdef GL_GLEXT_PROTOTYPES
4372 GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
4373 GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
4374 GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
4375 GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
4376 GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
4377 GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
4378 GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
4379 GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
4380 GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
4381 GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
4382 GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
4383 GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
4384 GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
4385 GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
4386 GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
4387 GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
4388 #endif
4389 #endif /* GL_ARB_window_pos */
4390
4391 #ifndef GL_KHR_debug
4392 #define GL_KHR_debug 1
4393 #endif /* GL_KHR_debug */
4394
4395 #ifndef GL_KHR_texture_compression_astc_hdr
4396 #define GL_KHR_texture_compression_astc_hdr 1
4397 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
4398 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
4399 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
4400 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
4401 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
4402 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
4403 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
4404 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
4405 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
4406 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
4407 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
4408 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
4409 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
4410 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
4411 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
4412 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
4413 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
4414 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
4415 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
4416 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
4417 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
4418 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
4419 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
4420 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
4421 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
4422 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
4423 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
4424 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
4425 #endif /* GL_KHR_texture_compression_astc_hdr */
4426
4427 #ifndef GL_KHR_texture_compression_astc_ldr
4428 #define GL_KHR_texture_compression_astc_ldr 1
4429 #endif /* GL_KHR_texture_compression_astc_ldr */
4430
4431 #ifndef GL_OES_byte_coordinates
4432 #define GL_OES_byte_coordinates 1
4433 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
4434 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
4435 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
4436 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
4437 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4438 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
4439 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4440 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
4441 typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
4442 typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
4443 typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
4444 typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
4445 typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
4446 typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
4447 typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4448 typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
4449 typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);
4450 typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
4451 typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);
4452 typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
4453 typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
4454 typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
4455 #ifdef GL_GLEXT_PROTOTYPES
4456 GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
4457 GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
4458 GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
4459 GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
4460 GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4461 GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
4462 GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4463 GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
4464 GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
4465 GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
4466 GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
4467 GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
4468 GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
4469 GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
4470 GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4471 GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
4472 GLAPI void APIENTRY glVertex2bOES (GLbyte x);
4473 GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
4474 GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);
4475 GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
4476 GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);
4477 GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
4478 #endif
4479 #endif /* GL_OES_byte_coordinates */
4480
4481 #ifndef GL_OES_compressed_paletted_texture
4482 #define GL_OES_compressed_paletted_texture 1
4483 #define GL_PALETTE4_RGB8_OES 0x8B90
4484 #define GL_PALETTE4_RGBA8_OES 0x8B91
4485 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
4486 #define GL_PALETTE4_RGBA4_OES 0x8B93
4487 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
4488 #define GL_PALETTE8_RGB8_OES 0x8B95
4489 #define GL_PALETTE8_RGBA8_OES 0x8B96
4490 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
4491 #define GL_PALETTE8_RGBA4_OES 0x8B98
4492 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
4493 #endif /* GL_OES_compressed_paletted_texture */
4494
4495 #ifndef GL_OES_fixed_point
4496 #define GL_OES_fixed_point 1
4497 typedef GLint GLfixed;
4498 #define GL_FIXED_OES 0x140C
4499 typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
4500 typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4501 typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
4502 typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
4503 typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4504 typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
4505 typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
4506 typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
4507 typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4508 typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
4509 typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
4510 typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4511 typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4512 typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
4513 typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
4514 typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
4515 typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
4516 typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
4517 typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
4518 typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4519 typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
4520 typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
4521 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4522 typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
4523 typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4524 typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
4525 typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
4526 typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
4527 typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4528 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);
4529 typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4530 typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4531 typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4532 typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4533 typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4534 typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4535 typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
4536 typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4537 typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4538 typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4539 typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
4540 typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
4541 typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
4542 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4543 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4544 typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
4545 typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
4546 typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
4547 typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
4548 typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
4549 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4550 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4551 typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
4552 typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
4553 typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4554 typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
4555 typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
4556 typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
4557 typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
4558 typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
4559 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4560 typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4561 typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4562 typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
4563 typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4564 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4565 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
4566 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
4567 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
4568 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
4569 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4570 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
4571 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
4572 typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
4573 typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
4574 typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
4575 typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
4576 typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
4577 typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
4578 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4579 typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
4580 typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
4581 typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4582 typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
4583 typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4584 typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
4585 typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4586 typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
4587 typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
4588 typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
4589 typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
4590 typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
4591 typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
4592 typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
4593 typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4594 typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
4595 typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
4596 typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
4597 typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
4598 typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
4599 typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
4600 typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
4601 typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4602 typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
4603 #ifdef GL_GLEXT_PROTOTYPES
4604 GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
4605 GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4606 GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
4607 GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
4608 GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4609 GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
4610 GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
4611 GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
4612 GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4613 GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
4614 GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
4615 GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
4616 GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4617 GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
4618 GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
4619 GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
4620 GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
4621 GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
4622 GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
4623 GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4624 GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
4625 GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
4626 GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4627 GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
4628 GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4629 GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
4630 GLAPI void APIENTRY glPointSizexOES (GLfixed size);
4631 GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
4632 GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4633 GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);
4634 GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
4635 GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
4636 GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
4637 GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
4638 GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4639 GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
4640 GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
4641 GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4642 GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4643 GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4644 GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
4645 GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
4646 GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
4647 GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
4648 GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4649 GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
4650 GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
4651 GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
4652 GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
4653 GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
4654 GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4655 GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4656 GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
4657 GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
4658 GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4659 GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
4660 GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
4661 GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
4662 GLAPI void APIENTRY glIndexxOES (GLfixed component);
4663 GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
4664 GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
4665 GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4666 GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4667 GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
4668 GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4669 GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
4670 GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
4671 GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
4672 GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
4673 GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
4674 GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4675 GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
4676 GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
4677 GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
4678 GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
4679 GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
4680 GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
4681 GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
4682 GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
4683 GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4684 GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
4685 GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
4686 GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
4687 GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
4688 GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4689 GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
4690 GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4691 GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
4692 GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
4693 GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
4694 GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
4695 GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
4696 GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
4697 GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
4698 GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4699 GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
4700 GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
4701 GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
4702 GLAPI void APIENTRY glVertex2xOES (GLfixed x);
4703 GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
4704 GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
4705 GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
4706 GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
4707 GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
4708 #endif
4709 #endif /* GL_OES_fixed_point */
4710
4711 #ifndef GL_OES_query_matrix
4712 #define GL_OES_query_matrix 1
4713 typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
4714 #ifdef GL_GLEXT_PROTOTYPES
4715 GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
4716 #endif
4717 #endif /* GL_OES_query_matrix */
4718
4719 #ifndef GL_OES_read_format
4720 #define GL_OES_read_format 1
4721 #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
4722 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
4723 #endif /* GL_OES_read_format */
4724
4725 #ifndef GL_OES_single_precision
4726 #define GL_OES_single_precision 1
4727 typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
4728 typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
4729 typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
4730 typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4731 typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
4732 typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4733 #ifdef GL_GLEXT_PROTOTYPES
4734 GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
4735 GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
4736 GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
4737 GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4738 GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
4739 GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4740 #endif
4741 #endif /* GL_OES_single_precision */
4742
4743 #ifndef GL_3DFX_multisample
4744 #define GL_3DFX_multisample 1
4745 #define GL_MULTISAMPLE_3DFX 0x86B2
4746 #define GL_SAMPLE_BUFFERS_3DFX 0x86B3
4747 #define GL_SAMPLES_3DFX 0x86B4
4748 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000
4749 #endif /* GL_3DFX_multisample */
4750
4751 #ifndef GL_3DFX_tbuffer
4752 #define GL_3DFX_tbuffer 1
4753 typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
4754 #ifdef GL_GLEXT_PROTOTYPES
4755 GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
4756 #endif
4757 #endif /* GL_3DFX_tbuffer */
4758
4759 #ifndef GL_3DFX_texture_compression_FXT1
4760 #define GL_3DFX_texture_compression_FXT1 1
4761 #define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
4762 #define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
4763 #endif /* GL_3DFX_texture_compression_FXT1 */
4764
4765 #ifndef GL_AMD_blend_minmax_factor
4766 #define GL_AMD_blend_minmax_factor 1
4767 #define GL_FACTOR_MIN_AMD 0x901C
4768 #define GL_FACTOR_MAX_AMD 0x901D
4769 #endif /* GL_AMD_blend_minmax_factor */
4770
4771 #ifndef GL_AMD_conservative_depth
4772 #define GL_AMD_conservative_depth 1
4773 #endif /* GL_AMD_conservative_depth */
4774
4775 #ifndef GL_AMD_debug_output
4776 #define GL_AMD_debug_output 1
4777 typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
4778 #define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
4779 #define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
4780 #define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
4781 #define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
4782 #define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
4783 #define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
4784 #define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
4785 #define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
4786 #define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
4787 #define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
4788 #define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
4789 #define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
4790 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
4791 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
4792 typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4793 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4794 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
4795 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4796 #ifdef GL_GLEXT_PROTOTYPES
4797 GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4798 GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4799 GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
4800 GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4801 #endif
4802 #endif /* GL_AMD_debug_output */
4803
4804 #ifndef GL_AMD_depth_clamp_separate
4805 #define GL_AMD_depth_clamp_separate 1
4806 #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
4807 #define GL_DEPTH_CLAMP_FAR_AMD 0x901F
4808 #endif /* GL_AMD_depth_clamp_separate */
4809
4810 #ifndef GL_AMD_draw_buffers_blend
4811 #define GL_AMD_draw_buffers_blend 1
4812 typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
4813 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4814 typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
4815 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4816 #ifdef GL_GLEXT_PROTOTYPES
4817 GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
4818 GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4819 GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
4820 GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4821 #endif
4822 #endif /* GL_AMD_draw_buffers_blend */
4823
4824 #ifndef GL_AMD_gcn_shader
4825 #define GL_AMD_gcn_shader 1
4826 #endif /* GL_AMD_gcn_shader */
4827
4828 #ifndef GL_AMD_gpu_shader_int64
4829 #define GL_AMD_gpu_shader_int64 1
4830 typedef int64_t GLint64EXT;
4831 #define GL_INT64_NV 0x140E
4832 #define GL_UNSIGNED_INT64_NV 0x140F
4833 #define GL_INT8_NV 0x8FE0
4834 #define GL_INT8_VEC2_NV 0x8FE1
4835 #define GL_INT8_VEC3_NV 0x8FE2
4836 #define GL_INT8_VEC4_NV 0x8FE3
4837 #define GL_INT16_NV 0x8FE4
4838 #define GL_INT16_VEC2_NV 0x8FE5
4839 #define GL_INT16_VEC3_NV 0x8FE6
4840 #define GL_INT16_VEC4_NV 0x8FE7
4841 #define GL_INT64_VEC2_NV 0x8FE9
4842 #define GL_INT64_VEC3_NV 0x8FEA
4843 #define GL_INT64_VEC4_NV 0x8FEB
4844 #define GL_UNSIGNED_INT8_NV 0x8FEC
4845 #define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
4846 #define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
4847 #define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
4848 #define GL_UNSIGNED_INT16_NV 0x8FF0
4849 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
4850 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
4851 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
4852 #define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
4853 #define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
4854 #define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
4855 #define GL_FLOAT16_NV 0x8FF8
4856 #define GL_FLOAT16_VEC2_NV 0x8FF9
4857 #define GL_FLOAT16_VEC3_NV 0x8FFA
4858 #define GL_FLOAT16_VEC4_NV 0x8FFB
4859 typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
4860 typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
4861 typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4862 typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4863 typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4864 typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4865 typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4866 typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4867 typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
4868 typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
4869 typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4870 typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4871 typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4872 typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4873 typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4874 typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4875 typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
4876 typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
4877 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
4878 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4879 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4880 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4881 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4882 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4883 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4884 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
4886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4893 #ifdef GL_GLEXT_PROTOTYPES
4894 GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
4895 GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
4896 GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4897 GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4898 GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4899 GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4900 GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4901 GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4902 GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
4903 GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
4904 GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4905 GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4906 GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4907 GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4908 GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4909 GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4910 GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
4911 GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
4912 GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
4913 GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4914 GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4915 GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4916 GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4917 GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4918 GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4919 GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4920 GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
4921 GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4922 GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4923 GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4924 GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4925 GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4926 GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4927 GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4928 #endif
4929 #endif /* GL_AMD_gpu_shader_int64 */
4930
4931 #ifndef GL_AMD_interleaved_elements
4932 #define GL_AMD_interleaved_elements 1
4933 #define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
4934 #define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
4935 typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
4936 #ifdef GL_GLEXT_PROTOTYPES
4937 GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
4938 #endif
4939 #endif /* GL_AMD_interleaved_elements */
4940
4941 #ifndef GL_AMD_multi_draw_indirect
4942 #define GL_AMD_multi_draw_indirect 1
4943 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4944 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4945 #ifdef GL_GLEXT_PROTOTYPES
4946 GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4947 GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4948 #endif
4949 #endif /* GL_AMD_multi_draw_indirect */
4950
4951 #ifndef GL_AMD_name_gen_delete
4952 #define GL_AMD_name_gen_delete 1
4953 #define GL_DATA_BUFFER_AMD 0x9151
4954 #define GL_PERFORMANCE_MONITOR_AMD 0x9152
4955 #define GL_QUERY_OBJECT_AMD 0x9153
4956 #define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
4957 #define GL_SAMPLER_OBJECT_AMD 0x9155
4958 typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
4959 typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
4960 typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
4961 #ifdef GL_GLEXT_PROTOTYPES
4962 GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
4963 GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
4964 GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
4965 #endif
4966 #endif /* GL_AMD_name_gen_delete */
4967
4968 #ifndef GL_AMD_occlusion_query_event
4969 #define GL_AMD_occlusion_query_event 1
4970 #define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
4971 #define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
4972 #define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
4973 #define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
4974 #define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
4975 #define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
4976 typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
4977 #ifdef GL_GLEXT_PROTOTYPES
4978 GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
4979 #endif
4980 #endif /* GL_AMD_occlusion_query_event */
4981
4982 #ifndef GL_AMD_performance_monitor
4983 #define GL_AMD_performance_monitor 1
4984 #define GL_COUNTER_TYPE_AMD 0x8BC0
4985 #define GL_COUNTER_RANGE_AMD 0x8BC1
4986 #define GL_UNSIGNED_INT64_AMD 0x8BC2
4987 #define GL_PERCENTAGE_AMD 0x8BC3
4988 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
4989 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
4990 #define GL_PERFMON_RESULT_AMD 0x8BC6
4991 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
4992 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
4993 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
4994 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
4995 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
4996 typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4997 typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4998 typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
4999 typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
5000 typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
5001 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5002 #ifdef GL_GLEXT_PROTOTYPES
5003 GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
5004 GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
5005 GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
5006 GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
5007 GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
5008 GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
5009 GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
5010 GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
5011 GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
5012 GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
5013 GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5014 #endif
5015 #endif /* GL_AMD_performance_monitor */
5016
5017 #ifndef GL_AMD_pinned_memory
5018 #define GL_AMD_pinned_memory 1
5019 #define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
5020 #endif /* GL_AMD_pinned_memory */
5021
5022 #ifndef GL_AMD_query_buffer_object
5023 #define GL_AMD_query_buffer_object 1
5024 #define GL_QUERY_BUFFER_AMD 0x9192
5025 #define GL_QUERY_BUFFER_BINDING_AMD 0x9193
5026 #define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
5027 #endif /* GL_AMD_query_buffer_object */
5028
5029 #ifndef GL_AMD_sample_positions
5030 #define GL_AMD_sample_positions 1
5031 #define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
5032 typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
5033 #ifdef GL_GLEXT_PROTOTYPES
5034 GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
5035 #endif
5036 #endif /* GL_AMD_sample_positions */
5037
5038 #ifndef GL_AMD_seamless_cubemap_per_texture
5039 #define GL_AMD_seamless_cubemap_per_texture 1
5040 #endif /* GL_AMD_seamless_cubemap_per_texture */
5041
5042 #ifndef GL_AMD_shader_atomic_counter_ops
5043 #define GL_AMD_shader_atomic_counter_ops 1
5044 #endif /* GL_AMD_shader_atomic_counter_ops */
5045
5046 #ifndef GL_AMD_shader_stencil_export
5047 #define GL_AMD_shader_stencil_export 1
5048 #endif /* GL_AMD_shader_stencil_export */
5049
5050 #ifndef GL_AMD_shader_trinary_minmax
5051 #define GL_AMD_shader_trinary_minmax 1
5052 #endif /* GL_AMD_shader_trinary_minmax */
5053
5054 #ifndef GL_AMD_sparse_texture
5055 #define GL_AMD_sparse_texture 1
5056 #define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
5057 #define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
5058 #define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
5059 #define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
5060 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
5061 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
5062 #define GL_MIN_SPARSE_LEVEL_AMD 0x919B
5063 #define GL_MIN_LOD_WARNING_AMD 0x919C
5064 #define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
5065 typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5066 typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5067 #ifdef GL_GLEXT_PROTOTYPES
5068 GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5069 GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5070 #endif
5071 #endif /* GL_AMD_sparse_texture */
5072
5073 #ifndef GL_AMD_stencil_operation_extended
5074 #define GL_AMD_stencil_operation_extended 1
5075 #define GL_SET_AMD 0x874A
5076 #define GL_REPLACE_VALUE_AMD 0x874B
5077 #define GL_STENCIL_OP_VALUE_AMD 0x874C
5078 #define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
5079 typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
5080 #ifdef GL_GLEXT_PROTOTYPES
5081 GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
5082 #endif
5083 #endif /* GL_AMD_stencil_operation_extended */
5084
5085 #ifndef GL_AMD_texture_texture4
5086 #define GL_AMD_texture_texture4 1
5087 #endif /* GL_AMD_texture_texture4 */
5088
5089 #ifndef GL_AMD_transform_feedback3_lines_triangles
5090 #define GL_AMD_transform_feedback3_lines_triangles 1
5091 #endif /* GL_AMD_transform_feedback3_lines_triangles */
5092
5093 #ifndef GL_AMD_transform_feedback4
5094 #define GL_AMD_transform_feedback4 1
5095 #define GL_STREAM_RASTERIZATION_AMD 0x91A0
5096 #endif /* GL_AMD_transform_feedback4 */
5097
5098 #ifndef GL_AMD_vertex_shader_layer
5099 #define GL_AMD_vertex_shader_layer 1
5100 #endif /* GL_AMD_vertex_shader_layer */
5101
5102 #ifndef GL_AMD_vertex_shader_tessellator
5103 #define GL_AMD_vertex_shader_tessellator 1
5104 #define GL_SAMPLER_BUFFER_AMD 0x9001
5105 #define GL_INT_SAMPLER_BUFFER_AMD 0x9002
5106 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
5107 #define GL_TESSELLATION_MODE_AMD 0x9004
5108 #define GL_TESSELLATION_FACTOR_AMD 0x9005
5109 #define GL_DISCRETE_AMD 0x9006
5110 #define GL_CONTINUOUS_AMD 0x9007
5111 typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
5112 typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
5113 #ifdef GL_GLEXT_PROTOTYPES
5114 GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
5115 GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
5116 #endif
5117 #endif /* GL_AMD_vertex_shader_tessellator */
5118
5119 #ifndef GL_AMD_vertex_shader_viewport_index
5120 #define GL_AMD_vertex_shader_viewport_index 1
5121 #endif /* GL_AMD_vertex_shader_viewport_index */
5122
5123 #ifndef GL_APPLE_aux_depth_stencil
5124 #define GL_APPLE_aux_depth_stencil 1
5125 #define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
5126 #endif /* GL_APPLE_aux_depth_stencil */
5127
5128 #ifndef GL_APPLE_client_storage
5129 #define GL_APPLE_client_storage 1
5130 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
5131 #endif /* GL_APPLE_client_storage */
5132
5133 #ifndef GL_APPLE_element_array
5134 #define GL_APPLE_element_array 1
5135 #define GL_ELEMENT_ARRAY_APPLE 0x8A0C
5136 #define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
5137 #define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
5138 typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
5139 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
5140 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5141 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5142 typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5143 #ifdef GL_GLEXT_PROTOTYPES
5144 GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
5145 GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
5146 GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5147 GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5148 GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5149 #endif
5150 #endif /* GL_APPLE_element_array */
5151
5152 #ifndef GL_APPLE_fence
5153 #define GL_APPLE_fence 1
5154 #define GL_DRAW_PIXELS_APPLE 0x8A0A
5155 #define GL_FENCE_APPLE 0x8A0B
5156 typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
5157 typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
5158 typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
5159 typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
5160 typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
5161 typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
5162 typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
5163 typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
5164 #ifdef GL_GLEXT_PROTOTYPES
5165 GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
5166 GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
5167 GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
5168 GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
5169 GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
5170 GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
5171 GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
5172 GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
5173 #endif
5174 #endif /* GL_APPLE_fence */
5175
5176 #ifndef GL_APPLE_float_pixels
5177 #define GL_APPLE_float_pixels 1
5178 #define GL_HALF_APPLE 0x140B
5179 #define GL_RGBA_FLOAT32_APPLE 0x8814
5180 #define GL_RGB_FLOAT32_APPLE 0x8815
5181 #define GL_ALPHA_FLOAT32_APPLE 0x8816
5182 #define GL_INTENSITY_FLOAT32_APPLE 0x8817
5183 #define GL_LUMINANCE_FLOAT32_APPLE 0x8818
5184 #define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
5185 #define GL_RGBA_FLOAT16_APPLE 0x881A
5186 #define GL_RGB_FLOAT16_APPLE 0x881B
5187 #define GL_ALPHA_FLOAT16_APPLE 0x881C
5188 #define GL_INTENSITY_FLOAT16_APPLE 0x881D
5189 #define GL_LUMINANCE_FLOAT16_APPLE 0x881E
5190 #define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
5191 #define GL_COLOR_FLOAT_APPLE 0x8A0F
5192 #endif /* GL_APPLE_float_pixels */
5193
5194 #ifndef GL_APPLE_flush_buffer_range
5195 #define GL_APPLE_flush_buffer_range 1
5196 #define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
5197 #define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
5198 typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
5199 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
5200 #ifdef GL_GLEXT_PROTOTYPES
5201 GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
5202 GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
5203 #endif
5204 #endif /* GL_APPLE_flush_buffer_range */
5205
5206 #ifndef GL_APPLE_object_purgeable
5207 #define GL_APPLE_object_purgeable 1
5208 #define GL_BUFFER_OBJECT_APPLE 0x85B3
5209 #define GL_RELEASED_APPLE 0x8A19
5210 #define GL_VOLATILE_APPLE 0x8A1A
5211 #define GL_RETAINED_APPLE 0x8A1B
5212 #define GL_UNDEFINED_APPLE 0x8A1C
5213 #define GL_PURGEABLE_APPLE 0x8A1D
5214 typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5215 typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5216 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5217 #ifdef GL_GLEXT_PROTOTYPES
5218 GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5219 GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5220 GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5221 #endif
5222 #endif /* GL_APPLE_object_purgeable */
5223
5224 #ifndef GL_APPLE_rgb_422
5225 #define GL_APPLE_rgb_422 1
5226 #define GL_RGB_422_APPLE 0x8A1F
5227 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
5228 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
5229 #define GL_RGB_RAW_422_APPLE 0x8A51
5230 #endif /* GL_APPLE_rgb_422 */
5231
5232 #ifndef GL_APPLE_row_bytes
5233 #define GL_APPLE_row_bytes 1
5234 #define GL_PACK_ROW_BYTES_APPLE 0x8A15
5235 #define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
5236 #endif /* GL_APPLE_row_bytes */
5237
5238 #ifndef GL_APPLE_specular_vector
5239 #define GL_APPLE_specular_vector 1
5240 #define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
5241 #endif /* GL_APPLE_specular_vector */
5242
5243 #ifndef GL_APPLE_texture_range
5244 #define GL_APPLE_texture_range 1
5245 #define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
5246 #define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
5247 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
5248 #define GL_STORAGE_PRIVATE_APPLE 0x85BD
5249 #define GL_STORAGE_CACHED_APPLE 0x85BE
5250 #define GL_STORAGE_SHARED_APPLE 0x85BF
5251 typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
5252 typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
5253 #ifdef GL_GLEXT_PROTOTYPES
5254 GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
5255 GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
5256 #endif
5257 #endif /* GL_APPLE_texture_range */
5258
5259 #ifndef GL_APPLE_transform_hint
5260 #define GL_APPLE_transform_hint 1
5261 #define GL_TRANSFORM_HINT_APPLE 0x85B1
5262 #endif /* GL_APPLE_transform_hint */
5263
5264 #ifndef GL_APPLE_vertex_array_object
5265 #define GL_APPLE_vertex_array_object 1
5266 #define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
5267 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
5268 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
5269 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
5270 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
5271 #ifdef GL_GLEXT_PROTOTYPES
5272 GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
5273 GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
5274 GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
5275 GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
5276 #endif
5277 #endif /* GL_APPLE_vertex_array_object */
5278
5279 #ifndef GL_APPLE_vertex_array_range
5280 #define GL_APPLE_vertex_array_range 1
5281 #define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
5282 #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
5283 #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
5284 #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
5285 #define GL_STORAGE_CLIENT_APPLE 0x85B4
5286 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5287 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5288 typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
5289 #ifdef GL_GLEXT_PROTOTYPES
5290 GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5291 GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5292 GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
5293 #endif
5294 #endif /* GL_APPLE_vertex_array_range */
5295
5296 #ifndef GL_APPLE_vertex_program_evaluators
5297 #define GL_APPLE_vertex_program_evaluators 1
5298 #define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
5299 #define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
5300 #define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
5301 #define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
5302 #define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
5303 #define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
5304 #define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
5305 #define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
5306 #define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
5307 #define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
5308 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5309 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5310 typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
5311 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5312 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5313 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5314 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5315 #ifdef GL_GLEXT_PROTOTYPES
5316 GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
5317 GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
5318 GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
5319 GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5320 GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5321 GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5322 GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5323 #endif
5324 #endif /* GL_APPLE_vertex_program_evaluators */
5325
5326 #ifndef GL_APPLE_ycbcr_422
5327 #define GL_APPLE_ycbcr_422 1
5328 #define GL_YCBCR_422_APPLE 0x85B9
5329 #endif /* GL_APPLE_ycbcr_422 */
5330
5331 #ifndef GL_ATI_draw_buffers
5332 #define GL_ATI_draw_buffers 1
5333 #define GL_MAX_DRAW_BUFFERS_ATI 0x8824
5334 #define GL_DRAW_BUFFER0_ATI 0x8825
5335 #define GL_DRAW_BUFFER1_ATI 0x8826
5336 #define GL_DRAW_BUFFER2_ATI 0x8827
5337 #define GL_DRAW_BUFFER3_ATI 0x8828
5338 #define GL_DRAW_BUFFER4_ATI 0x8829
5339 #define GL_DRAW_BUFFER5_ATI 0x882A
5340 #define GL_DRAW_BUFFER6_ATI 0x882B
5341 #define GL_DRAW_BUFFER7_ATI 0x882C
5342 #define GL_DRAW_BUFFER8_ATI 0x882D
5343 #define GL_DRAW_BUFFER9_ATI 0x882E
5344 #define GL_DRAW_BUFFER10_ATI 0x882F
5345 #define GL_DRAW_BUFFER11_ATI 0x8830
5346 #define GL_DRAW_BUFFER12_ATI 0x8831
5347 #define GL_DRAW_BUFFER13_ATI 0x8832
5348 #define GL_DRAW_BUFFER14_ATI 0x8833
5349 #define GL_DRAW_BUFFER15_ATI 0x8834
5350 typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
5351 #ifdef GL_GLEXT_PROTOTYPES
5352 GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
5353 #endif
5354 #endif /* GL_ATI_draw_buffers */
5355
5356 #ifndef GL_ATI_element_array
5357 #define GL_ATI_element_array 1
5358 #define GL_ELEMENT_ARRAY_ATI 0x8768
5359 #define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
5360 #define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
5361 typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
5362 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
5363 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
5364 #ifdef GL_GLEXT_PROTOTYPES
5365 GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
5366 GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
5367 GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
5368 #endif
5369 #endif /* GL_ATI_element_array */
5370
5371 #ifndef GL_ATI_envmap_bumpmap
5372 #define GL_ATI_envmap_bumpmap 1
5373 #define GL_BUMP_ROT_MATRIX_ATI 0x8775
5374 #define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
5375 #define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
5376 #define GL_BUMP_TEX_UNITS_ATI 0x8778
5377 #define GL_DUDV_ATI 0x8779
5378 #define GL_DU8DV8_ATI 0x877A
5379 #define GL_BUMP_ENVMAP_ATI 0x877B
5380 #define GL_BUMP_TARGET_ATI 0x877C
5381 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
5382 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
5383 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
5384 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
5385 #ifdef GL_GLEXT_PROTOTYPES
5386 GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
5387 GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
5388 GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
5389 GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
5390 #endif
5391 #endif /* GL_ATI_envmap_bumpmap */
5392
5393 #ifndef GL_ATI_fragment_shader
5394 #define GL_ATI_fragment_shader 1
5395 #define GL_FRAGMENT_SHADER_ATI 0x8920
5396 #define GL_REG_0_ATI 0x8921
5397 #define GL_REG_1_ATI 0x8922
5398 #define GL_REG_2_ATI 0x8923
5399 #define GL_REG_3_ATI 0x8924
5400 #define GL_REG_4_ATI 0x8925
5401 #define GL_REG_5_ATI 0x8926
5402 #define GL_REG_6_ATI 0x8927
5403 #define GL_REG_7_ATI 0x8928
5404 #define GL_REG_8_ATI 0x8929
5405 #define GL_REG_9_ATI 0x892A
5406 #define GL_REG_10_ATI 0x892B
5407 #define GL_REG_11_ATI 0x892C
5408 #define GL_REG_12_ATI 0x892D
5409 #define GL_REG_13_ATI 0x892E
5410 #define GL_REG_14_ATI 0x892F
5411 #define GL_REG_15_ATI 0x8930
5412 #define GL_REG_16_ATI 0x8931
5413 #define GL_REG_17_ATI 0x8932
5414 #define GL_REG_18_ATI 0x8933
5415 #define GL_REG_19_ATI 0x8934
5416 #define GL_REG_20_ATI 0x8935
5417 #define GL_REG_21_ATI 0x8936
5418 #define GL_REG_22_ATI 0x8937
5419 #define GL_REG_23_ATI 0x8938
5420 #define GL_REG_24_ATI 0x8939
5421 #define GL_REG_25_ATI 0x893A
5422 #define GL_REG_26_ATI 0x893B
5423 #define GL_REG_27_ATI 0x893C
5424 #define GL_REG_28_ATI 0x893D
5425 #define GL_REG_29_ATI 0x893E
5426 #define GL_REG_30_ATI 0x893F
5427 #define GL_REG_31_ATI 0x8940
5428 #define GL_CON_0_ATI 0x8941
5429 #define GL_CON_1_ATI 0x8942
5430 #define GL_CON_2_ATI 0x8943
5431 #define GL_CON_3_ATI 0x8944
5432 #define GL_CON_4_ATI 0x8945
5433 #define GL_CON_5_ATI 0x8946
5434 #define GL_CON_6_ATI 0x8947
5435 #define GL_CON_7_ATI 0x8948
5436 #define GL_CON_8_ATI 0x8949
5437 #define GL_CON_9_ATI 0x894A
5438 #define GL_CON_10_ATI 0x894B
5439 #define GL_CON_11_ATI 0x894C
5440 #define GL_CON_12_ATI 0x894D
5441 #define GL_CON_13_ATI 0x894E
5442 #define GL_CON_14_ATI 0x894F
5443 #define GL_CON_15_ATI 0x8950
5444 #define GL_CON_16_ATI 0x8951
5445 #define GL_CON_17_ATI 0x8952
5446 #define GL_CON_18_ATI 0x8953
5447 #define GL_CON_19_ATI 0x8954
5448 #define GL_CON_20_ATI 0x8955
5449 #define GL_CON_21_ATI 0x8956
5450 #define GL_CON_22_ATI 0x8957
5451 #define GL_CON_23_ATI 0x8958
5452 #define GL_CON_24_ATI 0x8959
5453 #define GL_CON_25_ATI 0x895A
5454 #define GL_CON_26_ATI 0x895B
5455 #define GL_CON_27_ATI 0x895C
5456 #define GL_CON_28_ATI 0x895D
5457 #define GL_CON_29_ATI 0x895E
5458 #define GL_CON_30_ATI 0x895F
5459 #define GL_CON_31_ATI 0x8960
5460 #define GL_MOV_ATI 0x8961
5461 #define GL_ADD_ATI 0x8963
5462 #define GL_MUL_ATI 0x8964
5463 #define GL_SUB_ATI 0x8965
5464 #define GL_DOT3_ATI 0x8966
5465 #define GL_DOT4_ATI 0x8967
5466 #define GL_MAD_ATI 0x8968
5467 #define GL_LERP_ATI 0x8969
5468 #define GL_CND_ATI 0x896A
5469 #define GL_CND0_ATI 0x896B
5470 #define GL_DOT2_ADD_ATI 0x896C
5471 #define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
5472 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
5473 #define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
5474 #define GL_NUM_PASSES_ATI 0x8970
5475 #define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
5476 #define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
5477 #define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
5478 #define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
5479 #define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
5480 #define GL_SWIZZLE_STR_ATI 0x8976
5481 #define GL_SWIZZLE_STQ_ATI 0x8977
5482 #define GL_SWIZZLE_STR_DR_ATI 0x8978
5483 #define GL_SWIZZLE_STQ_DQ_ATI 0x8979
5484 #define GL_SWIZZLE_STRQ_ATI 0x897A
5485 #define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
5486 #define GL_RED_BIT_ATI 0x00000001
5487 #define GL_GREEN_BIT_ATI 0x00000002
5488 #define GL_BLUE_BIT_ATI 0x00000004
5489 #define GL_2X_BIT_ATI 0x00000001
5490 #define GL_4X_BIT_ATI 0x00000002
5491 #define GL_8X_BIT_ATI 0x00000004
5492 #define GL_HALF_BIT_ATI 0x00000008
5493 #define GL_QUARTER_BIT_ATI 0x00000010
5494 #define GL_EIGHTH_BIT_ATI 0x00000020
5495 #define GL_SATURATE_BIT_ATI 0x00000040
5496 #define GL_COMP_BIT_ATI 0x00000002
5497 #define GL_NEGATE_BIT_ATI 0x00000004
5498 #define GL_BIAS_BIT_ATI 0x00000008
5499 typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
5500 typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
5501 typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
5502 typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
5503 typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
5504 typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
5505 typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
5506 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5507 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5508 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5509 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5510 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5511 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5512 typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
5513 #ifdef GL_GLEXT_PROTOTYPES
5514 GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
5515 GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
5516 GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
5517 GLAPI void APIENTRY glBeginFragmentShaderATI (void);
5518 GLAPI void APIENTRY glEndFragmentShaderATI (void);
5519 GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
5520 GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
5521 GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5522 GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5523 GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5524 GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5525 GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5526 GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5527 GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
5528 #endif
5529 #endif /* GL_ATI_fragment_shader */
5530
5531 #ifndef GL_ATI_map_object_buffer
5532 #define GL_ATI_map_object_buffer 1
5533 typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5534 typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5535 #ifdef GL_GLEXT_PROTOTYPES
5536 GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
5537 GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
5538 #endif
5539 #endif /* GL_ATI_map_object_buffer */
5540
5541 #ifndef GL_ATI_meminfo
5542 #define GL_ATI_meminfo 1
5543 #define GL_VBO_FREE_MEMORY_ATI 0x87FB
5544 #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
5545 #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
5546 #endif /* GL_ATI_meminfo */
5547
5548 #ifndef GL_ATI_pixel_format_float
5549 #define GL_ATI_pixel_format_float 1
5550 #define GL_RGBA_FLOAT_MODE_ATI 0x8820
5551 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
5552 #endif /* GL_ATI_pixel_format_float */
5553
5554 #ifndef GL_ATI_pn_triangles
5555 #define GL_ATI_pn_triangles 1
5556 #define GL_PN_TRIANGLES_ATI 0x87F0
5557 #define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
5558 #define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
5559 #define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
5560 #define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
5561 #define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
5562 #define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
5563 #define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
5564 #define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
5565 typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
5566 typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
5567 #ifdef GL_GLEXT_PROTOTYPES
5568 GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
5569 GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
5570 #endif
5571 #endif /* GL_ATI_pn_triangles */
5572
5573 #ifndef GL_ATI_separate_stencil
5574 #define GL_ATI_separate_stencil 1
5575 #define GL_STENCIL_BACK_FUNC_ATI 0x8800
5576 #define GL_STENCIL_BACK_FAIL_ATI 0x8801
5577 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
5578 #define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
5579 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5580 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5581 #ifdef GL_GLEXT_PROTOTYPES
5582 GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5583 GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5584 #endif
5585 #endif /* GL_ATI_separate_stencil */
5586
5587 #ifndef GL_ATI_text_fragment_shader
5588 #define GL_ATI_text_fragment_shader 1
5589 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
5590 #endif /* GL_ATI_text_fragment_shader */
5591
5592 #ifndef GL_ATI_texture_env_combine3
5593 #define GL_ATI_texture_env_combine3 1
5594 #define GL_MODULATE_ADD_ATI 0x8744
5595 #define GL_MODULATE_SIGNED_ADD_ATI 0x8745
5596 #define GL_MODULATE_SUBTRACT_ATI 0x8746
5597 #endif /* GL_ATI_texture_env_combine3 */
5598
5599 #ifndef GL_ATI_texture_float
5600 #define GL_ATI_texture_float 1
5601 #define GL_RGBA_FLOAT32_ATI 0x8814
5602 #define GL_RGB_FLOAT32_ATI 0x8815
5603 #define GL_ALPHA_FLOAT32_ATI 0x8816
5604 #define GL_INTENSITY_FLOAT32_ATI 0x8817
5605 #define GL_LUMINANCE_FLOAT32_ATI 0x8818
5606 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
5607 #define GL_RGBA_FLOAT16_ATI 0x881A
5608 #define GL_RGB_FLOAT16_ATI 0x881B
5609 #define GL_ALPHA_FLOAT16_ATI 0x881C
5610 #define GL_INTENSITY_FLOAT16_ATI 0x881D
5611 #define GL_LUMINANCE_FLOAT16_ATI 0x881E
5612 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
5613 #endif /* GL_ATI_texture_float */
5614
5615 #ifndef GL_ATI_texture_mirror_once
5616 #define GL_ATI_texture_mirror_once 1
5617 #define GL_MIRROR_CLAMP_ATI 0x8742
5618 #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
5619 #endif /* GL_ATI_texture_mirror_once */
5620
5621 #ifndef GL_ATI_vertex_array_object
5622 #define GL_ATI_vertex_array_object 1
5623 #define GL_STATIC_ATI 0x8760
5624 #define GL_DYNAMIC_ATI 0x8761
5625 #define GL_PRESERVE_ATI 0x8762
5626 #define GL_DISCARD_ATI 0x8763
5627 #define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
5628 #define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
5629 #define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
5630 #define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
5631 typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
5632 typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
5633 typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5634 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
5635 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
5636 typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
5637 typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5638 typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
5639 typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
5640 typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5641 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
5642 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
5643 #ifdef GL_GLEXT_PROTOTYPES
5644 GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
5645 GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
5646 GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5647 GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
5648 GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
5649 GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
5650 GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5651 GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
5652 GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
5653 GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5654 GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
5655 GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
5656 #endif
5657 #endif /* GL_ATI_vertex_array_object */
5658
5659 #ifndef GL_ATI_vertex_attrib_array_object
5660 #define GL_ATI_vertex_attrib_array_object 1
5661 typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5662 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
5663 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
5664 #ifdef GL_GLEXT_PROTOTYPES
5665 GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5666 GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
5667 GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
5668 #endif
5669 #endif /* GL_ATI_vertex_attrib_array_object */
5670
5671 #ifndef GL_ATI_vertex_streams
5672 #define GL_ATI_vertex_streams 1
5673 #define GL_MAX_VERTEX_STREAMS_ATI 0x876B
5674 #define GL_VERTEX_STREAM0_ATI 0x876C
5675 #define GL_VERTEX_STREAM1_ATI 0x876D
5676 #define GL_VERTEX_STREAM2_ATI 0x876E
5677 #define GL_VERTEX_STREAM3_ATI 0x876F
5678 #define GL_VERTEX_STREAM4_ATI 0x8770
5679 #define GL_VERTEX_STREAM5_ATI 0x8771
5680 #define GL_VERTEX_STREAM6_ATI 0x8772
5681 #define GL_VERTEX_STREAM7_ATI 0x8773
5682 #define GL_VERTEX_SOURCE_ATI 0x8774
5683 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
5684 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
5685 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
5686 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
5687 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
5688 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
5689 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
5690 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
5691 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
5692 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
5693 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
5694 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
5695 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
5696 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
5697 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
5698 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
5699 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
5700 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5701 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
5702 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5703 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5704 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5705 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5706 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5707 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5708 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
5709 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5710 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
5711 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5712 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
5713 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5714 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
5715 typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5716 typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
5717 typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5718 typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5719 typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
5720 typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5721 typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5722 typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5723 typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5724 typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5725 typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
5726 typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
5727 typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
5728 #ifdef GL_GLEXT_PROTOTYPES
5729 GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
5730 GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
5731 GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
5732 GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
5733 GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
5734 GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
5735 GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
5736 GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
5737 GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
5738 GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
5739 GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
5740 GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
5741 GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
5742 GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
5743 GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
5744 GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
5745 GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
5746 GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
5747 GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
5748 GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
5749 GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5750 GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
5751 GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5752 GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
5753 GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5754 GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
5755 GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5756 GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
5757 GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5758 GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
5759 GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5760 GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
5761 GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5762 GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
5763 GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5764 GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
5765 GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
5766 GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
5767 GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5768 GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
5769 GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5770 GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
5771 GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
5772 GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
5773 GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
5774 #endif
5775 #endif /* GL_ATI_vertex_streams */
5776
5777 #ifndef GL_EXT_422_pixels
5778 #define GL_EXT_422_pixels 1
5779 #define GL_422_EXT 0x80CC
5780 #define GL_422_REV_EXT 0x80CD
5781 #define GL_422_AVERAGE_EXT 0x80CE
5782 #define GL_422_REV_AVERAGE_EXT 0x80CF
5783 #endif /* GL_EXT_422_pixels */
5784
5785 #ifndef GL_EXT_abgr
5786 #define GL_EXT_abgr 1
5787 #define GL_ABGR_EXT 0x8000
5788 #endif /* GL_EXT_abgr */
5789
5790 #ifndef GL_EXT_bgra
5791 #define GL_EXT_bgra 1
5792 #define GL_BGR_EXT 0x80E0
5793 #define GL_BGRA_EXT 0x80E1
5794 #endif /* GL_EXT_bgra */
5795
5796 #ifndef GL_EXT_bindable_uniform
5797 #define GL_EXT_bindable_uniform 1
5798 #define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
5799 #define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
5800 #define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
5801 #define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
5802 #define GL_UNIFORM_BUFFER_EXT 0x8DEE
5803 #define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
5804 typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
5805 typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
5806 typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
5807 #ifdef GL_GLEXT_PROTOTYPES
5808 GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
5809 GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
5810 GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
5811 #endif
5812 #endif /* GL_EXT_bindable_uniform */
5813
5814 #ifndef GL_EXT_blend_color
5815 #define GL_EXT_blend_color 1
5816 #define GL_CONSTANT_COLOR_EXT 0x8001
5817 #define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
5818 #define GL_CONSTANT_ALPHA_EXT 0x8003
5819 #define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
5820 #define GL_BLEND_COLOR_EXT 0x8005
5821 typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5822 #ifdef GL_GLEXT_PROTOTYPES
5823 GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5824 #endif
5825 #endif /* GL_EXT_blend_color */
5826
5827 #ifndef GL_EXT_blend_equation_separate
5828 #define GL_EXT_blend_equation_separate 1
5829 #define GL_BLEND_EQUATION_RGB_EXT 0x8009
5830 #define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
5831 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
5832 #ifdef GL_GLEXT_PROTOTYPES
5833 GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
5834 #endif
5835 #endif /* GL_EXT_blend_equation_separate */
5836
5837 #ifndef GL_EXT_blend_func_separate
5838 #define GL_EXT_blend_func_separate 1
5839 #define GL_BLEND_DST_RGB_EXT 0x80C8
5840 #define GL_BLEND_SRC_RGB_EXT 0x80C9
5841 #define GL_BLEND_DST_ALPHA_EXT 0x80CA
5842 #define GL_BLEND_SRC_ALPHA_EXT 0x80CB
5843 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5844 #ifdef GL_GLEXT_PROTOTYPES
5845 GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5846 #endif
5847 #endif /* GL_EXT_blend_func_separate */
5848
5849 #ifndef GL_EXT_blend_logic_op
5850 #define GL_EXT_blend_logic_op 1
5851 #endif /* GL_EXT_blend_logic_op */
5852
5853 #ifndef GL_EXT_blend_minmax
5854 #define GL_EXT_blend_minmax 1
5855 #define GL_MIN_EXT 0x8007
5856 #define GL_MAX_EXT 0x8008
5857 #define GL_FUNC_ADD_EXT 0x8006
5858 #define GL_BLEND_EQUATION_EXT 0x8009
5859 typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
5860 #ifdef GL_GLEXT_PROTOTYPES
5861 GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
5862 #endif
5863 #endif /* GL_EXT_blend_minmax */
5864
5865 #ifndef GL_EXT_blend_subtract
5866 #define GL_EXT_blend_subtract 1
5867 #define GL_FUNC_SUBTRACT_EXT 0x800A
5868 #define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
5869 #endif /* GL_EXT_blend_subtract */
5870
5871 #ifndef GL_EXT_clip_volume_hint
5872 #define GL_EXT_clip_volume_hint 1
5873 #define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
5874 #endif /* GL_EXT_clip_volume_hint */
5875
5876 #ifndef GL_EXT_cmyka
5877 #define GL_EXT_cmyka 1
5878 #define GL_CMYK_EXT 0x800C
5879 #define GL_CMYKA_EXT 0x800D
5880 #define GL_PACK_CMYK_HINT_EXT 0x800E
5881 #define GL_UNPACK_CMYK_HINT_EXT 0x800F
5882 #endif /* GL_EXT_cmyka */
5883
5884 #ifndef GL_EXT_color_subtable
5885 #define GL_EXT_color_subtable 1
5886 typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5887 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5888 #ifdef GL_GLEXT_PROTOTYPES
5889 GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5890 GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5891 #endif
5892 #endif /* GL_EXT_color_subtable */
5893
5894 #ifndef GL_EXT_compiled_vertex_array
5895 #define GL_EXT_compiled_vertex_array 1
5896 #define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
5897 #define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
5898 typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
5899 typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
5900 #ifdef GL_GLEXT_PROTOTYPES
5901 GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
5902 GLAPI void APIENTRY glUnlockArraysEXT (void);
5903 #endif
5904 #endif /* GL_EXT_compiled_vertex_array */
5905
5906 #ifndef GL_EXT_convolution
5907 #define GL_EXT_convolution 1
5908 #define GL_CONVOLUTION_1D_EXT 0x8010
5909 #define GL_CONVOLUTION_2D_EXT 0x8011
5910 #define GL_SEPARABLE_2D_EXT 0x8012
5911 #define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
5912 #define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
5913 #define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
5914 #define GL_REDUCE_EXT 0x8016
5915 #define GL_CONVOLUTION_FORMAT_EXT 0x8017
5916 #define GL_CONVOLUTION_WIDTH_EXT 0x8018
5917 #define GL_CONVOLUTION_HEIGHT_EXT 0x8019
5918 #define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
5919 #define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
5920 #define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
5921 #define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
5922 #define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
5923 #define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
5924 #define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
5925 #define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
5926 #define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
5927 #define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
5928 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5929 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5930 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
5931 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
5932 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
5933 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
5934 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5935 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5936 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
5937 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
5938 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
5939 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5940 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5941 #ifdef GL_GLEXT_PROTOTYPES
5942 GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5943 GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5944 GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
5945 GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
5946 GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
5947 GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
5948 GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5949 GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5950 GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
5951 GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
5952 GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
5953 GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5954 GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5955 #endif
5956 #endif /* GL_EXT_convolution */
5957
5958 #ifndef GL_EXT_coordinate_frame
5959 #define GL_EXT_coordinate_frame 1
5960 #define GL_TANGENT_ARRAY_EXT 0x8439
5961 #define GL_BINORMAL_ARRAY_EXT 0x843A
5962 #define GL_CURRENT_TANGENT_EXT 0x843B
5963 #define GL_CURRENT_BINORMAL_EXT 0x843C
5964 #define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
5965 #define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
5966 #define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
5967 #define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
5968 #define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
5969 #define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
5970 #define GL_MAP1_TANGENT_EXT 0x8444
5971 #define GL_MAP2_TANGENT_EXT 0x8445
5972 #define GL_MAP1_BINORMAL_EXT 0x8446
5973 #define GL_MAP2_BINORMAL_EXT 0x8447
5974 typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
5975 typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
5976 typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
5977 typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
5978 typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
5979 typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
5980 typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
5981 typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
5982 typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
5983 typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
5984 typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
5985 typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
5986 typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
5987 typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
5988 typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
5989 typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
5990 typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
5991 typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
5992 typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
5993 typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
5994 typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5995 typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5996 #ifdef GL_GLEXT_PROTOTYPES
5997 GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
5998 GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
5999 GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
6000 GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
6001 GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
6002 GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
6003 GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
6004 GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
6005 GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
6006 GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
6007 GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
6008 GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
6009 GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
6010 GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
6011 GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
6012 GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
6013 GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
6014 GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
6015 GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
6016 GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
6017 GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6018 GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6019 #endif
6020 #endif /* GL_EXT_coordinate_frame */
6021
6022 #ifndef GL_EXT_copy_texture
6023 #define GL_EXT_copy_texture 1
6024 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6025 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6026 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6027 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6028 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6029 #ifdef GL_GLEXT_PROTOTYPES
6030 GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6031 GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6032 GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6033 GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6034 GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6035 #endif
6036 #endif /* GL_EXT_copy_texture */
6037
6038 #ifndef GL_EXT_cull_vertex
6039 #define GL_EXT_cull_vertex 1
6040 #define GL_CULL_VERTEX_EXT 0x81AA
6041 #define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
6042 #define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
6043 typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
6044 typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
6045 #ifdef GL_GLEXT_PROTOTYPES
6046 GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
6047 GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
6048 #endif
6049 #endif /* GL_EXT_cull_vertex */
6050
6051 #ifndef GL_EXT_debug_label
6052 #define GL_EXT_debug_label 1
6053 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
6054 #define GL_PROGRAM_OBJECT_EXT 0x8B40
6055 #define GL_SHADER_OBJECT_EXT 0x8B48
6056 #define GL_BUFFER_OBJECT_EXT 0x9151
6057 #define GL_QUERY_OBJECT_EXT 0x9153
6058 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
6059 typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6060 typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6061 #ifdef GL_GLEXT_PROTOTYPES
6062 GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6063 GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6064 #endif
6065 #endif /* GL_EXT_debug_label */
6066
6067 #ifndef GL_EXT_debug_marker
6068 #define GL_EXT_debug_marker 1
6069 typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6070 typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6071 typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
6072 #ifdef GL_GLEXT_PROTOTYPES
6073 GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
6074 GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
6075 GLAPI void APIENTRY glPopGroupMarkerEXT (void);
6076 #endif
6077 #endif /* GL_EXT_debug_marker */
6078
6079 #ifndef GL_EXT_depth_bounds_test
6080 #define GL_EXT_depth_bounds_test 1
6081 #define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
6082 #define GL_DEPTH_BOUNDS_EXT 0x8891
6083 typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
6084 #ifdef GL_GLEXT_PROTOTYPES
6085 GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
6086 #endif
6087 #endif /* GL_EXT_depth_bounds_test */
6088
6089 #ifndef GL_EXT_direct_state_access
6090 #define GL_EXT_direct_state_access 1
6091 #define GL_PROGRAM_MATRIX_EXT 0x8E2D
6092 #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
6093 #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
6094 typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
6095 typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
6096 typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
6097 typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
6098 typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
6099 typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6100 typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6101 typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6102 typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6103 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6104 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6105 typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6106 typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6107 typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
6108 typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
6109 typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6110 typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6111 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6112 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6113 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
6114 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6115 typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6116 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6117 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6118 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6119 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6120 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6121 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6122 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6123 typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6124 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6125 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6126 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6127 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6128 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6129 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6130 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6131 typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
6132 typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6133 typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6134 typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6135 typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6136 typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6137 typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6138 typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6139 typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6140 typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6141 typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6142 typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6143 typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6144 typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6145 typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6146 typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6147 typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6148 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6149 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6150 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6151 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6152 typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6153 typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6154 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6155 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6156 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6157 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6158 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6159 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6160 typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6161 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6162 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6163 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6164 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6165 typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6166 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6167 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6168 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6169 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6170 typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
6171 typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
6172 typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
6173 typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6174 typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6175 typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
6176 typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
6177 typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
6178 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6179 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6180 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6181 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6182 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6183 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6184 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
6185 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6186 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6187 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6188 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6189 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6190 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6191 typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
6192 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6193 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6194 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6195 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6196 typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6197 typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6198 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
6199 typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
6200 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
6201 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
6202 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6203 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
6204 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6205 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6206 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6207 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
6208 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
6209 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6210 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6211 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6212 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6213 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6214 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6215 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6216 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6217 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6218 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6219 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6220 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6221 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6222 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6223 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6224 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6225 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6226 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6227 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6228 typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6229 typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6230 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6231 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6232 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6233 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6234 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6235 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6236 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6237 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6238 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
6239 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
6240 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6241 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6242 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6243 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6244 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6245 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6246 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6247 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6248 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
6249 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6250 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6251 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
6252 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6253 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
6254 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
6255 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6256 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6257 typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
6258 typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
6259 typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
6260 typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6261 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6262 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6263 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6264 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6265 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
6266 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
6267 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
6268 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
6269 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6270 typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
6271 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6272 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6273 typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
6274 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6275 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6276 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6277 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6278 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6279 typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
6280 typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
6281 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6282 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6283 typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6284 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6285 typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6286 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6287 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6288 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6289 typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
6290 typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
6291 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6292 typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6293 typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6294 typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6295 typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6296 typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6297 typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6298 typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6299 typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6300 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6301 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6302 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6303 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6304 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6305 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6306 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
6307 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
6308 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6309 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
6310 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6311 typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
6312 typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6313 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6314 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6315 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
6316 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6317 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
6318 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
6319 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6320 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6321 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6322 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6323 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6324 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6325 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6326 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6327 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6328 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6329 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6330 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6331 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6332 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6333 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6334 typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6335 typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6336 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6337 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6338 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6339 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6340 typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6341 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6342 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6343 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6344 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6345 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6346 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6347 typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6348 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
6349 #ifdef GL_GLEXT_PROTOTYPES
6350 GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
6351 GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
6352 GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
6353 GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
6354 GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
6355 GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6356 GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6357 GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6358 GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6359 GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6360 GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6361 GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6362 GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6363 GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
6364 GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
6365 GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
6366 GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
6367 GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6368 GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6369 GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
6370 GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6371 GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6372 GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6373 GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6374 GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6375 GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6376 GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6377 GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6378 GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6379 GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6380 GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6381 GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6382 GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6383 GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6384 GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6385 GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6386 GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6387 GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
6388 GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6389 GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6390 GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6391 GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6392 GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6393 GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6394 GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6395 GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6396 GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6397 GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6398 GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6399 GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6400 GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6401 GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6402 GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6403 GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6404 GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6405 GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6406 GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6407 GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6408 GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6409 GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6410 GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6411 GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6412 GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6413 GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6414 GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6415 GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6416 GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6417 GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6418 GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6419 GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6420 GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6421 GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6422 GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6423 GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6424 GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
6425 GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
6426 GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
6427 GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
6428 GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
6429 GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
6430 GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
6431 GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
6432 GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
6433 GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
6434 GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6435 GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6436 GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6437 GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6438 GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6439 GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6440 GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
6441 GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6442 GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6443 GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6444 GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6445 GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6446 GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6447 GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
6448 GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
6449 GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
6450 GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
6451 GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
6452 GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6453 GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6454 GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
6455 GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
6456 GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
6457 GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
6458 GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6459 GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
6460 GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6461 GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6462 GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6463 GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
6464 GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
6465 GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6466 GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6467 GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6468 GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6469 GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6470 GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6471 GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6472 GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6473 GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6474 GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6475 GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6476 GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6477 GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6478 GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6479 GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6480 GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6481 GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6482 GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6483 GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6484 GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6485 GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6486 GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6487 GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6488 GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6489 GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6490 GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6491 GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6492 GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6493 GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6494 GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
6495 GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
6496 GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6497 GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6498 GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6499 GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6500 GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6501 GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6502 GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6503 GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6504 GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
6505 GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6506 GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6507 GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
6508 GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6509 GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
6510 GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
6511 GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
6512 GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
6513 GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
6514 GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
6515 GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
6516 GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6517 GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6518 GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6519 GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6520 GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6521 GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
6522 GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
6523 GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
6524 GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
6525 GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6526 GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
6527 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6528 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6529 GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
6530 GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6531 GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6532 GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6533 GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6534 GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6535 GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
6536 GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
6537 GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
6538 GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6539 GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
6540 GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6541 GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6542 GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6543 GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6544 GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6545 GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
6546 GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
6547 GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6548 GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6549 GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6550 GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6551 GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6552 GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6553 GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6554 GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6555 GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6556 GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6557 GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6558 GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
6559 GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
6560 GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6561 GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6562 GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
6563 GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
6564 GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6565 GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
6566 GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6567 GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
6568 GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6569 GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6570 GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6571 GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
6572 GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6573 GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
6574 GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
6575 GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6576 GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6577 GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6578 GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6579 GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6580 GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6581 GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6582 GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6583 GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6584 GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6585 GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6586 GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6587 GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6588 GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6589 GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6590 GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6591 GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6592 GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6593 GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6594 GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6595 GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6596 GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6597 GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6598 GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6599 GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6600 GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6601 GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6602 GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6603 GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6604 GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
6605 #endif
6606 #endif /* GL_EXT_direct_state_access */
6607
6608 #ifndef GL_EXT_draw_buffers2
6609 #define GL_EXT_draw_buffers2 1
6610 typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6611 #ifdef GL_GLEXT_PROTOTYPES
6612 GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6613 #endif
6614 #endif /* GL_EXT_draw_buffers2 */
6615
6616 #ifndef GL_EXT_draw_instanced
6617 #define GL_EXT_draw_instanced 1
6618 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6619 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6620 #ifdef GL_GLEXT_PROTOTYPES
6621 GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6622 GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6623 #endif
6624 #endif /* GL_EXT_draw_instanced */
6625
6626 #ifndef GL_EXT_draw_range_elements
6627 #define GL_EXT_draw_range_elements 1
6628 #define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
6629 #define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
6630 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6631 #ifdef GL_GLEXT_PROTOTYPES
6632 GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6633 #endif
6634 #endif /* GL_EXT_draw_range_elements */
6635
6636 #ifndef GL_EXT_fog_coord
6637 #define GL_EXT_fog_coord 1
6638 #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
6639 #define GL_FOG_COORDINATE_EXT 0x8451
6640 #define GL_FRAGMENT_DEPTH_EXT 0x8452
6641 #define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
6642 #define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
6643 #define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
6644 #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
6645 #define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
6646 typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
6647 typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
6648 typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
6649 typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
6650 typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
6651 #ifdef GL_GLEXT_PROTOTYPES
6652 GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
6653 GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
6654 GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
6655 GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
6656 GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6657 #endif
6658 #endif /* GL_EXT_fog_coord */
6659
6660 #ifndef GL_EXT_framebuffer_blit
6661 #define GL_EXT_framebuffer_blit 1
6662 #define GL_READ_FRAMEBUFFER_EXT 0x8CA8
6663 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
6664 #define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
6665 #define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
6666 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6667 #ifdef GL_GLEXT_PROTOTYPES
6668 GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6669 #endif
6670 #endif /* GL_EXT_framebuffer_blit */
6671
6672 #ifndef GL_EXT_framebuffer_multisample
6673 #define GL_EXT_framebuffer_multisample 1
6674 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
6675 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
6676 #define GL_MAX_SAMPLES_EXT 0x8D57
6677 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6678 #ifdef GL_GLEXT_PROTOTYPES
6679 GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6680 #endif
6681 #endif /* GL_EXT_framebuffer_multisample */
6682
6683 #ifndef GL_EXT_framebuffer_multisample_blit_scaled
6684 #define GL_EXT_framebuffer_multisample_blit_scaled 1
6685 #define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
6686 #define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
6687 #endif /* GL_EXT_framebuffer_multisample_blit_scaled */
6688
6689 #ifndef GL_EXT_framebuffer_object
6690 #define GL_EXT_framebuffer_object 1
6691 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
6692 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
6693 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
6694 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
6695 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
6696 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
6697 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
6698 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
6699 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
6700 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
6701 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
6702 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
6703 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
6704 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
6705 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
6706 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
6707 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
6708 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
6709 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
6710 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
6711 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
6712 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
6713 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
6714 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
6715 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
6716 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
6717 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
6718 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
6719 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
6720 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
6721 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
6722 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
6723 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
6724 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
6725 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00
6726 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20
6727 #define GL_FRAMEBUFFER_EXT 0x8D40
6728 #define GL_RENDERBUFFER_EXT 0x8D41
6729 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
6730 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
6731 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
6732 #define GL_STENCIL_INDEX1_EXT 0x8D46
6733 #define GL_STENCIL_INDEX4_EXT 0x8D47
6734 #define GL_STENCIL_INDEX8_EXT 0x8D48
6735 #define GL_STENCIL_INDEX16_EXT 0x8D49
6736 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
6737 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
6738 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
6739 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
6740 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
6741 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
6742 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
6743 typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
6744 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
6745 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
6746 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6747 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6748 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
6749 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
6750 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
6751 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
6752 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
6753 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6754 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6755 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6756 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6757 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6758 typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
6759 #ifdef GL_GLEXT_PROTOTYPES
6760 GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
6761 GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
6762 GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
6763 GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
6764 GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6765 GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
6766 GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
6767 GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
6768 GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
6769 GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
6770 GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
6771 GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6772 GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6773 GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6774 GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6775 GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6776 GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
6777 #endif
6778 #endif /* GL_EXT_framebuffer_object */
6779
6780 #ifndef GL_EXT_framebuffer_sRGB
6781 #define GL_EXT_framebuffer_sRGB 1
6782 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
6783 #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
6784 #endif /* GL_EXT_framebuffer_sRGB */
6785
6786 #ifndef GL_EXT_geometry_shader4
6787 #define GL_EXT_geometry_shader4 1
6788 #define GL_GEOMETRY_SHADER_EXT 0x8DD9
6789 #define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
6790 #define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
6791 #define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
6792 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
6793 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
6794 #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
6795 #define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
6796 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
6797 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
6798 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
6799 #define GL_LINES_ADJACENCY_EXT 0x000A
6800 #define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
6801 #define GL_TRIANGLES_ADJACENCY_EXT 0x000C
6802 #define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
6803 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
6804 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
6805 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
6806 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
6807 #define GL_PROGRAM_POINT_SIZE_EXT 0x8642
6808 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
6809 #ifdef GL_GLEXT_PROTOTYPES
6810 GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
6811 #endif
6812 #endif /* GL_EXT_geometry_shader4 */
6813
6814 #ifndef GL_EXT_gpu_program_parameters
6815 #define GL_EXT_gpu_program_parameters 1
6816 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6817 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6818 #ifdef GL_GLEXT_PROTOTYPES
6819 GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6820 GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6821 #endif
6822 #endif /* GL_EXT_gpu_program_parameters */
6823
6824 #ifndef GL_EXT_gpu_shader4
6825 #define GL_EXT_gpu_shader4 1
6826 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
6827 #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
6828 #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
6829 #define GL_SAMPLER_BUFFER_EXT 0x8DC2
6830 #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
6831 #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
6832 #define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
6833 #define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
6834 #define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
6835 #define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
6836 #define GL_INT_SAMPLER_1D_EXT 0x8DC9
6837 #define GL_INT_SAMPLER_2D_EXT 0x8DCA
6838 #define GL_INT_SAMPLER_3D_EXT 0x8DCB
6839 #define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
6840 #define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
6841 #define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
6842 #define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
6843 #define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
6844 #define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
6845 #define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
6846 #define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
6847 #define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
6848 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
6849 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
6850 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
6851 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
6852 #define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
6853 #define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
6854 typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
6855 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
6856 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
6857 typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
6858 typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
6859 typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
6860 typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6861 typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6862 typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6863 typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6864 typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6865 #ifdef GL_GLEXT_PROTOTYPES
6866 GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
6867 GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
6868 GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
6869 GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
6870 GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
6871 GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
6872 GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6873 GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
6874 GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
6875 GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
6876 GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
6877 #endif
6878 #endif /* GL_EXT_gpu_shader4 */
6879
6880 #ifndef GL_EXT_histogram
6881 #define GL_EXT_histogram 1
6882 #define GL_HISTOGRAM_EXT 0x8024
6883 #define GL_PROXY_HISTOGRAM_EXT 0x8025
6884 #define GL_HISTOGRAM_WIDTH_EXT 0x8026
6885 #define GL_HISTOGRAM_FORMAT_EXT 0x8027
6886 #define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
6887 #define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
6888 #define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
6889 #define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
6890 #define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
6891 #define GL_HISTOGRAM_SINK_EXT 0x802D
6892 #define GL_MINMAX_EXT 0x802E
6893 #define GL_MINMAX_FORMAT_EXT 0x802F
6894 #define GL_MINMAX_SINK_EXT 0x8030
6895 #define GL_TABLE_TOO_LARGE_EXT 0x8031
6896 typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6897 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6898 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6899 typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6900 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6901 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6902 typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6903 typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
6904 typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
6905 typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
6906 #ifdef GL_GLEXT_PROTOTYPES
6907 GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6908 GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6909 GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
6910 GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6911 GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6912 GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
6913 GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6914 GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
6915 GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
6916 GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
6917 #endif
6918 #endif /* GL_EXT_histogram */
6919
6920 #ifndef GL_EXT_index_array_formats
6921 #define GL_EXT_index_array_formats 1
6922 #define GL_IUI_V2F_EXT 0x81AD
6923 #define GL_IUI_V3F_EXT 0x81AE
6924 #define GL_IUI_N3F_V2F_EXT 0x81AF
6925 #define GL_IUI_N3F_V3F_EXT 0x81B0
6926 #define GL_T2F_IUI_V2F_EXT 0x81B1
6927 #define GL_T2F_IUI_V3F_EXT 0x81B2
6928 #define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
6929 #define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
6930 #endif /* GL_EXT_index_array_formats */
6931
6932 #ifndef GL_EXT_index_func
6933 #define GL_EXT_index_func 1
6934 #define GL_INDEX_TEST_EXT 0x81B5
6935 #define GL_INDEX_TEST_FUNC_EXT 0x81B6
6936 #define GL_INDEX_TEST_REF_EXT 0x81B7
6937 typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
6938 #ifdef GL_GLEXT_PROTOTYPES
6939 GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
6940 #endif
6941 #endif /* GL_EXT_index_func */
6942
6943 #ifndef GL_EXT_index_material
6944 #define GL_EXT_index_material 1
6945 #define GL_INDEX_MATERIAL_EXT 0x81B8
6946 #define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
6947 #define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
6948 typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
6949 #ifdef GL_GLEXT_PROTOTYPES
6950 GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
6951 #endif
6952 #endif /* GL_EXT_index_material */
6953
6954 #ifndef GL_EXT_index_texture
6955 #define GL_EXT_index_texture 1
6956 #endif /* GL_EXT_index_texture */
6957
6958 #ifndef GL_EXT_light_texture
6959 #define GL_EXT_light_texture 1
6960 #define GL_FRAGMENT_MATERIAL_EXT 0x8349
6961 #define GL_FRAGMENT_NORMAL_EXT 0x834A
6962 #define GL_FRAGMENT_COLOR_EXT 0x834C
6963 #define GL_ATTENUATION_EXT 0x834D
6964 #define GL_SHADOW_ATTENUATION_EXT 0x834E
6965 #define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
6966 #define GL_TEXTURE_LIGHT_EXT 0x8350
6967 #define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
6968 #define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
6969 typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
6970 typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
6971 typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
6972 #ifdef GL_GLEXT_PROTOTYPES
6973 GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
6974 GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
6975 GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
6976 #endif
6977 #endif /* GL_EXT_light_texture */
6978
6979 #ifndef GL_EXT_misc_attribute
6980 #define GL_EXT_misc_attribute 1
6981 #endif /* GL_EXT_misc_attribute */
6982
6983 #ifndef GL_EXT_multi_draw_arrays
6984 #define GL_EXT_multi_draw_arrays 1
6985 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6986 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6987 #ifdef GL_GLEXT_PROTOTYPES
6988 GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6989 GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6990 #endif
6991 #endif /* GL_EXT_multi_draw_arrays */
6992
6993 #ifndef GL_EXT_multisample
6994 #define GL_EXT_multisample 1
6995 #define GL_MULTISAMPLE_EXT 0x809D
6996 #define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
6997 #define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
6998 #define GL_SAMPLE_MASK_EXT 0x80A0
6999 #define GL_1PASS_EXT 0x80A1
7000 #define GL_2PASS_0_EXT 0x80A2
7001 #define GL_2PASS_1_EXT 0x80A3
7002 #define GL_4PASS_0_EXT 0x80A4
7003 #define GL_4PASS_1_EXT 0x80A5
7004 #define GL_4PASS_2_EXT 0x80A6
7005 #define GL_4PASS_3_EXT 0x80A7
7006 #define GL_SAMPLE_BUFFERS_EXT 0x80A8
7007 #define GL_SAMPLES_EXT 0x80A9
7008 #define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
7009 #define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
7010 #define GL_SAMPLE_PATTERN_EXT 0x80AC
7011 #define GL_MULTISAMPLE_BIT_EXT 0x20000000
7012 typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
7013 typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
7014 #ifdef GL_GLEXT_PROTOTYPES
7015 GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
7016 GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
7017 #endif
7018 #endif /* GL_EXT_multisample */
7019
7020 #ifndef GL_EXT_packed_depth_stencil
7021 #define GL_EXT_packed_depth_stencil 1
7022 #define GL_DEPTH_STENCIL_EXT 0x84F9
7023 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA
7024 #define GL_DEPTH24_STENCIL8_EXT 0x88F0
7025 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
7026 #endif /* GL_EXT_packed_depth_stencil */
7027
7028 #ifndef GL_EXT_packed_float
7029 #define GL_EXT_packed_float 1
7030 #define GL_R11F_G11F_B10F_EXT 0x8C3A
7031 #define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
7032 #define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
7033 #endif /* GL_EXT_packed_float */
7034
7035 #ifndef GL_EXT_packed_pixels
7036 #define GL_EXT_packed_pixels 1
7037 #define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
7038 #define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
7039 #define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
7040 #define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
7041 #define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
7042 #endif /* GL_EXT_packed_pixels */
7043
7044 #ifndef GL_EXT_paletted_texture
7045 #define GL_EXT_paletted_texture 1
7046 #define GL_COLOR_INDEX1_EXT 0x80E2
7047 #define GL_COLOR_INDEX2_EXT 0x80E3
7048 #define GL_COLOR_INDEX4_EXT 0x80E4
7049 #define GL_COLOR_INDEX8_EXT 0x80E5
7050 #define GL_COLOR_INDEX12_EXT 0x80E6
7051 #define GL_COLOR_INDEX16_EXT 0x80E7
7052 #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
7053 typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7054 typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
7055 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7056 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7057 #ifdef GL_GLEXT_PROTOTYPES
7058 GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7059 GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
7060 GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
7061 GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7062 #endif
7063 #endif /* GL_EXT_paletted_texture */
7064
7065 #ifndef GL_EXT_pixel_buffer_object
7066 #define GL_EXT_pixel_buffer_object 1
7067 #define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
7068 #define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
7069 #define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
7070 #define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
7071 #endif /* GL_EXT_pixel_buffer_object */
7072
7073 #ifndef GL_EXT_pixel_transform
7074 #define GL_EXT_pixel_transform 1
7075 #define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
7076 #define GL_PIXEL_MAG_FILTER_EXT 0x8331
7077 #define GL_PIXEL_MIN_FILTER_EXT 0x8332
7078 #define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
7079 #define GL_CUBIC_EXT 0x8334
7080 #define GL_AVERAGE_EXT 0x8335
7081 #define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
7082 #define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
7083 #define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
7084 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
7085 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
7086 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7087 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
7088 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7089 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7090 #ifdef GL_GLEXT_PROTOTYPES
7091 GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
7092 GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
7093 GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
7094 GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
7095 GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
7096 GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7097 #endif
7098 #endif /* GL_EXT_pixel_transform */
7099
7100 #ifndef GL_EXT_pixel_transform_color_table
7101 #define GL_EXT_pixel_transform_color_table 1
7102 #endif /* GL_EXT_pixel_transform_color_table */
7103
7104 #ifndef GL_EXT_point_parameters
7105 #define GL_EXT_point_parameters 1
7106 #define GL_POINT_SIZE_MIN_EXT 0x8126
7107 #define GL_POINT_SIZE_MAX_EXT 0x8127
7108 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
7109 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
7110 typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
7111 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
7112 #ifdef GL_GLEXT_PROTOTYPES
7113 GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
7114 GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
7115 #endif
7116 #endif /* GL_EXT_point_parameters */
7117
7118 #ifndef GL_EXT_polygon_offset
7119 #define GL_EXT_polygon_offset 1
7120 #define GL_POLYGON_OFFSET_EXT 0x8037
7121 #define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
7122 #define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
7123 typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
7124 #ifdef GL_GLEXT_PROTOTYPES
7125 GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
7126 #endif
7127 #endif /* GL_EXT_polygon_offset */
7128
7129 #ifndef GL_EXT_provoking_vertex
7130 #define GL_EXT_provoking_vertex 1
7131 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
7132 #define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
7133 #define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
7134 #define GL_PROVOKING_VERTEX_EXT 0x8E4F
7135 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
7136 #ifdef GL_GLEXT_PROTOTYPES
7137 GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
7138 #endif
7139 #endif /* GL_EXT_provoking_vertex */
7140
7141 #ifndef GL_EXT_rescale_normal
7142 #define GL_EXT_rescale_normal 1
7143 #define GL_RESCALE_NORMAL_EXT 0x803A
7144 #endif /* GL_EXT_rescale_normal */
7145
7146 #ifndef GL_EXT_secondary_color
7147 #define GL_EXT_secondary_color 1
7148 #define GL_COLOR_SUM_EXT 0x8458
7149 #define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
7150 #define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
7151 #define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
7152 #define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
7153 #define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
7154 #define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
7155 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
7156 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
7157 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
7158 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
7159 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
7160 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
7161 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
7162 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
7163 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
7164 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
7165 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
7166 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
7167 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
7168 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
7169 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
7170 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
7171 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
7172 #ifdef GL_GLEXT_PROTOTYPES
7173 GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
7174 GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
7175 GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
7176 GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
7177 GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
7178 GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
7179 GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
7180 GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
7181 GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
7182 GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
7183 GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
7184 GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
7185 GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
7186 GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
7187 GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
7188 GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
7189 GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
7190 #endif
7191 #endif /* GL_EXT_secondary_color */
7192
7193 #ifndef GL_EXT_separate_shader_objects
7194 #define GL_EXT_separate_shader_objects 1
7195 #define GL_ACTIVE_PROGRAM_EXT 0x8B8D
7196 typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
7197 typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
7198 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
7199 #ifdef GL_GLEXT_PROTOTYPES
7200 GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
7201 GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
7202 GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
7203 #endif
7204 #endif /* GL_EXT_separate_shader_objects */
7205
7206 #ifndef GL_EXT_separate_specular_color
7207 #define GL_EXT_separate_specular_color 1
7208 #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
7209 #define GL_SINGLE_COLOR_EXT 0x81F9
7210 #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
7211 #endif /* GL_EXT_separate_specular_color */
7212
7213 #ifndef GL_EXT_shader_image_load_formatted
7214 #define GL_EXT_shader_image_load_formatted 1
7215 #endif /* GL_EXT_shader_image_load_formatted */
7216
7217 #ifndef GL_EXT_shader_image_load_store
7218 #define GL_EXT_shader_image_load_store 1
7219 #define GL_MAX_IMAGE_UNITS_EXT 0x8F38
7220 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
7221 #define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
7222 #define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
7223 #define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
7224 #define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
7225 #define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
7226 #define GL_IMAGE_1D_EXT 0x904C
7227 #define GL_IMAGE_2D_EXT 0x904D
7228 #define GL_IMAGE_3D_EXT 0x904E
7229 #define GL_IMAGE_2D_RECT_EXT 0x904F
7230 #define GL_IMAGE_CUBE_EXT 0x9050
7231 #define GL_IMAGE_BUFFER_EXT 0x9051
7232 #define GL_IMAGE_1D_ARRAY_EXT 0x9052
7233 #define GL_IMAGE_2D_ARRAY_EXT 0x9053
7234 #define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
7235 #define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
7236 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
7237 #define GL_INT_IMAGE_1D_EXT 0x9057
7238 #define GL_INT_IMAGE_2D_EXT 0x9058
7239 #define GL_INT_IMAGE_3D_EXT 0x9059
7240 #define GL_INT_IMAGE_2D_RECT_EXT 0x905A
7241 #define GL_INT_IMAGE_CUBE_EXT 0x905B
7242 #define GL_INT_IMAGE_BUFFER_EXT 0x905C
7243 #define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
7244 #define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
7245 #define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
7246 #define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
7247 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
7248 #define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
7249 #define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
7250 #define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
7251 #define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
7252 #define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
7253 #define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
7254 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
7255 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
7256 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
7257 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
7258 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
7259 #define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
7260 #define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
7261 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
7262 #define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
7263 #define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
7264 #define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
7265 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
7266 #define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
7267 #define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
7268 #define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
7269 #define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
7270 #define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
7271 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
7272 #define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
7273 #define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
7274 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7275 typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
7276 #ifdef GL_GLEXT_PROTOTYPES
7277 GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7278 GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
7279 #endif
7280 #endif /* GL_EXT_shader_image_load_store */
7281
7282 #ifndef GL_EXT_shader_integer_mix
7283 #define GL_EXT_shader_integer_mix 1
7284 #endif /* GL_EXT_shader_integer_mix */
7285
7286 #ifndef GL_EXT_shadow_funcs
7287 #define GL_EXT_shadow_funcs 1
7288 #endif /* GL_EXT_shadow_funcs */
7289
7290 #ifndef GL_EXT_shared_texture_palette
7291 #define GL_EXT_shared_texture_palette 1
7292 #define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
7293 #endif /* GL_EXT_shared_texture_palette */
7294
7295 #ifndef GL_EXT_stencil_clear_tag
7296 #define GL_EXT_stencil_clear_tag 1
7297 #define GL_STENCIL_TAG_BITS_EXT 0x88F2
7298 #define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
7299 typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
7300 #ifdef GL_GLEXT_PROTOTYPES
7301 GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
7302 #endif
7303 #endif /* GL_EXT_stencil_clear_tag */
7304
7305 #ifndef GL_EXT_stencil_two_side
7306 #define GL_EXT_stencil_two_side 1
7307 #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
7308 #define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
7309 typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
7310 #ifdef GL_GLEXT_PROTOTYPES
7311 GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
7312 #endif
7313 #endif /* GL_EXT_stencil_two_side */
7314
7315 #ifndef GL_EXT_stencil_wrap
7316 #define GL_EXT_stencil_wrap 1
7317 #define GL_INCR_WRAP_EXT 0x8507
7318 #define GL_DECR_WRAP_EXT 0x8508
7319 #endif /* GL_EXT_stencil_wrap */
7320
7321 #ifndef GL_EXT_subtexture
7322 #define GL_EXT_subtexture 1
7323 typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7324 typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7325 #ifdef GL_GLEXT_PROTOTYPES
7326 GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7327 GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7328 #endif
7329 #endif /* GL_EXT_subtexture */
7330
7331 #ifndef GL_EXT_texture
7332 #define GL_EXT_texture 1
7333 #define GL_ALPHA4_EXT 0x803B
7334 #define GL_ALPHA8_EXT 0x803C
7335 #define GL_ALPHA12_EXT 0x803D
7336 #define GL_ALPHA16_EXT 0x803E
7337 #define GL_LUMINANCE4_EXT 0x803F
7338 #define GL_LUMINANCE8_EXT 0x8040
7339 #define GL_LUMINANCE12_EXT 0x8041
7340 #define GL_LUMINANCE16_EXT 0x8042
7341 #define GL_LUMINANCE4_ALPHA4_EXT 0x8043
7342 #define GL_LUMINANCE6_ALPHA2_EXT 0x8044
7343 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
7344 #define GL_LUMINANCE12_ALPHA4_EXT 0x8046
7345 #define GL_LUMINANCE12_ALPHA12_EXT 0x8047
7346 #define GL_LUMINANCE16_ALPHA16_EXT 0x8048
7347 #define GL_INTENSITY_EXT 0x8049
7348 #define GL_INTENSITY4_EXT 0x804A
7349 #define GL_INTENSITY8_EXT 0x804B
7350 #define GL_INTENSITY12_EXT 0x804C
7351 #define GL_INTENSITY16_EXT 0x804D
7352 #define GL_RGB2_EXT 0x804E
7353 #define GL_RGB4_EXT 0x804F
7354 #define GL_RGB5_EXT 0x8050
7355 #define GL_RGB8_EXT 0x8051
7356 #define GL_RGB10_EXT 0x8052
7357 #define GL_RGB12_EXT 0x8053
7358 #define GL_RGB16_EXT 0x8054
7359 #define GL_RGBA2_EXT 0x8055
7360 #define GL_RGBA4_EXT 0x8056
7361 #define GL_RGB5_A1_EXT 0x8057
7362 #define GL_RGBA8_EXT 0x8058
7363 #define GL_RGB10_A2_EXT 0x8059
7364 #define GL_RGBA12_EXT 0x805A
7365 #define GL_RGBA16_EXT 0x805B
7366 #define GL_TEXTURE_RED_SIZE_EXT 0x805C
7367 #define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
7368 #define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
7369 #define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
7370 #define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
7371 #define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
7372 #define GL_REPLACE_EXT 0x8062
7373 #define GL_PROXY_TEXTURE_1D_EXT 0x8063
7374 #define GL_PROXY_TEXTURE_2D_EXT 0x8064
7375 #define GL_TEXTURE_TOO_LARGE_EXT 0x8065
7376 #endif /* GL_EXT_texture */
7377
7378 #ifndef GL_EXT_texture3D
7379 #define GL_EXT_texture3D 1
7380 #define GL_PACK_SKIP_IMAGES_EXT 0x806B
7381 #define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
7382 #define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
7383 #define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
7384 #define GL_TEXTURE_3D_EXT 0x806F
7385 #define GL_PROXY_TEXTURE_3D_EXT 0x8070
7386 #define GL_TEXTURE_DEPTH_EXT 0x8071
7387 #define GL_TEXTURE_WRAP_R_EXT 0x8072
7388 #define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
7389 typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7390 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7391 #ifdef GL_GLEXT_PROTOTYPES
7392 GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7393 GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7394 #endif
7395 #endif /* GL_EXT_texture3D */
7396
7397 #ifndef GL_EXT_texture_array
7398 #define GL_EXT_texture_array 1
7399 #define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
7400 #define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
7401 #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
7402 #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
7403 #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
7404 #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
7405 #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
7406 #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
7407 #endif /* GL_EXT_texture_array */
7408
7409 #ifndef GL_EXT_texture_buffer_object
7410 #define GL_EXT_texture_buffer_object 1
7411 #define GL_TEXTURE_BUFFER_EXT 0x8C2A
7412 #define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
7413 #define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
7414 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
7415 #define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
7416 typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
7417 #ifdef GL_GLEXT_PROTOTYPES
7418 GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
7419 #endif
7420 #endif /* GL_EXT_texture_buffer_object */
7421
7422 #ifndef GL_EXT_texture_compression_latc
7423 #define GL_EXT_texture_compression_latc 1
7424 #define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
7425 #define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
7426 #define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
7427 #define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
7428 #endif /* GL_EXT_texture_compression_latc */
7429
7430 #ifndef GL_EXT_texture_compression_rgtc
7431 #define GL_EXT_texture_compression_rgtc 1
7432 #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
7433 #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
7434 #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
7435 #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
7436 #endif /* GL_EXT_texture_compression_rgtc */
7437
7438 #ifndef GL_EXT_texture_compression_s3tc
7439 #define GL_EXT_texture_compression_s3tc 1
7440 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
7441 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
7442 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
7443 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
7444 #endif /* GL_EXT_texture_compression_s3tc */
7445
7446 #ifndef GL_EXT_texture_cube_map
7447 #define GL_EXT_texture_cube_map 1
7448 #define GL_NORMAL_MAP_EXT 0x8511
7449 #define GL_REFLECTION_MAP_EXT 0x8512
7450 #define GL_TEXTURE_CUBE_MAP_EXT 0x8513
7451 #define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
7452 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
7453 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
7454 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
7455 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
7456 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
7457 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
7458 #define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
7459 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
7460 #endif /* GL_EXT_texture_cube_map */
7461
7462 #ifndef GL_EXT_texture_env_add
7463 #define GL_EXT_texture_env_add 1
7464 #endif /* GL_EXT_texture_env_add */
7465
7466 #ifndef GL_EXT_texture_env_combine
7467 #define GL_EXT_texture_env_combine 1
7468 #define GL_COMBINE_EXT 0x8570
7469 #define GL_COMBINE_RGB_EXT 0x8571
7470 #define GL_COMBINE_ALPHA_EXT 0x8572
7471 #define GL_RGB_SCALE_EXT 0x8573
7472 #define GL_ADD_SIGNED_EXT 0x8574
7473 #define GL_INTERPOLATE_EXT 0x8575
7474 #define GL_CONSTANT_EXT 0x8576
7475 #define GL_PRIMARY_COLOR_EXT 0x8577
7476 #define GL_PREVIOUS_EXT 0x8578
7477 #define GL_SOURCE0_RGB_EXT 0x8580
7478 #define GL_SOURCE1_RGB_EXT 0x8581
7479 #define GL_SOURCE2_RGB_EXT 0x8582
7480 #define GL_SOURCE0_ALPHA_EXT 0x8588
7481 #define GL_SOURCE1_ALPHA_EXT 0x8589
7482 #define GL_SOURCE2_ALPHA_EXT 0x858A
7483 #define GL_OPERAND0_RGB_EXT 0x8590
7484 #define GL_OPERAND1_RGB_EXT 0x8591
7485 #define GL_OPERAND2_RGB_EXT 0x8592
7486 #define GL_OPERAND0_ALPHA_EXT 0x8598
7487 #define GL_OPERAND1_ALPHA_EXT 0x8599
7488 #define GL_OPERAND2_ALPHA_EXT 0x859A
7489 #endif /* GL_EXT_texture_env_combine */
7490
7491 #ifndef GL_EXT_texture_env_dot3
7492 #define GL_EXT_texture_env_dot3 1
7493 #define GL_DOT3_RGB_EXT 0x8740
7494 #define GL_DOT3_RGBA_EXT 0x8741
7495 #endif /* GL_EXT_texture_env_dot3 */
7496
7497 #ifndef GL_EXT_texture_filter_anisotropic
7498 #define GL_EXT_texture_filter_anisotropic 1
7499 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
7500 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
7501 #endif /* GL_EXT_texture_filter_anisotropic */
7502
7503 #ifndef GL_EXT_texture_integer
7504 #define GL_EXT_texture_integer 1
7505 #define GL_RGBA32UI_EXT 0x8D70
7506 #define GL_RGB32UI_EXT 0x8D71
7507 #define GL_ALPHA32UI_EXT 0x8D72
7508 #define GL_INTENSITY32UI_EXT 0x8D73
7509 #define GL_LUMINANCE32UI_EXT 0x8D74
7510 #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
7511 #define GL_RGBA16UI_EXT 0x8D76
7512 #define GL_RGB16UI_EXT 0x8D77
7513 #define GL_ALPHA16UI_EXT 0x8D78
7514 #define GL_INTENSITY16UI_EXT 0x8D79
7515 #define GL_LUMINANCE16UI_EXT 0x8D7A
7516 #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
7517 #define GL_RGBA8UI_EXT 0x8D7C
7518 #define GL_RGB8UI_EXT 0x8D7D
7519 #define GL_ALPHA8UI_EXT 0x8D7E
7520 #define GL_INTENSITY8UI_EXT 0x8D7F
7521 #define GL_LUMINANCE8UI_EXT 0x8D80
7522 #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
7523 #define GL_RGBA32I_EXT 0x8D82
7524 #define GL_RGB32I_EXT 0x8D83
7525 #define GL_ALPHA32I_EXT 0x8D84
7526 #define GL_INTENSITY32I_EXT 0x8D85
7527 #define GL_LUMINANCE32I_EXT 0x8D86
7528 #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
7529 #define GL_RGBA16I_EXT 0x8D88
7530 #define GL_RGB16I_EXT 0x8D89
7531 #define GL_ALPHA16I_EXT 0x8D8A
7532 #define GL_INTENSITY16I_EXT 0x8D8B
7533 #define GL_LUMINANCE16I_EXT 0x8D8C
7534 #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
7535 #define GL_RGBA8I_EXT 0x8D8E
7536 #define GL_RGB8I_EXT 0x8D8F
7537 #define GL_ALPHA8I_EXT 0x8D90
7538 #define GL_INTENSITY8I_EXT 0x8D91
7539 #define GL_LUMINANCE8I_EXT 0x8D92
7540 #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
7541 #define GL_RED_INTEGER_EXT 0x8D94
7542 #define GL_GREEN_INTEGER_EXT 0x8D95
7543 #define GL_BLUE_INTEGER_EXT 0x8D96
7544 #define GL_ALPHA_INTEGER_EXT 0x8D97
7545 #define GL_RGB_INTEGER_EXT 0x8D98
7546 #define GL_RGBA_INTEGER_EXT 0x8D99
7547 #define GL_BGR_INTEGER_EXT 0x8D9A
7548 #define GL_BGRA_INTEGER_EXT 0x8D9B
7549 #define GL_LUMINANCE_INTEGER_EXT 0x8D9C
7550 #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
7551 #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
7552 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7553 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
7554 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7555 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
7556 typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
7557 typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7558 #ifdef GL_GLEXT_PROTOTYPES
7559 GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
7560 GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
7561 GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
7562 GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
7563 GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
7564 GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7565 #endif
7566 #endif /* GL_EXT_texture_integer */
7567
7568 #ifndef GL_EXT_texture_lod_bias
7569 #define GL_EXT_texture_lod_bias 1
7570 #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
7571 #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
7572 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501
7573 #endif /* GL_EXT_texture_lod_bias */
7574
7575 #ifndef GL_EXT_texture_mirror_clamp
7576 #define GL_EXT_texture_mirror_clamp 1
7577 #define GL_MIRROR_CLAMP_EXT 0x8742
7578 #define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
7579 #define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
7580 #endif /* GL_EXT_texture_mirror_clamp */
7581
7582 #ifndef GL_EXT_texture_object
7583 #define GL_EXT_texture_object 1
7584 #define GL_TEXTURE_PRIORITY_EXT 0x8066
7585 #define GL_TEXTURE_RESIDENT_EXT 0x8067
7586 #define GL_TEXTURE_1D_BINDING_EXT 0x8068
7587 #define GL_TEXTURE_2D_BINDING_EXT 0x8069
7588 #define GL_TEXTURE_3D_BINDING_EXT 0x806A
7589 typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
7590 typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
7591 typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
7592 typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
7593 typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
7594 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7595 #ifdef GL_GLEXT_PROTOTYPES
7596 GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
7597 GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
7598 GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
7599 GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
7600 GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
7601 GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7602 #endif
7603 #endif /* GL_EXT_texture_object */
7604
7605 #ifndef GL_EXT_texture_perturb_normal
7606 #define GL_EXT_texture_perturb_normal 1
7607 #define GL_PERTURB_EXT 0x85AE
7608 #define GL_TEXTURE_NORMAL_EXT 0x85AF
7609 typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
7610 #ifdef GL_GLEXT_PROTOTYPES
7611 GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
7612 #endif
7613 #endif /* GL_EXT_texture_perturb_normal */
7614
7615 #ifndef GL_EXT_texture_sRGB
7616 #define GL_EXT_texture_sRGB 1
7617 #define GL_SRGB_EXT 0x8C40
7618 #define GL_SRGB8_EXT 0x8C41
7619 #define GL_SRGB_ALPHA_EXT 0x8C42
7620 #define GL_SRGB8_ALPHA8_EXT 0x8C43
7621 #define GL_SLUMINANCE_ALPHA_EXT 0x8C44
7622 #define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
7623 #define GL_SLUMINANCE_EXT 0x8C46
7624 #define GL_SLUMINANCE8_EXT 0x8C47
7625 #define GL_COMPRESSED_SRGB_EXT 0x8C48
7626 #define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
7627 #define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
7628 #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
7629 #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
7630 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
7631 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
7632 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
7633 #endif /* GL_EXT_texture_sRGB */
7634
7635 #ifndef GL_EXT_texture_sRGB_decode
7636 #define GL_EXT_texture_sRGB_decode 1
7637 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
7638 #define GL_DECODE_EXT 0x8A49
7639 #define GL_SKIP_DECODE_EXT 0x8A4A
7640 #endif /* GL_EXT_texture_sRGB_decode */
7641
7642 #ifndef GL_EXT_texture_shared_exponent
7643 #define GL_EXT_texture_shared_exponent 1
7644 #define GL_RGB9_E5_EXT 0x8C3D
7645 #define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
7646 #define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
7647 #endif /* GL_EXT_texture_shared_exponent */
7648
7649 #ifndef GL_EXT_texture_snorm
7650 #define GL_EXT_texture_snorm 1
7651 #define GL_ALPHA_SNORM 0x9010
7652 #define GL_LUMINANCE_SNORM 0x9011
7653 #define GL_LUMINANCE_ALPHA_SNORM 0x9012
7654 #define GL_INTENSITY_SNORM 0x9013
7655 #define GL_ALPHA8_SNORM 0x9014
7656 #define GL_LUMINANCE8_SNORM 0x9015
7657 #define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
7658 #define GL_INTENSITY8_SNORM 0x9017
7659 #define GL_ALPHA16_SNORM 0x9018
7660 #define GL_LUMINANCE16_SNORM 0x9019
7661 #define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
7662 #define GL_INTENSITY16_SNORM 0x901B
7663 #define GL_RED_SNORM 0x8F90
7664 #define GL_RG_SNORM 0x8F91
7665 #define GL_RGB_SNORM 0x8F92
7666 #define GL_RGBA_SNORM 0x8F93
7667 #endif /* GL_EXT_texture_snorm */
7668
7669 #ifndef GL_EXT_texture_swizzle
7670 #define GL_EXT_texture_swizzle 1
7671 #define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
7672 #define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
7673 #define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
7674 #define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
7675 #define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
7676 #endif /* GL_EXT_texture_swizzle */
7677
7678 #ifndef GL_EXT_timer_query
7679 #define GL_EXT_timer_query 1
7680 #define GL_TIME_ELAPSED_EXT 0x88BF
7681 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
7682 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
7683 #ifdef GL_GLEXT_PROTOTYPES
7684 GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
7685 GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
7686 #endif
7687 #endif /* GL_EXT_timer_query */
7688
7689 #ifndef GL_EXT_transform_feedback
7690 #define GL_EXT_transform_feedback 1
7691 #define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
7692 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
7693 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
7694 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
7695 #define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
7696 #define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
7697 #define GL_PRIMITIVES_GENERATED_EXT 0x8C87
7698 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
7699 #define GL_RASTERIZER_DISCARD_EXT 0x8C89
7700 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
7701 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
7702 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
7703 #define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
7704 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
7705 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
7706 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
7707 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
7708 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7709 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7710 typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
7711 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7712 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7713 #ifdef GL_GLEXT_PROTOTYPES
7714 GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
7715 GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
7716 GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7717 GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7718 GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
7719 GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7720 GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7721 #endif
7722 #endif /* GL_EXT_transform_feedback */
7723
7724 #ifndef GL_EXT_vertex_array
7725 #define GL_EXT_vertex_array 1
7726 #define GL_VERTEX_ARRAY_EXT 0x8074
7727 #define GL_NORMAL_ARRAY_EXT 0x8075
7728 #define GL_COLOR_ARRAY_EXT 0x8076
7729 #define GL_INDEX_ARRAY_EXT 0x8077
7730 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
7731 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079
7732 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
7733 #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
7734 #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
7735 #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
7736 #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
7737 #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
7738 #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
7739 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081
7740 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082
7741 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
7742 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084
7743 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085
7744 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
7745 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087
7746 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
7747 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
7748 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
7749 #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
7750 #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
7751 #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
7752 #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
7753 #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
7754 #define GL_COLOR_ARRAY_POINTER_EXT 0x8090
7755 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091
7756 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
7757 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
7758 typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
7759 typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7760 typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
7761 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
7762 typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
7763 typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7764 typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7765 typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7766 typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7767 #ifdef GL_GLEXT_PROTOTYPES
7768 GLAPI void APIENTRY glArrayElementEXT (GLint i);
7769 GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7770 GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
7771 GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
7772 GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
7773 GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7774 GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7775 GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7776 GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7777 #endif
7778 #endif /* GL_EXT_vertex_array */
7779
7780 #ifndef GL_EXT_vertex_array_bgra
7781 #define GL_EXT_vertex_array_bgra 1
7782 #endif /* GL_EXT_vertex_array_bgra */
7783
7784 #ifndef GL_EXT_vertex_attrib_64bit
7785 #define GL_EXT_vertex_attrib_64bit 1
7786 #define GL_DOUBLE_VEC2_EXT 0x8FFC
7787 #define GL_DOUBLE_VEC3_EXT 0x8FFD
7788 #define GL_DOUBLE_VEC4_EXT 0x8FFE
7789 #define GL_DOUBLE_MAT2_EXT 0x8F46
7790 #define GL_DOUBLE_MAT3_EXT 0x8F47
7791 #define GL_DOUBLE_MAT4_EXT 0x8F48
7792 #define GL_DOUBLE_MAT2x3_EXT 0x8F49
7793 #define GL_DOUBLE_MAT2x4_EXT 0x8F4A
7794 #define GL_DOUBLE_MAT3x2_EXT 0x8F4B
7795 #define GL_DOUBLE_MAT3x4_EXT 0x8F4C
7796 #define GL_DOUBLE_MAT4x2_EXT 0x8F4D
7797 #define GL_DOUBLE_MAT4x3_EXT 0x8F4E
7798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
7799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
7800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
7803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
7804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
7805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
7806 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7807 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
7808 #ifdef GL_GLEXT_PROTOTYPES
7809 GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
7810 GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
7811 GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7812 GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7813 GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
7814 GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
7815 GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
7816 GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
7817 GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7818 GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
7819 #endif
7820 #endif /* GL_EXT_vertex_attrib_64bit */
7821
7822 #ifndef GL_EXT_vertex_shader
7823 #define GL_EXT_vertex_shader 1
7824 #define GL_VERTEX_SHADER_EXT 0x8780
7825 #define GL_VERTEX_SHADER_BINDING_EXT 0x8781
7826 #define GL_OP_INDEX_EXT 0x8782
7827 #define GL_OP_NEGATE_EXT 0x8783
7828 #define GL_OP_DOT3_EXT 0x8784
7829 #define GL_OP_DOT4_EXT 0x8785
7830 #define GL_OP_MUL_EXT 0x8786
7831 #define GL_OP_ADD_EXT 0x8787
7832 #define GL_OP_MADD_EXT 0x8788
7833 #define GL_OP_FRAC_EXT 0x8789
7834 #define GL_OP_MAX_EXT 0x878A
7835 #define GL_OP_MIN_EXT 0x878B
7836 #define GL_OP_SET_GE_EXT 0x878C
7837 #define GL_OP_SET_LT_EXT 0x878D
7838 #define GL_OP_CLAMP_EXT 0x878E
7839 #define GL_OP_FLOOR_EXT 0x878F
7840 #define GL_OP_ROUND_EXT 0x8790
7841 #define GL_OP_EXP_BASE_2_EXT 0x8791
7842 #define GL_OP_LOG_BASE_2_EXT 0x8792
7843 #define GL_OP_POWER_EXT 0x8793
7844 #define GL_OP_RECIP_EXT 0x8794
7845 #define GL_OP_RECIP_SQRT_EXT 0x8795
7846 #define GL_OP_SUB_EXT 0x8796
7847 #define GL_OP_CROSS_PRODUCT_EXT 0x8797
7848 #define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
7849 #define GL_OP_MOV_EXT 0x8799
7850 #define GL_OUTPUT_VERTEX_EXT 0x879A
7851 #define GL_OUTPUT_COLOR0_EXT 0x879B
7852 #define GL_OUTPUT_COLOR1_EXT 0x879C
7853 #define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
7854 #define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
7855 #define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
7856 #define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
7857 #define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
7858 #define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
7859 #define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
7860 #define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
7861 #define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
7862 #define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
7863 #define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
7864 #define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
7865 #define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
7866 #define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
7867 #define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
7868 #define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
7869 #define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
7870 #define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
7871 #define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
7872 #define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
7873 #define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
7874 #define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
7875 #define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
7876 #define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
7877 #define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
7878 #define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
7879 #define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
7880 #define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
7881 #define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
7882 #define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
7883 #define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
7884 #define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
7885 #define GL_OUTPUT_FOG_EXT 0x87BD
7886 #define GL_SCALAR_EXT 0x87BE
7887 #define GL_VECTOR_EXT 0x87BF
7888 #define GL_MATRIX_EXT 0x87C0
7889 #define GL_VARIANT_EXT 0x87C1
7890 #define GL_INVARIANT_EXT 0x87C2
7891 #define GL_LOCAL_CONSTANT_EXT 0x87C3
7892 #define GL_LOCAL_EXT 0x87C4
7893 #define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
7894 #define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
7895 #define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
7896 #define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
7897 #define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
7898 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
7899 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
7900 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
7901 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
7902 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
7903 #define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
7904 #define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
7905 #define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
7906 #define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
7907 #define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
7908 #define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
7909 #define GL_X_EXT 0x87D5
7910 #define GL_Y_EXT 0x87D6
7911 #define GL_Z_EXT 0x87D7
7912 #define GL_W_EXT 0x87D8
7913 #define GL_NEGATIVE_X_EXT 0x87D9
7914 #define GL_NEGATIVE_Y_EXT 0x87DA
7915 #define GL_NEGATIVE_Z_EXT 0x87DB
7916 #define GL_NEGATIVE_W_EXT 0x87DC
7917 #define GL_ZERO_EXT 0x87DD
7918 #define GL_ONE_EXT 0x87DE
7919 #define GL_NEGATIVE_ONE_EXT 0x87DF
7920 #define GL_NORMALIZED_RANGE_EXT 0x87E0
7921 #define GL_FULL_RANGE_EXT 0x87E1
7922 #define GL_CURRENT_VERTEX_EXT 0x87E2
7923 #define GL_MVP_MATRIX_EXT 0x87E3
7924 #define GL_VARIANT_VALUE_EXT 0x87E4
7925 #define GL_VARIANT_DATATYPE_EXT 0x87E5
7926 #define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
7927 #define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
7928 #define GL_VARIANT_ARRAY_EXT 0x87E8
7929 #define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
7930 #define GL_INVARIANT_VALUE_EXT 0x87EA
7931 #define GL_INVARIANT_DATATYPE_EXT 0x87EB
7932 #define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
7933 #define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
7934 typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
7935 typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
7936 typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
7937 typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
7938 typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
7939 typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
7940 typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7941 typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7942 typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7943 typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7944 typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7945 typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7946 typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7947 typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7948 typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7949 typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
7950 typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
7951 typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
7952 typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
7953 typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
7954 typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
7955 typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
7956 typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
7957 typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
7958 typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7959 typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7960 typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
7961 typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
7962 typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
7963 typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
7964 typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
7965 typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
7966 typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7967 typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7968 typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7969 typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
7970 typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7971 typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7972 typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7973 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7974 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7975 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7976 #ifdef GL_GLEXT_PROTOTYPES
7977 GLAPI void APIENTRY glBeginVertexShaderEXT (void);
7978 GLAPI void APIENTRY glEndVertexShaderEXT (void);
7979 GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
7980 GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
7981 GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
7982 GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
7983 GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7984 GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7985 GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7986 GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7987 GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
7988 GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
7989 GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7990 GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
7991 GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
7992 GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
7993 GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
7994 GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
7995 GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
7996 GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
7997 GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
7998 GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
7999 GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
8000 GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
8001 GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
8002 GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
8003 GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
8004 GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
8005 GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
8006 GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
8007 GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
8008 GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
8009 GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8010 GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8011 GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8012 GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
8013 GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8014 GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8015 GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8016 GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8017 GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
8018 GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8019 #endif
8020 #endif /* GL_EXT_vertex_shader */
8021
8022 #ifndef GL_EXT_vertex_weighting
8023 #define GL_EXT_vertex_weighting 1
8024 #define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
8025 #define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
8026 #define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
8027 #define GL_MODELVIEW1_MATRIX_EXT 0x8506
8028 #define GL_VERTEX_WEIGHTING_EXT 0x8509
8029 #define GL_MODELVIEW0_EXT 0x1700
8030 #define GL_MODELVIEW1_EXT 0x850A
8031 #define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
8032 #define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
8033 #define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
8034 #define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
8035 #define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
8036 #define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
8037 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
8038 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
8039 typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
8040 #ifdef GL_GLEXT_PROTOTYPES
8041 GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
8042 GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
8043 GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
8044 #endif
8045 #endif /* GL_EXT_vertex_weighting */
8046
8047 #ifndef GL_EXT_x11_sync_object
8048 #define GL_EXT_x11_sync_object 1
8049 #define GL_SYNC_X11_FENCE_EXT 0x90E1
8050 typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8051 #ifdef GL_GLEXT_PROTOTYPES
8052 GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8053 #endif
8054 #endif /* GL_EXT_x11_sync_object */
8055
8056 #ifndef GL_GREMEDY_frame_terminator
8057 #define GL_GREMEDY_frame_terminator 1
8058 typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
8059 #ifdef GL_GLEXT_PROTOTYPES
8060 GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
8061 #endif
8062 #endif /* GL_GREMEDY_frame_terminator */
8063
8064 #ifndef GL_GREMEDY_string_marker
8065 #define GL_GREMEDY_string_marker 1
8066 typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
8067 #ifdef GL_GLEXT_PROTOTYPES
8068 GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
8069 #endif
8070 #endif /* GL_GREMEDY_string_marker */
8071
8072 #ifndef GL_HP_convolution_border_modes
8073 #define GL_HP_convolution_border_modes 1
8074 #define GL_IGNORE_BORDER_HP 0x8150
8075 #define GL_CONSTANT_BORDER_HP 0x8151
8076 #define GL_REPLICATE_BORDER_HP 0x8153
8077 #define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
8078 #endif /* GL_HP_convolution_border_modes */
8079
8080 #ifndef GL_HP_image_transform
8081 #define GL_HP_image_transform 1
8082 #define GL_IMAGE_SCALE_X_HP 0x8155
8083 #define GL_IMAGE_SCALE_Y_HP 0x8156
8084 #define GL_IMAGE_TRANSLATE_X_HP 0x8157
8085 #define GL_IMAGE_TRANSLATE_Y_HP 0x8158
8086 #define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
8087 #define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
8088 #define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
8089 #define GL_IMAGE_MAG_FILTER_HP 0x815C
8090 #define GL_IMAGE_MIN_FILTER_HP 0x815D
8091 #define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
8092 #define GL_CUBIC_HP 0x815F
8093 #define GL_AVERAGE_HP 0x8160
8094 #define GL_IMAGE_TRANSFORM_2D_HP 0x8161
8095 #define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
8096 #define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
8097 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
8098 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
8099 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
8100 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
8101 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
8102 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
8103 #ifdef GL_GLEXT_PROTOTYPES
8104 GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
8105 GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
8106 GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
8107 GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
8108 GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
8109 GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
8110 #endif
8111 #endif /* GL_HP_image_transform */
8112
8113 #ifndef GL_HP_occlusion_test
8114 #define GL_HP_occlusion_test 1
8115 #define GL_OCCLUSION_TEST_HP 0x8165
8116 #define GL_OCCLUSION_TEST_RESULT_HP 0x8166
8117 #endif /* GL_HP_occlusion_test */
8118
8119 #ifndef GL_HP_texture_lighting
8120 #define GL_HP_texture_lighting 1
8121 #define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
8122 #define GL_TEXTURE_POST_SPECULAR_HP 0x8168
8123 #define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
8124 #endif /* GL_HP_texture_lighting */
8125
8126 #ifndef GL_IBM_cull_vertex
8127 #define GL_IBM_cull_vertex 1
8128 #define GL_CULL_VERTEX_IBM 103050
8129 #endif /* GL_IBM_cull_vertex */
8130
8131 #ifndef GL_IBM_multimode_draw_arrays
8132 #define GL_IBM_multimode_draw_arrays 1
8133 typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8134 typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8135 #ifdef GL_GLEXT_PROTOTYPES
8136 GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8137 GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8138 #endif
8139 #endif /* GL_IBM_multimode_draw_arrays */
8140
8141 #ifndef GL_IBM_rasterpos_clip
8142 #define GL_IBM_rasterpos_clip 1
8143 #define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
8144 #endif /* GL_IBM_rasterpos_clip */
8145
8146 #ifndef GL_IBM_static_data
8147 #define GL_IBM_static_data 1
8148 #define GL_ALL_STATIC_DATA_IBM 103060
8149 #define GL_STATIC_VERTEX_ARRAY_IBM 103061
8150 typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
8151 #ifdef GL_GLEXT_PROTOTYPES
8152 GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
8153 #endif
8154 #endif /* GL_IBM_static_data */
8155
8156 #ifndef GL_IBM_texture_mirrored_repeat
8157 #define GL_IBM_texture_mirrored_repeat 1
8158 #define GL_MIRRORED_REPEAT_IBM 0x8370
8159 #endif /* GL_IBM_texture_mirrored_repeat */
8160
8161 #ifndef GL_IBM_vertex_array_lists
8162 #define GL_IBM_vertex_array_lists 1
8163 #define GL_VERTEX_ARRAY_LIST_IBM 103070
8164 #define GL_NORMAL_ARRAY_LIST_IBM 103071
8165 #define GL_COLOR_ARRAY_LIST_IBM 103072
8166 #define GL_INDEX_ARRAY_LIST_IBM 103073
8167 #define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
8168 #define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
8169 #define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
8170 #define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
8171 #define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
8172 #define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
8173 #define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
8174 #define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
8175 #define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
8176 #define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
8177 #define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
8178 #define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
8179 typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8180 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8181 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
8182 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8183 typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8184 typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8185 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8186 typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8187 #ifdef GL_GLEXT_PROTOTYPES
8188 GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8189 GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8190 GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
8191 GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8192 GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8193 GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8194 GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8195 GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8196 #endif
8197 #endif /* GL_IBM_vertex_array_lists */
8198
8199 #ifndef GL_INGR_blend_func_separate
8200 #define GL_INGR_blend_func_separate 1
8201 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8202 #ifdef GL_GLEXT_PROTOTYPES
8203 GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8204 #endif
8205 #endif /* GL_INGR_blend_func_separate */
8206
8207 #ifndef GL_INGR_color_clamp
8208 #define GL_INGR_color_clamp 1
8209 #define GL_RED_MIN_CLAMP_INGR 0x8560
8210 #define GL_GREEN_MIN_CLAMP_INGR 0x8561
8211 #define GL_BLUE_MIN_CLAMP_INGR 0x8562
8212 #define GL_ALPHA_MIN_CLAMP_INGR 0x8563
8213 #define GL_RED_MAX_CLAMP_INGR 0x8564
8214 #define GL_GREEN_MAX_CLAMP_INGR 0x8565
8215 #define GL_BLUE_MAX_CLAMP_INGR 0x8566
8216 #define GL_ALPHA_MAX_CLAMP_INGR 0x8567
8217 #endif /* GL_INGR_color_clamp */
8218
8219 #ifndef GL_INGR_interlace_read
8220 #define GL_INGR_interlace_read 1
8221 #define GL_INTERLACE_READ_INGR 0x8568
8222 #endif /* GL_INGR_interlace_read */
8223
8224 #ifndef GL_INTEL_fragment_shader_ordering
8225 #define GL_INTEL_fragment_shader_ordering 1
8226 #endif /* GL_INTEL_fragment_shader_ordering */
8227
8228 #ifndef GL_INTEL_map_texture
8229 #define GL_INTEL_map_texture 1
8230 #define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
8231 #define GL_LAYOUT_DEFAULT_INTEL 0
8232 #define GL_LAYOUT_LINEAR_INTEL 1
8233 #define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
8234 typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
8235 typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
8236 typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8237 #ifdef GL_GLEXT_PROTOTYPES
8238 GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
8239 GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
8240 GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8241 #endif
8242 #endif /* GL_INTEL_map_texture */
8243
8244 #ifndef GL_INTEL_parallel_arrays
8245 #define GL_INTEL_parallel_arrays 1
8246 #define GL_PARALLEL_ARRAYS_INTEL 0x83F4
8247 #define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
8248 #define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
8249 #define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
8250 #define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
8251 typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8252 typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
8253 typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8254 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8255 #ifdef GL_GLEXT_PROTOTYPES
8256 GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
8257 GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
8258 GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
8259 GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
8260 #endif
8261 #endif /* GL_INTEL_parallel_arrays */
8262
8263 #ifndef GL_INTEL_performance_query
8264 #define GL_INTEL_performance_query 1
8265 #define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
8266 #define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
8267 #define GL_PERFQUERY_WAIT_INTEL 0x83FB
8268 #define GL_PERFQUERY_FLUSH_INTEL 0x83FA
8269 #define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
8270 #define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
8271 #define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
8272 #define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
8273 #define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
8274 #define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
8275 #define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
8276 #define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
8277 #define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
8278 #define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
8279 #define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
8280 #define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
8281 #define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
8282 #define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
8283 #define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
8284 #define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
8285 typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
8286 typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
8287 typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
8288 typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
8289 typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
8290 typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
8291 typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8292 typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8293 typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
8294 typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8295 #ifdef GL_GLEXT_PROTOTYPES
8296 GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
8297 GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
8298 GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
8299 GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
8300 GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
8301 GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
8302 GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8303 GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8304 GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
8305 GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8306 #endif
8307 #endif /* GL_INTEL_performance_query */
8308
8309 #ifndef GL_MESAX_texture_stack
8310 #define GL_MESAX_texture_stack 1
8311 #define GL_TEXTURE_1D_STACK_MESAX 0x8759
8312 #define GL_TEXTURE_2D_STACK_MESAX 0x875A
8313 #define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
8314 #define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
8315 #define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
8316 #define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
8317 #endif /* GL_MESAX_texture_stack */
8318
8319 #ifndef GL_MESA_pack_invert
8320 #define GL_MESA_pack_invert 1
8321 #define GL_PACK_INVERT_MESA 0x8758
8322 #endif /* GL_MESA_pack_invert */
8323
8324 #ifndef GL_MESA_resize_buffers
8325 #define GL_MESA_resize_buffers 1
8326 typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
8327 #ifdef GL_GLEXT_PROTOTYPES
8328 GLAPI void APIENTRY glResizeBuffersMESA (void);
8329 #endif
8330 #endif /* GL_MESA_resize_buffers */
8331
8332 #ifndef GL_MESA_window_pos
8333 #define GL_MESA_window_pos 1
8334 typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
8335 typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
8336 typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
8337 typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
8338 typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
8339 typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
8340 typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
8341 typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
8342 typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
8343 typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
8344 typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
8345 typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
8346 typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
8347 typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
8348 typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
8349 typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
8350 typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8351 typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
8352 typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8353 typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
8354 typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
8355 typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
8356 typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
8357 typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
8358 #ifdef GL_GLEXT_PROTOTYPES
8359 GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
8360 GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
8361 GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
8362 GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
8363 GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
8364 GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
8365 GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
8366 GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
8367 GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
8368 GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
8369 GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
8370 GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
8371 GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
8372 GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
8373 GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
8374 GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
8375 GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8376 GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
8377 GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8378 GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
8379 GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
8380 GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
8381 GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
8382 GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
8383 #endif
8384 #endif /* GL_MESA_window_pos */
8385
8386 #ifndef GL_MESA_ycbcr_texture
8387 #define GL_MESA_ycbcr_texture 1
8388 #define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
8389 #define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
8390 #define GL_YCBCR_MESA 0x8757
8391 #endif /* GL_MESA_ycbcr_texture */
8392
8393 #ifndef GL_NVX_conditional_render
8394 #define GL_NVX_conditional_render 1
8395 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
8396 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
8397 #ifdef GL_GLEXT_PROTOTYPES
8398 GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
8399 GLAPI void APIENTRY glEndConditionalRenderNVX (void);
8400 #endif
8401 #endif /* GL_NVX_conditional_render */
8402
8403 #ifndef GL_NVX_gpu_memory_info
8404 #define GL_NVX_gpu_memory_info 1
8405 #define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
8406 #define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
8407 #define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
8408 #define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
8409 #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
8410 #endif /* GL_NVX_gpu_memory_info */
8411
8412 #ifndef GL_NV_bindless_multi_draw_indirect
8413 #define GL_NV_bindless_multi_draw_indirect 1
8414 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8415 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8416 #ifdef GL_GLEXT_PROTOTYPES
8417 GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8418 GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8419 #endif
8420 #endif /* GL_NV_bindless_multi_draw_indirect */
8421
8422 #ifndef GL_NV_bindless_texture
8423 #define GL_NV_bindless_texture 1
8424 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
8425 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
8426 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8427 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8428 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8429 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
8430 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8431 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
8432 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
8433 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
8434 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8435 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8436 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
8437 #ifdef GL_GLEXT_PROTOTYPES
8438 GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
8439 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
8440 GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
8441 GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
8442 GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8443 GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
8444 GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
8445 GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
8446 GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
8447 GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
8448 GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8449 GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
8450 GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
8451 #endif
8452 #endif /* GL_NV_bindless_texture */
8453
8454 #ifndef GL_NV_blend_equation_advanced
8455 #define GL_NV_blend_equation_advanced 1
8456 #define GL_BLEND_OVERLAP_NV 0x9281
8457 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
8458 #define GL_BLUE_NV 0x1905
8459 #define GL_COLORBURN_NV 0x929A
8460 #define GL_COLORDODGE_NV 0x9299
8461 #define GL_CONJOINT_NV 0x9284
8462 #define GL_CONTRAST_NV 0x92A1
8463 #define GL_DARKEN_NV 0x9297
8464 #define GL_DIFFERENCE_NV 0x929E
8465 #define GL_DISJOINT_NV 0x9283
8466 #define GL_DST_ATOP_NV 0x928F
8467 #define GL_DST_IN_NV 0x928B
8468 #define GL_DST_NV 0x9287
8469 #define GL_DST_OUT_NV 0x928D
8470 #define GL_DST_OVER_NV 0x9289
8471 #define GL_EXCLUSION_NV 0x92A0
8472 #define GL_GREEN_NV 0x1904
8473 #define GL_HARDLIGHT_NV 0x929B
8474 #define GL_HARDMIX_NV 0x92A9
8475 #define GL_HSL_COLOR_NV 0x92AF
8476 #define GL_HSL_HUE_NV 0x92AD
8477 #define GL_HSL_LUMINOSITY_NV 0x92B0
8478 #define GL_HSL_SATURATION_NV 0x92AE
8479 #define GL_INVERT_OVG_NV 0x92B4
8480 #define GL_INVERT_RGB_NV 0x92A3
8481 #define GL_LIGHTEN_NV 0x9298
8482 #define GL_LINEARBURN_NV 0x92A5
8483 #define GL_LINEARDODGE_NV 0x92A4
8484 #define GL_LINEARLIGHT_NV 0x92A7
8485 #define GL_MINUS_CLAMPED_NV 0x92B3
8486 #define GL_MINUS_NV 0x929F
8487 #define GL_MULTIPLY_NV 0x9294
8488 #define GL_OVERLAY_NV 0x9296
8489 #define GL_PINLIGHT_NV 0x92A8
8490 #define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
8491 #define GL_PLUS_CLAMPED_NV 0x92B1
8492 #define GL_PLUS_DARKER_NV 0x9292
8493 #define GL_PLUS_NV 0x9291
8494 #define GL_RED_NV 0x1903
8495 #define GL_SCREEN_NV 0x9295
8496 #define GL_SOFTLIGHT_NV 0x929C
8497 #define GL_SRC_ATOP_NV 0x928E
8498 #define GL_SRC_IN_NV 0x928A
8499 #define GL_SRC_NV 0x9286
8500 #define GL_SRC_OUT_NV 0x928C
8501 #define GL_SRC_OVER_NV 0x9288
8502 #define GL_UNCORRELATED_NV 0x9282
8503 #define GL_VIVIDLIGHT_NV 0x92A6
8504 #define GL_XOR_NV 0x1506
8505 typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
8506 typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
8507 #ifdef GL_GLEXT_PROTOTYPES
8508 GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
8509 GLAPI void APIENTRY glBlendBarrierNV (void);
8510 #endif
8511 #endif /* GL_NV_blend_equation_advanced */
8512
8513 #ifndef GL_NV_blend_equation_advanced_coherent
8514 #define GL_NV_blend_equation_advanced_coherent 1
8515 #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
8516 #endif /* GL_NV_blend_equation_advanced_coherent */
8517
8518 #ifndef GL_NV_blend_square
8519 #define GL_NV_blend_square 1
8520 #endif /* GL_NV_blend_square */
8521
8522 #ifndef GL_NV_compute_program5
8523 #define GL_NV_compute_program5 1
8524 #define GL_COMPUTE_PROGRAM_NV 0x90FB
8525 #define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
8526 #endif /* GL_NV_compute_program5 */
8527
8528 #ifndef GL_NV_conditional_render
8529 #define GL_NV_conditional_render 1
8530 #define GL_QUERY_WAIT_NV 0x8E13
8531 #define GL_QUERY_NO_WAIT_NV 0x8E14
8532 #define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
8533 #define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
8534 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
8535 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
8536 #ifdef GL_GLEXT_PROTOTYPES
8537 GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
8538 GLAPI void APIENTRY glEndConditionalRenderNV (void);
8539 #endif
8540 #endif /* GL_NV_conditional_render */
8541
8542 #ifndef GL_NV_copy_depth_to_color
8543 #define GL_NV_copy_depth_to_color 1
8544 #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
8545 #define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
8546 #endif /* GL_NV_copy_depth_to_color */
8547
8548 #ifndef GL_NV_copy_image
8549 #define GL_NV_copy_image 1
8550 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8551 #ifdef GL_GLEXT_PROTOTYPES
8552 GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8553 #endif
8554 #endif /* GL_NV_copy_image */
8555
8556 #ifndef GL_NV_deep_texture3D
8557 #define GL_NV_deep_texture3D 1
8558 #define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
8559 #define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
8560 #endif /* GL_NV_deep_texture3D */
8561
8562 #ifndef GL_NV_depth_buffer_float
8563 #define GL_NV_depth_buffer_float 1
8564 #define GL_DEPTH_COMPONENT32F_NV 0x8DAB
8565 #define GL_DEPTH32F_STENCIL8_NV 0x8DAC
8566 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
8567 #define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
8568 typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
8569 typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
8570 typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
8571 #ifdef GL_GLEXT_PROTOTYPES
8572 GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
8573 GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
8574 GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
8575 #endif
8576 #endif /* GL_NV_depth_buffer_float */
8577
8578 #ifndef GL_NV_depth_clamp
8579 #define GL_NV_depth_clamp 1
8580 #define GL_DEPTH_CLAMP_NV 0x864F
8581 #endif /* GL_NV_depth_clamp */
8582
8583 #ifndef GL_NV_draw_texture
8584 #define GL_NV_draw_texture 1
8585 typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8586 #ifdef GL_GLEXT_PROTOTYPES
8587 GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8588 #endif
8589 #endif /* GL_NV_draw_texture */
8590
8591 #ifndef GL_NV_evaluators
8592 #define GL_NV_evaluators 1
8593 #define GL_EVAL_2D_NV 0x86C0
8594 #define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
8595 #define GL_MAP_TESSELLATION_NV 0x86C2
8596 #define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
8597 #define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
8598 #define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
8599 #define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
8600 #define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
8601 #define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
8602 #define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
8603 #define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
8604 #define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
8605 #define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
8606 #define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
8607 #define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
8608 #define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
8609 #define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
8610 #define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
8611 #define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
8612 #define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
8613 #define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
8614 #define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
8615 #define GL_MAX_MAP_TESSELLATION_NV 0x86D6
8616 #define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
8617 typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8618 typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
8619 typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
8620 typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8621 typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
8622 typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
8623 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
8624 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8625 typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
8626 #ifdef GL_GLEXT_PROTOTYPES
8627 GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8628 GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
8629 GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
8630 GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8631 GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
8632 GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
8633 GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
8634 GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8635 GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
8636 #endif
8637 #endif /* GL_NV_evaluators */
8638
8639 #ifndef GL_NV_explicit_multisample
8640 #define GL_NV_explicit_multisample 1
8641 #define GL_SAMPLE_POSITION_NV 0x8E50
8642 #define GL_SAMPLE_MASK_NV 0x8E51
8643 #define GL_SAMPLE_MASK_VALUE_NV 0x8E52
8644 #define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
8645 #define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
8646 #define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
8647 #define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
8648 #define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
8649 #define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
8650 #define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
8651 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
8652 typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
8653 typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
8654 #ifdef GL_GLEXT_PROTOTYPES
8655 GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
8656 GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
8657 GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
8658 #endif
8659 #endif /* GL_NV_explicit_multisample */
8660
8661 #ifndef GL_NV_fence
8662 #define GL_NV_fence 1
8663 #define GL_ALL_COMPLETED_NV 0x84F2
8664 #define GL_FENCE_STATUS_NV 0x84F3
8665 #define GL_FENCE_CONDITION_NV 0x84F4
8666 typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
8667 typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
8668 typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
8669 typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
8670 typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
8671 typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
8672 typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
8673 #ifdef GL_GLEXT_PROTOTYPES
8674 GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
8675 GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
8676 GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
8677 GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
8678 GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
8679 GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
8680 GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
8681 #endif
8682 #endif /* GL_NV_fence */
8683
8684 #ifndef GL_NV_float_buffer
8685 #define GL_NV_float_buffer 1
8686 #define GL_FLOAT_R_NV 0x8880
8687 #define GL_FLOAT_RG_NV 0x8881
8688 #define GL_FLOAT_RGB_NV 0x8882
8689 #define GL_FLOAT_RGBA_NV 0x8883
8690 #define GL_FLOAT_R16_NV 0x8884
8691 #define GL_FLOAT_R32_NV 0x8885
8692 #define GL_FLOAT_RG16_NV 0x8886
8693 #define GL_FLOAT_RG32_NV 0x8887
8694 #define GL_FLOAT_RGB16_NV 0x8888
8695 #define GL_FLOAT_RGB32_NV 0x8889
8696 #define GL_FLOAT_RGBA16_NV 0x888A
8697 #define GL_FLOAT_RGBA32_NV 0x888B
8698 #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
8699 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
8700 #define GL_FLOAT_RGBA_MODE_NV 0x888E
8701 #endif /* GL_NV_float_buffer */
8702
8703 #ifndef GL_NV_fog_distance
8704 #define GL_NV_fog_distance 1
8705 #define GL_FOG_DISTANCE_MODE_NV 0x855A
8706 #define GL_EYE_RADIAL_NV 0x855B
8707 #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
8708 #endif /* GL_NV_fog_distance */
8709
8710 #ifndef GL_NV_fragment_program
8711 #define GL_NV_fragment_program 1
8712 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
8713 #define GL_FRAGMENT_PROGRAM_NV 0x8870
8714 #define GL_MAX_TEXTURE_COORDS_NV 0x8871
8715 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
8716 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
8717 #define GL_PROGRAM_ERROR_STRING_NV 0x8874
8718 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8719 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8720 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8721 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8722 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8723 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8724 #ifdef GL_GLEXT_PROTOTYPES
8725 GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8726 GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8727 GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8728 GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8729 GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8730 GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8731 #endif
8732 #endif /* GL_NV_fragment_program */
8733
8734 #ifndef GL_NV_fragment_program2
8735 #define GL_NV_fragment_program2 1
8736 #define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
8737 #define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
8738 #define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
8739 #define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
8740 #define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
8741 #endif /* GL_NV_fragment_program2 */
8742
8743 #ifndef GL_NV_fragment_program4
8744 #define GL_NV_fragment_program4 1
8745 #endif /* GL_NV_fragment_program4 */
8746
8747 #ifndef GL_NV_fragment_program_option
8748 #define GL_NV_fragment_program_option 1
8749 #endif /* GL_NV_fragment_program_option */
8750
8751 #ifndef GL_NV_framebuffer_multisample_coverage
8752 #define GL_NV_framebuffer_multisample_coverage 1
8753 #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
8754 #define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
8755 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
8756 #define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
8757 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8758 #ifdef GL_GLEXT_PROTOTYPES
8759 GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8760 #endif
8761 #endif /* GL_NV_framebuffer_multisample_coverage */
8762
8763 #ifndef GL_NV_geometry_program4
8764 #define GL_NV_geometry_program4 1
8765 #define GL_GEOMETRY_PROGRAM_NV 0x8C26
8766 #define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
8767 #define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
8768 typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
8769 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
8770 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8771 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8772 #ifdef GL_GLEXT_PROTOTYPES
8773 GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
8774 GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
8775 GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8776 GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8777 #endif
8778 #endif /* GL_NV_geometry_program4 */
8779
8780 #ifndef GL_NV_geometry_shader4
8781 #define GL_NV_geometry_shader4 1
8782 #endif /* GL_NV_geometry_shader4 */
8783
8784 #ifndef GL_NV_gpu_program4
8785 #define GL_NV_gpu_program4 1
8786 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
8787 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
8788 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
8789 #define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
8790 #define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
8791 #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
8792 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
8793 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
8794 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8795 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8796 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8797 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8798 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8799 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8800 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8801 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8802 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8803 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8804 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8805 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8806 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8807 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8808 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8809 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8810 #ifdef GL_GLEXT_PROTOTYPES
8811 GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8812 GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8813 GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8814 GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8815 GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8816 GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8817 GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8818 GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8819 GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8820 GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8821 GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8822 GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8823 GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
8824 GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8825 GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
8826 GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8827 #endif
8828 #endif /* GL_NV_gpu_program4 */
8829
8830 #ifndef GL_NV_gpu_program5
8831 #define GL_NV_gpu_program5 1
8832 #define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
8833 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
8834 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
8835 #define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
8836 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
8837 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
8838 #define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
8839 #define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45
8840 typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
8841 typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
8842 #ifdef GL_GLEXT_PROTOTYPES
8843 GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
8844 GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
8845 #endif
8846 #endif /* GL_NV_gpu_program5 */
8847
8848 #ifndef GL_NV_gpu_program5_mem_extended
8849 #define GL_NV_gpu_program5_mem_extended 1
8850 #endif /* GL_NV_gpu_program5_mem_extended */
8851
8852 #ifndef GL_NV_gpu_shader5
8853 #define GL_NV_gpu_shader5 1
8854 #endif /* GL_NV_gpu_shader5 */
8855
8856 #ifndef GL_NV_half_float
8857 #define GL_NV_half_float 1
8858 typedef unsigned short GLhalfNV;
8859 #define GL_HALF_FLOAT_NV 0x140B
8860 typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
8861 typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
8862 typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8863 typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
8864 typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8865 typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
8866 typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8867 typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
8868 typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8869 typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
8870 typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8871 typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
8872 typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
8873 typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
8874 typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
8875 typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
8876 typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8877 typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
8878 typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8879 typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
8880 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
8881 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
8882 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
8883 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
8884 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8885 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
8886 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8887 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
8888 typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
8889 typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
8890 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8891 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
8892 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
8893 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
8894 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
8895 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
8896 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
8897 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
8898 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8899 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
8900 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8901 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
8902 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8903 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8904 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8905 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8906 #ifdef GL_GLEXT_PROTOTYPES
8907 GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
8908 GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
8909 GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8910 GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
8911 GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8912 GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
8913 GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8914 GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
8915 GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8916 GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
8917 GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8918 GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
8919 GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
8920 GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
8921 GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
8922 GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
8923 GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8924 GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
8925 GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8926 GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
8927 GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
8928 GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
8929 GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
8930 GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
8931 GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8932 GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
8933 GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8934 GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
8935 GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
8936 GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
8937 GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8938 GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
8939 GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
8940 GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
8941 GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
8942 GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
8943 GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
8944 GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
8945 GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8946 GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
8947 GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8948 GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
8949 GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8950 GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8951 GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8952 GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8953 #endif
8954 #endif /* GL_NV_half_float */
8955
8956 #ifndef GL_NV_light_max_exponent
8957 #define GL_NV_light_max_exponent 1
8958 #define GL_MAX_SHININESS_NV 0x8504
8959 #define GL_MAX_SPOT_EXPONENT_NV 0x8505
8960 #endif /* GL_NV_light_max_exponent */
8961
8962 #ifndef GL_NV_multisample_coverage
8963 #define GL_NV_multisample_coverage 1
8964 #define GL_COLOR_SAMPLES_NV 0x8E20
8965 #endif /* GL_NV_multisample_coverage */
8966
8967 #ifndef GL_NV_multisample_filter_hint
8968 #define GL_NV_multisample_filter_hint 1
8969 #define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
8970 #endif /* GL_NV_multisample_filter_hint */
8971
8972 #ifndef GL_NV_occlusion_query
8973 #define GL_NV_occlusion_query 1
8974 #define GL_PIXEL_COUNTER_BITS_NV 0x8864
8975 #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
8976 #define GL_PIXEL_COUNT_NV 0x8866
8977 #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
8978 typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
8979 typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
8980 typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
8981 typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
8982 typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
8983 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
8984 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
8985 #ifdef GL_GLEXT_PROTOTYPES
8986 GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
8987 GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
8988 GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
8989 GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
8990 GLAPI void APIENTRY glEndOcclusionQueryNV (void);
8991 GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
8992 GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
8993 #endif
8994 #endif /* GL_NV_occlusion_query */
8995
8996 #ifndef GL_NV_packed_depth_stencil
8997 #define GL_NV_packed_depth_stencil 1
8998 #define GL_DEPTH_STENCIL_NV 0x84F9
8999 #define GL_UNSIGNED_INT_24_8_NV 0x84FA
9000 #endif /* GL_NV_packed_depth_stencil */
9001
9002 #ifndef GL_NV_parameter_buffer_object
9003 #define GL_NV_parameter_buffer_object 1
9004 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
9005 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
9006 #define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
9007 #define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
9008 #define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
9009 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9010 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9011 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9012 #ifdef GL_GLEXT_PROTOTYPES
9013 GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9014 GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9015 GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9016 #endif
9017 #endif /* GL_NV_parameter_buffer_object */
9018
9019 #ifndef GL_NV_parameter_buffer_object2
9020 #define GL_NV_parameter_buffer_object2 1
9021 #endif /* GL_NV_parameter_buffer_object2 */
9022
9023 #ifndef GL_NV_path_rendering
9024 #define GL_NV_path_rendering 1
9025 #define GL_PATH_FORMAT_SVG_NV 0x9070
9026 #define GL_PATH_FORMAT_PS_NV 0x9071
9027 #define GL_STANDARD_FONT_NAME_NV 0x9072
9028 #define GL_SYSTEM_FONT_NAME_NV 0x9073
9029 #define GL_FILE_NAME_NV 0x9074
9030 #define GL_PATH_STROKE_WIDTH_NV 0x9075
9031 #define GL_PATH_END_CAPS_NV 0x9076
9032 #define GL_PATH_INITIAL_END_CAP_NV 0x9077
9033 #define GL_PATH_TERMINAL_END_CAP_NV 0x9078
9034 #define GL_PATH_JOIN_STYLE_NV 0x9079
9035 #define GL_PATH_MITER_LIMIT_NV 0x907A
9036 #define GL_PATH_DASH_CAPS_NV 0x907B
9037 #define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
9038 #define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
9039 #define GL_PATH_DASH_OFFSET_NV 0x907E
9040 #define GL_PATH_CLIENT_LENGTH_NV 0x907F
9041 #define GL_PATH_FILL_MODE_NV 0x9080
9042 #define GL_PATH_FILL_MASK_NV 0x9081
9043 #define GL_PATH_FILL_COVER_MODE_NV 0x9082
9044 #define GL_PATH_STROKE_COVER_MODE_NV 0x9083
9045 #define GL_PATH_STROKE_MASK_NV 0x9084
9046 #define GL_COUNT_UP_NV 0x9088
9047 #define GL_COUNT_DOWN_NV 0x9089
9048 #define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
9049 #define GL_CONVEX_HULL_NV 0x908B
9050 #define GL_BOUNDING_BOX_NV 0x908D
9051 #define GL_TRANSLATE_X_NV 0x908E
9052 #define GL_TRANSLATE_Y_NV 0x908F
9053 #define GL_TRANSLATE_2D_NV 0x9090
9054 #define GL_TRANSLATE_3D_NV 0x9091
9055 #define GL_AFFINE_2D_NV 0x9092
9056 #define GL_AFFINE_3D_NV 0x9094
9057 #define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
9058 #define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
9059 #define GL_UTF8_NV 0x909A
9060 #define GL_UTF16_NV 0x909B
9061 #define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
9062 #define GL_PATH_COMMAND_COUNT_NV 0x909D
9063 #define GL_PATH_COORD_COUNT_NV 0x909E
9064 #define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
9065 #define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
9066 #define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
9067 #define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
9068 #define GL_SQUARE_NV 0x90A3
9069 #define GL_ROUND_NV 0x90A4
9070 #define GL_TRIANGULAR_NV 0x90A5
9071 #define GL_BEVEL_NV 0x90A6
9072 #define GL_MITER_REVERT_NV 0x90A7
9073 #define GL_MITER_TRUNCATE_NV 0x90A8
9074 #define GL_SKIP_MISSING_GLYPH_NV 0x90A9
9075 #define GL_USE_MISSING_GLYPH_NV 0x90AA
9076 #define GL_PATH_ERROR_POSITION_NV 0x90AB
9077 #define GL_PATH_FOG_GEN_MODE_NV 0x90AC
9078 #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
9079 #define GL_ADJACENT_PAIRS_NV 0x90AE
9080 #define GL_FIRST_TO_REST_NV 0x90AF
9081 #define GL_PATH_GEN_MODE_NV 0x90B0
9082 #define GL_PATH_GEN_COEFF_NV 0x90B1
9083 #define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
9084 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3
9085 #define GL_PATH_STENCIL_FUNC_NV 0x90B7
9086 #define GL_PATH_STENCIL_REF_NV 0x90B8
9087 #define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
9088 #define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
9089 #define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
9090 #define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
9091 #define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
9092 #define GL_MOVE_TO_RESETS_NV 0x90B5
9093 #define GL_MOVE_TO_CONTINUES_NV 0x90B6
9094 #define GL_CLOSE_PATH_NV 0x00
9095 #define GL_MOVE_TO_NV 0x02
9096 #define GL_RELATIVE_MOVE_TO_NV 0x03
9097 #define GL_LINE_TO_NV 0x04
9098 #define GL_RELATIVE_LINE_TO_NV 0x05
9099 #define GL_HORIZONTAL_LINE_TO_NV 0x06
9100 #define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
9101 #define GL_VERTICAL_LINE_TO_NV 0x08
9102 #define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
9103 #define GL_QUADRATIC_CURVE_TO_NV 0x0A
9104 #define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
9105 #define GL_CUBIC_CURVE_TO_NV 0x0C
9106 #define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
9107 #define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
9108 #define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
9109 #define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
9110 #define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
9111 #define GL_SMALL_CCW_ARC_TO_NV 0x12
9112 #define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
9113 #define GL_SMALL_CW_ARC_TO_NV 0x14
9114 #define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
9115 #define GL_LARGE_CCW_ARC_TO_NV 0x16
9116 #define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
9117 #define GL_LARGE_CW_ARC_TO_NV 0x18
9118 #define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
9119 #define GL_RESTART_PATH_NV 0xF0
9120 #define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
9121 #define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
9122 #define GL_RECT_NV 0xF6
9123 #define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
9124 #define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
9125 #define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
9126 #define GL_ARC_TO_NV 0xFE
9127 #define GL_RELATIVE_ARC_TO_NV 0xFF
9128 #define GL_BOLD_BIT_NV 0x01
9129 #define GL_ITALIC_BIT_NV 0x02
9130 #define GL_GLYPH_WIDTH_BIT_NV 0x01
9131 #define GL_GLYPH_HEIGHT_BIT_NV 0x02
9132 #define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
9133 #define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
9134 #define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
9135 #define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
9136 #define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
9137 #define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
9138 #define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
9139 #define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
9140 #define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
9141 #define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
9142 #define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
9143 #define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
9144 #define GL_FONT_ASCENDER_BIT_NV 0x00200000
9145 #define GL_FONT_DESCENDER_BIT_NV 0x00400000
9146 #define GL_FONT_HEIGHT_BIT_NV 0x00800000
9147 #define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
9148 #define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
9149 #define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
9150 #define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
9151 #define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
9152 #define GL_PRIMARY_COLOR_NV 0x852C
9153 #define GL_SECONDARY_COLOR_NV 0x852D
9154 typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
9155 typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
9156 typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
9157 typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9158 typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9159 typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9160 typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9161 typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
9162 typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9163 typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9164 typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9165 typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
9166 typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9167 typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9168 typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
9169 typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
9170 typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
9171 typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
9172 typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9173 typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
9174 typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
9175 typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
9176 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
9177 typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9178 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9179 typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
9180 typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9181 typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9182 typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
9183 typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
9184 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
9185 typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9186 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9187 typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
9188 typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
9189 typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
9190 typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
9191 typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
9192 typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9193 typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9194 typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9195 typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
9196 typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
9197 typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
9198 typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
9199 typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9200 typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
9201 typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
9202 typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9203 #ifdef GL_GLEXT_PROTOTYPES
9204 GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
9205 GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
9206 GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
9207 GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9208 GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9209 GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9210 GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9211 GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
9212 GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9213 GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9214 GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9215 GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
9216 GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9217 GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9218 GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
9219 GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
9220 GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
9221 GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
9222 GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9223 GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
9224 GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
9225 GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
9226 GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
9227 GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9228 GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9229 GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
9230 GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9231 GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9232 GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
9233 GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
9234 GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
9235 GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9236 GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9237 GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
9238 GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
9239 GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
9240 GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
9241 GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
9242 GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9243 GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9244 GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9245 GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
9246 GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
9247 GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
9248 GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
9249 GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9250 GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
9251 GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
9252 GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9253 #endif
9254 #endif /* GL_NV_path_rendering */
9255
9256 #ifndef GL_NV_pixel_data_range
9257 #define GL_NV_pixel_data_range 1
9258 #define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
9259 #define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
9260 #define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
9261 #define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
9262 #define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
9263 #define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
9264 typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
9265 typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
9266 #ifdef GL_GLEXT_PROTOTYPES
9267 GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
9268 GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
9269 #endif
9270 #endif /* GL_NV_pixel_data_range */
9271
9272 #ifndef GL_NV_point_sprite
9273 #define GL_NV_point_sprite 1
9274 #define GL_POINT_SPRITE_NV 0x8861
9275 #define GL_COORD_REPLACE_NV 0x8862
9276 #define GL_POINT_SPRITE_R_MODE_NV 0x8863
9277 typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
9278 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9279 #ifdef GL_GLEXT_PROTOTYPES
9280 GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
9281 GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
9282 #endif
9283 #endif /* GL_NV_point_sprite */
9284
9285 #ifndef GL_NV_present_video
9286 #define GL_NV_present_video 1
9287 #define GL_FRAME_NV 0x8E26
9288 #define GL_FIELDS_NV 0x8E27
9289 #define GL_CURRENT_TIME_NV 0x8E28
9290 #define GL_NUM_FILL_STREAMS_NV 0x8E29
9291 #define GL_PRESENT_TIME_NV 0x8E2A
9292 #define GL_PRESENT_DURATION_NV 0x8E2B
9293 typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9294 typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9295 typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
9296 typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
9297 typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
9298 typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9299 #ifdef GL_GLEXT_PROTOTYPES
9300 GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9301 GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9302 GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
9303 GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
9304 GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
9305 GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9306 #endif
9307 #endif /* GL_NV_present_video */
9308
9309 #ifndef GL_NV_primitive_restart
9310 #define GL_NV_primitive_restart 1
9311 #define GL_PRIMITIVE_RESTART_NV 0x8558
9312 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
9313 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
9314 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
9315 #ifdef GL_GLEXT_PROTOTYPES
9316 GLAPI void APIENTRY glPrimitiveRestartNV (void);
9317 GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
9318 #endif
9319 #endif /* GL_NV_primitive_restart */
9320
9321 #ifndef GL_NV_register_combiners
9322 #define GL_NV_register_combiners 1
9323 #define GL_REGISTER_COMBINERS_NV 0x8522
9324 #define GL_VARIABLE_A_NV 0x8523
9325 #define GL_VARIABLE_B_NV 0x8524
9326 #define GL_VARIABLE_C_NV 0x8525
9327 #define GL_VARIABLE_D_NV 0x8526
9328 #define GL_VARIABLE_E_NV 0x8527
9329 #define GL_VARIABLE_F_NV 0x8528
9330 #define GL_VARIABLE_G_NV 0x8529
9331 #define GL_CONSTANT_COLOR0_NV 0x852A
9332 #define GL_CONSTANT_COLOR1_NV 0x852B
9333 #define GL_SPARE0_NV 0x852E
9334 #define GL_SPARE1_NV 0x852F
9335 #define GL_DISCARD_NV 0x8530
9336 #define GL_E_TIMES_F_NV 0x8531
9337 #define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
9338 #define GL_UNSIGNED_IDENTITY_NV 0x8536
9339 #define GL_UNSIGNED_INVERT_NV 0x8537
9340 #define GL_EXPAND_NORMAL_NV 0x8538
9341 #define GL_EXPAND_NEGATE_NV 0x8539
9342 #define GL_HALF_BIAS_NORMAL_NV 0x853A
9343 #define GL_HALF_BIAS_NEGATE_NV 0x853B
9344 #define GL_SIGNED_IDENTITY_NV 0x853C
9345 #define GL_SIGNED_NEGATE_NV 0x853D
9346 #define GL_SCALE_BY_TWO_NV 0x853E
9347 #define GL_SCALE_BY_FOUR_NV 0x853F
9348 #define GL_SCALE_BY_ONE_HALF_NV 0x8540
9349 #define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
9350 #define GL_COMBINER_INPUT_NV 0x8542
9351 #define GL_COMBINER_MAPPING_NV 0x8543
9352 #define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
9353 #define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
9354 #define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
9355 #define GL_COMBINER_MUX_SUM_NV 0x8547
9356 #define GL_COMBINER_SCALE_NV 0x8548
9357 #define GL_COMBINER_BIAS_NV 0x8549
9358 #define GL_COMBINER_AB_OUTPUT_NV 0x854A
9359 #define GL_COMBINER_CD_OUTPUT_NV 0x854B
9360 #define GL_COMBINER_SUM_OUTPUT_NV 0x854C
9361 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D
9362 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E
9363 #define GL_COLOR_SUM_CLAMP_NV 0x854F
9364 #define GL_COMBINER0_NV 0x8550
9365 #define GL_COMBINER1_NV 0x8551
9366 #define GL_COMBINER2_NV 0x8552
9367 #define GL_COMBINER3_NV 0x8553
9368 #define GL_COMBINER4_NV 0x8554
9369 #define GL_COMBINER5_NV 0x8555
9370 #define GL_COMBINER6_NV 0x8556
9371 #define GL_COMBINER7_NV 0x8557
9372 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
9373 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
9374 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9375 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
9376 typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9377 typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9378 typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9379 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9380 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9381 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9382 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9383 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
9384 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
9385 #ifdef GL_GLEXT_PROTOTYPES
9386 GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
9387 GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
9388 GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
9389 GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
9390 GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9391 GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9392 GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9393 GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9394 GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9395 GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9396 GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9397 GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
9398 GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
9399 #endif
9400 #endif /* GL_NV_register_combiners */
9401
9402 #ifndef GL_NV_register_combiners2
9403 #define GL_NV_register_combiners2 1
9404 #define GL_PER_STAGE_CONSTANTS_NV 0x8535
9405 typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
9406 typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
9407 #ifdef GL_GLEXT_PROTOTYPES
9408 GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
9409 GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
9410 #endif
9411 #endif /* GL_NV_register_combiners2 */
9412
9413 #ifndef GL_NV_shader_atomic_counters
9414 #define GL_NV_shader_atomic_counters 1
9415 #endif /* GL_NV_shader_atomic_counters */
9416
9417 #ifndef GL_NV_shader_atomic_float
9418 #define GL_NV_shader_atomic_float 1
9419 #endif /* GL_NV_shader_atomic_float */
9420
9421 #ifndef GL_NV_shader_buffer_load
9422 #define GL_NV_shader_buffer_load 1
9423 #define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
9424 #define GL_GPU_ADDRESS_NV 0x8F34
9425 #define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
9426 typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
9427 typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
9428 typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
9429 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
9430 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
9431 typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
9432 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
9433 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
9434 typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
9435 typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
9436 typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
9437 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
9438 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9439 #ifdef GL_GLEXT_PROTOTYPES
9440 GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
9441 GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
9442 GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
9443 GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
9444 GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
9445 GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
9446 GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
9447 GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
9448 GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
9449 GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
9450 GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
9451 GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
9452 GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9453 #endif
9454 #endif /* GL_NV_shader_buffer_load */
9455
9456 #ifndef GL_NV_shader_buffer_store
9457 #define GL_NV_shader_buffer_store 1
9458 #define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
9459 #endif /* GL_NV_shader_buffer_store */
9460
9461 #ifndef GL_NV_shader_storage_buffer_object
9462 #define GL_NV_shader_storage_buffer_object 1
9463 #endif /* GL_NV_shader_storage_buffer_object */
9464
9465 #ifndef GL_NV_shader_thread_group
9466 #define GL_NV_shader_thread_group 1
9467 #define GL_WARP_SIZE_NV 0x9339
9468 #define GL_WARPS_PER_SM_NV 0x933A
9469 #define GL_SM_COUNT_NV 0x933B
9470 #endif /* GL_NV_shader_thread_group */
9471
9472 #ifndef GL_NV_shader_thread_shuffle
9473 #define GL_NV_shader_thread_shuffle 1
9474 #endif /* GL_NV_shader_thread_shuffle */
9475
9476 #ifndef GL_NV_tessellation_program5
9477 #define GL_NV_tessellation_program5 1
9478 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
9479 #define GL_TESS_CONTROL_PROGRAM_NV 0x891E
9480 #define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
9481 #define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
9482 #define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
9483 #endif /* GL_NV_tessellation_program5 */
9484
9485 #ifndef GL_NV_texgen_emboss
9486 #define GL_NV_texgen_emboss 1
9487 #define GL_EMBOSS_LIGHT_NV 0x855D
9488 #define GL_EMBOSS_CONSTANT_NV 0x855E
9489 #define GL_EMBOSS_MAP_NV 0x855F
9490 #endif /* GL_NV_texgen_emboss */
9491
9492 #ifndef GL_NV_texgen_reflection
9493 #define GL_NV_texgen_reflection 1
9494 #define GL_NORMAL_MAP_NV 0x8511
9495 #define GL_REFLECTION_MAP_NV 0x8512
9496 #endif /* GL_NV_texgen_reflection */
9497
9498 #ifndef GL_NV_texture_barrier
9499 #define GL_NV_texture_barrier 1
9500 typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
9501 #ifdef GL_GLEXT_PROTOTYPES
9502 GLAPI void APIENTRY glTextureBarrierNV (void);
9503 #endif
9504 #endif /* GL_NV_texture_barrier */
9505
9506 #ifndef GL_NV_texture_compression_vtc
9507 #define GL_NV_texture_compression_vtc 1
9508 #endif /* GL_NV_texture_compression_vtc */
9509
9510 #ifndef GL_NV_texture_env_combine4
9511 #define GL_NV_texture_env_combine4 1
9512 #define GL_COMBINE4_NV 0x8503
9513 #define GL_SOURCE3_RGB_NV 0x8583
9514 #define GL_SOURCE3_ALPHA_NV 0x858B
9515 #define GL_OPERAND3_RGB_NV 0x8593
9516 #define GL_OPERAND3_ALPHA_NV 0x859B
9517 #endif /* GL_NV_texture_env_combine4 */
9518
9519 #ifndef GL_NV_texture_expand_normal
9520 #define GL_NV_texture_expand_normal 1
9521 #define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
9522 #endif /* GL_NV_texture_expand_normal */
9523
9524 #ifndef GL_NV_texture_multisample
9525 #define GL_NV_texture_multisample 1
9526 #define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
9527 #define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
9528 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9529 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9530 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9531 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9532 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9533 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9534 #ifdef GL_GLEXT_PROTOTYPES
9535 GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9536 GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9537 GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9538 GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9539 GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9540 GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9541 #endif
9542 #endif /* GL_NV_texture_multisample */
9543
9544 #ifndef GL_NV_texture_rectangle
9545 #define GL_NV_texture_rectangle 1
9546 #define GL_TEXTURE_RECTANGLE_NV 0x84F5
9547 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
9548 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
9549 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
9550 #endif /* GL_NV_texture_rectangle */
9551
9552 #ifndef GL_NV_texture_shader
9553 #define GL_NV_texture_shader 1
9554 #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
9555 #define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
9556 #define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
9557 #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
9558 #define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
9559 #define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
9560 #define GL_DSDT_MAG_INTENSITY_NV 0x86DC
9561 #define GL_SHADER_CONSISTENT_NV 0x86DD
9562 #define GL_TEXTURE_SHADER_NV 0x86DE
9563 #define GL_SHADER_OPERATION_NV 0x86DF
9564 #define GL_CULL_MODES_NV 0x86E0
9565 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
9566 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
9567 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
9568 #define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
9569 #define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
9570 #define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
9571 #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
9572 #define GL_CONST_EYE_NV 0x86E5
9573 #define GL_PASS_THROUGH_NV 0x86E6
9574 #define GL_CULL_FRAGMENT_NV 0x86E7
9575 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8
9576 #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
9577 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
9578 #define GL_DOT_PRODUCT_NV 0x86EC
9579 #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
9580 #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
9581 #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
9582 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
9583 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
9584 #define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
9585 #define GL_HILO_NV 0x86F4
9586 #define GL_DSDT_NV 0x86F5
9587 #define GL_DSDT_MAG_NV 0x86F6
9588 #define GL_DSDT_MAG_VIB_NV 0x86F7
9589 #define GL_HILO16_NV 0x86F8
9590 #define GL_SIGNED_HILO_NV 0x86F9
9591 #define GL_SIGNED_HILO16_NV 0x86FA
9592 #define GL_SIGNED_RGBA_NV 0x86FB
9593 #define GL_SIGNED_RGBA8_NV 0x86FC
9594 #define GL_SIGNED_RGB_NV 0x86FE
9595 #define GL_SIGNED_RGB8_NV 0x86FF
9596 #define GL_SIGNED_LUMINANCE_NV 0x8701
9597 #define GL_SIGNED_LUMINANCE8_NV 0x8702
9598 #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
9599 #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
9600 #define GL_SIGNED_ALPHA_NV 0x8705
9601 #define GL_SIGNED_ALPHA8_NV 0x8706
9602 #define GL_SIGNED_INTENSITY_NV 0x8707
9603 #define GL_SIGNED_INTENSITY8_NV 0x8708
9604 #define GL_DSDT8_NV 0x8709
9605 #define GL_DSDT8_MAG8_NV 0x870A
9606 #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
9607 #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
9608 #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
9609 #define GL_HI_SCALE_NV 0x870E
9610 #define GL_LO_SCALE_NV 0x870F
9611 #define GL_DS_SCALE_NV 0x8710
9612 #define GL_DT_SCALE_NV 0x8711
9613 #define GL_MAGNITUDE_SCALE_NV 0x8712
9614 #define GL_VIBRANCE_SCALE_NV 0x8713
9615 #define GL_HI_BIAS_NV 0x8714
9616 #define GL_LO_BIAS_NV 0x8715
9617 #define GL_DS_BIAS_NV 0x8716
9618 #define GL_DT_BIAS_NV 0x8717
9619 #define GL_MAGNITUDE_BIAS_NV 0x8718
9620 #define GL_VIBRANCE_BIAS_NV 0x8719
9621 #define GL_TEXTURE_BORDER_VALUES_NV 0x871A
9622 #define GL_TEXTURE_HI_SIZE_NV 0x871B
9623 #define GL_TEXTURE_LO_SIZE_NV 0x871C
9624 #define GL_TEXTURE_DS_SIZE_NV 0x871D
9625 #define GL_TEXTURE_DT_SIZE_NV 0x871E
9626 #define GL_TEXTURE_MAG_SIZE_NV 0x871F
9627 #endif /* GL_NV_texture_shader */
9628
9629 #ifndef GL_NV_texture_shader2
9630 #define GL_NV_texture_shader2 1
9631 #define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
9632 #endif /* GL_NV_texture_shader2 */
9633
9634 #ifndef GL_NV_texture_shader3
9635 #define GL_NV_texture_shader3 1
9636 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
9637 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
9638 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
9639 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
9640 #define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
9641 #define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
9642 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
9643 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
9644 #define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
9645 #define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
9646 #define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
9647 #define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
9648 #define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
9649 #define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
9650 #define GL_HILO8_NV 0x885E
9651 #define GL_SIGNED_HILO8_NV 0x885F
9652 #define GL_FORCE_BLUE_TO_ONE_NV 0x8860
9653 #endif /* GL_NV_texture_shader3 */
9654
9655 #ifndef GL_NV_transform_feedback
9656 #define GL_NV_transform_feedback 1
9657 #define GL_BACK_PRIMARY_COLOR_NV 0x8C77
9658 #define GL_BACK_SECONDARY_COLOR_NV 0x8C78
9659 #define GL_TEXTURE_COORD_NV 0x8C79
9660 #define GL_CLIP_DISTANCE_NV 0x8C7A
9661 #define GL_VERTEX_ID_NV 0x8C7B
9662 #define GL_PRIMITIVE_ID_NV 0x8C7C
9663 #define GL_GENERIC_ATTRIB_NV 0x8C7D
9664 #define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
9665 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
9666 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
9667 #define GL_ACTIVE_VARYINGS_NV 0x8C81
9668 #define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
9669 #define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
9670 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
9671 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
9672 #define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
9673 #define GL_PRIMITIVES_GENERATED_NV 0x8C87
9674 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
9675 #define GL_RASTERIZER_DISCARD_NV 0x8C89
9676 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
9677 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
9678 #define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
9679 #define GL_SEPARATE_ATTRIBS_NV 0x8C8D
9680 #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
9681 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
9682 #define GL_LAYER_NV 0x8DAA
9683 #define GL_NEXT_BUFFER_NV -2
9684 #define GL_SKIP_COMPONENTS4_NV -3
9685 #define GL_SKIP_COMPONENTS3_NV -4
9686 #define GL_SKIP_COMPONENTS2_NV -5
9687 #define GL_SKIP_COMPONENTS1_NV -6
9688 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
9689 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
9690 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
9691 typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9692 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9693 typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
9694 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9695 typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
9696 typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
9697 typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9698 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
9699 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9700 #ifdef GL_GLEXT_PROTOTYPES
9701 GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
9702 GLAPI void APIENTRY glEndTransformFeedbackNV (void);
9703 GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);
9704 GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9705 GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9706 GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
9707 GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9708 GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
9709 GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
9710 GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9711 GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
9712 GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9713 #endif
9714 #endif /* GL_NV_transform_feedback */
9715
9716 #ifndef GL_NV_transform_feedback2
9717 #define GL_NV_transform_feedback2 1
9718 #define GL_TRANSFORM_FEEDBACK_NV 0x8E22
9719 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
9720 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
9721 #define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
9722 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
9723 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
9724 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
9725 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
9726 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
9727 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
9728 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
9729 #ifdef GL_GLEXT_PROTOTYPES
9730 GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
9731 GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
9732 GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
9733 GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
9734 GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
9735 GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
9736 GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
9737 #endif
9738 #endif /* GL_NV_transform_feedback2 */
9739
9740 #ifndef GL_NV_vdpau_interop
9741 #define GL_NV_vdpau_interop 1
9742 typedef GLintptr GLvdpauSurfaceNV;
9743 #define GL_SURFACE_STATE_NV 0x86EB
9744 #define GL_SURFACE_REGISTERED_NV 0x86FD
9745 #define GL_SURFACE_MAPPED_NV 0x8700
9746 #define GL_WRITE_DISCARD_NV 0x88BE
9747 typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
9748 typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
9749 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9750 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9751 typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
9752 typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
9753 typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9754 typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
9755 typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9756 typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9757 #ifdef GL_GLEXT_PROTOTYPES
9758 GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
9759 GLAPI void APIENTRY glVDPAUFiniNV (void);
9760 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9761 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9762 GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
9763 GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
9764 GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9765 GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
9766 GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9767 GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9768 #endif
9769 #endif /* GL_NV_vdpau_interop */
9770
9771 #ifndef GL_NV_vertex_array_range
9772 #define GL_NV_vertex_array_range 1
9773 #define GL_VERTEX_ARRAY_RANGE_NV 0x851D
9774 #define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
9775 #define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
9776 #define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
9777 #define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
9778 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
9779 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
9780 #ifdef GL_GLEXT_PROTOTYPES
9781 GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
9782 GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
9783 #endif
9784 #endif /* GL_NV_vertex_array_range */
9785
9786 #ifndef GL_NV_vertex_array_range2
9787 #define GL_NV_vertex_array_range2 1
9788 #define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
9789 #endif /* GL_NV_vertex_array_range2 */
9790
9791 #ifndef GL_NV_vertex_attrib_integer_64bit
9792 #define GL_NV_vertex_attrib_integer_64bit 1
9793 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
9794 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
9795 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9796 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9797 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
9798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
9799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
9800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
9801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
9802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
9803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9806 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9807 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9808 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9809 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
9810 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
9811 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9812 #ifdef GL_GLEXT_PROTOTYPES
9813 GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
9814 GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
9815 GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9816 GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9817 GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
9818 GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
9819 GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
9820 GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
9821 GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
9822 GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
9823 GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9824 GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9825 GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
9826 GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
9827 GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
9828 GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
9829 GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
9830 GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
9831 GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9832 #endif
9833 #endif /* GL_NV_vertex_attrib_integer_64bit */
9834
9835 #ifndef GL_NV_vertex_buffer_unified_memory
9836 #define GL_NV_vertex_buffer_unified_memory 1
9837 #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
9838 #define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
9839 #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
9840 #define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
9841 #define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
9842 #define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
9843 #define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
9844 #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
9845 #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
9846 #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
9847 #define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
9848 #define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
9849 #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
9850 #define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
9851 #define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
9852 #define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
9853 #define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
9854 #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
9855 #define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
9856 #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
9857 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
9858 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
9859 #define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
9860 #define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
9861 #define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
9862 typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9863 typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9864 typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
9865 typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9866 typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
9867 typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9868 typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
9869 typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9870 typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
9871 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9872 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9873 typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
9874 #ifdef GL_GLEXT_PROTOTYPES
9875 GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9876 GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
9877 GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
9878 GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
9879 GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
9880 GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
9881 GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
9882 GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
9883 GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
9884 GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9885 GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9886 GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
9887 #endif
9888 #endif /* GL_NV_vertex_buffer_unified_memory */
9889
9890 #ifndef GL_NV_vertex_program
9891 #define GL_NV_vertex_program 1
9892 #define GL_VERTEX_PROGRAM_NV 0x8620
9893 #define GL_VERTEX_STATE_PROGRAM_NV 0x8621
9894 #define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
9895 #define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
9896 #define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
9897 #define GL_CURRENT_ATTRIB_NV 0x8626
9898 #define GL_PROGRAM_LENGTH_NV 0x8627
9899 #define GL_PROGRAM_STRING_NV 0x8628
9900 #define GL_MODELVIEW_PROJECTION_NV 0x8629
9901 #define GL_IDENTITY_NV 0x862A
9902 #define GL_INVERSE_NV 0x862B
9903 #define GL_TRANSPOSE_NV 0x862C
9904 #define GL_INVERSE_TRANSPOSE_NV 0x862D
9905 #define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
9906 #define GL_MAX_TRACK_MATRICES_NV 0x862F
9907 #define GL_MATRIX0_NV 0x8630
9908 #define GL_MATRIX1_NV 0x8631
9909 #define GL_MATRIX2_NV 0x8632
9910 #define GL_MATRIX3_NV 0x8633
9911 #define GL_MATRIX4_NV 0x8634
9912 #define GL_MATRIX5_NV 0x8635
9913 #define GL_MATRIX6_NV 0x8636
9914 #define GL_MATRIX7_NV 0x8637
9915 #define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
9916 #define GL_CURRENT_MATRIX_NV 0x8641
9917 #define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
9918 #define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
9919 #define GL_PROGRAM_PARAMETER_NV 0x8644
9920 #define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
9921 #define GL_PROGRAM_TARGET_NV 0x8646
9922 #define GL_PROGRAM_RESIDENT_NV 0x8647
9923 #define GL_TRACK_MATRIX_NV 0x8648
9924 #define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
9925 #define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
9926 #define GL_PROGRAM_ERROR_POSITION_NV 0x864B
9927 #define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
9928 #define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
9929 #define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
9930 #define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
9931 #define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
9932 #define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
9933 #define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
9934 #define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
9935 #define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
9936 #define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
9937 #define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
9938 #define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
9939 #define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
9940 #define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
9941 #define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
9942 #define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
9943 #define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
9944 #define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
9945 #define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
9946 #define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
9947 #define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
9948 #define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
9949 #define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
9950 #define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
9951 #define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
9952 #define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
9953 #define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
9954 #define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
9955 #define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
9956 #define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
9957 #define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
9958 #define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
9959 #define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
9960 #define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
9961 #define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
9962 #define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
9963 #define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
9964 #define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
9965 #define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
9966 #define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
9967 #define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
9968 #define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
9969 #define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
9970 #define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
9971 #define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
9972 #define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
9973 #define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
9974 #define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
9975 typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
9976 typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
9977 typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9978 typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
9979 typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
9980 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
9981 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
9982 typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
9983 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
9984 typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
9985 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
9986 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
9987 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
9988 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
9989 typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
9990 typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
9991 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9992 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
9993 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
9994 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
9995 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
9996 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
9997 typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9998 typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
9999 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10000 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
10001 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
10002 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
10003 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
10004 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
10005 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
10006 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
10007 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
10008 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
10009 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
10010 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
10011 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
10012 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10013 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
10014 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10015 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
10016 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
10017 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
10018 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10019 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
10020 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10021 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
10022 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10023 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
10024 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10025 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
10026 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10027 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10028 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10029 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10030 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10031 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10032 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10033 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10034 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10035 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10036 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10037 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10038 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
10039 #ifdef GL_GLEXT_PROTOTYPES
10040 GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
10041 GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
10042 GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
10043 GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
10044 GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
10045 GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
10046 GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
10047 GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
10048 GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
10049 GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
10050 GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
10051 GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
10052 GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
10053 GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
10054 GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
10055 GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
10056 GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10057 GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
10058 GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10059 GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
10060 GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
10061 GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
10062 GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
10063 GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
10064 GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10065 GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
10066 GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
10067 GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
10068 GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
10069 GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
10070 GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
10071 GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
10072 GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
10073 GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
10074 GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
10075 GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
10076 GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
10077 GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10078 GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
10079 GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10080 GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
10081 GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
10082 GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
10083 GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10084 GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
10085 GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10086 GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
10087 GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10088 GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
10089 GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10090 GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
10091 GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
10092 GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
10093 GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
10094 GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
10095 GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
10096 GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
10097 GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
10098 GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
10099 GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
10100 GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
10101 GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
10102 GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
10103 GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
10104 #endif
10105 #endif /* GL_NV_vertex_program */
10106
10107 #ifndef GL_NV_vertex_program1_1
10108 #define GL_NV_vertex_program1_1 1
10109 #endif /* GL_NV_vertex_program1_1 */
10110
10111 #ifndef GL_NV_vertex_program2
10112 #define GL_NV_vertex_program2 1
10113 #endif /* GL_NV_vertex_program2 */
10114
10115 #ifndef GL_NV_vertex_program2_option
10116 #define GL_NV_vertex_program2_option 1
10117 #endif /* GL_NV_vertex_program2_option */
10118
10119 #ifndef GL_NV_vertex_program3
10120 #define GL_NV_vertex_program3 1
10121 #endif /* GL_NV_vertex_program3 */
10122
10123 #ifndef GL_NV_vertex_program4
10124 #define GL_NV_vertex_program4 1
10125 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
10126 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
10127 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
10128 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
10129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
10130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
10131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
10132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
10133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
10135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
10136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
10137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
10138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
10139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
10140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
10141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
10142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
10143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
10144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
10145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
10146 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10147 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
10148 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
10149 #ifdef GL_GLEXT_PROTOTYPES
10150 GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
10151 GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
10152 GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
10153 GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
10154 GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
10155 GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
10156 GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
10157 GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10158 GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
10159 GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
10160 GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
10161 GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
10162 GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
10163 GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
10164 GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
10165 GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
10166 GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
10167 GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
10168 GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
10169 GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
10170 GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10171 GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
10172 GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
10173 #endif
10174 #endif /* GL_NV_vertex_program4 */
10175
10176 #ifndef GL_NV_video_capture
10177 #define GL_NV_video_capture 1
10178 #define GL_VIDEO_BUFFER_NV 0x9020
10179 #define GL_VIDEO_BUFFER_BINDING_NV 0x9021
10180 #define GL_FIELD_UPPER_NV 0x9022
10181 #define GL_FIELD_LOWER_NV 0x9023
10182 #define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
10183 #define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
10184 #define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
10185 #define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
10186 #define GL_VIDEO_BUFFER_PITCH_NV 0x9028
10187 #define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
10188 #define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
10189 #define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
10190 #define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
10191 #define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
10192 #define GL_PARTIAL_SUCCESS_NV 0x902E
10193 #define GL_SUCCESS_NV 0x902F
10194 #define GL_FAILURE_NV 0x9030
10195 #define GL_YCBYCR8_422_NV 0x9031
10196 #define GL_YCBAYCR8A_4224_NV 0x9032
10197 #define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
10198 #define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
10199 #define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
10200 #define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
10201 #define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
10202 #define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
10203 #define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
10204 #define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
10205 #define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
10206 #define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
10207 typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10208 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10209 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10210 typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10211 typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
10212 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10213 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10214 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10215 typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10216 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10217 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10218 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10219 #ifdef GL_GLEXT_PROTOTYPES
10220 GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
10221 GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10222 GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10223 GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
10224 GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
10225 GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10226 GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10227 GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10228 GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10229 GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10230 GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10231 GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10232 #endif
10233 #endif /* GL_NV_video_capture */
10234
10235 #ifndef GL_OML_interlace
10236 #define GL_OML_interlace 1
10237 #define GL_INTERLACE_OML 0x8980
10238 #define GL_INTERLACE_READ_OML 0x8981
10239 #endif /* GL_OML_interlace */
10240
10241 #ifndef GL_OML_resample
10242 #define GL_OML_resample 1
10243 #define GL_PACK_RESAMPLE_OML 0x8984
10244 #define GL_UNPACK_RESAMPLE_OML 0x8985
10245 #define GL_RESAMPLE_REPLICATE_OML 0x8986
10246 #define GL_RESAMPLE_ZERO_FILL_OML 0x8987
10247 #define GL_RESAMPLE_AVERAGE_OML 0x8988
10248 #define GL_RESAMPLE_DECIMATE_OML 0x8989
10249 #endif /* GL_OML_resample */
10250
10251 #ifndef GL_OML_subsample
10252 #define GL_OML_subsample 1
10253 #define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
10254 #define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
10255 #endif /* GL_OML_subsample */
10256
10257 #ifndef GL_PGI_misc_hints
10258 #define GL_PGI_misc_hints 1
10259 #define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
10260 #define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
10261 #define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
10262 #define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
10263 #define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
10264 #define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
10265 #define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
10266 #define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
10267 #define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
10268 #define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
10269 #define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
10270 #define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
10271 #define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
10272 #define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
10273 #define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
10274 #define GL_FULL_STIPPLE_HINT_PGI 0x1A219
10275 #define GL_CLIP_NEAR_HINT_PGI 0x1A220
10276 #define GL_CLIP_FAR_HINT_PGI 0x1A221
10277 #define GL_WIDE_LINE_HINT_PGI 0x1A222
10278 #define GL_BACK_NORMALS_HINT_PGI 0x1A223
10279 typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
10280 #ifdef GL_GLEXT_PROTOTYPES
10281 GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
10282 #endif
10283 #endif /* GL_PGI_misc_hints */
10284
10285 #ifndef GL_PGI_vertex_hints
10286 #define GL_PGI_vertex_hints 1
10287 #define GL_VERTEX_DATA_HINT_PGI 0x1A22A
10288 #define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
10289 #define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
10290 #define GL_MAX_VERTEX_HINT_PGI 0x1A22D
10291 #define GL_COLOR3_BIT_PGI 0x00010000
10292 #define GL_COLOR4_BIT_PGI 0x00020000
10293 #define GL_EDGEFLAG_BIT_PGI 0x00040000
10294 #define GL_INDEX_BIT_PGI 0x00080000
10295 #define GL_MAT_AMBIENT_BIT_PGI 0x00100000
10296 #define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
10297 #define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
10298 #define GL_MAT_EMISSION_BIT_PGI 0x00800000
10299 #define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
10300 #define GL_MAT_SHININESS_BIT_PGI 0x02000000
10301 #define GL_MAT_SPECULAR_BIT_PGI 0x04000000
10302 #define GL_NORMAL_BIT_PGI 0x08000000
10303 #define GL_TEXCOORD1_BIT_PGI 0x10000000
10304 #define GL_TEXCOORD2_BIT_PGI 0x20000000
10305 #define GL_TEXCOORD3_BIT_PGI 0x40000000
10306 #define GL_TEXCOORD4_BIT_PGI 0x80000000
10307 #define GL_VERTEX23_BIT_PGI 0x00000004
10308 #define GL_VERTEX4_BIT_PGI 0x00000008
10309 #endif /* GL_PGI_vertex_hints */
10310
10311 #ifndef GL_REND_screen_coordinates
10312 #define GL_REND_screen_coordinates 1
10313 #define GL_SCREEN_COORDINATES_REND 0x8490
10314 #define GL_INVERTED_SCREEN_W_REND 0x8491
10315 #endif /* GL_REND_screen_coordinates */
10316
10317 #ifndef GL_S3_s3tc
10318 #define GL_S3_s3tc 1
10319 #define GL_RGB_S3TC 0x83A0
10320 #define GL_RGB4_S3TC 0x83A1
10321 #define GL_RGBA_S3TC 0x83A2
10322 #define GL_RGBA4_S3TC 0x83A3
10323 #define GL_RGBA_DXT5_S3TC 0x83A4
10324 #define GL_RGBA4_DXT5_S3TC 0x83A5
10325 #endif /* GL_S3_s3tc */
10326
10327 #ifndef GL_SGIS_detail_texture
10328 #define GL_SGIS_detail_texture 1
10329 #define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
10330 #define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
10331 #define GL_LINEAR_DETAIL_SGIS 0x8097
10332 #define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
10333 #define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
10334 #define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
10335 #define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
10336 #define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
10337 typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10338 typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10339 #ifdef GL_GLEXT_PROTOTYPES
10340 GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10341 GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
10342 #endif
10343 #endif /* GL_SGIS_detail_texture */
10344
10345 #ifndef GL_SGIS_fog_function
10346 #define GL_SGIS_fog_function 1
10347 #define GL_FOG_FUNC_SGIS 0x812A
10348 #define GL_FOG_FUNC_POINTS_SGIS 0x812B
10349 #define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
10350 typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
10351 typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
10352 #ifdef GL_GLEXT_PROTOTYPES
10353 GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
10354 GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
10355 #endif
10356 #endif /* GL_SGIS_fog_function */
10357
10358 #ifndef GL_SGIS_generate_mipmap
10359 #define GL_SGIS_generate_mipmap 1
10360 #define GL_GENERATE_MIPMAP_SGIS 0x8191
10361 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
10362 #endif /* GL_SGIS_generate_mipmap */
10363
10364 #ifndef GL_SGIS_multisample
10365 #define GL_SGIS_multisample 1
10366 #define GL_MULTISAMPLE_SGIS 0x809D
10367 #define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
10368 #define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
10369 #define GL_SAMPLE_MASK_SGIS 0x80A0
10370 #define GL_1PASS_SGIS 0x80A1
10371 #define GL_2PASS_0_SGIS 0x80A2
10372 #define GL_2PASS_1_SGIS 0x80A3
10373 #define GL_4PASS_0_SGIS 0x80A4
10374 #define GL_4PASS_1_SGIS 0x80A5
10375 #define GL_4PASS_2_SGIS 0x80A6
10376 #define GL_4PASS_3_SGIS 0x80A7
10377 #define GL_SAMPLE_BUFFERS_SGIS 0x80A8
10378 #define GL_SAMPLES_SGIS 0x80A9
10379 #define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
10380 #define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
10381 #define GL_SAMPLE_PATTERN_SGIS 0x80AC
10382 typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
10383 typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
10384 #ifdef GL_GLEXT_PROTOTYPES
10385 GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
10386 GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
10387 #endif
10388 #endif /* GL_SGIS_multisample */
10389
10390 #ifndef GL_SGIS_pixel_texture
10391 #define GL_SGIS_pixel_texture 1
10392 #define GL_PIXEL_TEXTURE_SGIS 0x8353
10393 #define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
10394 #define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
10395 #define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
10396 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
10397 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
10398 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10399 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10400 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
10401 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
10402 #ifdef GL_GLEXT_PROTOTYPES
10403 GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
10404 GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
10405 GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
10406 GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
10407 GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
10408 GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
10409 #endif
10410 #endif /* GL_SGIS_pixel_texture */
10411
10412 #ifndef GL_SGIS_point_line_texgen
10413 #define GL_SGIS_point_line_texgen 1
10414 #define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
10415 #define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
10416 #define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
10417 #define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
10418 #define GL_EYE_POINT_SGIS 0x81F4
10419 #define GL_OBJECT_POINT_SGIS 0x81F5
10420 #define GL_EYE_LINE_SGIS 0x81F6
10421 #define GL_OBJECT_LINE_SGIS 0x81F7
10422 #endif /* GL_SGIS_point_line_texgen */
10423
10424 #ifndef GL_SGIS_point_parameters
10425 #define GL_SGIS_point_parameters 1
10426 #define GL_POINT_SIZE_MIN_SGIS 0x8126
10427 #define GL_POINT_SIZE_MAX_SGIS 0x8127
10428 #define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
10429 #define GL_DISTANCE_ATTENUATION_SGIS 0x8129
10430 typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10431 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10432 #ifdef GL_GLEXT_PROTOTYPES
10433 GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
10434 GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
10435 #endif
10436 #endif /* GL_SGIS_point_parameters */
10437
10438 #ifndef GL_SGIS_sharpen_texture
10439 #define GL_SGIS_sharpen_texture 1
10440 #define GL_LINEAR_SHARPEN_SGIS 0x80AD
10441 #define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
10442 #define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
10443 #define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
10444 typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10445 typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10446 #ifdef GL_GLEXT_PROTOTYPES
10447 GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10448 GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
10449 #endif
10450 #endif /* GL_SGIS_sharpen_texture */
10451
10452 #ifndef GL_SGIS_texture4D
10453 #define GL_SGIS_texture4D 1
10454 #define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
10455 #define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
10456 #define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
10457 #define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
10458 #define GL_TEXTURE_4D_SGIS 0x8134
10459 #define GL_PROXY_TEXTURE_4D_SGIS 0x8135
10460 #define GL_TEXTURE_4DSIZE_SGIS 0x8136
10461 #define GL_TEXTURE_WRAP_Q_SGIS 0x8137
10462 #define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
10463 #define GL_TEXTURE_4D_BINDING_SGIS 0x814F
10464 typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10465 typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10466 #ifdef GL_GLEXT_PROTOTYPES
10467 GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10468 GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10469 #endif
10470 #endif /* GL_SGIS_texture4D */
10471
10472 #ifndef GL_SGIS_texture_border_clamp
10473 #define GL_SGIS_texture_border_clamp 1
10474 #define GL_CLAMP_TO_BORDER_SGIS 0x812D
10475 #endif /* GL_SGIS_texture_border_clamp */
10476
10477 #ifndef GL_SGIS_texture_color_mask
10478 #define GL_SGIS_texture_color_mask 1
10479 #define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
10480 typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10481 #ifdef GL_GLEXT_PROTOTYPES
10482 GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10483 #endif
10484 #endif /* GL_SGIS_texture_color_mask */
10485
10486 #ifndef GL_SGIS_texture_edge_clamp
10487 #define GL_SGIS_texture_edge_clamp 1
10488 #define GL_CLAMP_TO_EDGE_SGIS 0x812F
10489 #endif /* GL_SGIS_texture_edge_clamp */
10490
10491 #ifndef GL_SGIS_texture_filter4
10492 #define GL_SGIS_texture_filter4 1
10493 #define GL_FILTER4_SGIS 0x8146
10494 #define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
10495 typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
10496 typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10497 #ifdef GL_GLEXT_PROTOTYPES
10498 GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
10499 GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10500 #endif
10501 #endif /* GL_SGIS_texture_filter4 */
10502
10503 #ifndef GL_SGIS_texture_lod
10504 #define GL_SGIS_texture_lod 1
10505 #define GL_TEXTURE_MIN_LOD_SGIS 0x813A
10506 #define GL_TEXTURE_MAX_LOD_SGIS 0x813B
10507 #define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
10508 #define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
10509 #endif /* GL_SGIS_texture_lod */
10510
10511 #ifndef GL_SGIS_texture_select
10512 #define GL_SGIS_texture_select 1
10513 #define GL_DUAL_ALPHA4_SGIS 0x8110
10514 #define GL_DUAL_ALPHA8_SGIS 0x8111
10515 #define GL_DUAL_ALPHA12_SGIS 0x8112
10516 #define GL_DUAL_ALPHA16_SGIS 0x8113
10517 #define GL_DUAL_LUMINANCE4_SGIS 0x8114
10518 #define GL_DUAL_LUMINANCE8_SGIS 0x8115
10519 #define GL_DUAL_LUMINANCE12_SGIS 0x8116
10520 #define GL_DUAL_LUMINANCE16_SGIS 0x8117
10521 #define GL_DUAL_INTENSITY4_SGIS 0x8118
10522 #define GL_DUAL_INTENSITY8_SGIS 0x8119
10523 #define GL_DUAL_INTENSITY12_SGIS 0x811A
10524 #define GL_DUAL_INTENSITY16_SGIS 0x811B
10525 #define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
10526 #define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
10527 #define GL_QUAD_ALPHA4_SGIS 0x811E
10528 #define GL_QUAD_ALPHA8_SGIS 0x811F
10529 #define GL_QUAD_LUMINANCE4_SGIS 0x8120
10530 #define GL_QUAD_LUMINANCE8_SGIS 0x8121
10531 #define GL_QUAD_INTENSITY4_SGIS 0x8122
10532 #define GL_QUAD_INTENSITY8_SGIS 0x8123
10533 #define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
10534 #define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
10535 #endif /* GL_SGIS_texture_select */
10536
10537 #ifndef GL_SGIX_async
10538 #define GL_SGIX_async 1
10539 #define GL_ASYNC_MARKER_SGIX 0x8329
10540 typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
10541 typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
10542 typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
10543 typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
10544 typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
10545 typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
10546 #ifdef GL_GLEXT_PROTOTYPES
10547 GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
10548 GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
10549 GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
10550 GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
10551 GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
10552 GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
10553 #endif
10554 #endif /* GL_SGIX_async */
10555
10556 #ifndef GL_SGIX_async_histogram
10557 #define GL_SGIX_async_histogram 1
10558 #define GL_ASYNC_HISTOGRAM_SGIX 0x832C
10559 #define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
10560 #endif /* GL_SGIX_async_histogram */
10561
10562 #ifndef GL_SGIX_async_pixel
10563 #define GL_SGIX_async_pixel 1
10564 #define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
10565 #define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
10566 #define GL_ASYNC_READ_PIXELS_SGIX 0x835E
10567 #define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
10568 #define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
10569 #define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
10570 #endif /* GL_SGIX_async_pixel */
10571
10572 #ifndef GL_SGIX_blend_alpha_minmax
10573 #define GL_SGIX_blend_alpha_minmax 1
10574 #define GL_ALPHA_MIN_SGIX 0x8320
10575 #define GL_ALPHA_MAX_SGIX 0x8321
10576 #endif /* GL_SGIX_blend_alpha_minmax */
10577
10578 #ifndef GL_SGIX_calligraphic_fragment
10579 #define GL_SGIX_calligraphic_fragment 1
10580 #define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
10581 #endif /* GL_SGIX_calligraphic_fragment */
10582
10583 #ifndef GL_SGIX_clipmap
10584 #define GL_SGIX_clipmap 1
10585 #define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
10586 #define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
10587 #define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
10588 #define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
10589 #define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
10590 #define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
10591 #define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
10592 #define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
10593 #define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
10594 #define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
10595 #define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
10596 #define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
10597 #endif /* GL_SGIX_clipmap */
10598
10599 #ifndef GL_SGIX_convolution_accuracy
10600 #define GL_SGIX_convolution_accuracy 1
10601 #define GL_CONVOLUTION_HINT_SGIX 0x8316
10602 #endif /* GL_SGIX_convolution_accuracy */
10603
10604 #ifndef GL_SGIX_depth_pass_instrument
10605 #define GL_SGIX_depth_pass_instrument 1
10606 #endif /* GL_SGIX_depth_pass_instrument */
10607
10608 #ifndef GL_SGIX_depth_texture
10609 #define GL_SGIX_depth_texture 1
10610 #define GL_DEPTH_COMPONENT16_SGIX 0x81A5
10611 #define GL_DEPTH_COMPONENT24_SGIX 0x81A6
10612 #define GL_DEPTH_COMPONENT32_SGIX 0x81A7
10613 #endif /* GL_SGIX_depth_texture */
10614
10615 #ifndef GL_SGIX_flush_raster
10616 #define GL_SGIX_flush_raster 1
10617 typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
10618 #ifdef GL_GLEXT_PROTOTYPES
10619 GLAPI void APIENTRY glFlushRasterSGIX (void);
10620 #endif
10621 #endif /* GL_SGIX_flush_raster */
10622
10623 #ifndef GL_SGIX_fog_offset
10624 #define GL_SGIX_fog_offset 1
10625 #define GL_FOG_OFFSET_SGIX 0x8198
10626 #define GL_FOG_OFFSET_VALUE_SGIX 0x8199
10627 #endif /* GL_SGIX_fog_offset */
10628
10629 #ifndef GL_SGIX_fragment_lighting
10630 #define GL_SGIX_fragment_lighting 1
10631 #define GL_FRAGMENT_LIGHTING_SGIX 0x8400
10632 #define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
10633 #define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
10634 #define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
10635 #define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
10636 #define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
10637 #define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
10638 #define GL_LIGHT_ENV_MODE_SGIX 0x8407
10639 #define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
10640 #define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
10641 #define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
10642 #define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
10643 #define GL_FRAGMENT_LIGHT0_SGIX 0x840C
10644 #define GL_FRAGMENT_LIGHT1_SGIX 0x840D
10645 #define GL_FRAGMENT_LIGHT2_SGIX 0x840E
10646 #define GL_FRAGMENT_LIGHT3_SGIX 0x840F
10647 #define GL_FRAGMENT_LIGHT4_SGIX 0x8410
10648 #define GL_FRAGMENT_LIGHT5_SGIX 0x8411
10649 #define GL_FRAGMENT_LIGHT6_SGIX 0x8412
10650 #define GL_FRAGMENT_LIGHT7_SGIX 0x8413
10651 typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
10652 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
10653 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
10654 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
10655 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
10656 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
10657 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
10658 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
10659 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
10660 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
10661 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
10662 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
10663 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
10664 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
10665 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
10666 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
10667 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
10668 typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
10669 #ifdef GL_GLEXT_PROTOTYPES
10670 GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
10671 GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
10672 GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
10673 GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
10674 GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
10675 GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
10676 GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
10677 GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
10678 GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
10679 GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
10680 GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
10681 GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
10682 GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
10683 GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
10684 GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
10685 GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
10686 GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
10687 GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
10688 #endif
10689 #endif /* GL_SGIX_fragment_lighting */
10690
10691 #ifndef GL_SGIX_framezoom
10692 #define GL_SGIX_framezoom 1
10693 #define GL_FRAMEZOOM_SGIX 0x818B
10694 #define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
10695 #define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
10696 typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
10697 #ifdef GL_GLEXT_PROTOTYPES
10698 GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
10699 #endif
10700 #endif /* GL_SGIX_framezoom */
10701
10702 #ifndef GL_SGIX_igloo_interface
10703 #define GL_SGIX_igloo_interface 1
10704 typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
10705 #ifdef GL_GLEXT_PROTOTYPES
10706 GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
10707 #endif
10708 #endif /* GL_SGIX_igloo_interface */
10709
10710 #ifndef GL_SGIX_instruments
10711 #define GL_SGIX_instruments 1
10712 #define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
10713 #define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
10714 typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
10715 typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
10716 typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
10717 typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
10718 typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
10719 typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
10720 #ifdef GL_GLEXT_PROTOTYPES
10721 GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
10722 GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
10723 GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
10724 GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
10725 GLAPI void APIENTRY glStartInstrumentsSGIX (void);
10726 GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
10727 #endif
10728 #endif /* GL_SGIX_instruments */
10729
10730 #ifndef GL_SGIX_interlace
10731 #define GL_SGIX_interlace 1
10732 #define GL_INTERLACE_SGIX 0x8094
10733 #endif /* GL_SGIX_interlace */
10734
10735 #ifndef GL_SGIX_ir_instrument1
10736 #define GL_SGIX_ir_instrument1 1
10737 #define GL_IR_INSTRUMENT1_SGIX 0x817F
10738 #endif /* GL_SGIX_ir_instrument1 */
10739
10740 #ifndef GL_SGIX_list_priority
10741 #define GL_SGIX_list_priority 1
10742 #define GL_LIST_PRIORITY_SGIX 0x8182
10743 typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
10744 typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
10745 typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
10746 typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
10747 typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
10748 typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
10749 #ifdef GL_GLEXT_PROTOTYPES
10750 GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
10751 GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
10752 GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
10753 GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
10754 GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
10755 GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
10756 #endif
10757 #endif /* GL_SGIX_list_priority */
10758
10759 #ifndef GL_SGIX_pixel_texture
10760 #define GL_SGIX_pixel_texture 1
10761 #define GL_PIXEL_TEX_GEN_SGIX 0x8139
10762 #define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
10763 typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
10764 #ifdef GL_GLEXT_PROTOTYPES
10765 GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
10766 #endif
10767 #endif /* GL_SGIX_pixel_texture */
10768
10769 #ifndef GL_SGIX_pixel_tiles
10770 #define GL_SGIX_pixel_tiles 1
10771 #define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
10772 #define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
10773 #define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
10774 #define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
10775 #define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
10776 #define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
10777 #define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
10778 #define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
10779 #endif /* GL_SGIX_pixel_tiles */
10780
10781 #ifndef GL_SGIX_polynomial_ffd
10782 #define GL_SGIX_polynomial_ffd 1
10783 #define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
10784 #define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
10785 #define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
10786 #define GL_TEXTURE_DEFORMATION_SGIX 0x8195
10787 #define GL_DEFORMATIONS_MASK_SGIX 0x8196
10788 #define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
10789 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10790 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10791 typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
10792 typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
10793 #ifdef GL_GLEXT_PROTOTYPES
10794 GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10795 GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10796 GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
10797 GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
10798 #endif
10799 #endif /* GL_SGIX_polynomial_ffd */
10800
10801 #ifndef GL_SGIX_reference_plane
10802 #define GL_SGIX_reference_plane 1
10803 #define GL_REFERENCE_PLANE_SGIX 0x817D
10804 #define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
10805 typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
10806 #ifdef GL_GLEXT_PROTOTYPES
10807 GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
10808 #endif
10809 #endif /* GL_SGIX_reference_plane */
10810
10811 #ifndef GL_SGIX_resample
10812 #define GL_SGIX_resample 1
10813 #define GL_PACK_RESAMPLE_SGIX 0x842C
10814 #define GL_UNPACK_RESAMPLE_SGIX 0x842D
10815 #define GL_RESAMPLE_REPLICATE_SGIX 0x842E
10816 #define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
10817 #define GL_RESAMPLE_DECIMATE_SGIX 0x8430
10818 #endif /* GL_SGIX_resample */
10819
10820 #ifndef GL_SGIX_scalebias_hint
10821 #define GL_SGIX_scalebias_hint 1
10822 #define GL_SCALEBIAS_HINT_SGIX 0x8322
10823 #endif /* GL_SGIX_scalebias_hint */
10824
10825 #ifndef GL_SGIX_shadow
10826 #define GL_SGIX_shadow 1
10827 #define GL_TEXTURE_COMPARE_SGIX 0x819A
10828 #define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
10829 #define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
10830 #define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
10831 #endif /* GL_SGIX_shadow */
10832
10833 #ifndef GL_SGIX_shadow_ambient
10834 #define GL_SGIX_shadow_ambient 1
10835 #define GL_SHADOW_AMBIENT_SGIX 0x80BF
10836 #endif /* GL_SGIX_shadow_ambient */
10837
10838 #ifndef GL_SGIX_sprite
10839 #define GL_SGIX_sprite 1
10840 #define GL_SPRITE_SGIX 0x8148
10841 #define GL_SPRITE_MODE_SGIX 0x8149
10842 #define GL_SPRITE_AXIS_SGIX 0x814A
10843 #define GL_SPRITE_TRANSLATION_SGIX 0x814B
10844 #define GL_SPRITE_AXIAL_SGIX 0x814C
10845 #define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
10846 #define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
10847 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
10848 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
10849 typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
10850 typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
10851 #ifdef GL_GLEXT_PROTOTYPES
10852 GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
10853 GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
10854 GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
10855 GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
10856 #endif
10857 #endif /* GL_SGIX_sprite */
10858
10859 #ifndef GL_SGIX_subsample
10860 #define GL_SGIX_subsample 1
10861 #define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
10862 #define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
10863 #define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
10864 #define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
10865 #define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
10866 #endif /* GL_SGIX_subsample */
10867
10868 #ifndef GL_SGIX_tag_sample_buffer
10869 #define GL_SGIX_tag_sample_buffer 1
10870 typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
10871 #ifdef GL_GLEXT_PROTOTYPES
10872 GLAPI void APIENTRY glTagSampleBufferSGIX (void);
10873 #endif
10874 #endif /* GL_SGIX_tag_sample_buffer */
10875
10876 #ifndef GL_SGIX_texture_add_env
10877 #define GL_SGIX_texture_add_env 1
10878 #define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
10879 #endif /* GL_SGIX_texture_add_env */
10880
10881 #ifndef GL_SGIX_texture_coordinate_clamp
10882 #define GL_SGIX_texture_coordinate_clamp 1
10883 #define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
10884 #define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
10885 #define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
10886 #endif /* GL_SGIX_texture_coordinate_clamp */
10887
10888 #ifndef GL_SGIX_texture_lod_bias
10889 #define GL_SGIX_texture_lod_bias 1
10890 #define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
10891 #define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
10892 #define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
10893 #endif /* GL_SGIX_texture_lod_bias */
10894
10895 #ifndef GL_SGIX_texture_multi_buffer
10896 #define GL_SGIX_texture_multi_buffer 1
10897 #define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
10898 #endif /* GL_SGIX_texture_multi_buffer */
10899
10900 #ifndef GL_SGIX_texture_scale_bias
10901 #define GL_SGIX_texture_scale_bias 1
10902 #define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
10903 #define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
10904 #define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
10905 #define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
10906 #endif /* GL_SGIX_texture_scale_bias */
10907
10908 #ifndef GL_SGIX_vertex_preclip
10909 #define GL_SGIX_vertex_preclip 1
10910 #define GL_VERTEX_PRECLIP_SGIX 0x83EE
10911 #define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
10912 #endif /* GL_SGIX_vertex_preclip */
10913
10914 #ifndef GL_SGIX_ycrcb
10915 #define GL_SGIX_ycrcb 1
10916 #define GL_YCRCB_422_SGIX 0x81BB
10917 #define GL_YCRCB_444_SGIX 0x81BC
10918 #endif /* GL_SGIX_ycrcb */
10919
10920 #ifndef GL_SGIX_ycrcb_subsample
10921 #define GL_SGIX_ycrcb_subsample 1
10922 #endif /* GL_SGIX_ycrcb_subsample */
10923
10924 #ifndef GL_SGIX_ycrcba
10925 #define GL_SGIX_ycrcba 1
10926 #define GL_YCRCB_SGIX 0x8318
10927 #define GL_YCRCBA_SGIX 0x8319
10928 #endif /* GL_SGIX_ycrcba */
10929
10930 #ifndef GL_SGI_color_matrix
10931 #define GL_SGI_color_matrix 1
10932 #define GL_COLOR_MATRIX_SGI 0x80B1
10933 #define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
10934 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
10935 #define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
10936 #define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
10937 #define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
10938 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
10939 #define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
10940 #define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
10941 #define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
10942 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
10943 #endif /* GL_SGI_color_matrix */
10944
10945 #ifndef GL_SGI_color_table
10946 #define GL_SGI_color_table 1
10947 #define GL_COLOR_TABLE_SGI 0x80D0
10948 #define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
10949 #define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
10950 #define GL_PROXY_COLOR_TABLE_SGI 0x80D3
10951 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
10952 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
10953 #define GL_COLOR_TABLE_SCALE_SGI 0x80D6
10954 #define GL_COLOR_TABLE_BIAS_SGI 0x80D7
10955 #define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
10956 #define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
10957 #define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
10958 #define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
10959 #define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
10960 #define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
10961 #define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
10962 #define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
10963 typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10964 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
10965 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
10966 typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10967 typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
10968 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
10969 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
10970 #ifdef GL_GLEXT_PROTOTYPES
10971 GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10972 GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
10973 GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
10974 GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10975 GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
10976 GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
10977 GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
10978 #endif
10979 #endif /* GL_SGI_color_table */
10980
10981 #ifndef GL_SGI_texture_color_table
10982 #define GL_SGI_texture_color_table 1
10983 #define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
10984 #define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
10985 #endif /* GL_SGI_texture_color_table */
10986
10987 #ifndef GL_SUNX_constant_data
10988 #define GL_SUNX_constant_data 1
10989 #define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
10990 #define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
10991 typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
10992 #ifdef GL_GLEXT_PROTOTYPES
10993 GLAPI void APIENTRY glFinishTextureSUNX (void);
10994 #endif
10995 #endif /* GL_SUNX_constant_data */
10996
10997 #ifndef GL_SUN_convolution_border_modes
10998 #define GL_SUN_convolution_border_modes 1
10999 #define GL_WRAP_BORDER_SUN 0x81D4
11000 #endif /* GL_SUN_convolution_border_modes */
11001
11002 #ifndef GL_SUN_global_alpha
11003 #define GL_SUN_global_alpha 1
11004 #define GL_GLOBAL_ALPHA_SUN 0x81D9
11005 #define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
11006 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
11007 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
11008 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
11009 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
11010 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
11011 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
11012 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
11013 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
11014 #ifdef GL_GLEXT_PROTOTYPES
11015 GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
11016 GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
11017 GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
11018 GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
11019 GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
11020 GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
11021 GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
11022 GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
11023 #endif
11024 #endif /* GL_SUN_global_alpha */
11025
11026 #ifndef GL_SUN_mesh_array
11027 #define GL_SUN_mesh_array 1
11028 #define GL_QUAD_MESH_SUN 0x8614
11029 #define GL_TRIANGLE_MESH_SUN 0x8615
11030 typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
11031 #ifdef GL_GLEXT_PROTOTYPES
11032 GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
11033 #endif
11034 #endif /* GL_SUN_mesh_array */
11035
11036 #ifndef GL_SUN_slice_accum
11037 #define GL_SUN_slice_accum 1
11038 #define GL_SLICE_ACCUM_SUN 0x85CC
11039 #endif /* GL_SUN_slice_accum */
11040
11041 #ifndef GL_SUN_triangle_list
11042 #define GL_SUN_triangle_list 1
11043 #define GL_RESTART_SUN 0x0001
11044 #define GL_REPLACE_MIDDLE_SUN 0x0002
11045 #define GL_REPLACE_OLDEST_SUN 0x0003
11046 #define GL_TRIANGLE_LIST_SUN 0x81D7
11047 #define GL_REPLACEMENT_CODE_SUN 0x81D8
11048 #define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
11049 #define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
11050 #define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
11051 #define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
11052 #define GL_R1UI_V3F_SUN 0x85C4
11053 #define GL_R1UI_C4UB_V3F_SUN 0x85C5
11054 #define GL_R1UI_C3F_V3F_SUN 0x85C6
11055 #define GL_R1UI_N3F_V3F_SUN 0x85C7
11056 #define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
11057 #define GL_R1UI_T2F_V3F_SUN 0x85C9
11058 #define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
11059 #define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
11060 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
11061 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
11062 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
11063 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
11064 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
11065 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
11066 typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
11067 #ifdef GL_GLEXT_PROTOTYPES
11068 GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
11069 GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
11070 GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
11071 GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
11072 GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
11073 GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
11074 GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
11075 #endif
11076 #endif /* GL_SUN_triangle_list */
11077
11078 #ifndef GL_SUN_vertex
11079 #define GL_SUN_vertex 1
11080 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11081 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11082 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11083 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11084 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11085 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
11086 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11087 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
11088 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11089 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11090 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11091 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11092 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11093 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11094 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11095 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11096 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11097 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11098 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11099 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11100 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11101 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11102 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11103 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11104 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11105 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
11106 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11107 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11108 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11109 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11110 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11111 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11112 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11113 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11114 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11115 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11116 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11117 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11118 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11119 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11120 #ifdef GL_GLEXT_PROTOTYPES
11121 GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11122 GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
11123 GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11124 GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
11125 GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11126 GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
11127 GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11128 GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
11129 GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11130 GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11131 GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11132 GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
11133 GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11134 GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
11135 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11136 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11137 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11138 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11139 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11140 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11141 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11142 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11143 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11144 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11145 GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11146 GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
11147 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11148 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11149 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11150 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11151 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11152 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11153 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11154 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11155 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11156 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11157 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11158 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11159 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11160 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11161 #endif
11162 #endif /* GL_SUN_vertex */
11163
11164 #ifndef GL_WIN_phong_shading
11165 #define GL_WIN_phong_shading 1
11166 #define GL_PHONG_WIN 0x80EA
11167 #define GL_PHONG_HINT_WIN 0x80EB
11168 #endif /* GL_WIN_phong_shading */
11169
11170 #ifndef GL_WIN_specular_fog
11171 #define GL_WIN_specular_fog 1
11172 #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
11173 #endif /* GL_WIN_specular_fog */
11174
11175 #ifdef __cplusplus
11176 }
11177 #endif
11178
11179 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #ifdef __IPHONEOS__
29 #include <OpenGLES/ES1/gl.h>
30 #include <OpenGLES/ES1/glext.h>
31 #else
32 #include <GLES/gl.h>
33 #include <GLES/glext.h>
34 #endif
35
36 #ifndef APIENTRY
37 #define APIENTRY
38 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles2.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
29
30 #ifdef __IPHONEOS__
31 #include <OpenGLES/ES2/gl.h>
32 #include <OpenGLES/ES2/glext.h>
33 #else
34 #include <GLES2/gl2platform.h>
35 #include <GLES2/gl2.h>
36 #include <GLES2/gl2ext.h>
37 #endif
38
39 #else /* _MSC_VER */
40
41 /* OpenGL ES2 headers for Visual Studio */
42 #include <SDL2/SDL_opengles2_khrplatform.h>
43 #include <SDL2/SDL_opengles2_gl2platform.h>
44 #include <SDL2/SDL_opengles2_gl2.h>
45 #include <SDL2/SDL_opengles2_gl2ext.h>
46
47 #endif /* _MSC_VER */
48
49 #ifndef APIENTRY
50 #define APIENTRY GL_APIENTRY
51 #endif
0 #ifndef __gl2_h_
1 #define __gl2_h_
2
3 /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
4
5 /*#include <GLES2/gl2platform.h>*/
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /*
12 * This document is licensed under the SGI Free Software B License Version
13 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
14 */
15
16 /*-------------------------------------------------------------------------
17 * Data type definitions
18 *-----------------------------------------------------------------------*/
19
20 typedef void GLvoid;
21 typedef char GLchar;
22 typedef unsigned int GLenum;
23 typedef unsigned char GLboolean;
24 typedef unsigned int GLbitfield;
25 typedef khronos_int8_t GLbyte;
26 typedef short GLshort;
27 typedef int GLint;
28 typedef int GLsizei;
29 typedef khronos_uint8_t GLubyte;
30 typedef unsigned short GLushort;
31 typedef unsigned int GLuint;
32 typedef khronos_float_t GLfloat;
33 typedef khronos_float_t GLclampf;
34 typedef khronos_int32_t GLfixed;
35
36 /* GL types for handling large vertex buffer objects */
37 typedef khronos_intptr_t GLintptr;
38 typedef khronos_ssize_t GLsizeiptr;
39
40 /* OpenGL ES core versions */
41 #define GL_ES_VERSION_2_0 1
42
43 /* ClearBufferMask */
44 #define GL_DEPTH_BUFFER_BIT 0x00000100
45 #define GL_STENCIL_BUFFER_BIT 0x00000400
46 #define GL_COLOR_BUFFER_BIT 0x00004000
47
48 /* Boolean */
49 #define GL_FALSE 0
50 #define GL_TRUE 1
51
52 /* BeginMode */
53 #define GL_POINTS 0x0000
54 #define GL_LINES 0x0001
55 #define GL_LINE_LOOP 0x0002
56 #define GL_LINE_STRIP 0x0003
57 #define GL_TRIANGLES 0x0004
58 #define GL_TRIANGLE_STRIP 0x0005
59 #define GL_TRIANGLE_FAN 0x0006
60
61 /* AlphaFunction (not supported in ES20) */
62 /* GL_NEVER */
63 /* GL_LESS */
64 /* GL_EQUAL */
65 /* GL_LEQUAL */
66 /* GL_GREATER */
67 /* GL_NOTEQUAL */
68 /* GL_GEQUAL */
69 /* GL_ALWAYS */
70
71 /* BlendingFactorDest */
72 #define GL_ZERO 0
73 #define GL_ONE 1
74 #define GL_SRC_COLOR 0x0300
75 #define GL_ONE_MINUS_SRC_COLOR 0x0301
76 #define GL_SRC_ALPHA 0x0302
77 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
78 #define GL_DST_ALPHA 0x0304
79 #define GL_ONE_MINUS_DST_ALPHA 0x0305
80
81 /* BlendingFactorSrc */
82 /* GL_ZERO */
83 /* GL_ONE */
84 #define GL_DST_COLOR 0x0306
85 #define GL_ONE_MINUS_DST_COLOR 0x0307
86 #define GL_SRC_ALPHA_SATURATE 0x0308
87 /* GL_SRC_ALPHA */
88 /* GL_ONE_MINUS_SRC_ALPHA */
89 /* GL_DST_ALPHA */
90 /* GL_ONE_MINUS_DST_ALPHA */
91
92 /* BlendEquationSeparate */
93 #define GL_FUNC_ADD 0x8006
94 #define GL_BLEND_EQUATION 0x8009
95 #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
96 #define GL_BLEND_EQUATION_ALPHA 0x883D
97
98 /* BlendSubtract */
99 #define GL_FUNC_SUBTRACT 0x800A
100 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
101
102 /* Separate Blend Functions */
103 #define GL_BLEND_DST_RGB 0x80C8
104 #define GL_BLEND_SRC_RGB 0x80C9
105 #define GL_BLEND_DST_ALPHA 0x80CA
106 #define GL_BLEND_SRC_ALPHA 0x80CB
107 #define GL_CONSTANT_COLOR 0x8001
108 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
109 #define GL_CONSTANT_ALPHA 0x8003
110 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
111 #define GL_BLEND_COLOR 0x8005
112
113 /* Buffer Objects */
114 #define GL_ARRAY_BUFFER 0x8892
115 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
116 #define GL_ARRAY_BUFFER_BINDING 0x8894
117 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
118
119 #define GL_STREAM_DRAW 0x88E0
120 #define GL_STATIC_DRAW 0x88E4
121 #define GL_DYNAMIC_DRAW 0x88E8
122
123 #define GL_BUFFER_SIZE 0x8764
124 #define GL_BUFFER_USAGE 0x8765
125
126 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
127
128 /* CullFaceMode */
129 #define GL_FRONT 0x0404
130 #define GL_BACK 0x0405
131 #define GL_FRONT_AND_BACK 0x0408
132
133 /* DepthFunction */
134 /* GL_NEVER */
135 /* GL_LESS */
136 /* GL_EQUAL */
137 /* GL_LEQUAL */
138 /* GL_GREATER */
139 /* GL_NOTEQUAL */
140 /* GL_GEQUAL */
141 /* GL_ALWAYS */
142
143 /* EnableCap */
144 #define GL_TEXTURE_2D 0x0DE1
145 #define GL_CULL_FACE 0x0B44
146 #define GL_BLEND 0x0BE2
147 #define GL_DITHER 0x0BD0
148 #define GL_STENCIL_TEST 0x0B90
149 #define GL_DEPTH_TEST 0x0B71
150 #define GL_SCISSOR_TEST 0x0C11
151 #define GL_POLYGON_OFFSET_FILL 0x8037
152 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
153 #define GL_SAMPLE_COVERAGE 0x80A0
154
155 /* ErrorCode */
156 #define GL_NO_ERROR 0
157 #define GL_INVALID_ENUM 0x0500
158 #define GL_INVALID_VALUE 0x0501
159 #define GL_INVALID_OPERATION 0x0502
160 #define GL_OUT_OF_MEMORY 0x0505
161
162 /* FrontFaceDirection */
163 #define GL_CW 0x0900
164 #define GL_CCW 0x0901
165
166 /* GetPName */
167 #define GL_LINE_WIDTH 0x0B21
168 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
169 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
170 #define GL_CULL_FACE_MODE 0x0B45
171 #define GL_FRONT_FACE 0x0B46
172 #define GL_DEPTH_RANGE 0x0B70
173 #define GL_DEPTH_WRITEMASK 0x0B72
174 #define GL_DEPTH_CLEAR_VALUE 0x0B73
175 #define GL_DEPTH_FUNC 0x0B74
176 #define GL_STENCIL_CLEAR_VALUE 0x0B91
177 #define GL_STENCIL_FUNC 0x0B92
178 #define GL_STENCIL_FAIL 0x0B94
179 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
180 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
181 #define GL_STENCIL_REF 0x0B97
182 #define GL_STENCIL_VALUE_MASK 0x0B93
183 #define GL_STENCIL_WRITEMASK 0x0B98
184 #define GL_STENCIL_BACK_FUNC 0x8800
185 #define GL_STENCIL_BACK_FAIL 0x8801
186 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
187 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
188 #define GL_STENCIL_BACK_REF 0x8CA3
189 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
190 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
191 #define GL_VIEWPORT 0x0BA2
192 #define GL_SCISSOR_BOX 0x0C10
193 /* GL_SCISSOR_TEST */
194 #define GL_COLOR_CLEAR_VALUE 0x0C22
195 #define GL_COLOR_WRITEMASK 0x0C23
196 #define GL_UNPACK_ALIGNMENT 0x0CF5
197 #define GL_PACK_ALIGNMENT 0x0D05
198 #define GL_MAX_TEXTURE_SIZE 0x0D33
199 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
200 #define GL_SUBPIXEL_BITS 0x0D50
201 #define GL_RED_BITS 0x0D52
202 #define GL_GREEN_BITS 0x0D53
203 #define GL_BLUE_BITS 0x0D54
204 #define GL_ALPHA_BITS 0x0D55
205 #define GL_DEPTH_BITS 0x0D56
206 #define GL_STENCIL_BITS 0x0D57
207 #define GL_POLYGON_OFFSET_UNITS 0x2A00
208 /* GL_POLYGON_OFFSET_FILL */
209 #define GL_POLYGON_OFFSET_FACTOR 0x8038
210 #define GL_TEXTURE_BINDING_2D 0x8069
211 #define GL_SAMPLE_BUFFERS 0x80A8
212 #define GL_SAMPLES 0x80A9
213 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
214 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
215
216 /* GetTextureParameter */
217 /* GL_TEXTURE_MAG_FILTER */
218 /* GL_TEXTURE_MIN_FILTER */
219 /* GL_TEXTURE_WRAP_S */
220 /* GL_TEXTURE_WRAP_T */
221
222 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
223 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
224
225 /* HintMode */
226 #define GL_DONT_CARE 0x1100
227 #define GL_FASTEST 0x1101
228 #define GL_NICEST 0x1102
229
230 /* HintTarget */
231 #define GL_GENERATE_MIPMAP_HINT 0x8192
232
233 /* DataType */
234 #define GL_BYTE 0x1400
235 #define GL_UNSIGNED_BYTE 0x1401
236 #define GL_SHORT 0x1402
237 #define GL_UNSIGNED_SHORT 0x1403
238 #define GL_INT 0x1404
239 #define GL_UNSIGNED_INT 0x1405
240 #define GL_FLOAT 0x1406
241 #define GL_FIXED 0x140C
242
243 /* PixelFormat */
244 #define GL_DEPTH_COMPONENT 0x1902
245 #define GL_ALPHA 0x1906
246 #define GL_RGB 0x1907
247 #define GL_RGBA 0x1908
248 #define GL_LUMINANCE 0x1909
249 #define GL_LUMINANCE_ALPHA 0x190A
250
251 /* PixelType */
252 /* GL_UNSIGNED_BYTE */
253 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
254 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
255 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
256
257 /* Shaders */
258 #define GL_FRAGMENT_SHADER 0x8B30
259 #define GL_VERTEX_SHADER 0x8B31
260 #define GL_MAX_VERTEX_ATTRIBS 0x8869
261 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
262 #define GL_MAX_VARYING_VECTORS 0x8DFC
263 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
264 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
265 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
266 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
267 #define GL_SHADER_TYPE 0x8B4F
268 #define GL_DELETE_STATUS 0x8B80
269 #define GL_LINK_STATUS 0x8B82
270 #define GL_VALIDATE_STATUS 0x8B83
271 #define GL_ATTACHED_SHADERS 0x8B85
272 #define GL_ACTIVE_UNIFORMS 0x8B86
273 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
274 #define GL_ACTIVE_ATTRIBUTES 0x8B89
275 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
276 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
277 #define GL_CURRENT_PROGRAM 0x8B8D
278
279 /* StencilFunction */
280 #define GL_NEVER 0x0200
281 #define GL_LESS 0x0201
282 #define GL_EQUAL 0x0202
283 #define GL_LEQUAL 0x0203
284 #define GL_GREATER 0x0204
285 #define GL_NOTEQUAL 0x0205
286 #define GL_GEQUAL 0x0206
287 #define GL_ALWAYS 0x0207
288
289 /* StencilOp */
290 /* GL_ZERO */
291 #define GL_KEEP 0x1E00
292 #define GL_REPLACE 0x1E01
293 #define GL_INCR 0x1E02
294 #define GL_DECR 0x1E03
295 #define GL_INVERT 0x150A
296 #define GL_INCR_WRAP 0x8507
297 #define GL_DECR_WRAP 0x8508
298
299 /* StringName */
300 #define GL_VENDOR 0x1F00
301 #define GL_RENDERER 0x1F01
302 #define GL_VERSION 0x1F02
303 #define GL_EXTENSIONS 0x1F03
304
305 /* TextureMagFilter */
306 #define GL_NEAREST 0x2600
307 #define GL_LINEAR 0x2601
308
309 /* TextureMinFilter */
310 /* GL_NEAREST */
311 /* GL_LINEAR */
312 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
313 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
314 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
315 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
316
317 /* TextureParameterName */
318 #define GL_TEXTURE_MAG_FILTER 0x2800
319 #define GL_TEXTURE_MIN_FILTER 0x2801
320 #define GL_TEXTURE_WRAP_S 0x2802
321 #define GL_TEXTURE_WRAP_T 0x2803
322
323 /* TextureTarget */
324 /* GL_TEXTURE_2D */
325 #define GL_TEXTURE 0x1702
326
327 #define GL_TEXTURE_CUBE_MAP 0x8513
328 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
329 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
330 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
331 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
332 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
333 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
334 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
335 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
336
337 /* TextureUnit */
338 #define GL_TEXTURE0 0x84C0
339 #define GL_TEXTURE1 0x84C1
340 #define GL_TEXTURE2 0x84C2
341 #define GL_TEXTURE3 0x84C3
342 #define GL_TEXTURE4 0x84C4
343 #define GL_TEXTURE5 0x84C5
344 #define GL_TEXTURE6 0x84C6
345 #define GL_TEXTURE7 0x84C7
346 #define GL_TEXTURE8 0x84C8
347 #define GL_TEXTURE9 0x84C9
348 #define GL_TEXTURE10 0x84CA
349 #define GL_TEXTURE11 0x84CB
350 #define GL_TEXTURE12 0x84CC
351 #define GL_TEXTURE13 0x84CD
352 #define GL_TEXTURE14 0x84CE
353 #define GL_TEXTURE15 0x84CF
354 #define GL_TEXTURE16 0x84D0
355 #define GL_TEXTURE17 0x84D1
356 #define GL_TEXTURE18 0x84D2
357 #define GL_TEXTURE19 0x84D3
358 #define GL_TEXTURE20 0x84D4
359 #define GL_TEXTURE21 0x84D5
360 #define GL_TEXTURE22 0x84D6
361 #define GL_TEXTURE23 0x84D7
362 #define GL_TEXTURE24 0x84D8
363 #define GL_TEXTURE25 0x84D9
364 #define GL_TEXTURE26 0x84DA
365 #define GL_TEXTURE27 0x84DB
366 #define GL_TEXTURE28 0x84DC
367 #define GL_TEXTURE29 0x84DD
368 #define GL_TEXTURE30 0x84DE
369 #define GL_TEXTURE31 0x84DF
370 #define GL_ACTIVE_TEXTURE 0x84E0
371
372 /* TextureWrapMode */
373 #define GL_REPEAT 0x2901
374 #define GL_CLAMP_TO_EDGE 0x812F
375 #define GL_MIRRORED_REPEAT 0x8370
376
377 /* Uniform Types */
378 #define GL_FLOAT_VEC2 0x8B50
379 #define GL_FLOAT_VEC3 0x8B51
380 #define GL_FLOAT_VEC4 0x8B52
381 #define GL_INT_VEC2 0x8B53
382 #define GL_INT_VEC3 0x8B54
383 #define GL_INT_VEC4 0x8B55
384 #define GL_BOOL 0x8B56
385 #define GL_BOOL_VEC2 0x8B57
386 #define GL_BOOL_VEC3 0x8B58
387 #define GL_BOOL_VEC4 0x8B59
388 #define GL_FLOAT_MAT2 0x8B5A
389 #define GL_FLOAT_MAT3 0x8B5B
390 #define GL_FLOAT_MAT4 0x8B5C
391 #define GL_SAMPLER_2D 0x8B5E
392 #define GL_SAMPLER_CUBE 0x8B60
393
394 /* Vertex Arrays */
395 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
396 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
397 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
398 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
399 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
400 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
401 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
402
403 /* Read Format */
404 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
405 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
406
407 /* Shader Source */
408 #define GL_COMPILE_STATUS 0x8B81
409 #define GL_INFO_LOG_LENGTH 0x8B84
410 #define GL_SHADER_SOURCE_LENGTH 0x8B88
411 #define GL_SHADER_COMPILER 0x8DFA
412
413 /* Shader Binary */
414 #define GL_SHADER_BINARY_FORMATS 0x8DF8
415 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
416
417 /* Shader Precision-Specified Types */
418 #define GL_LOW_FLOAT 0x8DF0
419 #define GL_MEDIUM_FLOAT 0x8DF1
420 #define GL_HIGH_FLOAT 0x8DF2
421 #define GL_LOW_INT 0x8DF3
422 #define GL_MEDIUM_INT 0x8DF4
423 #define GL_HIGH_INT 0x8DF5
424
425 /* Framebuffer Object. */
426 #define GL_FRAMEBUFFER 0x8D40
427 #define GL_RENDERBUFFER 0x8D41
428
429 #define GL_RGBA4 0x8056
430 #define GL_RGB5_A1 0x8057
431 #define GL_RGB565 0x8D62
432 #define GL_DEPTH_COMPONENT16 0x81A5
433 #define GL_STENCIL_INDEX8 0x8D48
434
435 #define GL_RENDERBUFFER_WIDTH 0x8D42
436 #define GL_RENDERBUFFER_HEIGHT 0x8D43
437 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
438 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
439 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
440 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
441 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
442 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
443 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
444
445 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
446 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
447 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
448 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
449
450 #define GL_COLOR_ATTACHMENT0 0x8CE0
451 #define GL_DEPTH_ATTACHMENT 0x8D00
452 #define GL_STENCIL_ATTACHMENT 0x8D20
453
454 #define GL_NONE 0
455
456 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
457 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
458 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
459 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
460 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
461
462 #define GL_FRAMEBUFFER_BINDING 0x8CA6
463 #define GL_RENDERBUFFER_BINDING 0x8CA7
464 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
465
466 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
467
468 /*-------------------------------------------------------------------------
469 * GL core functions.
470 *-----------------------------------------------------------------------*/
471
472 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
473 GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
474 GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
475 GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
476 GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
477 GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
478 GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
479 GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
480 GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
481 GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
482 GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
483 GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
484 GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
485 GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
486 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
487 GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
488 GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
489 GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
490 GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
491 GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
492 GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
493 GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
494 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);
495 GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
496 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
497 GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
498 GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
499 GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
500 GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
501 GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
502 GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
503 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
504 GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
505 GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
506 GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
507 GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
508 GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
509 GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
510 GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
511 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
512 GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
513 GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
514 GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
515 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
516 GL_APICALL void GL_APIENTRY glFinish (void);
517 GL_APICALL void GL_APIENTRY glFlush (void);
518 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
519 GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
520 GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
521 GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
522 GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
523 GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
524 GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
525 GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
526 GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
527 GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
528 GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
529 GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
530 GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
531 GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
532 GL_APICALL GLenum GL_APIENTRY glGetError (void);
533 GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
534 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
535 GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
536 GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
537 GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
538 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
539 GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
540 GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
541 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
542 GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
543 GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
544 GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
545 GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
546 GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
547 GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
548 GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
549 GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
550 GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
551 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
552 GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
553 GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
554 GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
555 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
556 GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
557 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
558 GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
559 GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
560 GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
561 GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
562 GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
563 GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
564 GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
565 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
566 GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
567 GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
568 GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
569 GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
570 GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
571 GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
572 GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
573 GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
574 GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
575 GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
576 GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
577 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);
578 GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
579 GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
580 GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
581 GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
582 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);
583 GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
584 GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
585 GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
586 GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
587 GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
588 GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
589 GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
590 GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
591 GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
592 GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
593 GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
594 GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
595 GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
596 GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
597 GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
598 GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
599 GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
600 GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
601 GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
602 GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
603 GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
604 GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
605 GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
606 GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
607 GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
608 GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
609 GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
610 GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
611 GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
612 GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
613 GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
614
615 #ifdef __cplusplus
616 }
617 #endif
618
619 #endif /* __gl2_h_ */
620
0 #ifndef __gl2ext_h_
1 #define __gl2ext_h_
2
3 /* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /*
10 * This document is licensed under the SGI Free Software B License Version
11 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
12 */
13
14 #ifndef GL_APIENTRYP
15 # define GL_APIENTRYP GL_APIENTRY*
16 #endif
17
18 /* New types shared by several extensions */
19
20 #ifndef __gl3_h_
21 /* These are defined with respect to <inttypes.h> in the
22 * Apple extension spec, but they are also used by non-APPLE
23 * extensions, and in the Khronos header we use the Khronos
24 * portable types in khrplatform.h, which must be defined.
25 */
26 typedef khronos_int64_t GLint64;
27 typedef khronos_uint64_t GLuint64;
28 typedef struct __GLsync *GLsync;
29 #endif
30
31
32 /*------------------------------------------------------------------------*
33 * OES extension tokens
34 *------------------------------------------------------------------------*/
35
36 /* GL_OES_compressed_ETC1_RGB8_texture */
37 #ifndef GL_OES_compressed_ETC1_RGB8_texture
38 #define GL_ETC1_RGB8_OES 0x8D64
39 #endif
40
41 /* GL_OES_compressed_paletted_texture */
42 #ifndef GL_OES_compressed_paletted_texture
43 #define GL_PALETTE4_RGB8_OES 0x8B90
44 #define GL_PALETTE4_RGBA8_OES 0x8B91
45 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
46 #define GL_PALETTE4_RGBA4_OES 0x8B93
47 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
48 #define GL_PALETTE8_RGB8_OES 0x8B95
49 #define GL_PALETTE8_RGBA8_OES 0x8B96
50 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
51 #define GL_PALETTE8_RGBA4_OES 0x8B98
52 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
53 #endif
54
55 /* GL_OES_depth24 */
56 #ifndef GL_OES_depth24
57 #define GL_DEPTH_COMPONENT24_OES 0x81A6
58 #endif
59
60 /* GL_OES_depth32 */
61 #ifndef GL_OES_depth32
62 #define GL_DEPTH_COMPONENT32_OES 0x81A7
63 #endif
64
65 /* GL_OES_depth_texture */
66 /* No new tokens introduced by this extension. */
67
68 /* GL_OES_EGL_image */
69 #ifndef GL_OES_EGL_image
70 typedef void* GLeglImageOES;
71 #endif
72
73 /* GL_OES_EGL_image_external */
74 #ifndef GL_OES_EGL_image_external
75 /* GLeglImageOES defined in GL_OES_EGL_image already. */
76 #define GL_TEXTURE_EXTERNAL_OES 0x8D65
77 #define GL_SAMPLER_EXTERNAL_OES 0x8D66
78 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
79 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
80 #endif
81
82 /* GL_OES_element_index_uint */
83 #ifndef GL_OES_element_index_uint
84 #define GL_UNSIGNED_INT 0x1405
85 #endif
86
87 /* GL_OES_get_program_binary */
88 #ifndef GL_OES_get_program_binary
89 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
90 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
91 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
92 #endif
93
94 /* GL_OES_mapbuffer */
95 #ifndef GL_OES_mapbuffer
96 #define GL_WRITE_ONLY_OES 0x88B9
97 #define GL_BUFFER_ACCESS_OES 0x88BB
98 #define GL_BUFFER_MAPPED_OES 0x88BC
99 #define GL_BUFFER_MAP_POINTER_OES 0x88BD
100 #endif
101
102 /* GL_OES_packed_depth_stencil */
103 #ifndef GL_OES_packed_depth_stencil
104 #define GL_DEPTH_STENCIL_OES 0x84F9
105 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
106 #define GL_DEPTH24_STENCIL8_OES 0x88F0
107 #endif
108
109 /* GL_OES_required_internalformat */
110 #ifndef GL_OES_required_internalformat
111 #define GL_ALPHA8_OES 0x803C
112 #define GL_DEPTH_COMPONENT16_OES 0x81A5
113 /* reuse GL_DEPTH_COMPONENT24_OES */
114 /* reuse GL_DEPTH24_STENCIL8_OES */
115 /* reuse GL_DEPTH_COMPONENT32_OES */
116 #define GL_LUMINANCE4_ALPHA4_OES 0x8043
117 #define GL_LUMINANCE8_ALPHA8_OES 0x8045
118 #define GL_LUMINANCE8_OES 0x8040
119 #define GL_RGBA4_OES 0x8056
120 #define GL_RGB5_A1_OES 0x8057
121 #define GL_RGB565_OES 0x8D62
122 /* reuse GL_RGB8_OES */
123 /* reuse GL_RGBA8_OES */
124 /* reuse GL_RGB10_EXT */
125 /* reuse GL_RGB10_A2_EXT */
126 #endif
127
128 /* GL_OES_rgb8_rgba8 */
129 #ifndef GL_OES_rgb8_rgba8
130 #define GL_RGB8_OES 0x8051
131 #define GL_RGBA8_OES 0x8058
132 #endif
133
134 /* GL_OES_standard_derivatives */
135 #ifndef GL_OES_standard_derivatives
136 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
137 #endif
138
139 /* GL_OES_stencil1 */
140 #ifndef GL_OES_stencil1
141 #define GL_STENCIL_INDEX1_OES 0x8D46
142 #endif
143
144 /* GL_OES_stencil4 */
145 #ifndef GL_OES_stencil4
146 #define GL_STENCIL_INDEX4_OES 0x8D47
147 #endif
148
149 #ifndef GL_OES_surfaceless_context
150 #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
151 #endif
152
153 /* GL_OES_texture_3D */
154 #ifndef GL_OES_texture_3D
155 #define GL_TEXTURE_WRAP_R_OES 0x8072
156 #define GL_TEXTURE_3D_OES 0x806F
157 #define GL_TEXTURE_BINDING_3D_OES 0x806A
158 #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
159 #define GL_SAMPLER_3D_OES 0x8B5F
160 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
161 #endif
162
163 /* GL_OES_texture_float */
164 /* No new tokens introduced by this extension. */
165
166 /* GL_OES_texture_float_linear */
167 /* No new tokens introduced by this extension. */
168
169 /* GL_OES_texture_half_float */
170 #ifndef GL_OES_texture_half_float
171 #define GL_HALF_FLOAT_OES 0x8D61
172 #endif
173
174 /* GL_OES_texture_half_float_linear */
175 /* No new tokens introduced by this extension. */
176
177 /* GL_OES_texture_npot */
178 /* No new tokens introduced by this extension. */
179
180 /* GL_OES_vertex_array_object */
181 #ifndef GL_OES_vertex_array_object
182 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
183 #endif
184
185 /* GL_OES_vertex_half_float */
186 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
187
188 /* GL_OES_vertex_type_10_10_10_2 */
189 #ifndef GL_OES_vertex_type_10_10_10_2
190 #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
191 #define GL_INT_10_10_10_2_OES 0x8DF7
192 #endif
193
194 /*------------------------------------------------------------------------*
195 * KHR extension tokens
196 *------------------------------------------------------------------------*/
197
198 #ifndef GL_KHR_debug
199 typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
200 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
201 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
202 #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
203 #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
204 #define GL_DEBUG_SOURCE_API_KHR 0x8246
205 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
206 #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
207 #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
208 #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
209 #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
210 #define GL_DEBUG_TYPE_ERROR_KHR 0x824C
211 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
212 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
213 #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
214 #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
215 #define GL_DEBUG_TYPE_OTHER_KHR 0x8251
216 #define GL_DEBUG_TYPE_MARKER_KHR 0x8268
217 #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
218 #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
219 #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
220 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
221 #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
222 #define GL_BUFFER_KHR 0x82E0
223 #define GL_SHADER_KHR 0x82E1
224 #define GL_PROGRAM_KHR 0x82E2
225 #define GL_QUERY_KHR 0x82E3
226 /* PROGRAM_PIPELINE only in GL */
227 #define GL_SAMPLER_KHR 0x82E6
228 /* DISPLAY_LIST only in GL */
229 #define GL_MAX_LABEL_LENGTH_KHR 0x82E8
230 #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
231 #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
232 #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
233 #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
234 #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
235 #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
236 #define GL_DEBUG_OUTPUT_KHR 0x92E0
237 #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
238 #define GL_STACK_OVERFLOW_KHR 0x0503
239 #define GL_STACK_UNDERFLOW_KHR 0x0504
240 #endif
241
242 #ifndef GL_KHR_texture_compression_astc_ldr
243 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
244 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
245 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
246 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
247 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
248 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
249 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
250 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
251 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
252 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
253 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
254 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
255 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
256 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
257 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
258 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
259 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
260 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
261 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
262 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
263 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
264 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
265 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
266 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
267 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
268 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
269 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
270 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
271 #endif
272
273 /*------------------------------------------------------------------------*
274 * AMD extension tokens
275 *------------------------------------------------------------------------*/
276
277 /* GL_AMD_compressed_3DC_texture */
278 #ifndef GL_AMD_compressed_3DC_texture
279 #define GL_3DC_X_AMD 0x87F9
280 #define GL_3DC_XY_AMD 0x87FA
281 #endif
282
283 /* GL_AMD_compressed_ATC_texture */
284 #ifndef GL_AMD_compressed_ATC_texture
285 #define GL_ATC_RGB_AMD 0x8C92
286 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
287 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
288 #endif
289
290 /* GL_AMD_performance_monitor */
291 #ifndef GL_AMD_performance_monitor
292 #define GL_COUNTER_TYPE_AMD 0x8BC0
293 #define GL_COUNTER_RANGE_AMD 0x8BC1
294 #define GL_UNSIGNED_INT64_AMD 0x8BC2
295 #define GL_PERCENTAGE_AMD 0x8BC3
296 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
297 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
298 #define GL_PERFMON_RESULT_AMD 0x8BC6
299 #endif
300
301 /* GL_AMD_program_binary_Z400 */
302 #ifndef GL_AMD_program_binary_Z400
303 #define GL_Z400_BINARY_AMD 0x8740
304 #endif
305
306 /*------------------------------------------------------------------------*
307 * ANGLE extension tokens
308 *------------------------------------------------------------------------*/
309
310 /* GL_ANGLE_depth_texture */
311 #ifndef GL_ANGLE_depth_texture
312 #define GL_DEPTH_COMPONENT 0x1902
313 #define GL_DEPTH_STENCIL_OES 0x84F9
314 #define GL_UNSIGNED_SHORT 0x1403
315 #define GL_UNSIGNED_INT 0x1405
316 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
317 #define GL_DEPTH_COMPONENT16 0x81A5
318 #define GL_DEPTH_COMPONENT32_OES 0x81A7
319 #define GL_DEPTH24_STENCIL8_OES 0x88F0
320 #endif
321
322 /* GL_ANGLE_framebuffer_blit */
323 #ifndef GL_ANGLE_framebuffer_blit
324 #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
325 #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
326 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
327 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
328 #endif
329
330 /* GL_ANGLE_framebuffer_multisample */
331 #ifndef GL_ANGLE_framebuffer_multisample
332 #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
333 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
334 #define GL_MAX_SAMPLES_ANGLE 0x8D57
335 #endif
336
337 /* GL_ANGLE_instanced_arrays */
338 #ifndef GL_ANGLE_instanced_arrays
339 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
340 #endif
341
342 /* GL_ANGLE_pack_reverse_row_order */
343 #ifndef GL_ANGLE_pack_reverse_row_order
344 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
345 #endif
346
347 /* GL_ANGLE_program_binary */
348 #ifndef GL_ANGLE_program_binary
349 #define GL_PROGRAM_BINARY_ANGLE 0x93A6
350 #endif
351
352 /* GL_ANGLE_texture_compression_dxt3 */
353 #ifndef GL_ANGLE_texture_compression_dxt3
354 #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
355 #endif
356
357 /* GL_ANGLE_texture_compression_dxt5 */
358 #ifndef GL_ANGLE_texture_compression_dxt5
359 #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
360 #endif
361
362 /* GL_ANGLE_texture_usage */
363 #ifndef GL_ANGLE_texture_usage
364 #define GL_TEXTURE_USAGE_ANGLE 0x93A2
365 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
366 #endif
367
368 /* GL_ANGLE_translated_shader_source */
369 #ifndef GL_ANGLE_translated_shader_source
370 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
371 #endif
372
373 /*------------------------------------------------------------------------*
374 * APPLE extension tokens
375 *------------------------------------------------------------------------*/
376
377 /* GL_APPLE_copy_texture_levels */
378 /* No new tokens introduced by this extension. */
379
380 /* GL_APPLE_framebuffer_multisample */
381 #ifndef GL_APPLE_framebuffer_multisample
382 #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
383 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
384 #define GL_MAX_SAMPLES_APPLE 0x8D57
385 #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
386 #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
387 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
388 #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
389 #endif
390
391 /* GL_APPLE_rgb_422 */
392 #ifndef GL_APPLE_rgb_422
393 #define GL_RGB_422_APPLE 0x8A1F
394 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
395 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
396 #endif
397
398 /* GL_APPLE_sync */
399 #ifndef GL_APPLE_sync
400
401 #define GL_SYNC_OBJECT_APPLE 0x8A53
402 #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
403 #define GL_OBJECT_TYPE_APPLE 0x9112
404 #define GL_SYNC_CONDITION_APPLE 0x9113
405 #define GL_SYNC_STATUS_APPLE 0x9114
406 #define GL_SYNC_FLAGS_APPLE 0x9115
407 #define GL_SYNC_FENCE_APPLE 0x9116
408 #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
409 #define GL_UNSIGNALED_APPLE 0x9118
410 #define GL_SIGNALED_APPLE 0x9119
411 #define GL_ALREADY_SIGNALED_APPLE 0x911A
412 #define GL_TIMEOUT_EXPIRED_APPLE 0x911B
413 #define GL_CONDITION_SATISFIED_APPLE 0x911C
414 #define GL_WAIT_FAILED_APPLE 0x911D
415 #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
416 #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
417 #endif
418
419 /* GL_APPLE_texture_format_BGRA8888 */
420 #ifndef GL_APPLE_texture_format_BGRA8888
421 #define GL_BGRA_EXT 0x80E1
422 #endif
423
424 /* GL_APPLE_texture_max_level */
425 #ifndef GL_APPLE_texture_max_level
426 #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
427 #endif
428
429 /*------------------------------------------------------------------------*
430 * ARM extension tokens
431 *------------------------------------------------------------------------*/
432
433 /* GL_ARM_mali_program_binary */
434 #ifndef GL_ARM_mali_program_binary
435 #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
436 #endif
437
438 /* GL_ARM_mali_shader_binary */
439 #ifndef GL_ARM_mali_shader_binary
440 #define GL_MALI_SHADER_BINARY_ARM 0x8F60
441 #endif
442
443 /* GL_ARM_rgba8 */
444 /* No new tokens introduced by this extension. */
445
446 /*------------------------------------------------------------------------*
447 * EXT extension tokens
448 *------------------------------------------------------------------------*/
449
450 /* GL_EXT_blend_minmax */
451 #ifndef GL_EXT_blend_minmax
452 #define GL_MIN_EXT 0x8007
453 #define GL_MAX_EXT 0x8008
454 #endif
455
456 /* GL_EXT_color_buffer_half_float */
457 #ifndef GL_EXT_color_buffer_half_float
458 #define GL_RGBA16F_EXT 0x881A
459 #define GL_RGB16F_EXT 0x881B
460 #define GL_RG16F_EXT 0x822F
461 #define GL_R16F_EXT 0x822D
462 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
463 #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
464 #endif
465
466 /* GL_EXT_debug_label */
467 #ifndef GL_EXT_debug_label
468 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
469 #define GL_PROGRAM_OBJECT_EXT 0x8B40
470 #define GL_SHADER_OBJECT_EXT 0x8B48
471 #define GL_BUFFER_OBJECT_EXT 0x9151
472 #define GL_QUERY_OBJECT_EXT 0x9153
473 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
474 #endif
475
476 /* GL_EXT_debug_marker */
477 /* No new tokens introduced by this extension. */
478
479 /* GL_EXT_discard_framebuffer */
480 #ifndef GL_EXT_discard_framebuffer
481 #define GL_COLOR_EXT 0x1800
482 #define GL_DEPTH_EXT 0x1801
483 #define GL_STENCIL_EXT 0x1802
484 #endif
485
486 #ifndef GL_EXT_disjoint_timer_query
487 #define GL_QUERY_COUNTER_BITS_EXT 0x8864
488 #define GL_CURRENT_QUERY_EXT 0x8865
489 #define GL_QUERY_RESULT_EXT 0x8866
490 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
491 #define GL_TIME_ELAPSED_EXT 0x88BF
492 #define GL_TIMESTAMP_EXT 0x8E28
493 #define GL_GPU_DISJOINT_EXT 0x8FBB
494 #endif
495
496 #ifndef GL_EXT_draw_buffers
497 #define GL_EXT_draw_buffers 1
498 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
499 #define GL_MAX_DRAW_BUFFERS_EXT 0x8824
500 #define GL_DRAW_BUFFER0_EXT 0x8825
501 #define GL_DRAW_BUFFER1_EXT 0x8826
502 #define GL_DRAW_BUFFER2_EXT 0x8827
503 #define GL_DRAW_BUFFER3_EXT 0x8828
504 #define GL_DRAW_BUFFER4_EXT 0x8829
505 #define GL_DRAW_BUFFER5_EXT 0x882A
506 #define GL_DRAW_BUFFER6_EXT 0x882B
507 #define GL_DRAW_BUFFER7_EXT 0x882C
508 #define GL_DRAW_BUFFER8_EXT 0x882D
509 #define GL_DRAW_BUFFER9_EXT 0x882E
510 #define GL_DRAW_BUFFER10_EXT 0x882F
511 #define GL_DRAW_BUFFER11_EXT 0x8830
512 #define GL_DRAW_BUFFER12_EXT 0x8831
513 #define GL_DRAW_BUFFER13_EXT 0x8832
514 #define GL_DRAW_BUFFER14_EXT 0x8833
515 #define GL_DRAW_BUFFER15_EXT 0x8834
516 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
517 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
518 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
519 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
520 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
521 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
522 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
523 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
524 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
525 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
526 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
527 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
528 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
529 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
530 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
531 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
532 #endif
533
534 /* GL_EXT_map_buffer_range */
535 #ifndef GL_EXT_map_buffer_range
536 #define GL_MAP_READ_BIT_EXT 0x0001
537 #define GL_MAP_WRITE_BIT_EXT 0x0002
538 #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
539 #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
540 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
541 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
542 #endif
543
544 /* GL_EXT_multisampled_render_to_texture */
545 #ifndef GL_EXT_multisampled_render_to_texture
546 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
547 /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
548 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
549 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
550 #define GL_MAX_SAMPLES_EXT 0x8D57
551 #endif
552
553 /* GL_EXT_multiview_draw_buffers */
554 #ifndef GL_EXT_multiview_draw_buffers
555 #define GL_COLOR_ATTACHMENT_EXT 0x90F0
556 #define GL_MULTIVIEW_EXT 0x90F1
557 #define GL_DRAW_BUFFER_EXT 0x0C01
558 #define GL_READ_BUFFER_EXT 0x0C02
559 #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
560 #endif
561
562 /* GL_EXT_multi_draw_arrays */
563 /* No new tokens introduced by this extension. */
564
565 /* GL_EXT_occlusion_query_boolean */
566 #ifndef GL_EXT_occlusion_query_boolean
567 #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
568 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
569 #define GL_CURRENT_QUERY_EXT 0x8865
570 #define GL_QUERY_RESULT_EXT 0x8866
571 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
572 #endif
573
574 /* GL_EXT_read_format_bgra */
575 #ifndef GL_EXT_read_format_bgra
576 #define GL_BGRA_EXT 0x80E1
577 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
578 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
579 #endif
580
581 /* GL_EXT_robustness */
582 #ifndef GL_EXT_robustness
583 /* reuse GL_NO_ERROR */
584 #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
585 #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
586 #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
587 #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
588 #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
589 #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
590 #define GL_NO_RESET_NOTIFICATION_EXT 0x8261
591 #endif
592
593 /* GL_EXT_separate_shader_objects */
594 #ifndef GL_EXT_separate_shader_objects
595 #define GL_VERTEX_SHADER_BIT_EXT 0x00000001
596 #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
597 #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
598 #define GL_PROGRAM_SEPARABLE_EXT 0x8258
599 #define GL_ACTIVE_PROGRAM_EXT 0x8259
600 #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
601 #endif
602
603 /* GL_EXT_shader_framebuffer_fetch */
604 #ifndef GL_EXT_shader_framebuffer_fetch
605 #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
606 #endif
607
608 /* GL_EXT_shader_texture_lod */
609 /* No new tokens introduced by this extension. */
610
611 /* GL_EXT_shadow_samplers */
612 #ifndef GL_EXT_shadow_samplers
613 #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
614 #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
615 #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
616 #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
617 #endif
618
619 /* GL_EXT_sRGB */
620 #ifndef GL_EXT_sRGB
621 #define GL_SRGB_EXT 0x8C40
622 #define GL_SRGB_ALPHA_EXT 0x8C42
623 #define GL_SRGB8_ALPHA8_EXT 0x8C43
624 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
625 #endif
626
627 /* GL_EXT_sRGB_write_control */
628 #ifndef GL_EXT_sRGB_write_control
629 #define GL_EXT_sRGB_write_control 1
630 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
631 #endif
632
633 /* GL_EXT_texture_compression_dxt1 */
634 #ifndef GL_EXT_texture_compression_dxt1
635 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
636 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
637 #endif
638
639 /* GL_EXT_texture_filter_anisotropic */
640 #ifndef GL_EXT_texture_filter_anisotropic
641 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
642 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
643 #endif
644
645 /* GL_EXT_texture_format_BGRA8888 */
646 #ifndef GL_EXT_texture_format_BGRA8888
647 #define GL_BGRA_EXT 0x80E1
648 #endif
649
650 /* GL_EXT_texture_rg */
651 #ifndef GL_EXT_texture_rg
652 #define GL_RED_EXT 0x1903
653 #define GL_RG_EXT 0x8227
654 #define GL_R8_EXT 0x8229
655 #define GL_RG8_EXT 0x822B
656 #endif
657
658 /* GL_EXT_texture_sRGB_decode */
659 #ifndef GL_EXT_texture_sRGB_decode
660 #define GL_EXT_texture_sRGB_decode 1
661 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
662 #define GL_DECODE_EXT 0x8A49
663 #define GL_SKIP_DECODE_EXT 0x8A4A
664 #endif
665
666 /* GL_EXT_texture_storage */
667 #ifndef GL_EXT_texture_storage
668 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
669 #define GL_ALPHA8_EXT 0x803C
670 #define GL_LUMINANCE8_EXT 0x8040
671 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
672 #define GL_RGBA32F_EXT 0x8814
673 #define GL_RGB32F_EXT 0x8815
674 #define GL_ALPHA32F_EXT 0x8816
675 #define GL_LUMINANCE32F_EXT 0x8818
676 #define GL_LUMINANCE_ALPHA32F_EXT 0x8819
677 /* reuse GL_RGBA16F_EXT */
678 /* reuse GL_RGB16F_EXT */
679 #define GL_ALPHA16F_EXT 0x881C
680 #define GL_LUMINANCE16F_EXT 0x881E
681 #define GL_LUMINANCE_ALPHA16F_EXT 0x881F
682 #define GL_RGB10_A2_EXT 0x8059
683 #define GL_RGB10_EXT 0x8052
684 #define GL_BGRA8_EXT 0x93A1
685 #define GL_R8_EXT 0x8229
686 #define GL_RG8_EXT 0x822B
687 #define GL_R32F_EXT 0x822E
688 #define GL_RG32F_EXT 0x8230
689 #define GL_R16F_EXT 0x822D
690 #define GL_RG16F_EXT 0x822F
691 #endif
692
693 /* GL_EXT_texture_type_2_10_10_10_REV */
694 #ifndef GL_EXT_texture_type_2_10_10_10_REV
695 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
696 #endif
697
698 /* GL_EXT_unpack_subimage */
699 #ifndef GL_EXT_unpack_subimage
700 #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
701 #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
702 #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
703 #endif
704
705 /*------------------------------------------------------------------------*
706 * DMP extension tokens
707 *------------------------------------------------------------------------*/
708
709 /* GL_DMP_shader_binary */
710 #ifndef GL_DMP_shader_binary
711 #define GL_SHADER_BINARY_DMP 0x9250
712 #endif
713
714 /*------------------------------------------------------------------------*
715 * FJ extension tokens
716 *------------------------------------------------------------------------*/
717
718 /* GL_FJ_shader_binary_GCCSO */
719 #ifndef GL_FJ_shader_binary_GCCSO
720 #define GL_GCCSO_SHADER_BINARY_FJ 0x9260
721 #endif
722
723 /*------------------------------------------------------------------------*
724 * IMG extension tokens
725 *------------------------------------------------------------------------*/
726
727 /* GL_IMG_program_binary */
728 #ifndef GL_IMG_program_binary
729 #define GL_SGX_PROGRAM_BINARY_IMG 0x9130
730 #endif
731
732 /* GL_IMG_read_format */
733 #ifndef GL_IMG_read_format
734 #define GL_BGRA_IMG 0x80E1
735 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
736 #endif
737
738 /* GL_IMG_shader_binary */
739 #ifndef GL_IMG_shader_binary
740 #define GL_SGX_BINARY_IMG 0x8C0A
741 #endif
742
743 /* GL_IMG_texture_compression_pvrtc */
744 #ifndef GL_IMG_texture_compression_pvrtc
745 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
746 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
747 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
748 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
749 #endif
750
751 /* GL_IMG_texture_compression_pvrtc2 */
752 #ifndef GL_IMG_texture_compression_pvrtc2
753 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
754 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
755 #endif
756
757 /* GL_IMG_multisampled_render_to_texture */
758 #ifndef GL_IMG_multisampled_render_to_texture
759 #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
760 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
761 #define GL_MAX_SAMPLES_IMG 0x9135
762 #define GL_TEXTURE_SAMPLES_IMG 0x9136
763 #endif
764
765 /*------------------------------------------------------------------------*
766 * NV extension tokens
767 *------------------------------------------------------------------------*/
768
769 /* GL_NV_coverage_sample */
770 #ifndef GL_NV_coverage_sample
771 #define GL_COVERAGE_COMPONENT_NV 0x8ED0
772 #define GL_COVERAGE_COMPONENT4_NV 0x8ED1
773 #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
774 #define GL_COVERAGE_BUFFERS_NV 0x8ED3
775 #define GL_COVERAGE_SAMPLES_NV 0x8ED4
776 #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
777 #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
778 #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
779 #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
780 #endif
781
782 /* GL_NV_depth_nonlinear */
783 #ifndef GL_NV_depth_nonlinear
784 #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
785 #endif
786
787 /* GL_NV_draw_buffers */
788 #ifndef GL_NV_draw_buffers
789 #define GL_MAX_DRAW_BUFFERS_NV 0x8824
790 #define GL_DRAW_BUFFER0_NV 0x8825
791 #define GL_DRAW_BUFFER1_NV 0x8826
792 #define GL_DRAW_BUFFER2_NV 0x8827
793 #define GL_DRAW_BUFFER3_NV 0x8828
794 #define GL_DRAW_BUFFER4_NV 0x8829
795 #define GL_DRAW_BUFFER5_NV 0x882A
796 #define GL_DRAW_BUFFER6_NV 0x882B
797 #define GL_DRAW_BUFFER7_NV 0x882C
798 #define GL_DRAW_BUFFER8_NV 0x882D
799 #define GL_DRAW_BUFFER9_NV 0x882E
800 #define GL_DRAW_BUFFER10_NV 0x882F
801 #define GL_DRAW_BUFFER11_NV 0x8830
802 #define GL_DRAW_BUFFER12_NV 0x8831
803 #define GL_DRAW_BUFFER13_NV 0x8832
804 #define GL_DRAW_BUFFER14_NV 0x8833
805 #define GL_DRAW_BUFFER15_NV 0x8834
806 #define GL_COLOR_ATTACHMENT0_NV 0x8CE0
807 #define GL_COLOR_ATTACHMENT1_NV 0x8CE1
808 #define GL_COLOR_ATTACHMENT2_NV 0x8CE2
809 #define GL_COLOR_ATTACHMENT3_NV 0x8CE3
810 #define GL_COLOR_ATTACHMENT4_NV 0x8CE4
811 #define GL_COLOR_ATTACHMENT5_NV 0x8CE5
812 #define GL_COLOR_ATTACHMENT6_NV 0x8CE6
813 #define GL_COLOR_ATTACHMENT7_NV 0x8CE7
814 #define GL_COLOR_ATTACHMENT8_NV 0x8CE8
815 #define GL_COLOR_ATTACHMENT9_NV 0x8CE9
816 #define GL_COLOR_ATTACHMENT10_NV 0x8CEA
817 #define GL_COLOR_ATTACHMENT11_NV 0x8CEB
818 #define GL_COLOR_ATTACHMENT12_NV 0x8CEC
819 #define GL_COLOR_ATTACHMENT13_NV 0x8CED
820 #define GL_COLOR_ATTACHMENT14_NV 0x8CEE
821 #define GL_COLOR_ATTACHMENT15_NV 0x8CEF
822 #endif
823
824 /* GL_NV_draw_instanced */
825 /* No new tokens introduced by this extension. */
826
827 /* GL_NV_fbo_color_attachments */
828 #ifndef GL_NV_fbo_color_attachments
829 #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
830 /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
831 #endif
832
833 /* GL_NV_fence */
834 #ifndef GL_NV_fence
835 #define GL_ALL_COMPLETED_NV 0x84F2
836 #define GL_FENCE_STATUS_NV 0x84F3
837 #define GL_FENCE_CONDITION_NV 0x84F4
838 #endif
839
840 /* GL_NV_framebuffer_blit */
841 #ifndef GL_NV_framebuffer_blit
842 #define GL_READ_FRAMEBUFFER_NV 0x8CA8
843 #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
844 #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
845 #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
846 #endif
847
848 /* GL_NV_framebuffer_multisample */
849 #ifndef GL_NV_framebuffer_multisample
850 #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
851 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
852 #define GL_MAX_SAMPLES_NV 0x8D57
853 #endif
854
855 /* GL_NV_generate_mipmap_sRGB */
856 /* No new tokens introduced by this extension. */
857
858 /* GL_NV_instanced_arrays */
859 #ifndef GL_NV_instanced_arrays
860 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
861 #endif
862
863 /* GL_NV_read_buffer */
864 #ifndef GL_NV_read_buffer
865 #define GL_READ_BUFFER_NV 0x0C02
866 #endif
867
868 /* GL_NV_read_buffer_front */
869 /* No new tokens introduced by this extension. */
870
871 /* GL_NV_read_depth */
872 /* No new tokens introduced by this extension. */
873
874 /* GL_NV_read_depth_stencil */
875 /* No new tokens introduced by this extension. */
876
877 /* GL_NV_read_stencil */
878 /* No new tokens introduced by this extension. */
879
880 /* GL_NV_shadow_samplers_array */
881 #ifndef GL_NV_shadow_samplers_array
882 #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
883 #endif
884
885 /* GL_NV_shadow_samplers_cube */
886 #ifndef GL_NV_shadow_samplers_cube
887 #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
888 #endif
889
890 /* GL_NV_sRGB_formats */
891 #ifndef GL_NV_sRGB_formats
892 #define GL_SLUMINANCE_NV 0x8C46
893 #define GL_SLUMINANCE_ALPHA_NV 0x8C44
894 #define GL_SRGB8_NV 0x8C41
895 #define GL_SLUMINANCE8_NV 0x8C47
896 #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
897 #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
898 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
899 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
900 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
901 #define GL_ETC1_SRGB8_NV 0x88EE
902 #endif
903
904 /* GL_NV_texture_border_clamp */
905 #ifndef GL_NV_texture_border_clamp
906 #define GL_TEXTURE_BORDER_COLOR_NV 0x1004
907 #define GL_CLAMP_TO_BORDER_NV 0x812D
908 #endif
909
910 /* GL_NV_texture_compression_s3tc_update */
911 /* No new tokens introduced by this extension. */
912
913 /* GL_NV_texture_npot_2D_mipmap */
914 /* No new tokens introduced by this extension. */
915
916 /*------------------------------------------------------------------------*
917 * QCOM extension tokens
918 *------------------------------------------------------------------------*/
919
920 /* GL_QCOM_alpha_test */
921 #ifndef GL_QCOM_alpha_test
922 #define GL_ALPHA_TEST_QCOM 0x0BC0
923 #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
924 #define GL_ALPHA_TEST_REF_QCOM 0x0BC2
925 #endif
926
927 /* GL_QCOM_binning_control */
928 #ifndef GL_QCOM_binning_control
929 #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
930 #define GL_CPU_OPTIMIZED_QCOM 0x8FB1
931 #define GL_GPU_OPTIMIZED_QCOM 0x8FB2
932 #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
933 #endif
934
935 /* GL_QCOM_driver_control */
936 /* No new tokens introduced by this extension. */
937
938 /* GL_QCOM_extended_get */
939 #ifndef GL_QCOM_extended_get
940 #define GL_TEXTURE_WIDTH_QCOM 0x8BD2
941 #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
942 #define GL_TEXTURE_DEPTH_QCOM 0x8BD4
943 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
944 #define GL_TEXTURE_FORMAT_QCOM 0x8BD6
945 #define GL_TEXTURE_TYPE_QCOM 0x8BD7
946 #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
947 #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
948 #define GL_TEXTURE_TARGET_QCOM 0x8BDA
949 #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
950 #define GL_STATE_RESTORE 0x8BDC
951 #endif
952
953 /* GL_QCOM_extended_get2 */
954 /* No new tokens introduced by this extension. */
955
956 /* GL_QCOM_perfmon_global_mode */
957 #ifndef GL_QCOM_perfmon_global_mode
958 #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
959 #endif
960
961 /* GL_QCOM_writeonly_rendering */
962 #ifndef GL_QCOM_writeonly_rendering
963 #define GL_WRITEONLY_RENDERING_QCOM 0x8823
964 #endif
965
966 /* GL_QCOM_tiled_rendering */
967 #ifndef GL_QCOM_tiled_rendering
968 #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
969 #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
970 #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
971 #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
972 #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
973 #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
974 #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
975 #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
976 #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
977 #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
978 #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
979 #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
980 #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
981 #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
982 #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
983 #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
984 #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
985 #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
986 #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
987 #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
988 #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
989 #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
990 #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
991 #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
992 #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
993 #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
994 #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
995 #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
996 #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
997 #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
998 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
999 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
1000 #endif
1001
1002 /*------------------------------------------------------------------------*
1003 * VIV extension tokens
1004 *------------------------------------------------------------------------*/
1005
1006 /* GL_VIV_shader_binary */
1007 #ifndef GL_VIV_shader_binary
1008 #define GL_SHADER_BINARY_VIV 0x8FC4
1009 #endif
1010
1011 /*------------------------------------------------------------------------*
1012 * End of extension tokens, start of corresponding extension functions
1013 *------------------------------------------------------------------------*/
1014
1015 /*------------------------------------------------------------------------*
1016 * OES extension functions
1017 *------------------------------------------------------------------------*/
1018
1019 /* GL_OES_compressed_ETC1_RGB8_texture */
1020 #ifndef GL_OES_compressed_ETC1_RGB8_texture
1021 #define GL_OES_compressed_ETC1_RGB8_texture 1
1022 #endif
1023
1024 /* GL_OES_compressed_paletted_texture */
1025 #ifndef GL_OES_compressed_paletted_texture
1026 #define GL_OES_compressed_paletted_texture 1
1027 #endif
1028
1029 /* GL_OES_depth24 */
1030 #ifndef GL_OES_depth24
1031 #define GL_OES_depth24 1
1032 #endif
1033
1034 /* GL_OES_depth32 */
1035 #ifndef GL_OES_depth32
1036 #define GL_OES_depth32 1
1037 #endif
1038
1039 /* GL_OES_depth_texture */
1040 #ifndef GL_OES_depth_texture
1041 #define GL_OES_depth_texture 1
1042 #endif
1043
1044 /* GL_OES_EGL_image */
1045 #ifndef GL_OES_EGL_image
1046 #define GL_OES_EGL_image 1
1047 #ifdef GL_GLEXT_PROTOTYPES
1048 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
1049 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
1050 #endif
1051 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
1052 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
1053 #endif
1054
1055 /* GL_OES_EGL_image_external */
1056 #ifndef GL_OES_EGL_image_external
1057 #define GL_OES_EGL_image_external 1
1058 /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
1059 #endif
1060
1061 /* GL_OES_element_index_uint */
1062 #ifndef GL_OES_element_index_uint
1063 #define GL_OES_element_index_uint 1
1064 #endif
1065
1066 /* GL_OES_fbo_render_mipmap */
1067 #ifndef GL_OES_fbo_render_mipmap
1068 #define GL_OES_fbo_render_mipmap 1
1069 #endif
1070
1071 /* GL_OES_fragment_precision_high */
1072 #ifndef GL_OES_fragment_precision_high
1073 #define GL_OES_fragment_precision_high 1
1074 #endif
1075
1076 /* GL_OES_get_program_binary */
1077 #ifndef GL_OES_get_program_binary
1078 #define GL_OES_get_program_binary 1
1079 #ifdef GL_GLEXT_PROTOTYPES
1080 GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1081 GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1082 #endif
1083 typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1084 typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1085 #endif
1086
1087 /* GL_OES_mapbuffer */
1088 #ifndef GL_OES_mapbuffer
1089 #define GL_OES_mapbuffer 1
1090 #ifdef GL_GLEXT_PROTOTYPES
1091 GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
1092 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
1093 GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);
1094 #endif
1095 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
1096 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
1097 typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);
1098 #endif
1099
1100 /* GL_OES_packed_depth_stencil */
1101 #ifndef GL_OES_packed_depth_stencil
1102 #define GL_OES_packed_depth_stencil 1
1103 #endif
1104
1105 /* GL_OES_required_internalformat */
1106 #ifndef GL_OES_required_internalformat
1107 #define GL_OES_required_internalformat 1
1108 #endif
1109
1110 /* GL_OES_rgb8_rgba8 */
1111 #ifndef GL_OES_rgb8_rgba8
1112 #define GL_OES_rgb8_rgba8 1
1113 #endif
1114
1115 /* GL_OES_standard_derivatives */
1116 #ifndef GL_OES_standard_derivatives
1117 #define GL_OES_standard_derivatives 1
1118 #endif
1119
1120 /* GL_OES_stencil1 */
1121 #ifndef GL_OES_stencil1
1122 #define GL_OES_stencil1 1
1123 #endif
1124
1125 /* GL_OES_stencil4 */
1126 #ifndef GL_OES_stencil4
1127 #define GL_OES_stencil4 1
1128 #endif
1129
1130 #ifndef GL_OES_surfaceless_context
1131 #define GL_OES_surfaceless_context 1
1132 #endif
1133
1134 /* GL_OES_texture_3D */
1135 #ifndef GL_OES_texture_3D
1136 #define GL_OES_texture_3D 1
1137 #ifdef GL_GLEXT_PROTOTYPES
1138 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);
1139 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);
1140 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1141 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);
1142 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);
1143 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1144 #endif
1145 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);
1146 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);
1147 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1148 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
1149 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);
1150 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1151 #endif
1152
1153 /* GL_OES_texture_float */
1154 #ifndef GL_OES_texture_float
1155 #define GL_OES_texture_float 1
1156 #endif
1157
1158 /* GL_OES_texture_float_linear */
1159 #ifndef GL_OES_texture_float_linear
1160 #define GL_OES_texture_float_linear 1
1161 #endif
1162
1163 /* GL_OES_texture_half_float */
1164 #ifndef GL_OES_texture_half_float
1165 #define GL_OES_texture_half_float 1
1166 #endif
1167
1168 /* GL_OES_texture_half_float_linear */
1169 #ifndef GL_OES_texture_half_float_linear
1170 #define GL_OES_texture_half_float_linear 1
1171 #endif
1172
1173 /* GL_OES_texture_npot */
1174 #ifndef GL_OES_texture_npot
1175 #define GL_OES_texture_npot 1
1176 #endif
1177
1178 /* GL_OES_vertex_array_object */
1179 #ifndef GL_OES_vertex_array_object
1180 #define GL_OES_vertex_array_object 1
1181 #ifdef GL_GLEXT_PROTOTYPES
1182 GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
1183 GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
1184 GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
1185 GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
1186 #endif
1187 typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
1188 typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
1189 typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
1190 typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
1191 #endif
1192
1193 /* GL_OES_vertex_half_float */
1194 #ifndef GL_OES_vertex_half_float
1195 #define GL_OES_vertex_half_float 1
1196 #endif
1197
1198 /* GL_OES_vertex_type_10_10_10_2 */
1199 #ifndef GL_OES_vertex_type_10_10_10_2
1200 #define GL_OES_vertex_type_10_10_10_2 1
1201 #endif
1202
1203 /*------------------------------------------------------------------------*
1204 * KHR extension functions
1205 *------------------------------------------------------------------------*/
1206
1207 #ifndef GL_KHR_debug
1208 #define GL_KHR_debug 1
1209 #ifdef GL_GLEXT_PROTOTYPES
1210 GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1211 GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1212 GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
1213 GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1214 GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1215 GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
1216 GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1217 GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1218 GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
1219 GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1220 GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);
1221 #endif
1222 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1223 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1224 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
1225 typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1226 typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1227 typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
1228 typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1229 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1230 typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
1231 typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1232 typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);
1233 #endif
1234
1235 #ifndef GL_KHR_texture_compression_astc_ldr
1236 #define GL_KHR_texture_compression_astc_ldr 1
1237 #endif
1238
1239
1240 /*------------------------------------------------------------------------*
1241 * AMD extension functions
1242 *------------------------------------------------------------------------*/
1243
1244 /* GL_AMD_compressed_3DC_texture */
1245 #ifndef GL_AMD_compressed_3DC_texture
1246 #define GL_AMD_compressed_3DC_texture 1
1247 #endif
1248
1249 /* GL_AMD_compressed_ATC_texture */
1250 #ifndef GL_AMD_compressed_ATC_texture
1251 #define GL_AMD_compressed_ATC_texture 1
1252 #endif
1253
1254 /* AMD_performance_monitor */
1255 #ifndef GL_AMD_performance_monitor
1256 #define GL_AMD_performance_monitor 1
1257 #ifdef GL_GLEXT_PROTOTYPES
1258 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1259 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1260 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1261 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1262 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1263 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
1264 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
1265 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1266 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
1267 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
1268 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1269 #endif
1270 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1271 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1272 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1273 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1274 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1275 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1276 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1277 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1278 typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
1279 typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
1280 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1281 #endif
1282
1283 /* GL_AMD_program_binary_Z400 */
1284 #ifndef GL_AMD_program_binary_Z400
1285 #define GL_AMD_program_binary_Z400 1
1286 #endif
1287
1288 /*------------------------------------------------------------------------*
1289 * ANGLE extension functions
1290 *------------------------------------------------------------------------*/
1291
1292 /* GL_ANGLE_depth_texture */
1293 #ifndef GL_ANGLE_depth_texture
1294 #define GL_ANGLE_depth_texture 1
1295 #endif
1296
1297 /* GL_ANGLE_framebuffer_blit */
1298 #ifndef GL_ANGLE_framebuffer_blit
1299 #define GL_ANGLE_framebuffer_blit 1
1300 #ifdef GL_GLEXT_PROTOTYPES
1301 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);
1302 #endif
1303 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);
1304 #endif
1305
1306 /* GL_ANGLE_framebuffer_multisample */
1307 #ifndef GL_ANGLE_framebuffer_multisample
1308 #define GL_ANGLE_framebuffer_multisample 1
1309 #ifdef GL_GLEXT_PROTOTYPES
1310 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1311 #endif
1312 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1313 #endif
1314
1315 #ifndef GL_ANGLE_instanced_arrays
1316 #define GL_ANGLE_instanced_arrays 1
1317 #ifdef GL_GLEXT_PROTOTYPES
1318 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1319 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1320 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
1321 #endif
1322 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1323 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1324 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
1325 #endif
1326
1327 /* GL_ANGLE_pack_reverse_row_order */
1328 #ifndef GL_ANGLE_pack_reverse_row_order
1329 #define GL_ANGLE_pack_reverse_row_order 1
1330 #endif
1331
1332 /* GL_ANGLE_program_binary */
1333 #ifndef GL_ANGLE_program_binary
1334 #define GL_ANGLE_program_binary 1
1335 #endif
1336
1337 /* GL_ANGLE_texture_compression_dxt3 */
1338 #ifndef GL_ANGLE_texture_compression_dxt3
1339 #define GL_ANGLE_texture_compression_dxt3 1
1340 #endif
1341
1342 /* GL_ANGLE_texture_compression_dxt5 */
1343 #ifndef GL_ANGLE_texture_compression_dxt5
1344 #define GL_ANGLE_texture_compression_dxt5 1
1345 #endif
1346
1347 /* GL_ANGLE_texture_usage */
1348 #ifndef GL_ANGLE_texture_usage
1349 #define GL_ANGLE_texture_usage 1
1350 #endif
1351
1352 #ifndef GL_ANGLE_translated_shader_source
1353 #define GL_ANGLE_translated_shader_source 1
1354 #ifdef GL_GLEXT_PROTOTYPES
1355 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1356 #endif
1357 typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1358 #endif
1359
1360 /*------------------------------------------------------------------------*
1361 * APPLE extension functions
1362 *------------------------------------------------------------------------*/
1363
1364 /* GL_APPLE_copy_texture_levels */
1365 #ifndef GL_APPLE_copy_texture_levels
1366 #define GL_APPLE_copy_texture_levels 1
1367 #ifdef GL_GLEXT_PROTOTYPES
1368 GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1369 #endif
1370 typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1371 #endif
1372
1373 /* GL_APPLE_framebuffer_multisample */
1374 #ifndef GL_APPLE_framebuffer_multisample
1375 #define GL_APPLE_framebuffer_multisample 1
1376 #ifdef GL_GLEXT_PROTOTYPES
1377 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1378 GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
1379 #endif /* GL_GLEXT_PROTOTYPES */
1380 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1381 typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
1382 #endif
1383
1384 /* GL_APPLE_rgb_422 */
1385 #ifndef GL_APPLE_rgb_422
1386 #define GL_APPLE_rgb_422 1
1387 #endif
1388
1389 /* GL_APPLE_sync */
1390 #ifndef GL_APPLE_sync
1391 #define GL_APPLE_sync 1
1392 #ifdef GL_GLEXT_PROTOTYPES
1393 GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
1394 GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
1395 GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
1396 GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1397 GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1398 GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
1399 GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1400 #endif
1401 typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
1402 typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
1403 typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
1404 typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1405 typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1406 typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
1407 typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1408 #endif
1409
1410 /* GL_APPLE_texture_format_BGRA8888 */
1411 #ifndef GL_APPLE_texture_format_BGRA8888
1412 #define GL_APPLE_texture_format_BGRA8888 1
1413 #endif
1414
1415 /* GL_APPLE_texture_max_level */
1416 #ifndef GL_APPLE_texture_max_level
1417 #define GL_APPLE_texture_max_level 1
1418 #endif
1419
1420 /*------------------------------------------------------------------------*
1421 * ARM extension functions
1422 *------------------------------------------------------------------------*/
1423
1424 /* GL_ARM_mali_program_binary */
1425 #ifndef GL_ARM_mali_program_binary
1426 #define GL_ARM_mali_program_binary 1
1427 #endif
1428
1429 /* GL_ARM_mali_shader_binary */
1430 #ifndef GL_ARM_mali_shader_binary
1431 #define GL_ARM_mali_shader_binary 1
1432 #endif
1433
1434 /* GL_ARM_rgba8 */
1435 #ifndef GL_ARM_rgba8
1436 #define GL_ARM_rgba8 1
1437 #endif
1438
1439 /*------------------------------------------------------------------------*
1440 * EXT extension functions
1441 *------------------------------------------------------------------------*/
1442
1443 /* GL_EXT_blend_minmax */
1444 #ifndef GL_EXT_blend_minmax
1445 #define GL_EXT_blend_minmax 1
1446 #endif
1447
1448 /* GL_EXT_color_buffer_half_float */
1449 #ifndef GL_EXT_color_buffer_half_float
1450 #define GL_EXT_color_buffer_half_float 1
1451 #endif
1452
1453 /* GL_EXT_debug_label */
1454 #ifndef GL_EXT_debug_label
1455 #define GL_EXT_debug_label 1
1456 #ifdef GL_GLEXT_PROTOTYPES
1457 GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1458 GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1459 #endif
1460 typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1461 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1462 #endif
1463
1464 /* GL_EXT_debug_marker */
1465 #ifndef GL_EXT_debug_marker
1466 #define GL_EXT_debug_marker 1
1467 #ifdef GL_GLEXT_PROTOTYPES
1468 GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
1469 GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
1470 GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
1471 #endif
1472 typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1473 typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1474 typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
1475 #endif
1476
1477 /* GL_EXT_discard_framebuffer */
1478 #ifndef GL_EXT_discard_framebuffer
1479 #define GL_EXT_discard_framebuffer 1
1480 #ifdef GL_GLEXT_PROTOTYPES
1481 GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1482 #endif
1483 typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1484 #endif
1485
1486 #ifndef GL_EXT_disjoint_timer_query
1487 #define GL_EXT_disjoint_timer_query 1
1488 #ifdef GL_GLEXT_PROTOTYPES
1489 GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
1490 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
1491 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
1492 GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
1493 GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
1494 GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
1495 GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
1496 GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
1497 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
1498 GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
1499 GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
1500 #endif
1501 typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
1502 typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
1503 typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
1504 typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
1505 typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
1506 typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
1507 typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
1508 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
1509 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
1510 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
1511 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
1512 #endif /* GL_EXT_disjoint_timer_query */
1513
1514 #ifndef GL_EXT_draw_buffers
1515 #define GL_EXT_draw_buffers 1
1516 #ifdef GL_GLEXT_PROTOTYPES
1517 GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
1518 #endif
1519 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
1520 #endif /* GL_EXT_draw_buffers */
1521
1522 /* GL_EXT_map_buffer_range */
1523 #ifndef GL_EXT_map_buffer_range
1524 #define GL_EXT_map_buffer_range 1
1525 #ifdef GL_GLEXT_PROTOTYPES
1526 GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1527 GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
1528 #endif
1529 typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1530 typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1531 #endif
1532
1533 /* GL_EXT_multisampled_render_to_texture */
1534 #ifndef GL_EXT_multisampled_render_to_texture
1535 #define GL_EXT_multisampled_render_to_texture 1
1536 #ifdef GL_GLEXT_PROTOTYPES
1537 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1538 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1539 #endif
1540 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1541 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1542 #endif
1543
1544 /* GL_EXT_multiview_draw_buffers */
1545 #ifndef GL_EXT_multiview_draw_buffers
1546 #define GL_EXT_multiview_draw_buffers 1
1547 #ifdef GL_GLEXT_PROTOTYPES
1548 GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
1549 GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
1550 GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
1551 #endif
1552 typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
1553 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
1554 typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
1555 #endif
1556
1557 #ifndef GL_EXT_multi_draw_arrays
1558 #define GL_EXT_multi_draw_arrays 1
1559 #ifdef GL_GLEXT_PROTOTYPES
1560 GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1561 GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1562 #endif /* GL_GLEXT_PROTOTYPES */
1563 typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1564 typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1565 #endif
1566
1567 /* GL_EXT_occlusion_query_boolean */
1568 #ifndef GL_EXT_occlusion_query_boolean
1569 #define GL_EXT_occlusion_query_boolean 1
1570 /* All entry points also exist in GL_EXT_disjoint_timer_query */
1571 #endif
1572
1573 /* GL_EXT_read_format_bgra */
1574 #ifndef GL_EXT_read_format_bgra
1575 #define GL_EXT_read_format_bgra 1
1576 #endif
1577
1578 /* GL_EXT_robustness */
1579 #ifndef GL_EXT_robustness
1580 #define GL_EXT_robustness 1
1581 #ifdef GL_GLEXT_PROTOTYPES
1582 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
1583 GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1584 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1585 GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1586 #endif
1587 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
1588 typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1589 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1590 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1591 #endif
1592
1593 /* GL_EXT_separate_shader_objects */
1594 #ifndef GL_EXT_separate_shader_objects
1595 #define GL_EXT_separate_shader_objects 1
1596 #ifdef GL_GLEXT_PROTOTYPES
1597 GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
1598 GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
1599 GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
1600 GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
1601 GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
1602 GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
1603 GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
1604 GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
1605 GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
1606 GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
1607 GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
1608 GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
1609 GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1610 GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
1611 GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
1612 GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1613 GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1614 GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1615 GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1616 GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1617 GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1618 GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1619 GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1620 GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1621 GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1622 GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1623 GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1624 GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1625 GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
1626 GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1627 #endif
1628 typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1629 typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
1630 typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
1631 typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1632 typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
1633 typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
1634 typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1635 typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
1636 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
1637 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
1638 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
1639 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
1640 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1641 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
1642 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
1643 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1644 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1645 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1646 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1647 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1648 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1649 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1650 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1651 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1652 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1653 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1654 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1655 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1656 typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1657 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1658 #endif
1659
1660 /* GL_EXT_shader_framebuffer_fetch */
1661 #ifndef GL_EXT_shader_framebuffer_fetch
1662 #define GL_EXT_shader_framebuffer_fetch 1
1663 #endif
1664
1665 /* GL_EXT_shader_texture_lod */
1666 #ifndef GL_EXT_shader_texture_lod
1667 #define GL_EXT_shader_texture_lod 1
1668 #endif
1669
1670 /* GL_EXT_shadow_samplers */
1671 #ifndef GL_EXT_shadow_samplers
1672 #define GL_EXT_shadow_samplers 1
1673 #endif
1674
1675 /* GL_EXT_sRGB */
1676 #ifndef GL_EXT_sRGB
1677 #define GL_EXT_sRGB 1
1678 #endif
1679
1680 /* GL_EXT_texture_compression_dxt1 */
1681 #ifndef GL_EXT_texture_compression_dxt1
1682 #define GL_EXT_texture_compression_dxt1 1
1683 #endif
1684
1685 /* GL_EXT_texture_filter_anisotropic */
1686 #ifndef GL_EXT_texture_filter_anisotropic
1687 #define GL_EXT_texture_filter_anisotropic 1
1688 #endif
1689
1690 /* GL_EXT_texture_format_BGRA8888 */
1691 #ifndef GL_EXT_texture_format_BGRA8888
1692 #define GL_EXT_texture_format_BGRA8888 1
1693 #endif
1694
1695 /* GL_EXT_texture_rg */
1696 #ifndef GL_EXT_texture_rg
1697 #define GL_EXT_texture_rg 1
1698 #endif
1699
1700 /* GL_EXT_texture_storage */
1701 #ifndef GL_EXT_texture_storage
1702 #define GL_EXT_texture_storage 1
1703 #ifdef GL_GLEXT_PROTOTYPES
1704 GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1705 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1706 GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1707 GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1708 GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1709 GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1710 #endif
1711 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1712 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1713 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1714 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1715 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1716 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1717 #endif
1718
1719 /* GL_EXT_texture_type_2_10_10_10_REV */
1720 #ifndef GL_EXT_texture_type_2_10_10_10_REV
1721 #define GL_EXT_texture_type_2_10_10_10_REV 1
1722 #endif
1723
1724 /* GL_EXT_unpack_subimage */
1725 #ifndef GL_EXT_unpack_subimage
1726 #define GL_EXT_unpack_subimage 1
1727 #endif
1728
1729 /*------------------------------------------------------------------------*
1730 * DMP extension functions
1731 *------------------------------------------------------------------------*/
1732
1733 /* GL_DMP_shader_binary */
1734 #ifndef GL_DMP_shader_binary
1735 #define GL_DMP_shader_binary 1
1736 #endif
1737
1738 /*------------------------------------------------------------------------*
1739 * FJ extension functions
1740 *------------------------------------------------------------------------*/
1741
1742 /* GL_FJ_shader_binary_GCCSO */
1743 #ifndef GL_FJ_shader_binary_GCCSO
1744 #define GL_FJ_shader_binary_GCCSO 1
1745 #endif
1746
1747 /*------------------------------------------------------------------------*
1748 * IMG extension functions
1749 *------------------------------------------------------------------------*/
1750
1751 /* GL_IMG_program_binary */
1752 #ifndef GL_IMG_program_binary
1753 #define GL_IMG_program_binary 1
1754 #endif
1755
1756 /* GL_IMG_read_format */
1757 #ifndef GL_IMG_read_format
1758 #define GL_IMG_read_format 1
1759 #endif
1760
1761 /* GL_IMG_shader_binary */
1762 #ifndef GL_IMG_shader_binary
1763 #define GL_IMG_shader_binary 1
1764 #endif
1765
1766 /* GL_IMG_texture_compression_pvrtc */
1767 #ifndef GL_IMG_texture_compression_pvrtc
1768 #define GL_IMG_texture_compression_pvrtc 1
1769 #endif
1770
1771 /* GL_IMG_texture_compression_pvrtc2 */
1772 #ifndef GL_IMG_texture_compression_pvrtc2
1773 #define GL_IMG_texture_compression_pvrtc2 1
1774 #endif
1775
1776 /* GL_IMG_multisampled_render_to_texture */
1777 #ifndef GL_IMG_multisampled_render_to_texture
1778 #define GL_IMG_multisampled_render_to_texture 1
1779 #ifdef GL_GLEXT_PROTOTYPES
1780 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1781 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1782 #endif
1783 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1784 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1785 #endif
1786
1787 /*------------------------------------------------------------------------*
1788 * NV extension functions
1789 *------------------------------------------------------------------------*/
1790
1791 /* GL_NV_coverage_sample */
1792 #ifndef GL_NV_coverage_sample
1793 #define GL_NV_coverage_sample 1
1794 #ifdef GL_GLEXT_PROTOTYPES
1795 GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
1796 GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
1797 #endif
1798 typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
1799 typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
1800 #endif
1801
1802 /* GL_NV_depth_nonlinear */
1803 #ifndef GL_NV_depth_nonlinear
1804 #define GL_NV_depth_nonlinear 1
1805 #endif
1806
1807 /* GL_NV_draw_buffers */
1808 #ifndef GL_NV_draw_buffers
1809 #define GL_NV_draw_buffers 1
1810 #ifdef GL_GLEXT_PROTOTYPES
1811 GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
1812 #endif
1813 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
1814 #endif
1815
1816 /* GL_NV_draw_instanced */
1817 #ifndef GL_NV_draw_instanced
1818 #define GL_NV_draw_instanced 1
1819 #ifdef GL_GLEXT_PROTOTYPES
1820 GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1821 GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1822 #endif
1823 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1824 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1825 #endif
1826
1827 /* GL_NV_fbo_color_attachments */
1828 #ifndef GL_NV_fbo_color_attachments
1829 #define GL_NV_fbo_color_attachments 1
1830 #endif
1831
1832 /* GL_NV_fence */
1833 #ifndef GL_NV_fence
1834 #define GL_NV_fence 1
1835 #ifdef GL_GLEXT_PROTOTYPES
1836 GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
1837 GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
1838 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
1839 GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
1840 GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
1841 GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
1842 GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
1843 #endif
1844 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
1845 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
1846 typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
1847 typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
1848 typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
1849 typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
1850 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
1851 #endif
1852
1853 /* GL_NV_framebuffer_blit */
1854 #ifndef GL_NV_framebuffer_blit
1855 #define GL_NV_framebuffer_blit 1
1856 #ifdef GL_GLEXT_PROTOTYPES
1857 GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1858 #endif
1859 typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1860 #endif
1861
1862 /* GL_NV_framebuffer_multisample */
1863 #ifndef GL_NV_framebuffer_multisample
1864 #define GL_NV_framebuffer_multisample 1
1865 #ifdef GL_GLEXT_PROTOTYPES
1866 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1867 #endif
1868 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1869 #endif
1870
1871 /* GL_NV_generate_mipmap_sRGB */
1872 #ifndef GL_NV_generate_mipmap_sRGB
1873 #define GL_NV_generate_mipmap_sRGB 1
1874 #endif
1875
1876 /* GL_NV_instanced_arrays */
1877 #ifndef GL_NV_instanced_arrays
1878 #define GL_NV_instanced_arrays 1
1879 #ifdef GL_GLEXT_PROTOTYPES
1880 GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
1881 #endif
1882 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
1883 #endif
1884
1885 /* GL_NV_read_buffer */
1886 #ifndef GL_NV_read_buffer
1887 #define GL_NV_read_buffer 1
1888 #ifdef GL_GLEXT_PROTOTYPES
1889 GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
1890 #endif
1891 typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
1892 #endif
1893
1894 /* GL_NV_read_buffer_front */
1895 #ifndef GL_NV_read_buffer_front
1896 #define GL_NV_read_buffer_front 1
1897 #endif
1898
1899 /* GL_NV_read_depth */
1900 #ifndef GL_NV_read_depth
1901 #define GL_NV_read_depth 1
1902 #endif
1903
1904 /* GL_NV_read_depth_stencil */
1905 #ifndef GL_NV_read_depth_stencil
1906 #define GL_NV_read_depth_stencil 1
1907 #endif
1908
1909 /* GL_NV_read_stencil */
1910 #ifndef GL_NV_read_stencil
1911 #define GL_NV_read_stencil 1
1912 #endif
1913
1914 /* GL_NV_shadow_samplers_array */
1915 #ifndef GL_NV_shadow_samplers_array
1916 #define GL_NV_shadow_samplers_array 1
1917 #endif
1918
1919 /* GL_NV_shadow_samplers_cube */
1920 #ifndef GL_NV_shadow_samplers_cube
1921 #define GL_NV_shadow_samplers_cube 1
1922 #endif
1923
1924 /* GL_NV_sRGB_formats */
1925 #ifndef GL_NV_sRGB_formats
1926 #define GL_NV_sRGB_formats 1
1927 #endif
1928
1929 /* GL_NV_texture_border_clamp */
1930 #ifndef GL_NV_texture_border_clamp
1931 #define GL_NV_texture_border_clamp 1
1932 #endif
1933
1934 /* GL_NV_texture_compression_s3tc_update */
1935 #ifndef GL_NV_texture_compression_s3tc_update
1936 #define GL_NV_texture_compression_s3tc_update 1
1937 #endif
1938
1939 /* GL_NV_texture_npot_2D_mipmap */
1940 #ifndef GL_NV_texture_npot_2D_mipmap
1941 #define GL_NV_texture_npot_2D_mipmap 1
1942 #endif
1943
1944 /*------------------------------------------------------------------------*
1945 * QCOM extension functions
1946 *------------------------------------------------------------------------*/
1947
1948 /* GL_QCOM_alpha_test */
1949 #ifndef GL_QCOM_alpha_test
1950 #define GL_QCOM_alpha_test 1
1951 #ifdef GL_GLEXT_PROTOTYPES
1952 GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
1953 #endif
1954 typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
1955 #endif
1956
1957 /* GL_QCOM_binning_control */
1958 #ifndef GL_QCOM_binning_control
1959 #define GL_QCOM_binning_control 1
1960 #endif
1961
1962 /* GL_QCOM_driver_control */
1963 #ifndef GL_QCOM_driver_control
1964 #define GL_QCOM_driver_control 1
1965 #ifdef GL_GLEXT_PROTOTYPES
1966 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
1967 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1968 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
1969 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
1970 #endif
1971 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
1972 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1973 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1974 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1975 #endif
1976
1977 /* GL_QCOM_extended_get */
1978 #ifndef GL_QCOM_extended_get
1979 #define GL_QCOM_extended_get 1
1980 #ifdef GL_GLEXT_PROTOTYPES
1981 GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
1982 GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1983 GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1984 GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1985 GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1986 GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
1987 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);
1988 GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
1989 #endif
1990 typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
1991 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1992 typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1993 typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1994 typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1995 typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
1996 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);
1997 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
1998 #endif
1999
2000 /* GL_QCOM_extended_get2 */
2001 #ifndef GL_QCOM_extended_get2
2002 #define GL_QCOM_extended_get2 1
2003 #ifdef GL_GLEXT_PROTOTYPES
2004 GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2005 GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2006 GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
2007 GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2008 #endif
2009 typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2010 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2011 typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
2012 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2013 #endif
2014
2015 /* GL_QCOM_perfmon_global_mode */
2016 #ifndef GL_QCOM_perfmon_global_mode
2017 #define GL_QCOM_perfmon_global_mode 1
2018 #endif
2019
2020 /* GL_QCOM_writeonly_rendering */
2021 #ifndef GL_QCOM_writeonly_rendering
2022 #define GL_QCOM_writeonly_rendering 1
2023 #endif
2024
2025 /* GL_QCOM_tiled_rendering */
2026 #ifndef GL_QCOM_tiled_rendering
2027 #define GL_QCOM_tiled_rendering 1
2028 #ifdef GL_GLEXT_PROTOTYPES
2029 GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2030 GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
2031 #endif
2032 typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2033 typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
2034 #endif
2035
2036 /*------------------------------------------------------------------------*
2037 * VIV extension tokens
2038 *------------------------------------------------------------------------*/
2039
2040 /* GL_VIV_shader_binary */
2041 #ifndef GL_VIV_shader_binary
2042 #define GL_VIV_shader_binary 1
2043 #endif
2044
2045 #ifdef __cplusplus
2046 }
2047 #endif
2048
2049 #endif /* __gl2ext_h_ */
0 #ifndef __gl2platform_h_
1 #define __gl2platform_h_
2
3 /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
4
5 /*
6 * This document is licensed under the SGI Free Software B License Version
7 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
8 */
9
10 /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
11 *
12 * Adopters may modify khrplatform.h and this file to suit their platform.
13 * You are encouraged to submit all modifications to the Khronos group so that
14 * they can be included in future versions of this file. Please submit changes
15 * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
16 * by filing a bug against product "OpenGL-ES" component "Registry".
17 */
18
19 /*#include <KHR/khrplatform.h>*/
20
21 #ifndef GL_APICALL
22 #define GL_APICALL KHRONOS_APICALL
23 #endif
24
25 #ifndef GL_APIENTRY
26 #define GL_APIENTRY KHRONOS_APIENTRY
27 #endif
28
29 #endif /* __gl2platform_h_ */
0 #ifndef __khrplatform_h_
1 #define __khrplatform_h_
2
3 /*
4 ** Copyright (c) 2008-2009 The Khronos Group Inc.
5 **
6 ** Permission is hereby granted, free of charge, to any person obtaining a
7 ** copy of this software and/or associated documentation files (the
8 ** "Materials"), to deal in the Materials without restriction, including
9 ** without limitation the rights to use, copy, modify, merge, publish,
10 ** distribute, sublicense, and/or sell copies of the Materials, and to
11 ** permit persons to whom the Materials are furnished to do so, subject to
12 ** the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included
15 ** in all copies or substantial portions of the Materials.
16 **
17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25
26 /* Khronos platform-specific types and definitions.
27 *
28 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
29 *
30 * Adopters may modify this file to suit their platform. Adopters are
31 * encouraged to submit platform specific modifications to the Khronos
32 * group so that they can be included in future versions of this file.
33 * Please submit changes by sending them to the public Khronos Bugzilla
34 * (http://khronos.org/bugzilla) by filing a bug against product
35 * "Khronos (general)" component "Registry".
36 *
37 * A predefined template which fills in some of the bug fields can be
38 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
39 * must create a Bugzilla login first.
40 *
41 *
42 * See the Implementer's Guidelines for information about where this file
43 * should be located on your system and for more details of its use:
44 * http://www.khronos.org/registry/implementers_guide.pdf
45 *
46 * This file should be included as
47 * #include <KHR/khrplatform.h>
48 * by Khronos client API header files that use its types and defines.
49 *
50 * The types in khrplatform.h should only be used to define API-specific types.
51 *
52 * Types defined in khrplatform.h:
53 * khronos_int8_t signed 8 bit
54 * khronos_uint8_t unsigned 8 bit
55 * khronos_int16_t signed 16 bit
56 * khronos_uint16_t unsigned 16 bit
57 * khronos_int32_t signed 32 bit
58 * khronos_uint32_t unsigned 32 bit
59 * khronos_int64_t signed 64 bit
60 * khronos_uint64_t unsigned 64 bit
61 * khronos_intptr_t signed same number of bits as a pointer
62 * khronos_uintptr_t unsigned same number of bits as a pointer
63 * khronos_ssize_t signed size
64 * khronos_usize_t unsigned size
65 * khronos_float_t signed 32 bit floating point
66 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
67 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
68 * nanoseconds
69 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
70 * khronos_boolean_enum_t enumerated boolean type. This should
71 * only be used as a base type when a client API's boolean type is
72 * an enum. Client APIs which use an integer or other type for
73 * booleans cannot use this as the base type for their boolean.
74 *
75 * Tokens defined in khrplatform.h:
76 *
77 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
78 *
79 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
80 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
81 *
82 * Calling convention macros defined in this file:
83 * KHRONOS_APICALL
84 * KHRONOS_APIENTRY
85 * KHRONOS_APIATTRIBUTES
86 *
87 * These may be used in function prototypes as:
88 *
89 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
90 * int arg1,
91 * int arg2) KHRONOS_APIATTRIBUTES;
92 */
93
94 /*-------------------------------------------------------------------------
95 * Definition of KHRONOS_APICALL
96 *-------------------------------------------------------------------------
97 * This precedes the return type of the function in the function prototype.
98 */
99 #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
100 # define KHRONOS_APICALL __declspec(dllimport)
101 #elif defined (__SYMBIAN32__)
102 # define KHRONOS_APICALL IMPORT_C
103 #else
104 # define KHRONOS_APICALL
105 #endif
106
107 /*-------------------------------------------------------------------------
108 * Definition of KHRONOS_APIENTRY
109 *-------------------------------------------------------------------------
110 * This follows the return type of the function and precedes the function
111 * name in the function prototype.
112 */
113 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
114 /* Win32 but not WinCE */
115 # define KHRONOS_APIENTRY __stdcall
116 #else
117 # define KHRONOS_APIENTRY
118 #endif
119
120 /*-------------------------------------------------------------------------
121 * Definition of KHRONOS_APIATTRIBUTES
122 *-------------------------------------------------------------------------
123 * This follows the closing parenthesis of the function prototype arguments.
124 */
125 #if defined (__ARMCC_2__)
126 #define KHRONOS_APIATTRIBUTES __softfp
127 #else
128 #define KHRONOS_APIATTRIBUTES
129 #endif
130
131 /*-------------------------------------------------------------------------
132 * basic type definitions
133 *-----------------------------------------------------------------------*/
134 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
135
136
137 /*
138 * Using <stdint.h>
139 */
140 #include <stdint.h>
141 typedef int32_t khronos_int32_t;
142 typedef uint32_t khronos_uint32_t;
143 typedef int64_t khronos_int64_t;
144 typedef uint64_t khronos_uint64_t;
145 #define KHRONOS_SUPPORT_INT64 1
146 #define KHRONOS_SUPPORT_FLOAT 1
147
148 #elif defined(__VMS ) || defined(__sgi)
149
150 /*
151 * Using <inttypes.h>
152 */
153 #include <inttypes.h>
154 typedef int32_t khronos_int32_t;
155 typedef uint32_t khronos_uint32_t;
156 typedef int64_t khronos_int64_t;
157 typedef uint64_t khronos_uint64_t;
158 #define KHRONOS_SUPPORT_INT64 1
159 #define KHRONOS_SUPPORT_FLOAT 1
160
161 #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
162
163 /*
164 * Win32
165 */
166 typedef __int32 khronos_int32_t;
167 typedef unsigned __int32 khronos_uint32_t;
168 typedef __int64 khronos_int64_t;
169 typedef unsigned __int64 khronos_uint64_t;
170 #define KHRONOS_SUPPORT_INT64 1
171 #define KHRONOS_SUPPORT_FLOAT 1
172
173 #elif defined(__sun__) || defined(__digital__)
174
175 /*
176 * Sun or Digital
177 */
178 typedef int khronos_int32_t;
179 typedef unsigned int khronos_uint32_t;
180 #if defined(__arch64__) || defined(_LP64)
181 typedef long int khronos_int64_t;
182 typedef unsigned long int khronos_uint64_t;
183 #else
184 typedef long long int khronos_int64_t;
185 typedef unsigned long long int khronos_uint64_t;
186 #endif /* __arch64__ */
187 #define KHRONOS_SUPPORT_INT64 1
188 #define KHRONOS_SUPPORT_FLOAT 1
189
190 #elif 0
191
192 /*
193 * Hypothetical platform with no float or int64 support
194 */
195 typedef int khronos_int32_t;
196 typedef unsigned int khronos_uint32_t;
197 #define KHRONOS_SUPPORT_INT64 0
198 #define KHRONOS_SUPPORT_FLOAT 0
199
200 #else
201
202 /*
203 * Generic fallback
204 */
205 #include <stdint.h>
206 typedef int32_t khronos_int32_t;
207 typedef uint32_t khronos_uint32_t;
208 typedef int64_t khronos_int64_t;
209 typedef uint64_t khronos_uint64_t;
210 #define KHRONOS_SUPPORT_INT64 1
211 #define KHRONOS_SUPPORT_FLOAT 1
212
213 #endif
214
215
216 /*
217 * Types that are (so far) the same on all platforms
218 */
219 typedef signed char khronos_int8_t;
220 typedef unsigned char khronos_uint8_t;
221 typedef signed short int khronos_int16_t;
222 typedef unsigned short int khronos_uint16_t;
223
224 /*
225 * Types that differ between LLP64 and LP64 architectures - in LLP64,
226 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
227 * to be the only LLP64 architecture in current use.
228 */
229 #ifdef _WIN64
230 typedef signed long long int khronos_intptr_t;
231 typedef unsigned long long int khronos_uintptr_t;
232 typedef signed long long int khronos_ssize_t;
233 typedef unsigned long long int khronos_usize_t;
234 #else
235 typedef signed long int khronos_intptr_t;
236 typedef unsigned long int khronos_uintptr_t;
237 typedef signed long int khronos_ssize_t;
238 typedef unsigned long int khronos_usize_t;
239 #endif
240
241 #if KHRONOS_SUPPORT_FLOAT
242 /*
243 * Float type
244 */
245 typedef float khronos_float_t;
246 #endif
247
248 #if KHRONOS_SUPPORT_INT64
249 /* Time types
250 *
251 * These types can be used to represent a time interval in nanoseconds or
252 * an absolute Unadjusted System Time. Unadjusted System Time is the number
253 * of nanoseconds since some arbitrary system event (e.g. since the last
254 * time the system booted). The Unadjusted System Time is an unsigned
255 * 64 bit value that wraps back to 0 every 584 years. Time intervals
256 * may be either signed or unsigned.
257 */
258 typedef khronos_uint64_t khronos_utime_nanoseconds_t;
259 typedef khronos_int64_t khronos_stime_nanoseconds_t;
260 #endif
261
262 /*
263 * Dummy value used to pad enum types to 32 bits.
264 */
265 #ifndef KHRONOS_MAX_ENUM
266 #define KHRONOS_MAX_ENUM 0x7FFFFFFF
267 #endif
268
269 /*
270 * Enumerated boolean type
271 *
272 * Values other than zero should be considered to be true. Therefore
273 * comparisons should not be made against KHRONOS_TRUE.
274 */
275 typedef enum {
276 KHRONOS_FALSE = 0,
277 KHRONOS_TRUE = 1,
278 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
279 } khronos_boolean_enum_t;
280
281 #endif /* __khrplatform_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_pixels.h
23 *
24 * Header for the enumerated pixel format definitions.
25 */
26
27 #ifndef SDL_pixels_h_
28 #define SDL_pixels_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_endian.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * \name Transparency definitions
41 *
42 * These define alpha as the opacity of a surface.
43 */
44 /* @{ */
45 #define SDL_ALPHA_OPAQUE 255
46 #define SDL_ALPHA_TRANSPARENT 0
47 /* @} */
48
49 /** Pixel type. */
50 typedef enum
51 {
52 SDL_PIXELTYPE_UNKNOWN,
53 SDL_PIXELTYPE_INDEX1,
54 SDL_PIXELTYPE_INDEX4,
55 SDL_PIXELTYPE_INDEX8,
56 SDL_PIXELTYPE_PACKED8,
57 SDL_PIXELTYPE_PACKED16,
58 SDL_PIXELTYPE_PACKED32,
59 SDL_PIXELTYPE_ARRAYU8,
60 SDL_PIXELTYPE_ARRAYU16,
61 SDL_PIXELTYPE_ARRAYU32,
62 SDL_PIXELTYPE_ARRAYF16,
63 SDL_PIXELTYPE_ARRAYF32
64 } SDL_PixelType;
65
66 /** Bitmap pixel order, high bit -> low bit. */
67 typedef enum
68 {
69 SDL_BITMAPORDER_NONE,
70 SDL_BITMAPORDER_4321,
71 SDL_BITMAPORDER_1234
72 } SDL_BitmapOrder;
73
74 /** Packed component order, high bit -> low bit. */
75 typedef enum
76 {
77 SDL_PACKEDORDER_NONE,
78 SDL_PACKEDORDER_XRGB,
79 SDL_PACKEDORDER_RGBX,
80 SDL_PACKEDORDER_ARGB,
81 SDL_PACKEDORDER_RGBA,
82 SDL_PACKEDORDER_XBGR,
83 SDL_PACKEDORDER_BGRX,
84 SDL_PACKEDORDER_ABGR,
85 SDL_PACKEDORDER_BGRA
86 } SDL_PackedOrder;
87
88 /** Array component order, low byte -> high byte. */
89 /* !!! FIXME: in 2.1, make these not overlap differently with
90 !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
91 typedef enum
92 {
93 SDL_ARRAYORDER_NONE,
94 SDL_ARRAYORDER_RGB,
95 SDL_ARRAYORDER_RGBA,
96 SDL_ARRAYORDER_ARGB,
97 SDL_ARRAYORDER_BGR,
98 SDL_ARRAYORDER_BGRA,
99 SDL_ARRAYORDER_ABGR
100 } SDL_ArrayOrder;
101
102 /** Packed component layout. */
103 typedef enum
104 {
105 SDL_PACKEDLAYOUT_NONE,
106 SDL_PACKEDLAYOUT_332,
107 SDL_PACKEDLAYOUT_4444,
108 SDL_PACKEDLAYOUT_1555,
109 SDL_PACKEDLAYOUT_5551,
110 SDL_PACKEDLAYOUT_565,
111 SDL_PACKEDLAYOUT_8888,
112 SDL_PACKEDLAYOUT_2101010,
113 SDL_PACKEDLAYOUT_1010102
114 } SDL_PackedLayout;
115
116 #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
117
118 #define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
119 ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
120 ((bits) << 8) | ((bytes) << 0))
121
122 #define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F)
123 #define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F)
124 #define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F)
125 #define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F)
126 #define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
127 #define SDL_BYTESPERPIXEL(X) \
128 (SDL_ISPIXELFORMAT_FOURCC(X) ? \
129 ((((X) == SDL_PIXELFORMAT_YUY2) || \
130 ((X) == SDL_PIXELFORMAT_UYVY) || \
131 ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
132
133 #define SDL_ISPIXELFORMAT_INDEXED(format) \
134 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
135 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
136 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
137 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
138
139 #define SDL_ISPIXELFORMAT_PACKED(format) \
140 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
141 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
142 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
143 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
144
145 #define SDL_ISPIXELFORMAT_ARRAY(format) \
146 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
147 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
148 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
149 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
150 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
151 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
152
153 #define SDL_ISPIXELFORMAT_ALPHA(format) \
154 ((SDL_ISPIXELFORMAT_PACKED(format) && \
155 ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
156 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
157 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
158 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
159 (SDL_ISPIXELFORMAT_ARRAY(format) && \
160 ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
161 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
162 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
163 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
164
165 /* The flag is set to 1 because 0x1? is not in the printable ASCII range */
166 #define SDL_ISPIXELFORMAT_FOURCC(format) \
167 ((format) && (SDL_PIXELFLAG(format) != 1))
168
169 /* Note: If you modify this list, update SDL_GetPixelFormatName() */
170 typedef enum
171 {
172 SDL_PIXELFORMAT_UNKNOWN,
173 SDL_PIXELFORMAT_INDEX1LSB =
174 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
175 1, 0),
176 SDL_PIXELFORMAT_INDEX1MSB =
177 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
178 1, 0),
179 SDL_PIXELFORMAT_INDEX4LSB =
180 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
181 4, 0),
182 SDL_PIXELFORMAT_INDEX4MSB =
183 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
184 4, 0),
185 SDL_PIXELFORMAT_INDEX8 =
186 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
187 SDL_PIXELFORMAT_RGB332 =
188 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
189 SDL_PACKEDLAYOUT_332, 8, 1),
190 SDL_PIXELFORMAT_XRGB4444 =
191 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
192 SDL_PACKEDLAYOUT_4444, 12, 2),
193 SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
194 SDL_PIXELFORMAT_XBGR4444 =
195 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
196 SDL_PACKEDLAYOUT_4444, 12, 2),
197 SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
198 SDL_PIXELFORMAT_XRGB1555 =
199 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
200 SDL_PACKEDLAYOUT_1555, 15, 2),
201 SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
202 SDL_PIXELFORMAT_XBGR1555 =
203 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
204 SDL_PACKEDLAYOUT_1555, 15, 2),
205 SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
206 SDL_PIXELFORMAT_ARGB4444 =
207 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
208 SDL_PACKEDLAYOUT_4444, 16, 2),
209 SDL_PIXELFORMAT_RGBA4444 =
210 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
211 SDL_PACKEDLAYOUT_4444, 16, 2),
212 SDL_PIXELFORMAT_ABGR4444 =
213 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
214 SDL_PACKEDLAYOUT_4444, 16, 2),
215 SDL_PIXELFORMAT_BGRA4444 =
216 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
217 SDL_PACKEDLAYOUT_4444, 16, 2),
218 SDL_PIXELFORMAT_ARGB1555 =
219 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
220 SDL_PACKEDLAYOUT_1555, 16, 2),
221 SDL_PIXELFORMAT_RGBA5551 =
222 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
223 SDL_PACKEDLAYOUT_5551, 16, 2),
224 SDL_PIXELFORMAT_ABGR1555 =
225 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
226 SDL_PACKEDLAYOUT_1555, 16, 2),
227 SDL_PIXELFORMAT_BGRA5551 =
228 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
229 SDL_PACKEDLAYOUT_5551, 16, 2),
230 SDL_PIXELFORMAT_RGB565 =
231 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
232 SDL_PACKEDLAYOUT_565, 16, 2),
233 SDL_PIXELFORMAT_BGR565 =
234 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
235 SDL_PACKEDLAYOUT_565, 16, 2),
236 SDL_PIXELFORMAT_RGB24 =
237 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
238 24, 3),
239 SDL_PIXELFORMAT_BGR24 =
240 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
241 24, 3),
242 SDL_PIXELFORMAT_XRGB8888 =
243 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
244 SDL_PACKEDLAYOUT_8888, 24, 4),
245 SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
246 SDL_PIXELFORMAT_RGBX8888 =
247 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
248 SDL_PACKEDLAYOUT_8888, 24, 4),
249 SDL_PIXELFORMAT_XBGR8888 =
250 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
251 SDL_PACKEDLAYOUT_8888, 24, 4),
252 SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
253 SDL_PIXELFORMAT_BGRX8888 =
254 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
255 SDL_PACKEDLAYOUT_8888, 24, 4),
256 SDL_PIXELFORMAT_ARGB8888 =
257 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
258 SDL_PACKEDLAYOUT_8888, 32, 4),
259 SDL_PIXELFORMAT_RGBA8888 =
260 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
261 SDL_PACKEDLAYOUT_8888, 32, 4),
262 SDL_PIXELFORMAT_ABGR8888 =
263 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
264 SDL_PACKEDLAYOUT_8888, 32, 4),
265 SDL_PIXELFORMAT_BGRA8888 =
266 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
267 SDL_PACKEDLAYOUT_8888, 32, 4),
268 SDL_PIXELFORMAT_ARGB2101010 =
269 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
270 SDL_PACKEDLAYOUT_2101010, 32, 4),
271
272 /* Aliases for RGBA byte arrays of color data, for the current platform */
273 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
274 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
275 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
276 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
277 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
278 #else
279 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
280 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
281 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
282 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
283 #endif
284
285 SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
286 SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
287 SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
288 SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
289 SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
290 SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
291 SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
292 SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
293 SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
294 SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
295 SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
296 SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
297 SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
298 SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
299 SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
300 SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
301 } SDL_PixelFormatEnum;
302
303 /**
304 * The bits of this structure can be directly reinterpreted as an integer-packed
305 * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888
306 * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
307 */
308 typedef struct SDL_Color
309 {
310 Uint8 r;
311 Uint8 g;
312 Uint8 b;
313 Uint8 a;
314 } SDL_Color;
315 #define SDL_Colour SDL_Color
316
317 typedef struct SDL_Palette
318 {
319 int ncolors;
320 SDL_Color *colors;
321 Uint32 version;
322 int refcount;
323 } SDL_Palette;
324
325 /**
326 * \note Everything in the pixel format structure is read-only.
327 */
328 typedef struct SDL_PixelFormat
329 {
330 Uint32 format;
331 SDL_Palette *palette;
332 Uint8 BitsPerPixel;
333 Uint8 BytesPerPixel;
334 Uint8 padding[2];
335 Uint32 Rmask;
336 Uint32 Gmask;
337 Uint32 Bmask;
338 Uint32 Amask;
339 Uint8 Rloss;
340 Uint8 Gloss;
341 Uint8 Bloss;
342 Uint8 Aloss;
343 Uint8 Rshift;
344 Uint8 Gshift;
345 Uint8 Bshift;
346 Uint8 Ashift;
347 int refcount;
348 struct SDL_PixelFormat *next;
349 } SDL_PixelFormat;
350
351 /**
352 * Get the human readable name of a pixel format.
353 *
354 * \param format the pixel format to query
355 * \returns the human readable name of the specified pixel format or
356 * `SDL_PIXELFORMAT_UNKNOWN` if the format isn't recognized.
357 *
358 * \since This function is available since SDL 2.0.0.
359 */
360 extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
361
362 /**
363 * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
364 *
365 * \param format one of the SDL_PixelFormatEnum values
366 * \param bpp a bits per pixel value; usually 15, 16, or 32
367 * \param Rmask a pointer filled in with the red mask for the format
368 * \param Gmask a pointer filled in with the green mask for the format
369 * \param Bmask a pointer filled in with the blue mask for the format
370 * \param Amask a pointer filled in with the alpha mask for the format
371 * \returns SDL_TRUE on success or SDL_FALSE if the conversion wasn't
372 * possible; call SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_MasksToPixelFormatEnum
377 */
378 extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
379 int *bpp,
380 Uint32 * Rmask,
381 Uint32 * Gmask,
382 Uint32 * Bmask,
383 Uint32 * Amask);
384
385 /**
386 * Convert a bpp value and RGBA masks to an enumerated pixel format.
387 *
388 * This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't
389 * possible.
390 *
391 * \param bpp a bits per pixel value; usually 15, 16, or 32
392 * \param Rmask the red mask for the format
393 * \param Gmask the green mask for the format
394 * \param Bmask the blue mask for the format
395 * \param Amask the alpha mask for the format
396 * \returns one of the SDL_PixelFormatEnum values
397 *
398 * \since This function is available since SDL 2.0.0.
399 *
400 * \sa SDL_PixelFormatEnumToMasks
401 */
402 extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
403 Uint32 Rmask,
404 Uint32 Gmask,
405 Uint32 Bmask,
406 Uint32 Amask);
407
408 /**
409 * Create an SDL_PixelFormat structure corresponding to a pixel format.
410 *
411 * Returned structure may come from a shared global cache (i.e. not newly
412 * allocated), and hence should not be modified, especially the palette. Weird
413 * errors such as `Blit combination not supported` may occur.
414 *
415 * \param pixel_format one of the SDL_PixelFormatEnum values
416 * \returns the new SDL_PixelFormat structure or NULL on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_FreeFormat
422 */
423 extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
424
425 /**
426 * Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
427 *
428 * \param format the SDL_PixelFormat structure to free
429 *
430 * \since This function is available since SDL 2.0.0.
431 *
432 * \sa SDL_AllocFormat
433 */
434 extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
435
436 /**
437 * Create a palette structure with the specified number of color entries.
438 *
439 * The palette entries are initialized to white.
440 *
441 * \param ncolors represents the number of color entries in the color palette
442 * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
443 * there wasn't enough memory); call SDL_GetError() for more
444 * information.
445 *
446 * \since This function is available since SDL 2.0.0.
447 *
448 * \sa SDL_FreePalette
449 */
450 extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
451
452 /**
453 * Set the palette for a pixel format structure.
454 *
455 * \param format the SDL_PixelFormat structure that will use the palette
456 * \param palette the SDL_Palette structure that will be used
457 * \returns 0 on success or a negative error code on failure; call
458 * SDL_GetError() for more information.
459 *
460 * \since This function is available since SDL 2.0.0.
461 *
462 * \sa SDL_AllocPalette
463 * \sa SDL_FreePalette
464 */
465 extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
466 SDL_Palette *palette);
467
468 /**
469 * Set a range of colors in a palette.
470 *
471 * \param palette the SDL_Palette structure to modify
472 * \param colors an array of SDL_Color structures to copy into the palette
473 * \param firstcolor the index of the first palette entry to modify
474 * \param ncolors the number of entries to modify
475 * \returns 0 on success or a negative error code if not all of the colors
476 * could be set; call SDL_GetError() for more information.
477 *
478 * \since This function is available since SDL 2.0.0.
479 *
480 * \sa SDL_AllocPalette
481 * \sa SDL_CreateRGBSurface
482 */
483 extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
484 const SDL_Color * colors,
485 int firstcolor, int ncolors);
486
487 /**
488 * Free a palette created with SDL_AllocPalette().
489 *
490 * \param palette the SDL_Palette structure to be freed
491 *
492 * \since This function is available since SDL 2.0.0.
493 *
494 * \sa SDL_AllocPalette
495 */
496 extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
497
498 /**
499 * Map an RGB triple to an opaque pixel value for a given pixel format.
500 *
501 * This function maps the RGB color value to the specified pixel format and
502 * returns the pixel value best approximating the given RGB color value for
503 * the given pixel format.
504 *
505 * If the format has a palette (8-bit) the index of the closest matching color
506 * in the palette will be returned.
507 *
508 * If the specified pixel format has an alpha component it will be returned as
509 * all 1 bits (fully opaque).
510 *
511 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
512 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
513 * format the return value can be assigned to a Uint16, and similarly a Uint8
514 * for an 8-bpp format).
515 *
516 * \param format an SDL_PixelFormat structure describing the pixel format
517 * \param r the red component of the pixel in the range 0-255
518 * \param g the green component of the pixel in the range 0-255
519 * \param b the blue component of the pixel in the range 0-255
520 * \returns a pixel value
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_GetRGB
525 * \sa SDL_GetRGBA
526 * \sa SDL_MapRGBA
527 */
528 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
529 Uint8 r, Uint8 g, Uint8 b);
530
531 /**
532 * Map an RGBA quadruple to a pixel value for a given pixel format.
533 *
534 * This function maps the RGBA color value to the specified pixel format and
535 * returns the pixel value best approximating the given RGBA color value for
536 * the given pixel format.
537 *
538 * If the specified pixel format has no alpha component the alpha value will
539 * be ignored (as it will be in formats with a palette).
540 *
541 * If the format has a palette (8-bit) the index of the closest matching color
542 * in the palette will be returned.
543 *
544 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
545 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
546 * format the return value can be assigned to a Uint16, and similarly a Uint8
547 * for an 8-bpp format).
548 *
549 * \param format an SDL_PixelFormat structure describing the format of the
550 * pixel
551 * \param r the red component of the pixel in the range 0-255
552 * \param g the green component of the pixel in the range 0-255
553 * \param b the blue component of the pixel in the range 0-255
554 * \param a the alpha component of the pixel in the range 0-255
555 * \returns a pixel value
556 *
557 * \since This function is available since SDL 2.0.0.
558 *
559 * \sa SDL_GetRGB
560 * \sa SDL_GetRGBA
561 * \sa SDL_MapRGB
562 */
563 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
564 Uint8 r, Uint8 g, Uint8 b,
565 Uint8 a);
566
567 /**
568 * Get RGB values from a pixel in the specified format.
569 *
570 * This function uses the entire 8-bit [0..255] range when converting color
571 * components from pixel formats with less than 8-bits per RGB component
572 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
573 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
574 *
575 * \param pixel a pixel value
576 * \param format an SDL_PixelFormat structure describing the format of the
577 * pixel
578 * \param r a pointer filled in with the red component
579 * \param g a pointer filled in with the green component
580 * \param b a pointer filled in with the blue component
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetRGBA
585 * \sa SDL_MapRGB
586 * \sa SDL_MapRGBA
587 */
588 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
589 const SDL_PixelFormat * format,
590 Uint8 * r, Uint8 * g, Uint8 * b);
591
592 /**
593 * Get RGBA values from a pixel in the specified format.
594 *
595 * This function uses the entire 8-bit [0..255] range when converting color
596 * components from pixel formats with less than 8-bits per RGB component
597 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
598 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
599 *
600 * If the surface has no alpha component, the alpha will be returned as 0xff
601 * (100% opaque).
602 *
603 * \param pixel a pixel value
604 * \param format an SDL_PixelFormat structure describing the format of the
605 * pixel
606 * \param r a pointer filled in with the red component
607 * \param g a pointer filled in with the green component
608 * \param b a pointer filled in with the blue component
609 * \param a a pointer filled in with the alpha component
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_GetRGB
614 * \sa SDL_MapRGB
615 * \sa SDL_MapRGBA
616 */
617 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
618 const SDL_PixelFormat * format,
619 Uint8 * r, Uint8 * g, Uint8 * b,
620 Uint8 * a);
621
622 /**
623 * Calculate a 256 entry gamma ramp for a gamma value.
624 *
625 * \param gamma a gamma value where 0.0 is black and 1.0 is identity
626 * \param ramp an array of 256 values filled in with the gamma ramp
627 *
628 * \since This function is available since SDL 2.0.0.
629 *
630 * \sa SDL_SetWindowGammaRamp
631 */
632 extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
633
634
635 /* Ends C function definitions when using C++ */
636 #ifdef __cplusplus
637 }
638 #endif
639 #include <SDL2/close_code.h>
640
641 #endif /* SDL_pixels_h_ */
642
643 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_platform.h
23 *
24 * Try to get a standard set of platform defines.
25 */
26
27 #ifndef SDL_platform_h_
28 #define SDL_platform_h_
29
30 #if defined(_AIX)
31 #undef __AIX__
32 #define __AIX__ 1
33 #endif
34 #if defined(__HAIKU__)
35 #undef __HAIKU__
36 #define __HAIKU__ 1
37 #endif
38 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
39 #undef __BSDI__
40 #define __BSDI__ 1
41 #endif
42 #if defined(_arch_dreamcast)
43 #undef __DREAMCAST__
44 #define __DREAMCAST__ 1
45 #endif
46 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
47 #undef __FREEBSD__
48 #define __FREEBSD__ 1
49 #endif
50 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
51 #undef __HPUX__
52 #define __HPUX__ 1
53 #endif
54 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
55 #undef __IRIX__
56 #define __IRIX__ 1
57 #endif
58 #if (defined(linux) || defined(__linux) || defined(__linux__))
59 #undef __LINUX__
60 #define __LINUX__ 1
61 #endif
62 #if defined(ANDROID) || defined(__ANDROID__)
63 #undef __ANDROID__
64 #undef __LINUX__ /* do we need to do this? */
65 #define __ANDROID__ 1
66 #endif
67
68 #if defined(__APPLE__)
69 /* lets us know what version of Mac OS X we're compiling on */
70 #include <AvailabilityMacros.h>
71 #include <TargetConditionals.h>
72
73 /* Fix building with older SDKs that don't define these
74 See this for more information:
75 https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
76 */
77 #ifndef TARGET_OS_MACCATALYST
78 #define TARGET_OS_MACCATALYST 0
79 #endif
80 #ifndef TARGET_OS_IOS
81 #define TARGET_OS_IOS 0
82 #endif
83 #ifndef TARGET_OS_IPHONE
84 #define TARGET_OS_IPHONE 0
85 #endif
86 #ifndef TARGET_OS_TV
87 #define TARGET_OS_TV 0
88 #endif
89 #ifndef TARGET_OS_SIMULATOR
90 #define TARGET_OS_SIMULATOR 0
91 #endif
92
93 #if TARGET_OS_TV
94 #undef __TVOS__
95 #define __TVOS__ 1
96 #endif
97 #if TARGET_OS_IPHONE
98 /* if compiling for iOS */
99 #undef __IPHONEOS__
100 #define __IPHONEOS__ 1
101 #undef __MACOSX__
102 #else
103 /* if not compiling for iOS */
104 #undef __MACOSX__
105 #define __MACOSX__ 1
106 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
107 # error SDL for Mac OS X only supports deploying on 10.6 and above.
108 #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
109 #endif /* TARGET_OS_IPHONE */
110 #endif /* defined(__APPLE__) */
111
112 #if defined(__NetBSD__)
113 #undef __NETBSD__
114 #define __NETBSD__ 1
115 #endif
116 #if defined(__OpenBSD__)
117 #undef __OPENBSD__
118 #define __OPENBSD__ 1
119 #endif
120 #if defined(__OS2__) || defined(__EMX__)
121 #undef __OS2__
122 #define __OS2__ 1
123 #endif
124 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
125 #undef __OSF__
126 #define __OSF__ 1
127 #endif
128 #if defined(__QNXNTO__)
129 #undef __QNXNTO__
130 #define __QNXNTO__ 1
131 #endif
132 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
133 #undef __RISCOS__
134 #define __RISCOS__ 1
135 #endif
136 #if defined(__sun) && defined(__SVR4)
137 #undef __SOLARIS__
138 #define __SOLARIS__ 1
139 #endif
140
141 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
142 /* Try to find out if we're compiling for WinRT or non-WinRT */
143 #if defined(_MSC_VER) && defined(__has_include)
144 #if __has_include(<winapifamily.h>)
145 #define HAVE_WINAPIFAMILY_H 1
146 #else
147 #define HAVE_WINAPIFAMILY_H 0
148 #endif
149
150 /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
151 #elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
152 #define HAVE_WINAPIFAMILY_H 1
153 #else
154 #define HAVE_WINAPIFAMILY_H 0
155 #endif
156
157 #if HAVE_WINAPIFAMILY_H
158 #include <winapifamily.h>
159 #define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
160 #else
161 #define WINAPI_FAMILY_WINRT 0
162 #endif /* HAVE_WINAPIFAMILY_H */
163
164 #if WINAPI_FAMILY_WINRT
165 #undef __WINRT__
166 #define __WINRT__ 1
167 #else
168 #undef __WINDOWS__
169 #define __WINDOWS__ 1
170 #endif
171 #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
172
173 #if defined(__WINDOWS__)
174 #undef __WIN32__
175 #define __WIN32__ 1
176 #endif
177 #if defined(__PSP__)
178 #undef __PSP__
179 #define __PSP__ 1
180 #endif
181
182 /* The NACL compiler defines __native_client__ and __pnacl__
183 * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
184 */
185 #if defined(__native_client__)
186 #undef __LINUX__
187 #undef __NACL__
188 #define __NACL__ 1
189 #endif
190 #if defined(__pnacl__)
191 #undef __LINUX__
192 #undef __PNACL__
193 #define __PNACL__ 1
194 /* PNACL with newlib supports static linking only */
195 #define __SDL_NOGETPROCADDR__
196 #endif
197
198 #if defined(__vita__)
199 #define __VITA__ 1
200 #endif
201
202 #include <SDL2/begin_code.h>
203 /* Set up for C function definitions, even when using C++ */
204 #ifdef __cplusplus
205 extern "C" {
206 #endif
207
208 /**
209 * Get the name of the platform.
210 *
211 * Here are the names returned for some (but not all) supported platforms:
212 *
213 * - "Windows"
214 * - "Mac OS X"
215 * - "Linux"
216 * - "iOS"
217 * - "Android"
218 *
219 * \returns the name of the platform. If the correct platform name is not
220 * available, returns a string beginning with the text "Unknown".
221 *
222 * \since This function is available since SDL 2.0.0.
223 */
224 extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
225
226 /* Ends C function definitions when using C++ */
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_platform_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_power_h_
22 #define SDL_power_h_
23
24 /**
25 * \file SDL_power.h
26 *
27 * Header for the SDL power management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * The basic state for the system's power supply.
40 */
41 typedef enum
42 {
43 SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
44 SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
45 SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
46 SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
47 SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
48 } SDL_PowerState;
49
50
51 /**
52 * Get the current power supply details.
53 *
54 * You should never take a battery status as absolute truth. Batteries
55 * (especially failing batteries) are delicate hardware, and the values
56 * reported here are best estimates based on what that hardware reports. It's
57 * not uncommon for older batteries to lose stored power much faster than it
58 * reports, or completely drain when reporting it has 20 percent left, etc.
59 *
60 * Battery status can change at any time; if you are concerned with power
61 * state, you should call this function frequently, and perhaps ignore changes
62 * until they seem to be stable for a few seconds.
63 *
64 * It's possible a platform can only report battery percentage or time left
65 * but not both.
66 *
67 * \param secs seconds of battery life left, you can pass a NULL here if you
68 * don't care, will return -1 if we can't determine a value, or
69 * we're not running on a battery
70 * \param pct percentage of battery life left, between 0 and 100, you can pass
71 * a NULL here if you don't care, will return -1 if we can't
72 * determine a value, or we're not running on a battery
73 * \returns an SDL_PowerState enum representing the current battery state.
74 *
75 * \since This function is available since SDL 2.0.0.
76 */
77 extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
78
79 /* Ends C function definitions when using C++ */
80 #ifdef __cplusplus
81 }
82 #endif
83 #include <SDL2/close_code.h>
84
85 #endif /* SDL_power_h_ */
86
87 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_quit.h
23 *
24 * Include file for SDL quit event handling.
25 */
26
27 #ifndef SDL_quit_h_
28 #define SDL_quit_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /**
34 * \file SDL_quit.h
35 *
36 * An ::SDL_QUIT event is generated when the user tries to close the application
37 * window. If it is ignored or filtered out, the window will remain open.
38 * If it is not ignored or filtered, it is queued normally and the window
39 * is allowed to close. When the window is closed, screen updates will
40 * complete, but have no effect.
41 *
42 * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
43 * and SIGTERM (system termination request), if handlers do not already
44 * exist, that generate ::SDL_QUIT events as well. There is no way
45 * to determine the cause of an ::SDL_QUIT event, but setting a signal
46 * handler in your application will override the default generation of
47 * quit events for that signal.
48 *
49 * \sa SDL_Quit()
50 */
51
52 /* There are no functions directly affecting the quit event */
53
54 #define SDL_QuitRequested() \
55 (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
56
57 #endif /* SDL_quit_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rect.h
23 *
24 * Header file for SDL_rect definition and management functions.
25 */
26
27 #ifndef SDL_rect_h_
28 #define SDL_rect_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_pixels.h>
33 #include <SDL2/SDL_rwops.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * The structure that defines a point (integer)
43 *
44 * \sa SDL_EnclosePoints
45 * \sa SDL_PointInRect
46 */
47 typedef struct SDL_Point
48 {
49 int x;
50 int y;
51 } SDL_Point;
52
53 /**
54 * The structure that defines a point (floating point)
55 *
56 * \sa SDL_EncloseFPoints
57 * \sa SDL_PointInFRect
58 */
59 typedef struct SDL_FPoint
60 {
61 float x;
62 float y;
63 } SDL_FPoint;
64
65
66 /**
67 * A rectangle, with the origin at the upper left (integer).
68 *
69 * \sa SDL_RectEmpty
70 * \sa SDL_RectEquals
71 * \sa SDL_HasIntersection
72 * \sa SDL_IntersectRect
73 * \sa SDL_IntersectRectAndLine
74 * \sa SDL_UnionRect
75 * \sa SDL_EnclosePoints
76 */
77 typedef struct SDL_Rect
78 {
79 int x, y;
80 int w, h;
81 } SDL_Rect;
82
83
84 /**
85 * A rectangle, with the origin at the upper left (floating point).
86 *
87 * \sa SDL_FRectEmpty
88 * \sa SDL_FRectEquals
89 * \sa SDL_FRectEqualsEpsilon
90 * \sa SDL_HasIntersectionF
91 * \sa SDL_IntersectFRect
92 * \sa SDL_IntersectFRectAndLine
93 * \sa SDL_UnionFRect
94 * \sa SDL_EncloseFPoints
95 * \sa SDL_PointInFRect
96 */
97 typedef struct SDL_FRect
98 {
99 float x;
100 float y;
101 float w;
102 float h;
103 } SDL_FRect;
104
105
106 /**
107 * Returns true if point resides inside a rectangle.
108 */
109 SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
110 {
111 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
112 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
113 }
114
115 /**
116 * Returns true if the rectangle has no area.
117 */
118 SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
119 {
120 return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
121 }
122
123 /**
124 * Returns true if the two rectangles are equal.
125 */
126 SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
127 {
128 return (a && b && (a->x == b->x) && (a->y == b->y) &&
129 (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
130 }
131
132 /**
133 * Determine whether two rectangles intersect.
134 *
135 * If either pointer is NULL the function will return SDL_FALSE.
136 *
137 * \param A an SDL_Rect structure representing the first rectangle
138 * \param B an SDL_Rect structure representing the second rectangle
139 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_IntersectRect
144 */
145 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
146 const SDL_Rect * B);
147
148 /**
149 * Calculate the intersection of two rectangles.
150 *
151 * If `result` is NULL then this function will return SDL_FALSE.
152 *
153 * \param A an SDL_Rect structure representing the first rectangle
154 * \param B an SDL_Rect structure representing the second rectangle
155 * \param result an SDL_Rect structure filled in with the intersection of
156 * rectangles `A` and `B`
157 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
158 *
159 * \since This function is available since SDL 2.0.0.
160 *
161 * \sa SDL_HasIntersection
162 */
163 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
164 const SDL_Rect * B,
165 SDL_Rect * result);
166
167 /**
168 * Calculate the union of two rectangles.
169 *
170 * \param A an SDL_Rect structure representing the first rectangle
171 * \param B an SDL_Rect structure representing the second rectangle
172 * \param result an SDL_Rect structure filled in with the union of rectangles
173 * `A` and `B`
174 *
175 * \since This function is available since SDL 2.0.0.
176 */
177 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
178 const SDL_Rect * B,
179 SDL_Rect * result);
180
181 /**
182 * Calculate a minimal rectangle enclosing a set of points.
183 *
184 * If `clip` is not NULL then only points inside of the clipping rectangle are
185 * considered.
186 *
187 * \param points an array of SDL_Point structures representing points to be
188 * enclosed
189 * \param count the number of structures in the `points` array
190 * \param clip an SDL_Rect used for clipping or NULL to enclose all points
191 * \param result an SDL_Rect structure filled in with the minimal enclosing
192 * rectangle
193 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
194 * points were outside of the clipping rectangle.
195 *
196 * \since This function is available since SDL 2.0.0.
197 */
198 extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
199 int count,
200 const SDL_Rect * clip,
201 SDL_Rect * result);
202
203 /**
204 * Calculate the intersection of a rectangle and line segment.
205 *
206 * This function is used to clip a line segment to a rectangle. A line segment
207 * contained entirely within the rectangle or that does not intersect will
208 * remain unchanged. A line segment that crosses the rectangle at either or
209 * both ends will be clipped to the boundary of the rectangle and the new
210 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
211 *
212 * \param rect an SDL_Rect structure representing the rectangle to intersect
213 * \param X1 a pointer to the starting X-coordinate of the line
214 * \param Y1 a pointer to the starting Y-coordinate of the line
215 * \param X2 a pointer to the ending X-coordinate of the line
216 * \param Y2 a pointer to the ending Y-coordinate of the line
217 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
218 *
219 * \since This function is available since SDL 2.0.0.
220 */
221 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
222 rect, int *X1,
223 int *Y1, int *X2,
224 int *Y2);
225
226
227 /* SDL_FRect versions... */
228
229 /**
230 * Returns true if point resides inside a rectangle.
231 */
232 SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
233 {
234 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
235 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
236 }
237
238 /**
239 * Returns true if the rectangle has no area.
240 */
241 SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
242 {
243 return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
244 }
245
246 /**
247 * Returns true if the two rectangles are equal, within some given epsilon.
248 *
249 * \since This function is available since SDL 2.0.22.
250 */
251 SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
252 {
253 return (a && b && ((a == b) ||
254 ((SDL_fabs(a->x - b->x) <= epsilon) &&
255 (SDL_fabs(a->y - b->y) <= epsilon) &&
256 (SDL_fabs(a->w - b->w) <= epsilon) &&
257 (SDL_fabs(a->h - b->h) <= epsilon))))
258 ? SDL_TRUE : SDL_FALSE;
259 }
260
261 /**
262 * Returns true if the two rectangles are equal, using a default epsilon.
263 *
264 * \since This function is available since SDL 2.0.22.
265 */
266 SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
267 {
268 return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
269 }
270
271 /**
272 * Determine whether two rectangles intersect with float precision.
273 *
274 * If either pointer is NULL the function will return SDL_FALSE.
275 *
276 * \param A an SDL_FRect structure representing the first rectangle
277 * \param B an SDL_FRect structure representing the second rectangle
278 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
279 *
280 * \since This function is available since SDL 2.0.22.
281 *
282 * \sa SDL_IntersectRect
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
285 const SDL_FRect * B);
286
287 /**
288 * Calculate the intersection of two rectangles with float precision.
289 *
290 * If `result` is NULL then this function will return SDL_FALSE.
291 *
292 * \param A an SDL_FRect structure representing the first rectangle
293 * \param B an SDL_FRect structure representing the second rectangle
294 * \param result an SDL_FRect structure filled in with the intersection of
295 * rectangles `A` and `B`
296 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
297 *
298 * \since This function is available since SDL 2.0.22.
299 *
300 * \sa SDL_HasIntersectionF
301 */
302 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
303 const SDL_FRect * B,
304 SDL_FRect * result);
305
306 /**
307 * Calculate the union of two rectangles with float precision.
308 *
309 * \param A an SDL_FRect structure representing the first rectangle
310 * \param B an SDL_FRect structure representing the second rectangle
311 * \param result an SDL_FRect structure filled in with the union of rectangles
312 * `A` and `B`
313 *
314 * \since This function is available since SDL 2.0.22.
315 */
316 extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
317 const SDL_FRect * B,
318 SDL_FRect * result);
319
320 /**
321 * Calculate a minimal rectangle enclosing a set of points with float
322 * precision.
323 *
324 * If `clip` is not NULL then only points inside of the clipping rectangle are
325 * considered.
326 *
327 * \param points an array of SDL_FPoint structures representing points to be
328 * enclosed
329 * \param count the number of structures in the `points` array
330 * \param clip an SDL_FRect used for clipping or NULL to enclose all points
331 * \param result an SDL_FRect structure filled in with the minimal enclosing
332 * rectangle
333 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
334 * points were outside of the clipping rectangle.
335 *
336 * \since This function is available since SDL 2.0.22.
337 */
338 extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
339 int count,
340 const SDL_FRect * clip,
341 SDL_FRect * result);
342
343 /**
344 * Calculate the intersection of a rectangle and line segment with float
345 * precision.
346 *
347 * This function is used to clip a line segment to a rectangle. A line segment
348 * contained entirely within the rectangle or that does not intersect will
349 * remain unchanged. A line segment that crosses the rectangle at either or
350 * both ends will be clipped to the boundary of the rectangle and the new
351 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
352 *
353 * \param rect an SDL_FRect structure representing the rectangle to intersect
354 * \param X1 a pointer to the starting X-coordinate of the line
355 * \param Y1 a pointer to the starting Y-coordinate of the line
356 * \param X2 a pointer to the ending X-coordinate of the line
357 * \param Y2 a pointer to the ending Y-coordinate of the line
358 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
359 *
360 * \since This function is available since SDL 2.0.22.
361 */
362 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
363 rect, float *X1,
364 float *Y1, float *X2,
365 float *Y2);
366
367 /* Ends C function definitions when using C++ */
368 #ifdef __cplusplus
369 }
370 #endif
371 #include <SDL2/close_code.h>
372
373 #endif /* SDL_rect_h_ */
374
375 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_render.h
23 *
24 * Header file for SDL 2D rendering functions.
25 *
26 * This API supports the following features:
27 * * single pixel points
28 * * single pixel lines
29 * * filled rectangles
30 * * texture images
31 *
32 * The primitives may be drawn in opaque, blended, or additive modes.
33 *
34 * The texture images may be drawn in opaque, blended, or additive modes.
35 * They can have an additional color tint or alpha modulation applied to
36 * them, and may also be stretched with linear interpolation.
37 *
38 * This API is designed to accelerate simple 2D operations. You may
39 * want more functionality such as polygons and particle effects and
40 * in that case you should use SDL's OpenGL/Direct3D support or one
41 * of the many good 3D engines.
42 *
43 * These functions must be called from the main thread.
44 * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
45 */
46
47 #ifndef SDL_render_h_
48 #define SDL_render_h_
49
50 #include <SDL2/SDL_stdinc.h>
51 #include <SDL2/SDL_rect.h>
52 #include <SDL2/SDL_video.h>
53
54 #include <SDL2/begin_code.h>
55 /* Set up for C function definitions, even when using C++ */
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 /**
61 * Flags used when creating a rendering context
62 */
63 typedef enum
64 {
65 SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */
66 SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware
67 acceleration */
68 SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized
69 with the refresh rate */
70 SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports
71 rendering to texture */
72 } SDL_RendererFlags;
73
74 /**
75 * Information on the capabilities of a render driver or context.
76 */
77 typedef struct SDL_RendererInfo
78 {
79 const char *name; /**< The name of the renderer */
80 Uint32 flags; /**< Supported ::SDL_RendererFlags */
81 Uint32 num_texture_formats; /**< The number of available texture formats */
82 Uint32 texture_formats[16]; /**< The available texture formats */
83 int max_texture_width; /**< The maximum texture width */
84 int max_texture_height; /**< The maximum texture height */
85 } SDL_RendererInfo;
86
87 /**
88 * Vertex structure
89 */
90 typedef struct SDL_Vertex
91 {
92 SDL_FPoint position; /**< Vertex position, in SDL_Renderer coordinates */
93 SDL_Color color; /**< Vertex color */
94 SDL_FPoint tex_coord; /**< Normalized texture coordinates, if needed */
95 } SDL_Vertex;
96
97 /**
98 * The scaling mode for a texture.
99 */
100 typedef enum
101 {
102 SDL_ScaleModeNearest, /**< nearest pixel sampling */
103 SDL_ScaleModeLinear, /**< linear filtering */
104 SDL_ScaleModeBest /**< anisotropic filtering */
105 } SDL_ScaleMode;
106
107 /**
108 * The access pattern allowed for a texture.
109 */
110 typedef enum
111 {
112 SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
113 SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
114 SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
115 } SDL_TextureAccess;
116
117 /**
118 * The texture channel modulation used in SDL_RenderCopy().
119 */
120 typedef enum
121 {
122 SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */
123 SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */
124 SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */
125 } SDL_TextureModulate;
126
127 /**
128 * Flip constants for SDL_RenderCopyEx
129 */
130 typedef enum
131 {
132 SDL_FLIP_NONE = 0x00000000, /**< Do not flip */
133 SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */
134 SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */
135 } SDL_RendererFlip;
136
137 /**
138 * A structure representing rendering state
139 */
140 struct SDL_Renderer;
141 typedef struct SDL_Renderer SDL_Renderer;
142
143 /**
144 * An efficient driver-specific representation of pixel data
145 */
146 struct SDL_Texture;
147 typedef struct SDL_Texture SDL_Texture;
148
149 /* Function prototypes */
150
151 /**
152 * Get the number of 2D rendering drivers available for the current display.
153 *
154 * A render driver is a set of code that handles rendering and texture
155 * management on a particular display. Normally there is only one, but some
156 * drivers may have several available with different capabilities.
157 *
158 * There may be none if SDL was compiled without render support.
159 *
160 * \returns a number >= 0 on success or a negative error code on failure; call
161 * SDL_GetError() for more information.
162 *
163 * \since This function is available since SDL 2.0.0.
164 *
165 * \sa SDL_CreateRenderer
166 * \sa SDL_GetRenderDriverInfo
167 */
168 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
169
170 /**
171 * Get info about a specific 2D rendering driver for the current display.
172 *
173 * \param index the index of the driver to query information about
174 * \param info an SDL_RendererInfo structure to be filled with information on
175 * the rendering driver
176 * \returns 0 on success or a negative error code on failure; call
177 * SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.0.
180 *
181 * \sa SDL_CreateRenderer
182 * \sa SDL_GetNumRenderDrivers
183 */
184 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
185 SDL_RendererInfo * info);
186
187 /**
188 * Create a window and default renderer.
189 *
190 * \param width the width of the window
191 * \param height the height of the window
192 * \param window_flags the flags used to create the window (see
193 * SDL_CreateWindow())
194 * \param window a pointer filled with the window, or NULL on error
195 * \param renderer a pointer filled with the renderer, or NULL on error
196 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
197 * information.
198 *
199 * \since This function is available since SDL 2.0.0.
200 *
201 * \sa SDL_CreateRenderer
202 * \sa SDL_CreateWindow
203 */
204 extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
205 int width, int height, Uint32 window_flags,
206 SDL_Window **window, SDL_Renderer **renderer);
207
208
209 /**
210 * Create a 2D rendering context for a window.
211 *
212 * \param window the window where rendering is displayed
213 * \param index the index of the rendering driver to initialize, or -1 to
214 * initialize the first one supporting the requested flags
215 * \param flags 0, or one or more SDL_RendererFlags OR'd together
216 * \returns a valid rendering context or NULL if there was an error; call
217 * SDL_GetError() for more information.
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_CreateSoftwareRenderer
222 * \sa SDL_DestroyRenderer
223 * \sa SDL_GetNumRenderDrivers
224 * \sa SDL_GetRendererInfo
225 */
226 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
227 int index, Uint32 flags);
228
229 /**
230 * Create a 2D software rendering context for a surface.
231 *
232 * Two other API which can be used to create SDL_Renderer:
233 * SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
234 * create a software renderer, but they are intended to be used with an
235 * SDL_Window as the final destination and not an SDL_Surface.
236 *
237 * \param surface the SDL_Surface structure representing the surface where
238 * rendering is done
239 * \returns a valid rendering context or NULL if there was an error; call
240 * SDL_GetError() for more information.
241 *
242 * \since This function is available since SDL 2.0.0.
243 *
244 * \sa SDL_CreateRenderer
245 * \sa SDL_CreateWindowRenderer
246 * \sa SDL_DestroyRenderer
247 */
248 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
249
250 /**
251 * Get the renderer associated with a window.
252 *
253 * \param window the window to query
254 * \returns the rendering context on success or NULL on failure; call
255 * SDL_GetError() for more information.
256 *
257 * \since This function is available since SDL 2.0.0.
258 *
259 * \sa SDL_CreateRenderer
260 */
261 extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
262
263 /**
264 * Get the window associated with a renderer.
265 *
266 * \param renderer the renderer to query
267 * \returns the window on success or NULL on failure; call SDL_GetError() for
268 * more information.
269 *
270 * \since This function is available since SDL 2.0.22.
271 */
272 extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
273
274 /**
275 * Get information about a rendering context.
276 *
277 * \param renderer the rendering context
278 * \param info an SDL_RendererInfo structure filled with information about the
279 * current renderer
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateRenderer
286 */
287 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
288 SDL_RendererInfo * info);
289
290 /**
291 * Get the output size in pixels of a rendering context.
292 *
293 * Due to high-dpi displays, you might end up with a rendering context that
294 * has more pixels than the window that contains it, so use this instead of
295 * SDL_GetWindowSize() to decide how much drawing area you have.
296 *
297 * \param renderer the rendering context
298 * \param w an int filled with the width
299 * \param h an int filled with the height
300 * \returns 0 on success or a negative error code on failure; call
301 * SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetRenderer
306 */
307 extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
308 int *w, int *h);
309
310 /**
311 * Create a texture for a rendering context.
312 *
313 * You can set the texture scaling method by setting
314 * `SDL_HINT_RENDER_SCALE_QUALITY` before creating the texture.
315 *
316 * \param renderer the rendering context
317 * \param format one of the enumerated values in SDL_PixelFormatEnum
318 * \param access one of the enumerated values in SDL_TextureAccess
319 * \param w the width of the texture in pixels
320 * \param h the height of the texture in pixels
321 * \returns a pointer to the created texture or NULL if no rendering context
322 * was active, the format was unsupported, or the width or height
323 * were out of range; call SDL_GetError() for more information.
324 *
325 * \since This function is available since SDL 2.0.0.
326 *
327 * \sa SDL_CreateTextureFromSurface
328 * \sa SDL_DestroyTexture
329 * \sa SDL_QueryTexture
330 * \sa SDL_UpdateTexture
331 */
332 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
333 Uint32 format,
334 int access, int w,
335 int h);
336
337 /**
338 * Create a texture from an existing surface.
339 *
340 * The surface is not modified or freed by this function.
341 *
342 * The SDL_TextureAccess hint for the created texture is
343 * `SDL_TEXTUREACCESS_STATIC`.
344 *
345 * The pixel format of the created texture may be different from the pixel
346 * format of the surface. Use SDL_QueryTexture() to query the pixel format of
347 * the texture.
348 *
349 * \param renderer the rendering context
350 * \param surface the SDL_Surface structure containing pixel data used to fill
351 * the texture
352 * \returns the created texture or NULL on failure; call SDL_GetError() for
353 * more information.
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateTexture
358 * \sa SDL_DestroyTexture
359 * \sa SDL_QueryTexture
360 */
361 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
362
363 /**
364 * Query the attributes of a texture.
365 *
366 * \param texture the texture to query
367 * \param format a pointer filled in with the raw format of the texture; the
368 * actual format may differ, but pixel transfers will use this
369 * format (one of the SDL_PixelFormatEnum values). This argument
370 * can be NULL if you don't need this information.
371 * \param access a pointer filled in with the actual access to the texture
372 * (one of the SDL_TextureAccess values). This argument can be
373 * NULL if you don't need this information.
374 * \param w a pointer filled in with the width of the texture in pixels. This
375 * argument can be NULL if you don't need this information.
376 * \param h a pointer filled in with the height of the texture in pixels. This
377 * argument can be NULL if you don't need this information.
378 * \returns 0 on success or a negative error code on failure; call
379 * SDL_GetError() for more information.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_CreateTexture
384 */
385 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
386 Uint32 * format, int *access,
387 int *w, int *h);
388
389 /**
390 * Set an additional color value multiplied into render copy operations.
391 *
392 * When this texture is rendered, during the copy operation each source color
393 * channel is modulated by the appropriate color value according to the
394 * following formula:
395 *
396 * `srcC = srcC * (color / 255)`
397 *
398 * Color modulation is not always supported by the renderer; it will return -1
399 * if color modulation is not supported.
400 *
401 * \param texture the texture to update
402 * \param r the red color value multiplied into copy operations
403 * \param g the green color value multiplied into copy operations
404 * \param b the blue color value multiplied into copy operations
405 * \returns 0 on success or a negative error code on failure; call
406 * SDL_GetError() for more information.
407 *
408 * \since This function is available since SDL 2.0.0.
409 *
410 * \sa SDL_GetTextureColorMod
411 * \sa SDL_SetTextureAlphaMod
412 */
413 extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
414 Uint8 r, Uint8 g, Uint8 b);
415
416
417 /**
418 * Get the additional color value multiplied into render copy operations.
419 *
420 * \param texture the texture to query
421 * \param r a pointer filled in with the current red color value
422 * \param g a pointer filled in with the current green color value
423 * \param b a pointer filled in with the current blue color value
424 * \returns 0 on success or a negative error code on failure; call
425 * SDL_GetError() for more information.
426 *
427 * \since This function is available since SDL 2.0.0.
428 *
429 * \sa SDL_GetTextureAlphaMod
430 * \sa SDL_SetTextureColorMod
431 */
432 extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
433 Uint8 * r, Uint8 * g,
434 Uint8 * b);
435
436 /**
437 * Set an additional alpha value multiplied into render copy operations.
438 *
439 * When this texture is rendered, during the copy operation the source alpha
440 * value is modulated by this alpha value according to the following formula:
441 *
442 * `srcA = srcA * (alpha / 255)`
443 *
444 * Alpha modulation is not always supported by the renderer; it will return -1
445 * if alpha modulation is not supported.
446 *
447 * \param texture the texture to update
448 * \param alpha the source alpha value multiplied into copy operations
449 * \returns 0 on success or a negative error code on failure; call
450 * SDL_GetError() for more information.
451 *
452 * \since This function is available since SDL 2.0.0.
453 *
454 * \sa SDL_GetTextureAlphaMod
455 * \sa SDL_SetTextureColorMod
456 */
457 extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
458 Uint8 alpha);
459
460 /**
461 * Get the additional alpha value multiplied into render copy operations.
462 *
463 * \param texture the texture to query
464 * \param alpha a pointer filled in with the current alpha value
465 * \returns 0 on success or a negative error code on failure; call
466 * SDL_GetError() for more information.
467 *
468 * \since This function is available since SDL 2.0.0.
469 *
470 * \sa SDL_GetTextureColorMod
471 * \sa SDL_SetTextureAlphaMod
472 */
473 extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
474 Uint8 * alpha);
475
476 /**
477 * Set the blend mode for a texture, used by SDL_RenderCopy().
478 *
479 * If the blend mode is not supported, the closest supported mode is chosen
480 * and this function returns -1.
481 *
482 * \param texture the texture to update
483 * \param blendMode the SDL_BlendMode to use for texture blending
484 * \returns 0 on success or a negative error code on failure; call
485 * SDL_GetError() for more information.
486 *
487 * \since This function is available since SDL 2.0.0.
488 *
489 * \sa SDL_GetTextureBlendMode
490 * \sa SDL_RenderCopy
491 */
492 extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
493 SDL_BlendMode blendMode);
494
495 /**
496 * Get the blend mode used for texture copy operations.
497 *
498 * \param texture the texture to query
499 * \param blendMode a pointer filled in with the current SDL_BlendMode
500 * \returns 0 on success or a negative error code on failure; call
501 * SDL_GetError() for more information.
502 *
503 * \since This function is available since SDL 2.0.0.
504 *
505 * \sa SDL_SetTextureBlendMode
506 */
507 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
508 SDL_BlendMode *blendMode);
509
510 /**
511 * Set the scale mode used for texture scale operations.
512 *
513 * If the scale mode is not supported, the closest supported mode is chosen.
514 *
515 * \param texture The texture to update.
516 * \param scaleMode the SDL_ScaleMode to use for texture scaling.
517 * \returns 0 on success, or -1 if the texture is not valid.
518 *
519 * \since This function is available since SDL 2.0.12.
520 *
521 * \sa SDL_GetTextureScaleMode
522 */
523 extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
524 SDL_ScaleMode scaleMode);
525
526 /**
527 * Get the scale mode used for texture scale operations.
528 *
529 * \param texture the texture to query.
530 * \param scaleMode a pointer filled in with the current scale mode.
531 * \return 0 on success, or -1 if the texture is not valid.
532 *
533 * \since This function is available since SDL 2.0.12.
534 *
535 * \sa SDL_SetTextureScaleMode
536 */
537 extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
538 SDL_ScaleMode *scaleMode);
539
540 /**
541 * Associate a user-specified pointer with a texture.
542 *
543 * \param texture the texture to update.
544 * \param userdata the pointer to associate with the texture.
545 * \returns 0 on success, or -1 if the texture is not valid.
546 *
547 * \since This function is available since SDL 2.0.18.
548 *
549 * \sa SDL_GetTextureUserData
550 */
551 extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture,
552 void *userdata);
553
554 /**
555 * Get the user-specified pointer associated with a texture
556 *
557 * \param texture the texture to query.
558 * \return the pointer associated with the texture, or NULL if the texture is
559 * not valid.
560 *
561 * \since This function is available since SDL 2.0.18.
562 *
563 * \sa SDL_SetTextureUserData
564 */
565 extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture);
566
567 /**
568 * Update the given texture rectangle with new pixel data.
569 *
570 * The pixel data must be in the pixel format of the texture. Use
571 * SDL_QueryTexture() to query the pixel format of the texture.
572 *
573 * This is a fairly slow function, intended for use with static textures that
574 * do not change often.
575 *
576 * If the texture is intended to be updated often, it is preferred to create
577 * the texture as streaming and use the locking functions referenced below.
578 * While this function will work with streaming textures, for optimization
579 * reasons you may not get the pixels back if you lock the texture afterward.
580 *
581 * \param texture the texture to update
582 * \param rect an SDL_Rect structure representing the area to update, or NULL
583 * to update the entire texture
584 * \param pixels the raw pixel data in the format of the texture
585 * \param pitch the number of bytes in a row of pixel data, including padding
586 * between lines
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_CreateTexture
593 * \sa SDL_LockTexture
594 * \sa SDL_UnlockTexture
595 */
596 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
597 const SDL_Rect * rect,
598 const void *pixels, int pitch);
599
600 /**
601 * Update a rectangle within a planar YV12 or IYUV texture with new pixel
602 * data.
603 *
604 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
605 * block of Y and U/V planes in the proper order, but this function is
606 * available if your pixel data is not contiguous.
607 *
608 * \param texture the texture to update
609 * \param rect a pointer to the rectangle of pixels to update, or NULL to
610 * update the entire texture
611 * \param Yplane the raw pixel data for the Y plane
612 * \param Ypitch the number of bytes between rows of pixel data for the Y
613 * plane
614 * \param Uplane the raw pixel data for the U plane
615 * \param Upitch the number of bytes between rows of pixel data for the U
616 * plane
617 * \param Vplane the raw pixel data for the V plane
618 * \param Vpitch the number of bytes between rows of pixel data for the V
619 * plane
620 * \returns 0 on success or -1 if the texture is not valid; call
621 * SDL_GetError() for more information.
622 *
623 * \since This function is available since SDL 2.0.1.
624 *
625 * \sa SDL_UpdateTexture
626 */
627 extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
628 const SDL_Rect * rect,
629 const Uint8 *Yplane, int Ypitch,
630 const Uint8 *Uplane, int Upitch,
631 const Uint8 *Vplane, int Vpitch);
632
633 /**
634 * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
635 *
636 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
637 * block of NV12/21 planes in the proper order, but this function is available
638 * if your pixel data is not contiguous.
639 *
640 * \param texture the texture to update
641 * \param rect a pointer to the rectangle of pixels to update, or NULL to
642 * update the entire texture.
643 * \param Yplane the raw pixel data for the Y plane.
644 * \param Ypitch the number of bytes between rows of pixel data for the Y
645 * plane.
646 * \param UVplane the raw pixel data for the UV plane.
647 * \param UVpitch the number of bytes between rows of pixel data for the UV
648 * plane.
649 * \return 0 on success, or -1 if the texture is not valid.
650 *
651 * \since This function is available since SDL 2.0.16.
652 */
653 extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture,
654 const SDL_Rect * rect,
655 const Uint8 *Yplane, int Ypitch,
656 const Uint8 *UVplane, int UVpitch);
657
658 /**
659 * Lock a portion of the texture for **write-only** pixel access.
660 *
661 * As an optimization, the pixels made available for editing don't necessarily
662 * contain the old texture data. This is a write-only operation, and if you
663 * need to keep a copy of the texture data you should do that at the
664 * application level.
665 *
666 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
667 * changes.
668 *
669 * \param texture the texture to lock for access, which was created with
670 * `SDL_TEXTUREACCESS_STREAMING`
671 * \param rect an SDL_Rect structure representing the area to lock for access;
672 * NULL to lock the entire texture
673 * \param pixels this is filled in with a pointer to the locked pixels,
674 * appropriately offset by the locked area
675 * \param pitch this is filled in with the pitch of the locked pixels; the
676 * pitch is the length of one row in bytes
677 * \returns 0 on success or a negative error code if the texture is not valid
678 * or was not created with `SDL_TEXTUREACCESS_STREAMING`; call
679 * SDL_GetError() for more information.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_UnlockTexture
684 */
685 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
686 const SDL_Rect * rect,
687 void **pixels, int *pitch);
688
689 /**
690 * Lock a portion of the texture for **write-only** pixel access, and expose
691 * it as a SDL surface.
692 *
693 * Besides providing an SDL_Surface instead of raw pixel data, this function
694 * operates like SDL_LockTexture.
695 *
696 * As an optimization, the pixels made available for editing don't necessarily
697 * contain the old texture data. This is a write-only operation, and if you
698 * need to keep a copy of the texture data you should do that at the
699 * application level.
700 *
701 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
702 * changes.
703 *
704 * The returned surface is freed internally after calling SDL_UnlockTexture()
705 * or SDL_DestroyTexture(). The caller should not free it.
706 *
707 * \param texture the texture to lock for access, which was created with
708 * `SDL_TEXTUREACCESS_STREAMING`
709 * \param rect a pointer to the rectangle to lock for access. If the rect is
710 * NULL, the entire texture will be locked
711 * \param surface this is filled in with an SDL surface representing the
712 * locked area
713 * \returns 0 on success, or -1 if the texture is not valid or was not created
714 * with `SDL_TEXTUREACCESS_STREAMING`
715 *
716 * \since This function is available since SDL 2.0.12.
717 *
718 * \sa SDL_LockTexture
719 * \sa SDL_UnlockTexture
720 */
721 extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
722 const SDL_Rect *rect,
723 SDL_Surface **surface);
724
725 /**
726 * Unlock a texture, uploading the changes to video memory, if needed.
727 *
728 * **Warning**: Please note that SDL_LockTexture() is intended to be
729 * write-only; it will not guarantee the previous contents of the texture will
730 * be provided. You must fully initialize any area of a texture that you lock
731 * before unlocking it, as the pixels might otherwise be uninitialized memory.
732 *
733 * Which is to say: locking and immediately unlocking a texture can result in
734 * corrupted textures, depending on the renderer in use.
735 *
736 * \param texture a texture locked by SDL_LockTexture()
737 *
738 * \since This function is available since SDL 2.0.0.
739 *
740 * \sa SDL_LockTexture
741 */
742 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
743
744 /**
745 * Determine whether a renderer supports the use of render targets.
746 *
747 * \param renderer the renderer that will be checked
748 * \returns SDL_TRUE if supported or SDL_FALSE if not.
749 *
750 * \since This function is available since SDL 2.0.0.
751 *
752 * \sa SDL_SetRenderTarget
753 */
754 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
755
756 /**
757 * Set a texture as the current rendering target.
758 *
759 * Before using this function, you should check the
760 * `SDL_RENDERER_TARGETTEXTURE` bit in the flags of SDL_RendererInfo to see if
761 * render targets are supported.
762 *
763 * The default render target is the window for which the renderer was created.
764 * To stop rendering to a texture and render to the window again, call this
765 * function with a NULL `texture`.
766 *
767 * \param renderer the rendering context
768 * \param texture the targeted texture, which must be created with the
769 * `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
770 * window instead of a texture.
771 * \returns 0 on success or a negative error code on failure; call
772 * SDL_GetError() for more information.
773 *
774 * \since This function is available since SDL 2.0.0.
775 *
776 * \sa SDL_GetRenderTarget
777 */
778 extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
779 SDL_Texture *texture);
780
781 /**
782 * Get the current render target.
783 *
784 * The default render target is the window for which the renderer was created,
785 * and is reported a NULL here.
786 *
787 * \param renderer the rendering context
788 * \returns the current render target or NULL for the default render target.
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_SetRenderTarget
793 */
794 extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
795
796 /**
797 * Set a device independent resolution for rendering.
798 *
799 * This function uses the viewport and scaling functionality to allow a fixed
800 * logical resolution for rendering, regardless of the actual output
801 * resolution. If the actual output resolution doesn't have the same aspect
802 * ratio the output rendering will be centered within the output display.
803 *
804 * If the output display is a window, mouse and touch events in the window
805 * will be filtered and scaled so they seem to arrive within the logical
806 * resolution. The SDL_HINT_MOUSE_RELATIVE_SCALING hint controls whether
807 * relative motion events are also scaled.
808 *
809 * If this function results in scaling or subpixel drawing by the rendering
810 * backend, it will be handled using the appropriate quality hints.
811 *
812 * \param renderer the renderer for which resolution should be set
813 * \param w the width of the logical resolution
814 * \param h the height of the logical resolution
815 * \returns 0 on success or a negative error code on failure; call
816 * SDL_GetError() for more information.
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_RenderGetLogicalSize
821 */
822 extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
823
824 /**
825 * Get device independent resolution for rendering.
826 *
827 * This may return 0 for `w` and `h` if the SDL_Renderer has never had its
828 * logical size set by SDL_RenderSetLogicalSize() and never had a render
829 * target set.
830 *
831 * \param renderer a rendering context
832 * \param w an int to be filled with the width
833 * \param h an int to be filled with the height
834 *
835 * \since This function is available since SDL 2.0.0.
836 *
837 * \sa SDL_RenderSetLogicalSize
838 */
839 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
840
841 /**
842 * Set whether to force integer scales for resolution-independent rendering.
843 *
844 * This function restricts the logical viewport to integer values - that is,
845 * when a resolution is between two multiples of a logical size, the viewport
846 * size is rounded down to the lower multiple.
847 *
848 * \param renderer the renderer for which integer scaling should be set
849 * \param enable enable or disable the integer scaling for rendering
850 * \returns 0 on success or a negative error code on failure; call
851 * SDL_GetError() for more information.
852 *
853 * \since This function is available since SDL 2.0.5.
854 *
855 * \sa SDL_RenderGetIntegerScale
856 * \sa SDL_RenderSetLogicalSize
857 */
858 extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
859 SDL_bool enable);
860
861 /**
862 * Get whether integer scales are forced for resolution-independent rendering.
863 *
864 * \param renderer the renderer from which integer scaling should be queried
865 * \returns SDL_TRUE if integer scales are forced or SDL_FALSE if not and on
866 * failure; call SDL_GetError() for more information.
867 *
868 * \since This function is available since SDL 2.0.5.
869 *
870 * \sa SDL_RenderSetIntegerScale
871 */
872 extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
873
874 /**
875 * Set the drawing area for rendering on the current target.
876 *
877 * When the window is resized, the viewport is reset to fill the entire new
878 * window size.
879 *
880 * \param renderer the rendering context
881 * \param rect the SDL_Rect structure representing the drawing area, or NULL
882 * to set the viewport to the entire target
883 * \returns 0 on success or a negative error code on failure; call
884 * SDL_GetError() for more information.
885 *
886 * \since This function is available since SDL 2.0.0.
887 *
888 * \sa SDL_RenderGetViewport
889 */
890 extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
891 const SDL_Rect * rect);
892
893 /**
894 * Get the drawing area for the current target.
895 *
896 * \param renderer the rendering context
897 * \param rect an SDL_Rect structure filled in with the current drawing area
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_RenderSetViewport
902 */
903 extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
904 SDL_Rect * rect);
905
906 /**
907 * Set the clip rectangle for rendering on the specified target.
908 *
909 * \param renderer the rendering context for which clip rectangle should be
910 * set
911 * \param rect an SDL_Rect structure representing the clip area, relative to
912 * the viewport, or NULL to disable clipping
913 * \returns 0 on success or a negative error code on failure; call
914 * SDL_GetError() for more information.
915 *
916 * \since This function is available since SDL 2.0.0.
917 *
918 * \sa SDL_RenderGetClipRect
919 * \sa SDL_RenderIsClipEnabled
920 */
921 extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
922 const SDL_Rect * rect);
923
924 /**
925 * Get the clip rectangle for the current target.
926 *
927 * \param renderer the rendering context from which clip rectangle should be
928 * queried
929 * \param rect an SDL_Rect structure filled in with the current clipping area
930 * or an empty rectangle if clipping is disabled
931 *
932 * \since This function is available since SDL 2.0.0.
933 *
934 * \sa SDL_RenderIsClipEnabled
935 * \sa SDL_RenderSetClipRect
936 */
937 extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
938 SDL_Rect * rect);
939
940 /**
941 * Get whether clipping is enabled on the given renderer.
942 *
943 * \param renderer the renderer from which clip state should be queried
944 * \returns SDL_TRUE if clipping is enabled or SDL_FALSE if not; call
945 * SDL_GetError() for more information.
946 *
947 * \since This function is available since SDL 2.0.4.
948 *
949 * \sa SDL_RenderGetClipRect
950 * \sa SDL_RenderSetClipRect
951 */
952 extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
953
954
955 /**
956 * Set the drawing scale for rendering on the current target.
957 *
958 * The drawing coordinates are scaled by the x/y scaling factors before they
959 * are used by the renderer. This allows resolution independent drawing with a
960 * single coordinate system.
961 *
962 * If this results in scaling or subpixel drawing by the rendering backend, it
963 * will be handled using the appropriate quality hints. For best results use
964 * integer scaling factors.
965 *
966 * \param renderer a rendering context
967 * \param scaleX the horizontal scaling factor
968 * \param scaleY the vertical scaling factor
969 * \returns 0 on success or a negative error code on failure; call
970 * SDL_GetError() for more information.
971 *
972 * \since This function is available since SDL 2.0.0.
973 *
974 * \sa SDL_RenderGetScale
975 * \sa SDL_RenderSetLogicalSize
976 */
977 extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
978 float scaleX, float scaleY);
979
980 /**
981 * Get the drawing scale for the current target.
982 *
983 * \param renderer the renderer from which drawing scale should be queried
984 * \param scaleX a pointer filled in with the horizontal scaling factor
985 * \param scaleY a pointer filled in with the vertical scaling factor
986 *
987 * \since This function is available since SDL 2.0.0.
988 *
989 * \sa SDL_RenderSetScale
990 */
991 extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
992 float *scaleX, float *scaleY);
993
994 /**
995 * Get logical coordinates of point in renderer when given real coordinates of
996 * point in window.
997 *
998 * Logical coordinates will differ from real coordinates when render is scaled
999 * and logical renderer size set
1000 *
1001 * \param renderer the renderer from which the logical coordinates should be
1002 * calcualted
1003 * \param windowX the real X coordinate in the window
1004 * \param windowY the real Y coordinate in the window
1005 * \param logicalX the pointer filled with the logical x coordinate
1006 * \param logicalY the pointer filled with the logical y coordinate
1007 *
1008 * \since This function is available since SDL 2.0.18.
1009 *
1010 * \sa SDL_RenderGetScale
1011 * \sa SDL_RenderSetScale
1012 * \sa SDL_RenderGetLogicalSize
1013 * \sa SDL_RenderSetLogicalSize
1014 */
1015 extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
1016 int windowX, int windowY,
1017 float *logicalX, float *logicalY);
1018
1019 /**
1020 * Get real coordinates of point in window when given logical coordinates of point in renderer.
1021 * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
1022 *
1023 * \param renderer the renderer from which the window coordinates should be calculated
1024 * \param logicalX the logical x coordinate
1025 * \param logicalY the logical y coordinate
1026 * \param windowX the pointer filled with the real X coordinate in the window
1027 * \param windowY the pointer filled with the real Y coordinate in the window
1028
1029 *
1030 * \since This function is available since SDL 2.0.18.
1031 *
1032 * \sa SDL_RenderGetScale
1033 * \sa SDL_RenderSetScale
1034 * \sa SDL_RenderGetLogicalSize
1035 * \sa SDL_RenderSetLogicalSize
1036 */
1037 extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
1038 float logicalX, float logicalY,
1039 int *windowX, int *windowY);
1040
1041 /**
1042 * Set the color used for drawing operations (Rect, Line and Clear).
1043 *
1044 * Set the color for drawing or filling rectangles, lines, and points, and for
1045 * SDL_RenderClear().
1046 *
1047 * \param renderer the rendering context
1048 * \param r the red value used to draw on the rendering target
1049 * \param g the green value used to draw on the rendering target
1050 * \param b the blue value used to draw on the rendering target
1051 * \param a the alpha value used to draw on the rendering target; usually
1052 * `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
1053 * specify how the alpha channel is used
1054 * \returns 0 on success or a negative error code on failure; call
1055 * SDL_GetError() for more information.
1056 *
1057 * \since This function is available since SDL 2.0.0.
1058 *
1059 * \sa SDL_GetRenderDrawColor
1060 * \sa SDL_RenderClear
1061 * \sa SDL_RenderDrawLine
1062 * \sa SDL_RenderDrawLines
1063 * \sa SDL_RenderDrawPoint
1064 * \sa SDL_RenderDrawPoints
1065 * \sa SDL_RenderDrawRect
1066 * \sa SDL_RenderDrawRects
1067 * \sa SDL_RenderFillRect
1068 * \sa SDL_RenderFillRects
1069 */
1070 extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
1071 Uint8 r, Uint8 g, Uint8 b,
1072 Uint8 a);
1073
1074 /**
1075 * Get the color used for drawing operations (Rect, Line and Clear).
1076 *
1077 * \param renderer the rendering context
1078 * \param r a pointer filled in with the red value used to draw on the
1079 * rendering target
1080 * \param g a pointer filled in with the green value used to draw on the
1081 * rendering target
1082 * \param b a pointer filled in with the blue value used to draw on the
1083 * rendering target
1084 * \param a a pointer filled in with the alpha value used to draw on the
1085 * rendering target; usually `SDL_ALPHA_OPAQUE` (255)
1086 * \returns 0 on success or a negative error code on failure; call
1087 * SDL_GetError() for more information.
1088 *
1089 * \since This function is available since SDL 2.0.0.
1090 *
1091 * \sa SDL_SetRenderDrawColor
1092 */
1093 extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
1094 Uint8 * r, Uint8 * g, Uint8 * b,
1095 Uint8 * a);
1096
1097 /**
1098 * Set the blend mode used for drawing operations (Fill and Line).
1099 *
1100 * If the blend mode is not supported, the closest supported mode is chosen.
1101 *
1102 * \param renderer the rendering context
1103 * \param blendMode the SDL_BlendMode to use for blending
1104 * \returns 0 on success or a negative error code on failure; call
1105 * SDL_GetError() for more information.
1106 *
1107 * \since This function is available since SDL 2.0.0.
1108 *
1109 * \sa SDL_GetRenderDrawBlendMode
1110 * \sa SDL_RenderDrawLine
1111 * \sa SDL_RenderDrawLines
1112 * \sa SDL_RenderDrawPoint
1113 * \sa SDL_RenderDrawPoints
1114 * \sa SDL_RenderDrawRect
1115 * \sa SDL_RenderDrawRects
1116 * \sa SDL_RenderFillRect
1117 * \sa SDL_RenderFillRects
1118 */
1119 extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
1120 SDL_BlendMode blendMode);
1121
1122 /**
1123 * Get the blend mode used for drawing operations.
1124 *
1125 * \param renderer the rendering context
1126 * \param blendMode a pointer filled in with the current SDL_BlendMode
1127 * \returns 0 on success or a negative error code on failure; call
1128 * SDL_GetError() for more information.
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_SetRenderDrawBlendMode
1133 */
1134 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
1135 SDL_BlendMode *blendMode);
1136
1137 /**
1138 * Clear the current rendering target with the drawing color.
1139 *
1140 * This function clears the entire rendering target, ignoring the viewport and
1141 * the clip rectangle.
1142 *
1143 * \param renderer the rendering context
1144 * \returns 0 on success or a negative error code on failure; call
1145 * SDL_GetError() for more information.
1146 *
1147 * \since This function is available since SDL 2.0.0.
1148 *
1149 * \sa SDL_SetRenderDrawColor
1150 */
1151 extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
1152
1153 /**
1154 * Draw a point on the current rendering target.
1155 *
1156 * SDL_RenderDrawPoint() draws a single point. If you want to draw multiple,
1157 * use SDL_RenderDrawPoints() instead.
1158 *
1159 * \param renderer the rendering context
1160 * \param x the x coordinate of the point
1161 * \param y the y coordinate of the point
1162 * \returns 0 on success or a negative error code on failure; call
1163 * SDL_GetError() for more information.
1164 *
1165 * \since This function is available since SDL 2.0.0.
1166 *
1167 * \sa SDL_RenderDrawLine
1168 * \sa SDL_RenderDrawLines
1169 * \sa SDL_RenderDrawPoints
1170 * \sa SDL_RenderDrawRect
1171 * \sa SDL_RenderDrawRects
1172 * \sa SDL_RenderFillRect
1173 * \sa SDL_RenderFillRects
1174 * \sa SDL_RenderPresent
1175 * \sa SDL_SetRenderDrawBlendMode
1176 * \sa SDL_SetRenderDrawColor
1177 */
1178 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
1179 int x, int y);
1180
1181 /**
1182 * Draw multiple points on the current rendering target.
1183 *
1184 * \param renderer the rendering context
1185 * \param points an array of SDL_Point structures that represent the points to
1186 * draw
1187 * \param count the number of points to draw
1188 * \returns 0 on success or a negative error code on failure; call
1189 * SDL_GetError() for more information.
1190 *
1191 * \since This function is available since SDL 2.0.0.
1192 *
1193 * \sa SDL_RenderDrawLine
1194 * \sa SDL_RenderDrawLines
1195 * \sa SDL_RenderDrawPoint
1196 * \sa SDL_RenderDrawRect
1197 * \sa SDL_RenderDrawRects
1198 * \sa SDL_RenderFillRect
1199 * \sa SDL_RenderFillRects
1200 * \sa SDL_RenderPresent
1201 * \sa SDL_SetRenderDrawBlendMode
1202 * \sa SDL_SetRenderDrawColor
1203 */
1204 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
1205 const SDL_Point * points,
1206 int count);
1207
1208 /**
1209 * Draw a line on the current rendering target.
1210 *
1211 * SDL_RenderDrawLine() draws the line to include both end points. If you want
1212 * to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
1213 *
1214 * \param renderer the rendering context
1215 * \param x1 the x coordinate of the start point
1216 * \param y1 the y coordinate of the start point
1217 * \param x2 the x coordinate of the end point
1218 * \param y2 the y coordinate of the end point
1219 * \returns 0 on success or a negative error code on failure; call
1220 * SDL_GetError() for more information.
1221 *
1222 * \since This function is available since SDL 2.0.0.
1223 *
1224 * \sa SDL_RenderDrawLines
1225 * \sa SDL_RenderDrawPoint
1226 * \sa SDL_RenderDrawPoints
1227 * \sa SDL_RenderDrawRect
1228 * \sa SDL_RenderDrawRects
1229 * \sa SDL_RenderFillRect
1230 * \sa SDL_RenderFillRects
1231 * \sa SDL_RenderPresent
1232 * \sa SDL_SetRenderDrawBlendMode
1233 * \sa SDL_SetRenderDrawColor
1234 */
1235 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
1236 int x1, int y1, int x2, int y2);
1237
1238 /**
1239 * Draw a series of connected lines on the current rendering target.
1240 *
1241 * \param renderer the rendering context
1242 * \param points an array of SDL_Point structures representing points along
1243 * the lines
1244 * \param count the number of points, drawing count-1 lines
1245 * \returns 0 on success or a negative error code on failure; call
1246 * SDL_GetError() for more information.
1247 *
1248 * \since This function is available since SDL 2.0.0.
1249 *
1250 * \sa SDL_RenderDrawLine
1251 * \sa SDL_RenderDrawPoint
1252 * \sa SDL_RenderDrawPoints
1253 * \sa SDL_RenderDrawRect
1254 * \sa SDL_RenderDrawRects
1255 * \sa SDL_RenderFillRect
1256 * \sa SDL_RenderFillRects
1257 * \sa SDL_RenderPresent
1258 * \sa SDL_SetRenderDrawBlendMode
1259 * \sa SDL_SetRenderDrawColor
1260 */
1261 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
1262 const SDL_Point * points,
1263 int count);
1264
1265 /**
1266 * Draw a rectangle on the current rendering target.
1267 *
1268 * \param renderer the rendering context
1269 * \param rect an SDL_Rect structure representing the rectangle to draw, or
1270 * NULL to outline the entire rendering target
1271 * \returns 0 on success or a negative error code on failure; call
1272 * SDL_GetError() for more information.
1273 *
1274 * \since This function is available since SDL 2.0.0.
1275 *
1276 * \sa SDL_RenderDrawLine
1277 * \sa SDL_RenderDrawLines
1278 * \sa SDL_RenderDrawPoint
1279 * \sa SDL_RenderDrawPoints
1280 * \sa SDL_RenderDrawRects
1281 * \sa SDL_RenderFillRect
1282 * \sa SDL_RenderFillRects
1283 * \sa SDL_RenderPresent
1284 * \sa SDL_SetRenderDrawBlendMode
1285 * \sa SDL_SetRenderDrawColor
1286 */
1287 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
1288 const SDL_Rect * rect);
1289
1290 /**
1291 * Draw some number of rectangles on the current rendering target.
1292 *
1293 * \param renderer the rendering context
1294 * \param rects an array of SDL_Rect structures representing the rectangles to
1295 * be drawn
1296 * \param count the number of rectangles
1297 * \returns 0 on success or a negative error code on failure; call
1298 * SDL_GetError() for more information.
1299 *
1300 * \since This function is available since SDL 2.0.0.
1301 *
1302 * \sa SDL_RenderDrawLine
1303 * \sa SDL_RenderDrawLines
1304 * \sa SDL_RenderDrawPoint
1305 * \sa SDL_RenderDrawPoints
1306 * \sa SDL_RenderDrawRect
1307 * \sa SDL_RenderFillRect
1308 * \sa SDL_RenderFillRects
1309 * \sa SDL_RenderPresent
1310 * \sa SDL_SetRenderDrawBlendMode
1311 * \sa SDL_SetRenderDrawColor
1312 */
1313 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
1314 const SDL_Rect * rects,
1315 int count);
1316
1317 /**
1318 * Fill a rectangle on the current rendering target with the drawing color.
1319 *
1320 * The current drawing color is set by SDL_SetRenderDrawColor(), and the
1321 * color's alpha value is ignored unless blending is enabled with the
1322 * appropriate call to SDL_SetRenderDrawBlendMode().
1323 *
1324 * \param renderer the rendering context
1325 * \param rect the SDL_Rect structure representing the rectangle to fill, or
1326 * NULL for the entire rendering target
1327 * \returns 0 on success or a negative error code on failure; call
1328 * SDL_GetError() for more information.
1329 *
1330 * \since This function is available since SDL 2.0.0.
1331 *
1332 * \sa SDL_RenderDrawLine
1333 * \sa SDL_RenderDrawLines
1334 * \sa SDL_RenderDrawPoint
1335 * \sa SDL_RenderDrawPoints
1336 * \sa SDL_RenderDrawRect
1337 * \sa SDL_RenderDrawRects
1338 * \sa SDL_RenderFillRects
1339 * \sa SDL_RenderPresent
1340 * \sa SDL_SetRenderDrawBlendMode
1341 * \sa SDL_SetRenderDrawColor
1342 */
1343 extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
1344 const SDL_Rect * rect);
1345
1346 /**
1347 * Fill some number of rectangles on the current rendering target with the
1348 * drawing color.
1349 *
1350 * \param renderer the rendering context
1351 * \param rects an array of SDL_Rect structures representing the rectangles to
1352 * be filled
1353 * \param count the number of rectangles
1354 * \returns 0 on success or a negative error code on failure; call
1355 * SDL_GetError() for more information.
1356 *
1357 * \since This function is available since SDL 2.0.0.
1358 *
1359 * \sa SDL_RenderDrawLine
1360 * \sa SDL_RenderDrawLines
1361 * \sa SDL_RenderDrawPoint
1362 * \sa SDL_RenderDrawPoints
1363 * \sa SDL_RenderDrawRect
1364 * \sa SDL_RenderDrawRects
1365 * \sa SDL_RenderFillRect
1366 * \sa SDL_RenderPresent
1367 */
1368 extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
1369 const SDL_Rect * rects,
1370 int count);
1371
1372 /**
1373 * Copy a portion of the texture to the current rendering target.
1374 *
1375 * The texture is blended with the destination based on its blend mode set
1376 * with SDL_SetTextureBlendMode().
1377 *
1378 * The texture color is affected based on its color modulation set by
1379 * SDL_SetTextureColorMod().
1380 *
1381 * The texture alpha is affected based on its alpha modulation set by
1382 * SDL_SetTextureAlphaMod().
1383 *
1384 * \param renderer the rendering context
1385 * \param texture the source texture
1386 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1387 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1388 * rendering target; the texture will be stretched to fill the
1389 * given rectangle
1390 * \returns 0 on success or a negative error code on failure; call
1391 * SDL_GetError() for more information.
1392 *
1393 * \since This function is available since SDL 2.0.0.
1394 *
1395 * \sa SDL_RenderCopyEx
1396 * \sa SDL_SetTextureAlphaMod
1397 * \sa SDL_SetTextureBlendMode
1398 * \sa SDL_SetTextureColorMod
1399 */
1400 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
1401 SDL_Texture * texture,
1402 const SDL_Rect * srcrect,
1403 const SDL_Rect * dstrect);
1404
1405 /**
1406 * Copy a portion of the texture to the current rendering, with optional
1407 * rotation and flipping.
1408 *
1409 * Copy a portion of the texture to the current rendering target, optionally
1410 * rotating it by angle around the given center and also flipping it
1411 * top-bottom and/or left-right.
1412 *
1413 * The texture is blended with the destination based on its blend mode set
1414 * with SDL_SetTextureBlendMode().
1415 *
1416 * The texture color is affected based on its color modulation set by
1417 * SDL_SetTextureColorMod().
1418 *
1419 * The texture alpha is affected based on its alpha modulation set by
1420 * SDL_SetTextureAlphaMod().
1421 *
1422 * \param renderer the rendering context
1423 * \param texture the source texture
1424 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1425 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1426 * rendering target
1427 * \param angle an angle in degrees that indicates the rotation that will be
1428 * applied to dstrect, rotating it in a clockwise direction
1429 * \param center a pointer to a point indicating the point around which
1430 * dstrect will be rotated (if NULL, rotation will be done
1431 * around `dstrect.w / 2`, `dstrect.h / 2`)
1432 * \param flip a SDL_RendererFlip value stating which flipping actions should
1433 * be performed on the texture
1434 * \returns 0 on success or a negative error code on failure; call
1435 * SDL_GetError() for more information.
1436 *
1437 * \since This function is available since SDL 2.0.0.
1438 *
1439 * \sa SDL_RenderCopy
1440 * \sa SDL_SetTextureAlphaMod
1441 * \sa SDL_SetTextureBlendMode
1442 * \sa SDL_SetTextureColorMod
1443 */
1444 extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
1445 SDL_Texture * texture,
1446 const SDL_Rect * srcrect,
1447 const SDL_Rect * dstrect,
1448 const double angle,
1449 const SDL_Point *center,
1450 const SDL_RendererFlip flip);
1451
1452
1453 /**
1454 * Draw a point on the current rendering target at subpixel precision.
1455 *
1456 * \param renderer The renderer which should draw a point.
1457 * \param x The x coordinate of the point.
1458 * \param y The y coordinate of the point.
1459 * \return 0 on success, or -1 on error
1460 *
1461 * \since This function is available since SDL 2.0.10.
1462 */
1463 extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
1464 float x, float y);
1465
1466 /**
1467 * Draw multiple points on the current rendering target at subpixel precision.
1468 *
1469 * \param renderer The renderer which should draw multiple points.
1470 * \param points The points to draw
1471 * \param count The number of points to draw
1472 * \return 0 on success, or -1 on error
1473 *
1474 * \since This function is available since SDL 2.0.10.
1475 */
1476 extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
1477 const SDL_FPoint * points,
1478 int count);
1479
1480 /**
1481 * Draw a line on the current rendering target at subpixel precision.
1482 *
1483 * \param renderer The renderer which should draw a line.
1484 * \param x1 The x coordinate of the start point.
1485 * \param y1 The y coordinate of the start point.
1486 * \param x2 The x coordinate of the end point.
1487 * \param y2 The y coordinate of the end point.
1488 * \return 0 on success, or -1 on error
1489 *
1490 * \since This function is available since SDL 2.0.10.
1491 */
1492 extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
1493 float x1, float y1, float x2, float y2);
1494
1495 /**
1496 * Draw a series of connected lines on the current rendering target at
1497 * subpixel precision.
1498 *
1499 * \param renderer The renderer which should draw multiple lines.
1500 * \param points The points along the lines
1501 * \param count The number of points, drawing count-1 lines
1502 * \return 0 on success, or -1 on error
1503 *
1504 * \since This function is available since SDL 2.0.10.
1505 */
1506 extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
1507 const SDL_FPoint * points,
1508 int count);
1509
1510 /**
1511 * Draw a rectangle on the current rendering target at subpixel precision.
1512 *
1513 * \param renderer The renderer which should draw a rectangle.
1514 * \param rect A pointer to the destination rectangle, or NULL to outline the
1515 * entire rendering target.
1516 * \return 0 on success, or -1 on error
1517 *
1518 * \since This function is available since SDL 2.0.10.
1519 */
1520 extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
1521 const SDL_FRect * rect);
1522
1523 /**
1524 * Draw some number of rectangles on the current rendering target at subpixel
1525 * precision.
1526 *
1527 * \param renderer The renderer which should draw multiple rectangles.
1528 * \param rects A pointer to an array of destination rectangles.
1529 * \param count The number of rectangles.
1530 * \return 0 on success, or -1 on error
1531 *
1532 * \since This function is available since SDL 2.0.10.
1533 */
1534 extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
1535 const SDL_FRect * rects,
1536 int count);
1537
1538 /**
1539 * Fill a rectangle on the current rendering target with the drawing color at
1540 * subpixel precision.
1541 *
1542 * \param renderer The renderer which should fill a rectangle.
1543 * \param rect A pointer to the destination rectangle, or NULL for the entire
1544 * rendering target.
1545 * \return 0 on success, or -1 on error
1546 *
1547 * \since This function is available since SDL 2.0.10.
1548 */
1549 extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
1550 const SDL_FRect * rect);
1551
1552 /**
1553 * Fill some number of rectangles on the current rendering target with the
1554 * drawing color at subpixel precision.
1555 *
1556 * \param renderer The renderer which should fill multiple rectangles.
1557 * \param rects A pointer to an array of destination rectangles.
1558 * \param count The number of rectangles.
1559 * \return 0 on success, or -1 on error
1560 *
1561 * \since This function is available since SDL 2.0.10.
1562 */
1563 extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
1564 const SDL_FRect * rects,
1565 int count);
1566
1567 /**
1568 * Copy a portion of the texture to the current rendering target at subpixel
1569 * precision.
1570 *
1571 * \param renderer The renderer which should copy parts of a texture.
1572 * \param texture The source texture.
1573 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1574 * texture.
1575 * \param dstrect A pointer to the destination rectangle, or NULL for the
1576 * entire rendering target.
1577 * \return 0 on success, or -1 on error
1578 *
1579 * \since This function is available since SDL 2.0.10.
1580 */
1581 extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
1582 SDL_Texture * texture,
1583 const SDL_Rect * srcrect,
1584 const SDL_FRect * dstrect);
1585
1586 /**
1587 * Copy a portion of the source texture to the current rendering target, with
1588 * rotation and flipping, at subpixel precision.
1589 *
1590 * \param renderer The renderer which should copy parts of a texture.
1591 * \param texture The source texture.
1592 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1593 * texture.
1594 * \param dstrect A pointer to the destination rectangle, or NULL for the
1595 * entire rendering target.
1596 * \param angle An angle in degrees that indicates the rotation that will be
1597 * applied to dstrect, rotating it in a clockwise direction
1598 * \param center A pointer to a point indicating the point around which
1599 * dstrect will be rotated (if NULL, rotation will be done
1600 * around dstrect.w/2, dstrect.h/2).
1601 * \param flip An SDL_RendererFlip value stating which flipping actions should
1602 * be performed on the texture
1603 * \return 0 on success, or -1 on error
1604 *
1605 * \since This function is available since SDL 2.0.10.
1606 */
1607 extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
1608 SDL_Texture * texture,
1609 const SDL_Rect * srcrect,
1610 const SDL_FRect * dstrect,
1611 const double angle,
1612 const SDL_FPoint *center,
1613 const SDL_RendererFlip flip);
1614
1615 /**
1616 * Render a list of triangles, optionally using a texture and indices into the
1617 * vertex array Color and alpha modulation is done per vertex
1618 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1619 *
1620 * \param renderer The rendering context.
1621 * \param texture (optional) The SDL texture to use.
1622 * \param vertices Vertices.
1623 * \param num_vertices Number of vertices.
1624 * \param indices (optional) An array of integer indices into the 'vertices'
1625 * array, if NULL all vertices will be rendered in sequential
1626 * order.
1627 * \param num_indices Number of indices.
1628 * \return 0 on success, or -1 if the operation is not supported
1629 *
1630 * \since This function is available since SDL 2.0.18.
1631 *
1632 * \sa SDL_RenderGeometryRaw
1633 * \sa SDL_Vertex
1634 */
1635 extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
1636 SDL_Texture *texture,
1637 const SDL_Vertex *vertices, int num_vertices,
1638 const int *indices, int num_indices);
1639
1640 /**
1641 * Render a list of triangles, optionally using a texture and indices into the
1642 * vertex arrays Color and alpha modulation is done per vertex
1643 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1644 *
1645 * \param renderer The rendering context.
1646 * \param texture (optional) The SDL texture to use.
1647 * \param xy Vertex positions
1648 * \param xy_stride Byte size to move from one element to the next element
1649 * \param color Vertex colors (as SDL_Color)
1650 * \param color_stride Byte size to move from one element to the next element
1651 * \param uv Vertex normalized texture coordinates
1652 * \param uv_stride Byte size to move from one element to the next element
1653 * \param num_vertices Number of vertices.
1654 * \param indices (optional) An array of indices into the 'vertices' arrays,
1655 * if NULL all vertices will be rendered in sequential order.
1656 * \param num_indices Number of indices.
1657 * \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
1658 * \return 0 on success, or -1 if the operation is not supported
1659 *
1660 * \since This function is available since SDL 2.0.18.
1661 *
1662 * \sa SDL_RenderGeometry
1663 * \sa SDL_Vertex
1664 */
1665 extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
1666 SDL_Texture *texture,
1667 const float *xy, int xy_stride,
1668 const SDL_Color *color, int color_stride,
1669 const float *uv, int uv_stride,
1670 int num_vertices,
1671 const void *indices, int num_indices, int size_indices);
1672
1673 /**
1674 * Read pixels from the current rendering target to an array of pixels.
1675 *
1676 * **WARNING**: This is a very slow operation, and should not be used
1677 * frequently. If you're using this on the main rendering target, it should be
1678 * called after rendering and before SDL_RenderPresent().
1679 *
1680 * `pitch` specifies the number of bytes between rows in the destination
1681 * `pixels` data. This allows you to write to a subrectangle or have padded
1682 * rows in the destination. Generally, `pitch` should equal the number of
1683 * pixels per row in the `pixels` data times the number of bytes per pixel,
1684 * but it might contain additional padding (for example, 24bit RGB Windows
1685 * Bitmap data pads all rows to multiples of 4 bytes).
1686 *
1687 * \param renderer the rendering context
1688 * \param rect an SDL_Rect structure representing the area to read, or NULL
1689 * for the entire render target
1690 * \param format an SDL_PixelFormatEnum value of the desired format of the
1691 * pixel data, or 0 to use the format of the rendering target
1692 * \param pixels a pointer to the pixel data to copy into
1693 * \param pitch the pitch of the `pixels` parameter
1694 * \returns 0 on success or a negative error code on failure; call
1695 * SDL_GetError() for more information.
1696 *
1697 * \since This function is available since SDL 2.0.0.
1698 */
1699 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
1700 const SDL_Rect * rect,
1701 Uint32 format,
1702 void *pixels, int pitch);
1703
1704 /**
1705 * Update the screen with any rendering performed since the previous call.
1706 *
1707 * SDL's rendering functions operate on a backbuffer; that is, calling a
1708 * rendering function such as SDL_RenderDrawLine() does not directly put a
1709 * line on the screen, but rather updates the backbuffer. As such, you compose
1710 * your entire scene and *present* the composed backbuffer to the screen as a
1711 * complete picture.
1712 *
1713 * Therefore, when using SDL's rendering API, one does all drawing intended
1714 * for the frame, and then calls this function once per frame to present the
1715 * final drawing to the user.
1716 *
1717 * The backbuffer should be considered invalidated after each present; do not
1718 * assume that previous contents will exist between frames. You are strongly
1719 * encouraged to call SDL_RenderClear() to initialize the backbuffer before
1720 * starting each new frame's drawing, even if you plan to overwrite every
1721 * pixel.
1722 *
1723 * \param renderer the rendering context
1724 *
1725 * \since This function is available since SDL 2.0.0.
1726 *
1727 * \sa SDL_RenderClear
1728 * \sa SDL_RenderDrawLine
1729 * \sa SDL_RenderDrawLines
1730 * \sa SDL_RenderDrawPoint
1731 * \sa SDL_RenderDrawPoints
1732 * \sa SDL_RenderDrawRect
1733 * \sa SDL_RenderDrawRects
1734 * \sa SDL_RenderFillRect
1735 * \sa SDL_RenderFillRects
1736 * \sa SDL_SetRenderDrawBlendMode
1737 * \sa SDL_SetRenderDrawColor
1738 */
1739 extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
1740
1741 /**
1742 * Destroy the specified texture.
1743 *
1744 * Passing NULL or an otherwise invalid texture will set the SDL error message
1745 * to "Invalid texture".
1746 *
1747 * \param texture the texture to destroy
1748 *
1749 * \since This function is available since SDL 2.0.0.
1750 *
1751 * \sa SDL_CreateTexture
1752 * \sa SDL_CreateTextureFromSurface
1753 */
1754 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
1755
1756 /**
1757 * Destroy the rendering context for a window and free associated textures.
1758 *
1759 * \param renderer the rendering context
1760 *
1761 * \since This function is available since SDL 2.0.0.
1762 *
1763 * \sa SDL_CreateRenderer
1764 */
1765 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
1766
1767 /**
1768 * Force the rendering context to flush any pending commands to the underlying
1769 * rendering API.
1770 *
1771 * You do not need to (and in fact, shouldn't) call this function unless you
1772 * are planning to call into OpenGL/Direct3D/Metal/whatever directly in
1773 * addition to using an SDL_Renderer.
1774 *
1775 * This is for a very-specific case: if you are using SDL's render API, you
1776 * asked for a specific renderer backend (OpenGL, Direct3D, etc), you set
1777 * SDL_HINT_RENDER_BATCHING to "1", and you plan to make OpenGL/D3D/whatever
1778 * calls in addition to SDL render API calls. If all of this applies, you
1779 * should call SDL_RenderFlush() between calls to SDL's render API and the
1780 * low-level API you're using in cooperation.
1781 *
1782 * In all other cases, you can ignore this function. This is only here to get
1783 * maximum performance out of a specific situation. In all other cases, SDL
1784 * will do the right thing, perhaps at a performance loss.
1785 *
1786 * This function is first available in SDL 2.0.10, and is not needed in 2.0.9
1787 * and earlier, as earlier versions did not queue rendering commands at all,
1788 * instead flushing them to the OS immediately.
1789 *
1790 * \param renderer the rendering context
1791 * \returns 0 on success or a negative error code on failure; call
1792 * SDL_GetError() for more information.
1793 *
1794 * \since This function is available since SDL 2.0.10.
1795 */
1796 extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
1797
1798
1799 /**
1800 * Bind an OpenGL/ES/ES2 texture to the current context.
1801 *
1802 * This is for use with OpenGL instructions when rendering OpenGL primitives
1803 * directly.
1804 *
1805 * If not NULL, `texw` and `texh` will be filled with the width and height
1806 * values suitable for the provided texture. In most cases, both will be 1.0,
1807 * however, on systems that support the GL_ARB_texture_rectangle extension,
1808 * these values will actually be the pixel width and height used to create the
1809 * texture, so this factor needs to be taken into account when providing
1810 * texture coordinates to OpenGL.
1811 *
1812 * You need a renderer to create an SDL_Texture, therefore you can only use
1813 * this function with an implicit OpenGL context from SDL_CreateRenderer(),
1814 * not with your own OpenGL context. If you need control over your OpenGL
1815 * context, you need to write your own texture-loading methods.
1816 *
1817 * Also note that SDL may upload RGB textures as BGR (or vice-versa), and
1818 * re-order the color channels in the shaders phase, so the uploaded texture
1819 * may have swapped color channels.
1820 *
1821 * \param texture the texture to bind to the current OpenGL/ES/ES2 context
1822 * \param texw a pointer to a float value which will be filled with the
1823 * texture width or NULL if you don't need that value
1824 * \param texh a pointer to a float value which will be filled with the
1825 * texture height or NULL if you don't need that value
1826 * \returns 0 on success, or -1 if the operation is not supported; call
1827 * SDL_GetError() for more information.
1828 *
1829 * \since This function is available since SDL 2.0.0.
1830 *
1831 * \sa SDL_GL_MakeCurrent
1832 * \sa SDL_GL_UnbindTexture
1833 */
1834 extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
1835
1836 /**
1837 * Unbind an OpenGL/ES/ES2 texture from the current context.
1838 *
1839 * See SDL_GL_BindTexture() for examples on how to use these functions
1840 *
1841 * \param texture the texture to unbind from the current OpenGL/ES/ES2 context
1842 * \returns 0 on success, or -1 if the operation is not supported
1843 *
1844 * \since This function is available since SDL 2.0.0.
1845 *
1846 * \sa SDL_GL_BindTexture
1847 * \sa SDL_GL_MakeCurrent
1848 */
1849 extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
1850
1851 /**
1852 * Get the CAMetalLayer associated with the given Metal renderer.
1853 *
1854 * This function returns `void *`, so SDL doesn't have to include Metal's
1855 * headers, but it can be safely cast to a `CAMetalLayer *`.
1856 *
1857 * \param renderer The renderer to query
1858 * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
1859 * Metal renderer
1860 *
1861 * \since This function is available since SDL 2.0.8.
1862 *
1863 * \sa SDL_RenderGetMetalCommandEncoder
1864 */
1865 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
1866
1867 /**
1868 * Get the Metal command encoder for the current frame
1869 *
1870 * This function returns `void *`, so SDL doesn't have to include Metal's
1871 * headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.
1872 *
1873 * Note that as of SDL 2.0.18, this will return NULL if Metal refuses to give
1874 * SDL a drawable to render to, which might happen if the window is
1875 * hidden/minimized/offscreen. This doesn't apply to command encoders for
1876 * render targets, just the window's backbacker. Check your return values!
1877 *
1878 * \param renderer The renderer to query
1879 * \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
1880 * renderer isn't a Metal renderer or there was an error.
1881 *
1882 * \since This function is available since SDL 2.0.8.
1883 *
1884 * \sa SDL_RenderGetMetalLayer
1885 */
1886 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
1887
1888 /**
1889 * Toggle VSync of the given renderer.
1890 *
1891 * \param renderer The renderer to toggle
1892 * \param vsync 1 for on, 0 for off. All other values are reserved
1893 * \returns a 0 int on success, or non-zero on failure
1894 *
1895 * \since This function is available since SDL 2.0.18.
1896 */
1897 extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
1898
1899 /* Ends C function definitions when using C++ */
1900 #ifdef __cplusplus
1901 }
1902 #endif
1903 #include <SDL2/close_code.h>
1904
1905 #endif /* SDL_render_h_ */
1906
1907 /* vi: set ts=4 sw=4 expandtab: */
0 #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1"
1 #define SDL_REVISION_NUMBER 0
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rwops.h
23 *
24 * This file provides a general interface for SDL to read and write
25 * data streams. It can easily be extended to files, memory, etc.
26 */
27
28 #ifndef SDL_rwops_h_
29 #define SDL_rwops_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* RWops Types */
41 #define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
42 #define SDL_RWOPS_WINFILE 1U /**< Win32 file */
43 #define SDL_RWOPS_STDFILE 2U /**< Stdio file */
44 #define SDL_RWOPS_JNIFILE 3U /**< Android asset */
45 #define SDL_RWOPS_MEMORY 4U /**< Memory stream */
46 #define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
47 #if defined(__VITA__)
48 #define SDL_RWOPS_VITAFILE 6U /**< Vita file */
49 #endif
50
51 /**
52 * This is the read/write operation structure -- very basic.
53 */
54 typedef struct SDL_RWops
55 {
56 /**
57 * Return the size of the file in this rwops, or -1 if unknown
58 */
59 Sint64 (SDLCALL * size) (struct SDL_RWops * context);
60
61 /**
62 * Seek to \c offset relative to \c whence, one of stdio's whence values:
63 * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
64 *
65 * \return the final offset in the data stream, or -1 on error.
66 */
67 Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
68 int whence);
69
70 /**
71 * Read up to \c maxnum objects each of size \c size from the data
72 * stream to the area pointed at by \c ptr.
73 *
74 * \return the number of objects read, or 0 at error or end of file.
75 */
76 size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
77 size_t size, size_t maxnum);
78
79 /**
80 * Write exactly \c num objects each of size \c size from the area
81 * pointed at by \c ptr to data stream.
82 *
83 * \return the number of objects written, or 0 at error or end of file.
84 */
85 size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
86 size_t size, size_t num);
87
88 /**
89 * Close and free an allocated SDL_RWops structure.
90 *
91 * \return 0 if successful or -1 on write error when flushing data.
92 */
93 int (SDLCALL * close) (struct SDL_RWops * context);
94
95 Uint32 type;
96 union
97 {
98 #if defined(__ANDROID__)
99 struct
100 {
101 void *asset;
102 } androidio;
103 #elif defined(__WIN32__)
104 struct
105 {
106 SDL_bool append;
107 void *h;
108 struct
109 {
110 void *data;
111 size_t size;
112 size_t left;
113 } buffer;
114 } windowsio;
115 #elif defined(__VITA__)
116 struct
117 {
118 int h;
119 struct
120 {
121 void *data;
122 size_t size;
123 size_t left;
124 } buffer;
125 } vitaio;
126 #endif
127
128 #ifdef HAVE_STDIO_H
129 struct
130 {
131 SDL_bool autoclose;
132 FILE *fp;
133 } stdio;
134 #endif
135 struct
136 {
137 Uint8 *base;
138 Uint8 *here;
139 Uint8 *stop;
140 } mem;
141 struct
142 {
143 void *data1;
144 void *data2;
145 } unknown;
146 } hidden;
147
148 } SDL_RWops;
149
150
151 /**
152 * \name RWFrom functions
153 *
154 * Functions to create SDL_RWops structures from various data streams.
155 */
156 /* @{ */
157
158 /**
159 * Use this function to create a new SDL_RWops structure for reading from
160 * and/or writing to a named file.
161 *
162 * The `mode` string is treated roughly the same as in a call to the C
163 * library's fopen(), even if SDL doesn't happen to use fopen() behind the
164 * scenes.
165 *
166 * Available `mode` strings:
167 *
168 * - "r": Open a file for reading. The file must exist.
169 * - "w": Create an empty file for writing. If a file with the same name
170 * already exists its content is erased and the file is treated as a new
171 * empty file.
172 * - "a": Append to a file. Writing operations append data at the end of the
173 * file. The file is created if it does not exist.
174 * - "r+": Open a file for update both reading and writing. The file must
175 * exist.
176 * - "w+": Create an empty file for both reading and writing. If a file with
177 * the same name already exists its content is erased and the file is
178 * treated as a new empty file.
179 * - "a+": Open a file for reading and appending. All writing operations are
180 * performed at the end of the file, protecting the previous content to be
181 * overwritten. You can reposition (fseek, rewind) the internal pointer to
182 * anywhere in the file for reading, but writing operations will move it
183 * back to the end of file. The file is created if it does not exist.
184 *
185 * **NOTE**: In order to open a file as a binary file, a "b" character has to
186 * be included in the `mode` string. This additional "b" character can either
187 * be appended at the end of the string (thus making the following compound
188 * modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
189 * letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
190 * Additional characters may follow the sequence, although they should have no
191 * effect. For example, "t" is sometimes appended to make explicit the file is
192 * a text file.
193 *
194 * This function supports Unicode filenames, but they must be encoded in UTF-8
195 * format, regardless of the underlying operating system.
196 *
197 * As a fallback, SDL_RWFromFile() will transparently open a matching filename
198 * in an Android app's `assets`.
199 *
200 * Closing the SDL_RWops will close the file handle SDL is holding internally.
201 *
202 * \param file a UTF-8 string representing the filename to open
203 * \param mode an ASCII string representing the mode to be used for opening
204 * the file.
205 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
206 * failure; call SDL_GetError() for more information.
207 *
208 * \since This function is available since SDL 2.0.0.
209 *
210 * \sa SDL_RWclose
211 * \sa SDL_RWFromConstMem
212 * \sa SDL_RWFromFP
213 * \sa SDL_RWFromMem
214 * \sa SDL_RWread
215 * \sa SDL_RWseek
216 * \sa SDL_RWtell
217 * \sa SDL_RWwrite
218 */
219 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
220 const char *mode);
221
222 #ifdef HAVE_STDIO_H
223
224 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose);
225
226 #else
227
228 /**
229 * Use this function to create an SDL_RWops structure from a standard I/O file
230 * pointer (stdio.h's `FILE*`).
231 *
232 * This function is not available on Windows, since files opened in an
233 * application on that platform cannot be used by a dynamically linked
234 * library.
235 *
236 * On some platforms, the first parameter is a `void*`, on others, it's a
237 * `FILE*`, depending on what system headers are available to SDL. It is
238 * always intended to be the `FILE*` type from the C runtime's stdio.h.
239 *
240 * \param fp the `FILE*` that feeds the SDL_RWops stream
241 * \param autoclose SDL_TRUE to close the `FILE*` when closing the SDL_RWops,
242 * SDL_FALSE to leave the `FILE*` open when the RWops is
243 * closed
244 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
245 * failure; call SDL_GetError() for more information.
246 *
247 * \since This function is available since SDL 2.0.0.
248 *
249 * \sa SDL_RWclose
250 * \sa SDL_RWFromConstMem
251 * \sa SDL_RWFromFile
252 * \sa SDL_RWFromMem
253 * \sa SDL_RWread
254 * \sa SDL_RWseek
255 * \sa SDL_RWtell
256 * \sa SDL_RWwrite
257 */
258 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
259 SDL_bool autoclose);
260 #endif
261
262 /**
263 * Use this function to prepare a read-write memory buffer for use with
264 * SDL_RWops.
265 *
266 * This function sets up an SDL_RWops struct based on a memory area of a
267 * certain size, for both read and write access.
268 *
269 * This memory buffer is not copied by the RWops; the pointer you provide must
270 * remain valid until you close the stream. Closing the stream will not free
271 * the original buffer.
272 *
273 * If you need to make sure the RWops never writes to the memory buffer, you
274 * should use SDL_RWFromConstMem() with a read-only buffer of memory instead.
275 *
276 * \param mem a pointer to a buffer to feed an SDL_RWops stream
277 * \param size the buffer size, in bytes
278 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
279 * SDL_GetError() for more information.
280 *
281 * \since This function is available since SDL 2.0.0.
282 *
283 * \sa SDL_RWclose
284 * \sa SDL_RWFromConstMem
285 * \sa SDL_RWFromFile
286 * \sa SDL_RWFromFP
287 * \sa SDL_RWFromMem
288 * \sa SDL_RWread
289 * \sa SDL_RWseek
290 * \sa SDL_RWtell
291 * \sa SDL_RWwrite
292 */
293 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
294
295 /**
296 * Use this function to prepare a read-only memory buffer for use with RWops.
297 *
298 * This function sets up an SDL_RWops struct based on a memory area of a
299 * certain size. It assumes the memory area is not writable.
300 *
301 * Attempting to write to this RWops stream will report an error without
302 * writing to the memory buffer.
303 *
304 * This memory buffer is not copied by the RWops; the pointer you provide must
305 * remain valid until you close the stream. Closing the stream will not free
306 * the original buffer.
307 *
308 * If you need to write to a memory buffer, you should use SDL_RWFromMem()
309 * with a writable buffer of memory instead.
310 *
311 * \param mem a pointer to a read-only buffer to feed an SDL_RWops stream
312 * \param size the buffer size, in bytes
313 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
314 * SDL_GetError() for more information.
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_RWclose
319 * \sa SDL_RWFromConstMem
320 * \sa SDL_RWFromFile
321 * \sa SDL_RWFromFP
322 * \sa SDL_RWFromMem
323 * \sa SDL_RWread
324 * \sa SDL_RWseek
325 * \sa SDL_RWtell
326 */
327 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
328 int size);
329
330 /* @} *//* RWFrom functions */
331
332
333 /**
334 * Use this function to allocate an empty, unpopulated SDL_RWops structure.
335 *
336 * Applications do not need to use this function unless they are providing
337 * their own SDL_RWops implementation. If you just need a SDL_RWops to
338 * read/write a common data source, you should use the built-in
339 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc.
340 *
341 * You must free the returned pointer with SDL_FreeRW(). Depending on your
342 * operating system and compiler, there may be a difference between the
343 * malloc() and free() your program uses and the versions SDL calls
344 * internally. Trying to mix the two can cause crashing such as segmentation
345 * faults. Since all SDL_RWops must free themselves when their **close**
346 * method is called, all SDL_RWops must be allocated through this function, so
347 * they can all be freed correctly with SDL_FreeRW().
348 *
349 * \returns a pointer to the allocated memory on success, or NULL on failure;
350 * call SDL_GetError() for more information.
351 *
352 * \since This function is available since SDL 2.0.0.
353 *
354 * \sa SDL_FreeRW
355 */
356 extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
357
358 /**
359 * Use this function to free an SDL_RWops structure allocated by
360 * SDL_AllocRW().
361 *
362 * Applications do not need to use this function unless they are providing
363 * their own SDL_RWops implementation. If you just need a SDL_RWops to
364 * read/write a common data source, you should use the built-in
365 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and
366 * call the **close** method on those SDL_RWops pointers when you are done
367 * with them.
368 *
369 * Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is
370 * invalid as soon as this function returns. Any extra memory allocated during
371 * creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must
372 * be responsible for managing that memory in their **close** method.
373 *
374 * \param area the SDL_RWops structure to be freed
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_AllocRW
379 */
380 extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
381
382 #define RW_SEEK_SET 0 /**< Seek from the beginning of data */
383 #define RW_SEEK_CUR 1 /**< Seek relative to current read point */
384 #define RW_SEEK_END 2 /**< Seek relative to the end of data */
385
386 /**
387 * Use this function to get the size of the data stream in an SDL_RWops.
388 *
389 * Prior to SDL 2.0.10, this function was a macro.
390 *
391 * \param context the SDL_RWops to get the size of the data stream from
392 * \returns the size of the data stream in the SDL_RWops on success, -1 if
393 * unknown or a negative error code on failure; call SDL_GetError()
394 * for more information.
395 *
396 * \since This function is available since SDL 2.0.10.
397 */
398 extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
399
400 /**
401 * Seek within an SDL_RWops data stream.
402 *
403 * This function seeks to byte `offset`, relative to `whence`.
404 *
405 * `whence` may be any of the following values:
406 *
407 * - `RW_SEEK_SET`: seek from the beginning of data
408 * - `RW_SEEK_CUR`: seek relative to current read point
409 * - `RW_SEEK_END`: seek relative to the end of data
410 *
411 * If this stream can not seek, it will return -1.
412 *
413 * SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
414 * `seek` method appropriately, to simplify application development.
415 *
416 * Prior to SDL 2.0.10, this function was a macro.
417 *
418 * \param context a pointer to an SDL_RWops structure
419 * \param offset an offset in bytes, relative to **whence** location; can be
420 * negative
421 * \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
422 * \returns the final offset in the data stream after the seek or -1 on error.
423 *
424 * \since This function is available since SDL 2.0.10.
425 *
426 * \sa SDL_RWclose
427 * \sa SDL_RWFromConstMem
428 * \sa SDL_RWFromFile
429 * \sa SDL_RWFromFP
430 * \sa SDL_RWFromMem
431 * \sa SDL_RWread
432 * \sa SDL_RWtell
433 * \sa SDL_RWwrite
434 */
435 extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
436 Sint64 offset, int whence);
437
438 /**
439 * Determine the current read/write offset in an SDL_RWops data stream.
440 *
441 * SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
442 * method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
443 * application development.
444 *
445 * Prior to SDL 2.0.10, this function was a macro.
446 *
447 * \param context a SDL_RWops data stream object from which to get the current
448 * offset
449 * \returns the current offset in the stream, or -1 if the information can not
450 * be determined.
451 *
452 * \since This function is available since SDL 2.0.10.
453 *
454 * \sa SDL_RWclose
455 * \sa SDL_RWFromConstMem
456 * \sa SDL_RWFromFile
457 * \sa SDL_RWFromFP
458 * \sa SDL_RWFromMem
459 * \sa SDL_RWread
460 * \sa SDL_RWseek
461 * \sa SDL_RWwrite
462 */
463 extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
464
465 /**
466 * Read from a data source.
467 *
468 * This function reads up to `maxnum` objects each of size `size` from the
469 * data source to the area pointed at by `ptr`. This function may read less
470 * objects than requested. It will return zero when there has been an error or
471 * the data stream is completely read.
472 *
473 * SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
474 * `read` method appropriately, to simplify application development.
475 *
476 * Prior to SDL 2.0.10, this function was a macro.
477 *
478 * \param context a pointer to an SDL_RWops structure
479 * \param ptr a pointer to a buffer to read data into
480 * \param size the size of each object to read, in bytes
481 * \param maxnum the maximum number of objects to be read
482 * \returns the number of objects read, or 0 at error or end of file; call
483 * SDL_GetError() for more information.
484 *
485 * \since This function is available since SDL 2.0.10.
486 *
487 * \sa SDL_RWclose
488 * \sa SDL_RWFromConstMem
489 * \sa SDL_RWFromFile
490 * \sa SDL_RWFromFP
491 * \sa SDL_RWFromMem
492 * \sa SDL_RWseek
493 * \sa SDL_RWwrite
494 */
495 extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
496 void *ptr, size_t size,
497 size_t maxnum);
498
499 /**
500 * Write to an SDL_RWops data stream.
501 *
502 * This function writes exactly `num` objects each of size `size` from the
503 * area pointed at by `ptr` to the stream. If this fails for any reason, it'll
504 * return less than `num` to demonstrate how far the write progressed. On
505 * success, it returns `num`.
506 *
507 * SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
508 * `write` method appropriately, to simplify application development.
509 *
510 * Prior to SDL 2.0.10, this function was a macro.
511 *
512 * \param context a pointer to an SDL_RWops structure
513 * \param ptr a pointer to a buffer containing data to write
514 * \param size the size of an object to write, in bytes
515 * \param num the number of objects to write
516 * \returns the number of objects written, which will be less than **num** on
517 * error; call SDL_GetError() for more information.
518 *
519 * \since This function is available since SDL 2.0.10.
520 *
521 * \sa SDL_RWclose
522 * \sa SDL_RWFromConstMem
523 * \sa SDL_RWFromFile
524 * \sa SDL_RWFromFP
525 * \sa SDL_RWFromMem
526 * \sa SDL_RWread
527 * \sa SDL_RWseek
528 */
529 extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
530 const void *ptr, size_t size,
531 size_t num);
532
533 /**
534 * Close and free an allocated SDL_RWops structure.
535 *
536 * SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
537 * resources used by the stream and frees the SDL_RWops itself with
538 * SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
539 * flush to its output (e.g. to disk).
540 *
541 * Note that if this fails to flush the stream to disk, this function reports
542 * an error, but the SDL_RWops is still invalid once this function returns.
543 *
544 * Prior to SDL 2.0.10, this function was a macro.
545 *
546 * \param context SDL_RWops structure to close
547 * \returns 0 on success or a negative error code on failure; call
548 * SDL_GetError() for more information.
549 *
550 * \since This function is available since SDL 2.0.10.
551 *
552 * \sa SDL_RWFromConstMem
553 * \sa SDL_RWFromFile
554 * \sa SDL_RWFromFP
555 * \sa SDL_RWFromMem
556 * \sa SDL_RWread
557 * \sa SDL_RWseek
558 * \sa SDL_RWwrite
559 */
560 extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
561
562 /**
563 * Load all the data from an SDL data stream.
564 *
565 * The data is allocated with a zero byte at the end (null terminated) for
566 * convenience. This extra byte is not included in the value reported via
567 * `datasize`.
568 *
569 * The data should be freed with SDL_free().
570 *
571 * \param src the SDL_RWops to read all available data from
572 * \param datasize if not NULL, will store the number of bytes read
573 * \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
574 * \returns the data, or NULL if there was an error.
575 *
576 * \since This function is available since SDL 2.0.6.
577 */
578 extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
579 size_t *datasize,
580 int freesrc);
581
582 /**
583 * Load all the data from a file path.
584 *
585 * The data is allocated with a zero byte at the end (null terminated) for
586 * convenience. This extra byte is not included in the value reported via
587 * `datasize`.
588 *
589 * The data should be freed with SDL_free().
590 *
591 * Prior to SDL 2.0.10, this function was a macro wrapping around
592 * SDL_LoadFile_RW.
593 *
594 * \param file the path to read all available data from
595 * \param datasize if not NULL, will store the number of bytes read
596 * \returns the data, or NULL if there was an error.
597 *
598 * \since This function is available since SDL 2.0.10.
599 */
600 extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
601
602 /**
603 * \name Read endian functions
604 *
605 * Read an item of the specified endianness and return in native format.
606 */
607 /* @{ */
608
609 /**
610 * Use this function to read a byte from an SDL_RWops.
611 *
612 * \param src the SDL_RWops to read from
613 * \returns the read byte on success or 0 on failure; call SDL_GetError() for
614 * more information.
615 *
616 * \since This function is available since SDL 2.0.0.
617 *
618 * \sa SDL_WriteU8
619 */
620 extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
621
622 /**
623 * Use this function to read 16 bits of little-endian data from an SDL_RWops
624 * and return in native format.
625 *
626 * SDL byteswaps the data only if necessary, so the data returned will be in
627 * the native byte order.
628 *
629 * \param src the stream from which to read data
630 * \returns 16 bits of data in the native byte order of the platform.
631 *
632 * \since This function is available since SDL 2.0.0.
633 *
634 * \sa SDL_ReadBE16
635 */
636 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
637
638 /**
639 * Use this function to read 16 bits of big-endian data from an SDL_RWops and
640 * return in native format.
641 *
642 * SDL byteswaps the data only if necessary, so the data returned will be in
643 * the native byte order.
644 *
645 * \param src the stream from which to read data
646 * \returns 16 bits of data in the native byte order of the platform.
647 *
648 * \since This function is available since SDL 2.0.0.
649 *
650 * \sa SDL_ReadLE16
651 */
652 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
653
654 /**
655 * Use this function to read 32 bits of little-endian data from an SDL_RWops
656 * and return in native format.
657 *
658 * SDL byteswaps the data only if necessary, so the data returned will be in
659 * the native byte order.
660 *
661 * \param src the stream from which to read data
662 * \returns 32 bits of data in the native byte order of the platform.
663 *
664 * \since This function is available since SDL 2.0.0.
665 *
666 * \sa SDL_ReadBE32
667 */
668 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
669
670 /**
671 * Use this function to read 32 bits of big-endian data from an SDL_RWops and
672 * return in native format.
673 *
674 * SDL byteswaps the data only if necessary, so the data returned will be in
675 * the native byte order.
676 *
677 * \param src the stream from which to read data
678 * \returns 32 bits of data in the native byte order of the platform.
679 *
680 * \since This function is available since SDL 2.0.0.
681 *
682 * \sa SDL_ReadLE32
683 */
684 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
685
686 /**
687 * Use this function to read 64 bits of little-endian data from an SDL_RWops
688 * and return in native format.
689 *
690 * SDL byteswaps the data only if necessary, so the data returned will be in
691 * the native byte order.
692 *
693 * \param src the stream from which to read data
694 * \returns 64 bits of data in the native byte order of the platform.
695 *
696 * \since This function is available since SDL 2.0.0.
697 *
698 * \sa SDL_ReadBE64
699 */
700 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
701
702 /**
703 * Use this function to read 64 bits of big-endian data from an SDL_RWops and
704 * return in native format.
705 *
706 * SDL byteswaps the data only if necessary, so the data returned will be in
707 * the native byte order.
708 *
709 * \param src the stream from which to read data
710 * \returns 64 bits of data in the native byte order of the platform.
711 *
712 * \since This function is available since SDL 2.0.0.
713 *
714 * \sa SDL_ReadLE64
715 */
716 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
717 /* @} *//* Read endian functions */
718
719 /**
720 * \name Write endian functions
721 *
722 * Write an item of native format to the specified endianness.
723 */
724 /* @{ */
725
726 /**
727 * Use this function to write a byte to an SDL_RWops.
728 *
729 * \param dst the SDL_RWops to write to
730 * \param value the byte value to write
731 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
732 * information.
733 *
734 * \since This function is available since SDL 2.0.0.
735 *
736 * \sa SDL_ReadU8
737 */
738 extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
739
740 /**
741 * Use this function to write 16 bits in native format to a SDL_RWops as
742 * little-endian data.
743 *
744 * SDL byteswaps the data only if necessary, so the application always
745 * specifies native format, and the data written will be in little-endian
746 * format.
747 *
748 * \param dst the stream to which data will be written
749 * \param value the data to be written, in native format
750 * \returns 1 on successful write, 0 on error.
751 *
752 * \since This function is available since SDL 2.0.0.
753 *
754 * \sa SDL_WriteBE16
755 */
756 extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
757
758 /**
759 * Use this function to write 16 bits in native format to a SDL_RWops as
760 * big-endian data.
761 *
762 * SDL byteswaps the data only if necessary, so the application always
763 * specifies native format, and the data written will be in big-endian format.
764 *
765 * \param dst the stream to which data will be written
766 * \param value the data to be written, in native format
767 * \returns 1 on successful write, 0 on error.
768 *
769 * \since This function is available since SDL 2.0.0.
770 *
771 * \sa SDL_WriteLE16
772 */
773 extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
774
775 /**
776 * Use this function to write 32 bits in native format to a SDL_RWops as
777 * little-endian data.
778 *
779 * SDL byteswaps the data only if necessary, so the application always
780 * specifies native format, and the data written will be in little-endian
781 * format.
782 *
783 * \param dst the stream to which data will be written
784 * \param value the data to be written, in native format
785 * \returns 1 on successful write, 0 on error.
786 *
787 * \since This function is available since SDL 2.0.0.
788 *
789 * \sa SDL_WriteBE32
790 */
791 extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
792
793 /**
794 * Use this function to write 32 bits in native format to a SDL_RWops as
795 * big-endian data.
796 *
797 * SDL byteswaps the data only if necessary, so the application always
798 * specifies native format, and the data written will be in big-endian format.
799 *
800 * \param dst the stream to which data will be written
801 * \param value the data to be written, in native format
802 * \returns 1 on successful write, 0 on error.
803 *
804 * \since This function is available since SDL 2.0.0.
805 *
806 * \sa SDL_WriteLE32
807 */
808 extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
809
810 /**
811 * Use this function to write 64 bits in native format to a SDL_RWops as
812 * little-endian data.
813 *
814 * SDL byteswaps the data only if necessary, so the application always
815 * specifies native format, and the data written will be in little-endian
816 * format.
817 *
818 * \param dst the stream to which data will be written
819 * \param value the data to be written, in native format
820 * \returns 1 on successful write, 0 on error.
821 *
822 * \since This function is available since SDL 2.0.0.
823 *
824 * \sa SDL_WriteBE64
825 */
826 extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
827
828 /**
829 * Use this function to write 64 bits in native format to a SDL_RWops as
830 * big-endian data.
831 *
832 * SDL byteswaps the data only if necessary, so the application always
833 * specifies native format, and the data written will be in big-endian format.
834 *
835 * \param dst the stream to which data will be written
836 * \param value the data to be written, in native format
837 * \returns 1 on successful write, 0 on error.
838 *
839 * \since This function is available since SDL 2.0.0.
840 *
841 * \sa SDL_WriteLE64
842 */
843 extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
844 /* @} *//* Write endian functions */
845
846 /* Ends C function definitions when using C++ */
847 #ifdef __cplusplus
848 }
849 #endif
850 #include <SDL2/close_code.h>
851
852 #endif /* SDL_rwops_h_ */
853
854 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_scancode.h
23 *
24 * Defines keyboard scancodes.
25 */
26
27 #ifndef SDL_scancode_h_
28 #define SDL_scancode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /**
33 * \brief The SDL keyboard scancode representation.
34 *
35 * Values of this type are used to represent keyboard keys, among other places
36 * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
37 * SDL_Event structure.
38 *
39 * The values in this enumeration are based on the USB usage page standard:
40 * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
41 */
42 typedef enum
43 {
44 SDL_SCANCODE_UNKNOWN = 0,
45
46 /**
47 * \name Usage page 0x07
48 *
49 * These values are from usage page 0x07 (USB keyboard page).
50 */
51 /* @{ */
52
53 SDL_SCANCODE_A = 4,
54 SDL_SCANCODE_B = 5,
55 SDL_SCANCODE_C = 6,
56 SDL_SCANCODE_D = 7,
57 SDL_SCANCODE_E = 8,
58 SDL_SCANCODE_F = 9,
59 SDL_SCANCODE_G = 10,
60 SDL_SCANCODE_H = 11,
61 SDL_SCANCODE_I = 12,
62 SDL_SCANCODE_J = 13,
63 SDL_SCANCODE_K = 14,
64 SDL_SCANCODE_L = 15,
65 SDL_SCANCODE_M = 16,
66 SDL_SCANCODE_N = 17,
67 SDL_SCANCODE_O = 18,
68 SDL_SCANCODE_P = 19,
69 SDL_SCANCODE_Q = 20,
70 SDL_SCANCODE_R = 21,
71 SDL_SCANCODE_S = 22,
72 SDL_SCANCODE_T = 23,
73 SDL_SCANCODE_U = 24,
74 SDL_SCANCODE_V = 25,
75 SDL_SCANCODE_W = 26,
76 SDL_SCANCODE_X = 27,
77 SDL_SCANCODE_Y = 28,
78 SDL_SCANCODE_Z = 29,
79
80 SDL_SCANCODE_1 = 30,
81 SDL_SCANCODE_2 = 31,
82 SDL_SCANCODE_3 = 32,
83 SDL_SCANCODE_4 = 33,
84 SDL_SCANCODE_5 = 34,
85 SDL_SCANCODE_6 = 35,
86 SDL_SCANCODE_7 = 36,
87 SDL_SCANCODE_8 = 37,
88 SDL_SCANCODE_9 = 38,
89 SDL_SCANCODE_0 = 39,
90
91 SDL_SCANCODE_RETURN = 40,
92 SDL_SCANCODE_ESCAPE = 41,
93 SDL_SCANCODE_BACKSPACE = 42,
94 SDL_SCANCODE_TAB = 43,
95 SDL_SCANCODE_SPACE = 44,
96
97 SDL_SCANCODE_MINUS = 45,
98 SDL_SCANCODE_EQUALS = 46,
99 SDL_SCANCODE_LEFTBRACKET = 47,
100 SDL_SCANCODE_RIGHTBRACKET = 48,
101 SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
102 * key on ISO keyboards and at the right end
103 * of the QWERTY row on ANSI keyboards.
104 * Produces REVERSE SOLIDUS (backslash) and
105 * VERTICAL LINE in a US layout, REVERSE
106 * SOLIDUS and VERTICAL LINE in a UK Mac
107 * layout, NUMBER SIGN and TILDE in a UK
108 * Windows layout, DOLLAR SIGN and POUND SIGN
109 * in a Swiss German layout, NUMBER SIGN and
110 * APOSTROPHE in a German layout, GRAVE
111 * ACCENT and POUND SIGN in a French Mac
112 * layout, and ASTERISK and MICRO SIGN in a
113 * French Windows layout.
114 */
115 SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
116 * instead of 49 for the same key, but all
117 * OSes I've seen treat the two codes
118 * identically. So, as an implementor, unless
119 * your keyboard generates both of those
120 * codes and your OS treats them differently,
121 * you should generate SDL_SCANCODE_BACKSLASH
122 * instead of this code. As a user, you
123 * should not rely on this code because SDL
124 * will never generate it with most (all?)
125 * keyboards.
126 */
127 SDL_SCANCODE_SEMICOLON = 51,
128 SDL_SCANCODE_APOSTROPHE = 52,
129 SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
130 * and ISO keyboards). Produces GRAVE ACCENT and
131 * TILDE in a US Windows layout and in US and UK
132 * Mac layouts on ANSI keyboards, GRAVE ACCENT
133 * and NOT SIGN in a UK Windows layout, SECTION
134 * SIGN and PLUS-MINUS SIGN in US and UK Mac
135 * layouts on ISO keyboards, SECTION SIGN and
136 * DEGREE SIGN in a Swiss German layout (Mac:
137 * only on ISO keyboards), CIRCUMFLEX ACCENT and
138 * DEGREE SIGN in a German layout (Mac: only on
139 * ISO keyboards), SUPERSCRIPT TWO and TILDE in a
140 * French Windows layout, COMMERCIAL AT and
141 * NUMBER SIGN in a French Mac layout on ISO
142 * keyboards, and LESS-THAN SIGN and GREATER-THAN
143 * SIGN in a Swiss German, German, or French Mac
144 * layout on ANSI keyboards.
145 */
146 SDL_SCANCODE_COMMA = 54,
147 SDL_SCANCODE_PERIOD = 55,
148 SDL_SCANCODE_SLASH = 56,
149
150 SDL_SCANCODE_CAPSLOCK = 57,
151
152 SDL_SCANCODE_F1 = 58,
153 SDL_SCANCODE_F2 = 59,
154 SDL_SCANCODE_F3 = 60,
155 SDL_SCANCODE_F4 = 61,
156 SDL_SCANCODE_F5 = 62,
157 SDL_SCANCODE_F6 = 63,
158 SDL_SCANCODE_F7 = 64,
159 SDL_SCANCODE_F8 = 65,
160 SDL_SCANCODE_F9 = 66,
161 SDL_SCANCODE_F10 = 67,
162 SDL_SCANCODE_F11 = 68,
163 SDL_SCANCODE_F12 = 69,
164
165 SDL_SCANCODE_PRINTSCREEN = 70,
166 SDL_SCANCODE_SCROLLLOCK = 71,
167 SDL_SCANCODE_PAUSE = 72,
168 SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
169 does send code 73, not 117) */
170 SDL_SCANCODE_HOME = 74,
171 SDL_SCANCODE_PAGEUP = 75,
172 SDL_SCANCODE_DELETE = 76,
173 SDL_SCANCODE_END = 77,
174 SDL_SCANCODE_PAGEDOWN = 78,
175 SDL_SCANCODE_RIGHT = 79,
176 SDL_SCANCODE_LEFT = 80,
177 SDL_SCANCODE_DOWN = 81,
178 SDL_SCANCODE_UP = 82,
179
180 SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
181 */
182 SDL_SCANCODE_KP_DIVIDE = 84,
183 SDL_SCANCODE_KP_MULTIPLY = 85,
184 SDL_SCANCODE_KP_MINUS = 86,
185 SDL_SCANCODE_KP_PLUS = 87,
186 SDL_SCANCODE_KP_ENTER = 88,
187 SDL_SCANCODE_KP_1 = 89,
188 SDL_SCANCODE_KP_2 = 90,
189 SDL_SCANCODE_KP_3 = 91,
190 SDL_SCANCODE_KP_4 = 92,
191 SDL_SCANCODE_KP_5 = 93,
192 SDL_SCANCODE_KP_6 = 94,
193 SDL_SCANCODE_KP_7 = 95,
194 SDL_SCANCODE_KP_8 = 96,
195 SDL_SCANCODE_KP_9 = 97,
196 SDL_SCANCODE_KP_0 = 98,
197 SDL_SCANCODE_KP_PERIOD = 99,
198
199 SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
200 * keyboards have over ANSI ones,
201 * located between left shift and Y.
202 * Produces GRAVE ACCENT and TILDE in a
203 * US or UK Mac layout, REVERSE SOLIDUS
204 * (backslash) and VERTICAL LINE in a
205 * US or UK Windows layout, and
206 * LESS-THAN SIGN and GREATER-THAN SIGN
207 * in a Swiss German, German, or French
208 * layout. */
209 SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
210 SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
211 * not a physical key - but some Mac keyboards
212 * do have a power key. */
213 SDL_SCANCODE_KP_EQUALS = 103,
214 SDL_SCANCODE_F13 = 104,
215 SDL_SCANCODE_F14 = 105,
216 SDL_SCANCODE_F15 = 106,
217 SDL_SCANCODE_F16 = 107,
218 SDL_SCANCODE_F17 = 108,
219 SDL_SCANCODE_F18 = 109,
220 SDL_SCANCODE_F19 = 110,
221 SDL_SCANCODE_F20 = 111,
222 SDL_SCANCODE_F21 = 112,
223 SDL_SCANCODE_F22 = 113,
224 SDL_SCANCODE_F23 = 114,
225 SDL_SCANCODE_F24 = 115,
226 SDL_SCANCODE_EXECUTE = 116,
227 SDL_SCANCODE_HELP = 117,
228 SDL_SCANCODE_MENU = 118,
229 SDL_SCANCODE_SELECT = 119,
230 SDL_SCANCODE_STOP = 120,
231 SDL_SCANCODE_AGAIN = 121, /**< redo */
232 SDL_SCANCODE_UNDO = 122,
233 SDL_SCANCODE_CUT = 123,
234 SDL_SCANCODE_COPY = 124,
235 SDL_SCANCODE_PASTE = 125,
236 SDL_SCANCODE_FIND = 126,
237 SDL_SCANCODE_MUTE = 127,
238 SDL_SCANCODE_VOLUMEUP = 128,
239 SDL_SCANCODE_VOLUMEDOWN = 129,
240 /* not sure whether there's a reason to enable these */
241 /* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
242 /* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
243 /* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
244 SDL_SCANCODE_KP_COMMA = 133,
245 SDL_SCANCODE_KP_EQUALSAS400 = 134,
246
247 SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
248 footnotes in USB doc */
249 SDL_SCANCODE_INTERNATIONAL2 = 136,
250 SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
251 SDL_SCANCODE_INTERNATIONAL4 = 138,
252 SDL_SCANCODE_INTERNATIONAL5 = 139,
253 SDL_SCANCODE_INTERNATIONAL6 = 140,
254 SDL_SCANCODE_INTERNATIONAL7 = 141,
255 SDL_SCANCODE_INTERNATIONAL8 = 142,
256 SDL_SCANCODE_INTERNATIONAL9 = 143,
257 SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
258 SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
259 SDL_SCANCODE_LANG3 = 146, /**< Katakana */
260 SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
261 SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
262 SDL_SCANCODE_LANG6 = 149, /**< reserved */
263 SDL_SCANCODE_LANG7 = 150, /**< reserved */
264 SDL_SCANCODE_LANG8 = 151, /**< reserved */
265 SDL_SCANCODE_LANG9 = 152, /**< reserved */
266
267 SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
268 SDL_SCANCODE_SYSREQ = 154,
269 SDL_SCANCODE_CANCEL = 155,
270 SDL_SCANCODE_CLEAR = 156,
271 SDL_SCANCODE_PRIOR = 157,
272 SDL_SCANCODE_RETURN2 = 158,
273 SDL_SCANCODE_SEPARATOR = 159,
274 SDL_SCANCODE_OUT = 160,
275 SDL_SCANCODE_OPER = 161,
276 SDL_SCANCODE_CLEARAGAIN = 162,
277 SDL_SCANCODE_CRSEL = 163,
278 SDL_SCANCODE_EXSEL = 164,
279
280 SDL_SCANCODE_KP_00 = 176,
281 SDL_SCANCODE_KP_000 = 177,
282 SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
283 SDL_SCANCODE_DECIMALSEPARATOR = 179,
284 SDL_SCANCODE_CURRENCYUNIT = 180,
285 SDL_SCANCODE_CURRENCYSUBUNIT = 181,
286 SDL_SCANCODE_KP_LEFTPAREN = 182,
287 SDL_SCANCODE_KP_RIGHTPAREN = 183,
288 SDL_SCANCODE_KP_LEFTBRACE = 184,
289 SDL_SCANCODE_KP_RIGHTBRACE = 185,
290 SDL_SCANCODE_KP_TAB = 186,
291 SDL_SCANCODE_KP_BACKSPACE = 187,
292 SDL_SCANCODE_KP_A = 188,
293 SDL_SCANCODE_KP_B = 189,
294 SDL_SCANCODE_KP_C = 190,
295 SDL_SCANCODE_KP_D = 191,
296 SDL_SCANCODE_KP_E = 192,
297 SDL_SCANCODE_KP_F = 193,
298 SDL_SCANCODE_KP_XOR = 194,
299 SDL_SCANCODE_KP_POWER = 195,
300 SDL_SCANCODE_KP_PERCENT = 196,
301 SDL_SCANCODE_KP_LESS = 197,
302 SDL_SCANCODE_KP_GREATER = 198,
303 SDL_SCANCODE_KP_AMPERSAND = 199,
304 SDL_SCANCODE_KP_DBLAMPERSAND = 200,
305 SDL_SCANCODE_KP_VERTICALBAR = 201,
306 SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
307 SDL_SCANCODE_KP_COLON = 203,
308 SDL_SCANCODE_KP_HASH = 204,
309 SDL_SCANCODE_KP_SPACE = 205,
310 SDL_SCANCODE_KP_AT = 206,
311 SDL_SCANCODE_KP_EXCLAM = 207,
312 SDL_SCANCODE_KP_MEMSTORE = 208,
313 SDL_SCANCODE_KP_MEMRECALL = 209,
314 SDL_SCANCODE_KP_MEMCLEAR = 210,
315 SDL_SCANCODE_KP_MEMADD = 211,
316 SDL_SCANCODE_KP_MEMSUBTRACT = 212,
317 SDL_SCANCODE_KP_MEMMULTIPLY = 213,
318 SDL_SCANCODE_KP_MEMDIVIDE = 214,
319 SDL_SCANCODE_KP_PLUSMINUS = 215,
320 SDL_SCANCODE_KP_CLEAR = 216,
321 SDL_SCANCODE_KP_CLEARENTRY = 217,
322 SDL_SCANCODE_KP_BINARY = 218,
323 SDL_SCANCODE_KP_OCTAL = 219,
324 SDL_SCANCODE_KP_DECIMAL = 220,
325 SDL_SCANCODE_KP_HEXADECIMAL = 221,
326
327 SDL_SCANCODE_LCTRL = 224,
328 SDL_SCANCODE_LSHIFT = 225,
329 SDL_SCANCODE_LALT = 226, /**< alt, option */
330 SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
331 SDL_SCANCODE_RCTRL = 228,
332 SDL_SCANCODE_RSHIFT = 229,
333 SDL_SCANCODE_RALT = 230, /**< alt gr, option */
334 SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
335
336 SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
337 * by any of the above, but since there's a
338 * special KMOD_MODE for it I'm adding it here
339 */
340
341 /* @} *//* Usage page 0x07 */
342
343 /**
344 * \name Usage page 0x0C
345 *
346 * These values are mapped from usage page 0x0C (USB consumer page).
347 */
348 /* @{ */
349
350 SDL_SCANCODE_AUDIONEXT = 258,
351 SDL_SCANCODE_AUDIOPREV = 259,
352 SDL_SCANCODE_AUDIOSTOP = 260,
353 SDL_SCANCODE_AUDIOPLAY = 261,
354 SDL_SCANCODE_AUDIOMUTE = 262,
355 SDL_SCANCODE_MEDIASELECT = 263,
356 SDL_SCANCODE_WWW = 264,
357 SDL_SCANCODE_MAIL = 265,
358 SDL_SCANCODE_CALCULATOR = 266,
359 SDL_SCANCODE_COMPUTER = 267,
360 SDL_SCANCODE_AC_SEARCH = 268,
361 SDL_SCANCODE_AC_HOME = 269,
362 SDL_SCANCODE_AC_BACK = 270,
363 SDL_SCANCODE_AC_FORWARD = 271,
364 SDL_SCANCODE_AC_STOP = 272,
365 SDL_SCANCODE_AC_REFRESH = 273,
366 SDL_SCANCODE_AC_BOOKMARKS = 274,
367
368 /* @} *//* Usage page 0x0C */
369
370 /**
371 * \name Walther keys
372 *
373 * These are values that Christian Walther added (for mac keyboard?).
374 */
375 /* @{ */
376
377 SDL_SCANCODE_BRIGHTNESSDOWN = 275,
378 SDL_SCANCODE_BRIGHTNESSUP = 276,
379 SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
380 switch, video mode switch */
381 SDL_SCANCODE_KBDILLUMTOGGLE = 278,
382 SDL_SCANCODE_KBDILLUMDOWN = 279,
383 SDL_SCANCODE_KBDILLUMUP = 280,
384 SDL_SCANCODE_EJECT = 281,
385 SDL_SCANCODE_SLEEP = 282,
386
387 SDL_SCANCODE_APP1 = 283,
388 SDL_SCANCODE_APP2 = 284,
389
390 /* @} *//* Walther keys */
391
392 /**
393 * \name Usage page 0x0C (additional media keys)
394 *
395 * These values are mapped from usage page 0x0C (USB consumer page).
396 */
397 /* @{ */
398
399 SDL_SCANCODE_AUDIOREWIND = 285,
400 SDL_SCANCODE_AUDIOFASTFORWARD = 286,
401
402 /* @} *//* Usage page 0x0C (additional media keys) */
403
404 /* Add any other keys here. */
405
406 SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
407 for array bounds */
408 } SDL_Scancode;
409
410 #endif /* SDL_scancode_h_ */
411
412 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_sensor.h
23 *
24 * Include file for SDL sensor event handling
25 *
26 */
27
28 #ifndef SDL_sensor_h_
29 #define SDL_sensor_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 /* *INDENT-OFF* */
38 extern "C" {
39 /* *INDENT-ON* */
40 #endif
41
42 /**
43 * \brief SDL_sensor.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
47 * for sensors, and load appropriate drivers.
48 */
49
50 struct _SDL_Sensor;
51 typedef struct _SDL_Sensor SDL_Sensor;
52
53 /**
54 * This is a unique ID for a sensor for the time it is connected to the system,
55 * and is never reused for the lifetime of the application.
56 *
57 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
58 */
59 typedef Sint32 SDL_SensorID;
60
61 /* The different sensors defined by SDL
62 *
63 * Additional sensors may be available, using platform dependent semantics.
64 *
65 * Hare are the additional Android sensors:
66 * https://developer.android.com/reference/android/hardware/SensorEvent.html#values
67 */
68 typedef enum
69 {
70 SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
71 SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
72 SDL_SENSOR_ACCEL, /**< Accelerometer */
73 SDL_SENSOR_GYRO /**< Gyroscope */
74 } SDL_SensorType;
75
76 /**
77 * Accelerometer sensor
78 *
79 * The accelerometer returns the current acceleration in SI meters per
80 * second squared. This measurement includes the force of gravity, so
81 * a device at rest will have an value of SDL_STANDARD_GRAVITY away
82 * from the center of the earth.
83 *
84 * values[0]: Acceleration on the x axis
85 * values[1]: Acceleration on the y axis
86 * values[2]: Acceleration on the z axis
87 *
88 * For phones held in portrait mode and game controllers held in front of you,
89 * the axes are defined as follows:
90 * -X ... +X : left ... right
91 * -Y ... +Y : bottom ... top
92 * -Z ... +Z : farther ... closer
93 *
94 * The axis data is not changed when the phone is rotated.
95 *
96 * \sa SDL_GetDisplayOrientation()
97 */
98 #define SDL_STANDARD_GRAVITY 9.80665f
99
100 /**
101 * Gyroscope sensor
102 *
103 * The gyroscope returns the current rate of rotation in radians per second.
104 * The rotation is positive in the counter-clockwise direction. That is,
105 * an observer looking from a positive location on one of the axes would
106 * see positive rotation on that axis when it appeared to be rotating
107 * counter-clockwise.
108 *
109 * values[0]: Angular speed around the x axis (pitch)
110 * values[1]: Angular speed around the y axis (yaw)
111 * values[2]: Angular speed around the z axis (roll)
112 *
113 * For phones held in portrait mode and game controllers held in front of you,
114 * the axes are defined as follows:
115 * -X ... +X : left ... right
116 * -Y ... +Y : bottom ... top
117 * -Z ... +Z : farther ... closer
118 *
119 * The axis data is not changed when the phone or controller is rotated.
120 *
121 * \sa SDL_GetDisplayOrientation()
122 */
123
124 /* Function prototypes */
125
126 /**
127 * Locking for multi-threaded access to the sensor API
128 *
129 * If you are using the sensor API or handling events from multiple threads
130 * you should use these locking functions to protect access to the sensors.
131 *
132 * In particular, you are guaranteed that the sensor list won't change, so the
133 * API functions that take a sensor index will be valid, and sensor events
134 * will not be delivered.
135 *
136 * \since This function is available since SDL 2.0.14.
137 */
138 extern DECLSPEC void SDLCALL SDL_LockSensors(void);
139 extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
140
141 /**
142 * Count the number of sensors attached to the system right now.
143 *
144 * \returns the number of sensors detected.
145 *
146 * \since This function is available since SDL 2.0.9.
147 */
148 extern DECLSPEC int SDLCALL SDL_NumSensors(void);
149
150 /**
151 * Get the implementation dependent name of a sensor.
152 *
153 * \param device_index The sensor to obtain name from
154 * \returns the sensor name, or NULL if `device_index` is out of range.
155 *
156 * \since This function is available since SDL 2.0.9.
157 */
158 extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
159
160 /**
161 * Get the type of a sensor.
162 *
163 * \param device_index The sensor to get the type from
164 * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is
165 * out of range.
166 *
167 * \since This function is available since SDL 2.0.9.
168 */
169 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
170
171 /**
172 * Get the platform dependent type of a sensor.
173 *
174 * \param device_index The sensor to check
175 * \returns the sensor platform dependent type, or -1 if `device_index` is out
176 * of range.
177 *
178 * \since This function is available since SDL 2.0.9.
179 */
180 extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
181
182 /**
183 * Get the instance ID of a sensor.
184 *
185 * \param device_index The sensor to get instance id from
186 * \returns the sensor instance ID, or -1 if `device_index` is out of range.
187 *
188 * \since This function is available since SDL 2.0.9.
189 */
190 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
191
192 /**
193 * Open a sensor for use.
194 *
195 * \param device_index The sensor to open
196 * \returns an SDL_Sensor sensor object, or NULL if an error occurred.
197 *
198 * \since This function is available since SDL 2.0.9.
199 */
200 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
201
202 /**
203 * Return the SDL_Sensor associated with an instance id.
204 *
205 * \param instance_id The sensor from instance id
206 * \returns an SDL_Sensor object.
207 *
208 * \since This function is available since SDL 2.0.9.
209 */
210 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
211
212 /**
213 * Get the implementation dependent name of a sensor
214 *
215 * \param sensor The SDL_Sensor object
216 * \returns the sensor name, or NULL if `sensor` is NULL.
217 *
218 * \since This function is available since SDL 2.0.9.
219 */
220 extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
221
222 /**
223 * Get the type of a sensor.
224 *
225 * \param sensor The SDL_Sensor object to inspect
226 * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
227 * NULL.
228 *
229 * \since This function is available since SDL 2.0.9.
230 */
231 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
232
233 /**
234 * Get the platform dependent type of a sensor.
235 *
236 * \param sensor The SDL_Sensor object to inspect
237 * \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
238 *
239 * \since This function is available since SDL 2.0.9.
240 */
241 extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
242
243 /**
244 * Get the instance ID of a sensor.
245 *
246 * \param sensor The SDL_Sensor object to inspect
247 * \returns the sensor instance ID, or -1 if `sensor` is NULL.
248 *
249 * \since This function is available since SDL 2.0.9.
250 */
251 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
252
253 /**
254 * Get the current state of an opened sensor.
255 *
256 * The number of values and interpretation of the data is sensor dependent.
257 *
258 * \param sensor The SDL_Sensor object to query
259 * \param data A pointer filled with the current sensor state
260 * \param num_values The number of values to write to data
261 * \returns 0 or -1 if an error occurred.
262 *
263 * \since This function is available since SDL 2.0.9.
264 */
265 extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
266
267 /**
268 * Close a sensor previously opened with SDL_SensorOpen().
269 *
270 * \param sensor The SDL_Sensor object to close
271 *
272 * \since This function is available since SDL 2.0.9.
273 */
274 extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
275
276 /**
277 * Update the current state of the open sensors.
278 *
279 * This is called automatically by the event loop if sensor events are
280 * enabled.
281 *
282 * This needs to be called from the thread that initialized the sensor
283 * subsystem.
284 *
285 * \since This function is available since SDL 2.0.9.
286 */
287 extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
288
289
290 /* Ends C function definitions when using C++ */
291 #ifdef __cplusplus
292 /* *INDENT-OFF* */
293 }
294 /* *INDENT-ON* */
295 #endif
296 #include <SDL2/close_code.h>
297
298 #endif /* SDL_sensor_h_ */
299
300 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_shape_h_
22 #define SDL_shape_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_pixels.h>
26 #include <SDL2/SDL_rect.h>
27 #include <SDL2/SDL_surface.h>
28 #include <SDL2/SDL_video.h>
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /** \file SDL_shape.h
37 *
38 * Header file for the shaped window API.
39 */
40
41 #define SDL_NONSHAPEABLE_WINDOW -1
42 #define SDL_INVALID_SHAPE_ARGUMENT -2
43 #define SDL_WINDOW_LACKS_SHAPE -3
44
45 /**
46 * Create a window that can be shaped with the specified position, dimensions,
47 * and flags.
48 *
49 * \param title The title of the window, in UTF-8 encoding.
50 * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
51 * ::SDL_WINDOWPOS_UNDEFINED.
52 * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
53 * ::SDL_WINDOWPOS_UNDEFINED.
54 * \param w The width of the window.
55 * \param h The height of the window.
56 * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with
57 * any of the following: ::SDL_WINDOW_OPENGL,
58 * ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
59 * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
60 * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
61 * and ::SDL_WINDOW_FULLSCREEN is always unset.
62 * \return the window created, or NULL if window creation failed.
63 *
64 * \since This function is available since SDL 2.0.0.
65 *
66 * \sa SDL_DestroyWindow
67 */
68 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
69
70 /**
71 * Return whether the given window is a shaped window.
72 *
73 * \param window The window to query for being shaped.
74 * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if
75 * the window is unshaped or NULL.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_CreateShapedWindow
80 */
81 extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
82
83 /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
84 typedef enum {
85 /** \brief The default mode, a binarized alpha cutoff of 1. */
86 ShapeModeDefault,
87 /** \brief A binarized alpha cutoff with a given integer value. */
88 ShapeModeBinarizeAlpha,
89 /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
90 ShapeModeReverseBinarizeAlpha,
91 /** \brief A color key is applied. */
92 ShapeModeColorKey
93 } WindowShapeMode;
94
95 #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
96
97 /** \brief A union containing parameters for shaped windows. */
98 typedef union {
99 /** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
100 Uint8 binarizationCutoff;
101 SDL_Color colorKey;
102 } SDL_WindowShapeParams;
103
104 /** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
105 typedef struct SDL_WindowShapeMode {
106 /** \brief The mode of these window-shape parameters. */
107 WindowShapeMode mode;
108 /** \brief Window-shape parameters. */
109 SDL_WindowShapeParams parameters;
110 } SDL_WindowShapeMode;
111
112 /**
113 * Set the shape and parameters of a shaped window.
114 *
115 * \param window The shaped window whose parameters should be set.
116 * \param shape A surface encoding the desired shape for the window.
117 * \param shape_mode The parameters to set for the shaped window.
118 * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape
119 * argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does
120 * not reference a valid shaped window.
121 *
122 * \since This function is available since SDL 2.0.0.
123 *
124 * \sa SDL_WindowShapeMode
125 * \sa SDL_GetShapedWindowMode
126 */
127 extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
128
129 /**
130 * Get the shape parameters of a shaped window.
131 *
132 * \param window The shaped window whose parameters should be retrieved.
133 * \param shape_mode An empty shape-mode structure to fill, or NULL to check
134 * whether the window has a shape.
135 * \return 0 if the window has a shape and, provided shape_mode was not NULL,
136 * shape_mode has been filled with the mode data,
137 * SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped
138 * window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a
139 * shapeable window currently lacking a shape.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_WindowShapeMode
144 * \sa SDL_SetWindowShape
145 */
146 extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
147
148 /* Ends C function definitions when using C++ */
149 #ifdef __cplusplus
150 }
151 #endif
152 #include <SDL2/close_code.h>
153
154 #endif /* SDL_shape_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_stdinc.h
23 *
24 * This is a general header that includes C language support.
25 */
26
27 #ifndef SDL_stdinc_h_
28 #define SDL_stdinc_h_
29
30 #include <SDL2/SDL_config.h>
31
32 #ifdef __APPLE__
33 #ifndef _DARWIN_C_SOURCE
34 #define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
35 #endif
36 #endif
37
38 #ifdef HAVE_SYS_TYPES_H
39 #include <sys/types.h>
40 #endif
41 #ifdef HAVE_STDIO_H
42 #include <stdio.h>
43 #endif
44 #if defined(STDC_HEADERS)
45 # include <stdlib.h>
46 # include <stddef.h>
47 # include <stdarg.h>
48 #else
49 # if defined(HAVE_STDLIB_H)
50 # include <stdlib.h>
51 # elif defined(HAVE_MALLOC_H)
52 # include <malloc.h>
53 # endif
54 # if defined(HAVE_STDDEF_H)
55 # include <stddef.h>
56 # endif
57 # if defined(HAVE_STDARG_H)
58 # include <stdarg.h>
59 # endif
60 #endif
61 #ifdef HAVE_STRING_H
62 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
63 # include <memory.h>
64 # endif
65 # include <string.h>
66 #endif
67 #ifdef HAVE_STRINGS_H
68 # include <strings.h>
69 #endif
70 #ifdef HAVE_WCHAR_H
71 # include <wchar.h>
72 #endif
73 #if defined(HAVE_INTTYPES_H)
74 # include <inttypes.h>
75 #elif defined(HAVE_STDINT_H)
76 # include <stdint.h>
77 #endif
78 #ifdef HAVE_CTYPE_H
79 # include <ctype.h>
80 #endif
81 #ifdef HAVE_MATH_H
82 # if defined(__WINRT__)
83 /* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
84 WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
85 for more information.
86 */
87 # define _USE_MATH_DEFINES
88 # endif
89 # include <math.h>
90 #endif
91 #ifdef HAVE_FLOAT_H
92 # include <float.h>
93 #endif
94 #if defined(HAVE_ALLOCA) && !defined(alloca)
95 # if defined(HAVE_ALLOCA_H)
96 # include <alloca.h>
97 # elif defined(__GNUC__)
98 # define alloca __builtin_alloca
99 # elif defined(_MSC_VER)
100 # include <malloc.h>
101 # define alloca _alloca
102 # elif defined(__WATCOMC__)
103 # include <malloc.h>
104 # elif defined(__BORLANDC__)
105 # include <malloc.h>
106 # elif defined(__DMC__)
107 # include <stdlib.h>
108 # elif defined(__AIX__)
109 #pragma alloca
110 # elif defined(__MRC__)
111 void *alloca(unsigned);
112 # else
113 char *alloca();
114 # endif
115 #endif
116
117 /**
118 * Check if the compiler supports a given builtin.
119 * Supported by virtually all clang versions and recent gcc. Use this
120 * instead of checking the clang version if possible.
121 */
122 #ifdef __has_builtin
123 #define _SDL_HAS_BUILTIN(x) __has_builtin(x)
124 #else
125 #define _SDL_HAS_BUILTIN(x) 0
126 #endif
127
128 /**
129 * The number of elements in an array.
130 */
131 #define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
132 #define SDL_TABLESIZE(table) SDL_arraysize(table)
133
134 /**
135 * Macro useful for building other macros with strings in them
136 *
137 * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
138 */
139 #define SDL_STRINGIFY_ARG(arg) #arg
140
141 /**
142 * \name Cast operators
143 *
144 * Use proper C++ casts when compiled as C++ to be compatible with the option
145 * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
146 */
147 /* @{ */
148 #ifdef __cplusplus
149 #define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
150 #define SDL_static_cast(type, expression) static_cast<type>(expression)
151 #define SDL_const_cast(type, expression) const_cast<type>(expression)
152 #else
153 #define SDL_reinterpret_cast(type, expression) ((type)(expression))
154 #define SDL_static_cast(type, expression) ((type)(expression))
155 #define SDL_const_cast(type, expression) ((type)(expression))
156 #endif
157 /* @} *//* Cast operators */
158
159 /* Define a four character code as a Uint32 */
160 #define SDL_FOURCC(A, B, C, D) \
161 ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
162 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
163 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
164 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
165
166 /**
167 * \name Basic data types
168 */
169 /* @{ */
170
171 #ifdef __CC_ARM
172 /* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
173 #define SDL_FALSE 0
174 #define SDL_TRUE 1
175 typedef int SDL_bool;
176 #else
177 typedef enum
178 {
179 SDL_FALSE = 0,
180 SDL_TRUE = 1
181 } SDL_bool;
182 #endif
183
184 /**
185 * \brief A signed 8-bit integer type.
186 */
187 #define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
188 #define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
189 typedef int8_t Sint8;
190 /**
191 * \brief An unsigned 8-bit integer type.
192 */
193 #define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
194 #define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
195 typedef uint8_t Uint8;
196 /**
197 * \brief A signed 16-bit integer type.
198 */
199 #define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
200 #define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
201 typedef int16_t Sint16;
202 /**
203 * \brief An unsigned 16-bit integer type.
204 */
205 #define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
206 #define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
207 typedef uint16_t Uint16;
208 /**
209 * \brief A signed 32-bit integer type.
210 */
211 #define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
212 #define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
213 typedef int32_t Sint32;
214 /**
215 * \brief An unsigned 32-bit integer type.
216 */
217 #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
218 #define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
219 typedef uint32_t Uint32;
220
221 /**
222 * \brief A signed 64-bit integer type.
223 */
224 #define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */
225 #define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */
226 typedef int64_t Sint64;
227 /**
228 * \brief An unsigned 64-bit integer type.
229 */
230 #define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */
231 #define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */
232 typedef uint64_t Uint64;
233
234 /* @} *//* Basic data types */
235
236 /**
237 * \name Floating-point constants
238 */
239 /* @{ */
240
241 #ifdef FLT_EPSILON
242 #define SDL_FLT_EPSILON FLT_EPSILON
243 #else
244 #define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
245 #endif
246
247 /* @} *//* Floating-point constants */
248
249 /* Make sure we have macros for printing width-based integers.
250 * <stdint.h> should define these but this is not true all platforms.
251 * (for example win32) */
252 #ifndef SDL_PRIs64
253 #ifdef PRIs64
254 #define SDL_PRIs64 PRIs64
255 #elif defined(__WIN32__)
256 #define SDL_PRIs64 "I64d"
257 #elif defined(__LINUX__) && defined(__LP64__)
258 #define SDL_PRIs64 "ld"
259 #else
260 #define SDL_PRIs64 "lld"
261 #endif
262 #endif
263 #ifndef SDL_PRIu64
264 #ifdef PRIu64
265 #define SDL_PRIu64 PRIu64
266 #elif defined(__WIN32__)
267 #define SDL_PRIu64 "I64u"
268 #elif defined(__LINUX__) && defined(__LP64__)
269 #define SDL_PRIu64 "lu"
270 #else
271 #define SDL_PRIu64 "llu"
272 #endif
273 #endif
274 #ifndef SDL_PRIx64
275 #ifdef PRIx64
276 #define SDL_PRIx64 PRIx64
277 #elif defined(__WIN32__)
278 #define SDL_PRIx64 "I64x"
279 #elif defined(__LINUX__) && defined(__LP64__)
280 #define SDL_PRIx64 "lx"
281 #else
282 #define SDL_PRIx64 "llx"
283 #endif
284 #endif
285 #ifndef SDL_PRIX64
286 #ifdef PRIX64
287 #define SDL_PRIX64 PRIX64
288 #elif defined(__WIN32__)
289 #define SDL_PRIX64 "I64X"
290 #elif defined(__LINUX__) && defined(__LP64__)
291 #define SDL_PRIX64 "lX"
292 #else
293 #define SDL_PRIX64 "llX"
294 #endif
295 #endif
296 #ifndef SDL_PRIs32
297 #ifdef PRId32
298 #define SDL_PRIs32 PRId32
299 #else
300 #define SDL_PRIs32 "d"
301 #endif
302 #endif
303 #ifndef SDL_PRIu32
304 #ifdef PRIu32
305 #define SDL_PRIu32 PRIu32
306 #else
307 #define SDL_PRIu32 "u"
308 #endif
309 #endif
310 #ifndef SDL_PRIx32
311 #ifdef PRIx32
312 #define SDL_PRIx32 PRIx32
313 #else
314 #define SDL_PRIx32 "x"
315 #endif
316 #endif
317 #ifndef SDL_PRIX32
318 #ifdef PRIX32
319 #define SDL_PRIX32 PRIX32
320 #else
321 #define SDL_PRIX32 "X"
322 #endif
323 #endif
324
325 /* Annotations to help code analysis tools */
326 #ifdef SDL_DISABLE_ANALYZE_MACROS
327 #define SDL_IN_BYTECAP(x)
328 #define SDL_INOUT_Z_CAP(x)
329 #define SDL_OUT_Z_CAP(x)
330 #define SDL_OUT_CAP(x)
331 #define SDL_OUT_BYTECAP(x)
332 #define SDL_OUT_Z_BYTECAP(x)
333 #define SDL_PRINTF_FORMAT_STRING
334 #define SDL_SCANF_FORMAT_STRING
335 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
336 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
337 #else
338 #if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
339 #include <sal.h>
340
341 #define SDL_IN_BYTECAP(x) _In_bytecount_(x)
342 #define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
343 #define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
344 #define SDL_OUT_CAP(x) _Out_cap_(x)
345 #define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
346 #define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
347
348 #define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
349 #define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
350 #else
351 #define SDL_IN_BYTECAP(x)
352 #define SDL_INOUT_Z_CAP(x)
353 #define SDL_OUT_Z_CAP(x)
354 #define SDL_OUT_CAP(x)
355 #define SDL_OUT_BYTECAP(x)
356 #define SDL_OUT_Z_BYTECAP(x)
357 #define SDL_PRINTF_FORMAT_STRING
358 #define SDL_SCANF_FORMAT_STRING
359 #endif
360 #if defined(__GNUC__)
361 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
362 #define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
363 #else
364 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
365 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
366 #endif
367 #endif /* SDL_DISABLE_ANALYZE_MACROS */
368
369 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
370 #define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
371 #elif defined(__cplusplus) && (__cplusplus >= 201103L)
372 #define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
373 #else /* universal, but may trigger -Wunused-local-typedefs */
374 #define SDL_COMPILE_TIME_ASSERT(name, x) \
375 typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
376 #endif
377 /** \cond */
378 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
379 SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
380 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
381 SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
382 SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
383 SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
384 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
385 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
386 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
387 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
388 /** \endcond */
389
390 /* Check to make sure enums are the size of ints, for structure packing.
391 For both Watcom C/C++ and Borland C/C++ the compiler option that makes
392 enums having the size of an int must be enabled.
393 This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
394 */
395
396 /** \cond */
397 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
398 #if !defined(__ANDROID__) && !defined(__VITA__)
399 /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
400 typedef enum
401 {
402 DUMMY_ENUM_VALUE
403 } SDL_DUMMY_ENUM;
404
405 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
406 #endif
407 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
408 /** \endcond */
409
410 #include <SDL2/begin_code.h>
411 /* Set up for C function definitions, even when using C++ */
412 #ifdef __cplusplus
413 extern "C" {
414 #endif
415
416 #ifdef HAVE_ALLOCA
417 #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
418 #define SDL_stack_free(data)
419 #else
420 #define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
421 #define SDL_stack_free(data) SDL_free(data)
422 #endif
423
424 extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
425 extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
426 extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
427 extern DECLSPEC void SDLCALL SDL_free(void *mem);
428
429 typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
430 typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
431 typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
432 typedef void (SDLCALL *SDL_free_func)(void *mem);
433
434 /**
435 * Get the current set of SDL memory functions
436 *
437 * \since This function is available since SDL 2.0.7.
438 */
439 extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
440 SDL_calloc_func *calloc_func,
441 SDL_realloc_func *realloc_func,
442 SDL_free_func *free_func);
443
444 /**
445 * Replace SDL's memory allocation functions with a custom set
446 *
447 * \since This function is available since SDL 2.0.7.
448 */
449 extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
450 SDL_calloc_func calloc_func,
451 SDL_realloc_func realloc_func,
452 SDL_free_func free_func);
453
454 /**
455 * Get the number of outstanding (unfreed) allocations
456 *
457 * \since This function is available since SDL 2.0.7.
458 */
459 extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
460
461 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
462 extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
463
464 extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
465
466 extern DECLSPEC int SDLCALL SDL_abs(int x);
467
468 /* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */
469 #define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
470 #define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
471 #define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
472
473 extern DECLSPEC int SDLCALL SDL_isalpha(int x);
474 extern DECLSPEC int SDLCALL SDL_isalnum(int x);
475 extern DECLSPEC int SDLCALL SDL_isblank(int x);
476 extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
477 extern DECLSPEC int SDLCALL SDL_isdigit(int x);
478 extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
479 extern DECLSPEC int SDLCALL SDL_ispunct(int x);
480 extern DECLSPEC int SDLCALL SDL_isspace(int x);
481 extern DECLSPEC int SDLCALL SDL_isupper(int x);
482 extern DECLSPEC int SDLCALL SDL_islower(int x);
483 extern DECLSPEC int SDLCALL SDL_isprint(int x);
484 extern DECLSPEC int SDLCALL SDL_isgraph(int x);
485 extern DECLSPEC int SDLCALL SDL_toupper(int x);
486 extern DECLSPEC int SDLCALL SDL_tolower(int x);
487
488 extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
489
490 extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
491
492 #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
493 #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
494 #define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
495
496 /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
497 SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
498 {
499 #ifdef __APPLE__
500 memset_pattern4(dst, &val, dwords * 4);
501 #elif defined(__GNUC__) && defined(__i386__)
502 int u0, u1, u2;
503 __asm__ __volatile__ (
504 "cld \n\t"
505 "rep ; stosl \n\t"
506 : "=&D" (u0), "=&a" (u1), "=&c" (u2)
507 : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
508 : "memory"
509 );
510 #else
511 size_t _n = (dwords + 3) / 4;
512 Uint32 *_p = SDL_static_cast(Uint32 *, dst);
513 Uint32 _val = (val);
514 if (dwords == 0) {
515 return;
516 }
517 switch (dwords % 4) {
518 case 0: do { *_p++ = _val; SDL_FALLTHROUGH;
519 case 3: *_p++ = _val; SDL_FALLTHROUGH;
520 case 2: *_p++ = _val; SDL_FALLTHROUGH;
521 case 1: *_p++ = _val;
522 } while ( --_n );
523 }
524 #endif
525 }
526
527 extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
528
529 extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
530 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
531
532 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
533 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
534 extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
535 extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
536 extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
537
538 extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
539 extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
540 extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
541 extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
542
543 extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
544 extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
545 extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
546 extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
547 extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
548 extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
549 extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
550 extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
551 extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
552 extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
553 extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
554 extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
555 extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
556
557 extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
558 extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
559 extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
560 extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
561 extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
562 extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
563
564 extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
565 extern DECLSPEC double SDLCALL SDL_atof(const char *str);
566 extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
567 extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
568 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
569 extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
570 extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
571
572 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
573 extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
574 extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
575 extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
576
577 extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
578 extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
579 extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
580 extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
581 extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
582 extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
583
584 #ifndef HAVE_M_PI
585 #ifndef M_PI
586 #define M_PI 3.14159265358979323846264338327950288 /**< pi */
587 #endif
588 #endif
589
590 /**
591 * Use this function to compute arc cosine of `x`.
592 *
593 * The definition of `y = acos(x)` is `x = cos(y)`.
594 *
595 * Domain: `-1 <= x <= 1`
596 *
597 * Range: `0 <= y <= Pi`
598 *
599 * \param x floating point value, in radians.
600 * \returns arc cosine of `x`.
601 *
602 * \since This function is available since SDL 2.0.2.
603 */
604 extern DECLSPEC double SDLCALL SDL_acos(double x);
605 extern DECLSPEC float SDLCALL SDL_acosf(float x);
606 extern DECLSPEC double SDLCALL SDL_asin(double x);
607 extern DECLSPEC float SDLCALL SDL_asinf(float x);
608 extern DECLSPEC double SDLCALL SDL_atan(double x);
609 extern DECLSPEC float SDLCALL SDL_atanf(float x);
610 extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
611 extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
612 extern DECLSPEC double SDLCALL SDL_ceil(double x);
613 extern DECLSPEC float SDLCALL SDL_ceilf(float x);
614 extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
615 extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
616 extern DECLSPEC double SDLCALL SDL_cos(double x);
617 extern DECLSPEC float SDLCALL SDL_cosf(float x);
618 extern DECLSPEC double SDLCALL SDL_exp(double x);
619 extern DECLSPEC float SDLCALL SDL_expf(float x);
620 extern DECLSPEC double SDLCALL SDL_fabs(double x);
621 extern DECLSPEC float SDLCALL SDL_fabsf(float x);
622 extern DECLSPEC double SDLCALL SDL_floor(double x);
623 extern DECLSPEC float SDLCALL SDL_floorf(float x);
624 extern DECLSPEC double SDLCALL SDL_trunc(double x);
625 extern DECLSPEC float SDLCALL SDL_truncf(float x);
626 extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
627 extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
628 extern DECLSPEC double SDLCALL SDL_log(double x);
629 extern DECLSPEC float SDLCALL SDL_logf(float x);
630 extern DECLSPEC double SDLCALL SDL_log10(double x);
631 extern DECLSPEC float SDLCALL SDL_log10f(float x);
632 extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
633 extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
634 extern DECLSPEC double SDLCALL SDL_round(double x);
635 extern DECLSPEC float SDLCALL SDL_roundf(float x);
636 extern DECLSPEC long SDLCALL SDL_lround(double x);
637 extern DECLSPEC long SDLCALL SDL_lroundf(float x);
638 extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
639 extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
640 extern DECLSPEC double SDLCALL SDL_sin(double x);
641 extern DECLSPEC float SDLCALL SDL_sinf(float x);
642 extern DECLSPEC double SDLCALL SDL_sqrt(double x);
643 extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
644 extern DECLSPEC double SDLCALL SDL_tan(double x);
645 extern DECLSPEC float SDLCALL SDL_tanf(float x);
646
647 /* The SDL implementation of iconv() returns these error codes */
648 #define SDL_ICONV_ERROR (size_t)-1
649 #define SDL_ICONV_E2BIG (size_t)-2
650 #define SDL_ICONV_EILSEQ (size_t)-3
651 #define SDL_ICONV_EINVAL (size_t)-4
652
653 /* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
654 typedef struct _SDL_iconv_t *SDL_iconv_t;
655 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
656 const char *fromcode);
657 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
658 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
659 size_t * inbytesleft, char **outbuf,
660 size_t * outbytesleft);
661
662 /**
663 * This function converts a string between encodings in one pass, returning a
664 * string that must be freed with SDL_free() or NULL on error.
665 *
666 * \since This function is available since SDL 2.0.0.
667 */
668 extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
669 const char *fromcode,
670 const char *inbuf,
671 size_t inbytesleft);
672 #define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
673 #define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
674 #define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
675 #define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
676
677 /* force builds using Clang's static analysis tools to use literal C runtime
678 here, since there are possibly tests that are ineffective otherwise. */
679 #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
680
681 /* The analyzer knows about strlcpy even when the system doesn't provide it */
682 #ifndef HAVE_STRLCPY
683 size_t strlcpy(char* dst, const char* src, size_t size);
684 #endif
685
686 /* The analyzer knows about strlcat even when the system doesn't provide it */
687 #ifndef HAVE_STRLCAT
688 size_t strlcat(char* dst, const char* src, size_t size);
689 #endif
690
691 #define SDL_malloc malloc
692 #define SDL_calloc calloc
693 #define SDL_realloc realloc
694 #define SDL_free free
695 #define SDL_memset memset
696 #define SDL_memcpy memcpy
697 #define SDL_memmove memmove
698 #define SDL_memcmp memcmp
699 #define SDL_strlcpy strlcpy
700 #define SDL_strlcat strlcat
701 #define SDL_strlen strlen
702 #define SDL_wcslen wcslen
703 #define SDL_wcslcpy wcslcpy
704 #define SDL_wcslcat wcslcat
705 #define SDL_strdup strdup
706 #define SDL_wcsdup wcsdup
707 #define SDL_strchr strchr
708 #define SDL_strrchr strrchr
709 #define SDL_strstr strstr
710 #define SDL_wcsstr wcsstr
711 #define SDL_strtokr strtok_r
712 #define SDL_strcmp strcmp
713 #define SDL_wcscmp wcscmp
714 #define SDL_strncmp strncmp
715 #define SDL_wcsncmp wcsncmp
716 #define SDL_strcasecmp strcasecmp
717 #define SDL_strncasecmp strncasecmp
718 #define SDL_sscanf sscanf
719 #define SDL_vsscanf vsscanf
720 #define SDL_snprintf snprintf
721 #define SDL_vsnprintf vsnprintf
722 #endif
723
724 SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
725 {
726 return SDL_memcpy(dst, src, dwords * 4);
727 }
728
729 /* Ends C function definitions when using C++ */
730 #ifdef __cplusplus
731 }
732 #endif
733 #include <SDL2/close_code.h>
734
735 #endif /* SDL_stdinc_h_ */
736
737 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_surface.h
23 *
24 * Header file for ::SDL_Surface definition and management functions.
25 */
26
27 #ifndef SDL_surface_h_
28 #define SDL_surface_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_blendmode.h>
34 #include <SDL2/SDL_rwops.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \name Surface flags
44 *
45 * These are the currently supported flags for the ::SDL_Surface.
46 *
47 * \internal
48 * Used internally (read-only).
49 */
50 /* @{ */
51 #define SDL_SWSURFACE 0 /**< Just here for compatibility */
52 #define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
53 #define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
54 #define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
55 #define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
56 /* @} *//* Surface flags */
57
58 /**
59 * Evaluates to true if the surface needs to be locked before access.
60 */
61 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
62
63 /**
64 * \brief A collection of pixels used in software blitting.
65 *
66 * \note This structure should be treated as read-only, except for \c pixels,
67 * which, if not NULL, contains the raw pixel data for the surface.
68 */
69 typedef struct SDL_Surface
70 {
71 Uint32 flags; /**< Read-only */
72 SDL_PixelFormat *format; /**< Read-only */
73 int w, h; /**< Read-only */
74 int pitch; /**< Read-only */
75 void *pixels; /**< Read-write */
76
77 /** Application data associated with the surface */
78 void *userdata; /**< Read-write */
79
80 /** information needed for surfaces requiring locks */
81 int locked; /**< Read-only */
82
83 /** list of BlitMap that hold a reference to this surface */
84 void *list_blitmap; /**< Private */
85
86 /** clipping information */
87 SDL_Rect clip_rect; /**< Read-only */
88
89 /** info for fast blit mapping to other surfaces */
90 struct SDL_BlitMap *map; /**< Private */
91
92 /** Reference count -- used when freeing surface */
93 int refcount; /**< Read-mostly */
94 } SDL_Surface;
95
96 /**
97 * \brief The type of function used for surface blitting functions.
98 */
99 typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
100 struct SDL_Surface * dst, SDL_Rect * dstrect);
101
102 /**
103 * \brief The formula used for converting between YUV and RGB
104 */
105 typedef enum
106 {
107 SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
108 SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
109 SDL_YUV_CONVERSION_BT709, /**< BT.709 */
110 SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
111 } SDL_YUV_CONVERSION_MODE;
112
113 /**
114 * Allocate a new RGB surface.
115 *
116 * If `depth` is 4 or 8 bits, an empty palette is allocated for the surface.
117 * If `depth` is greater than 8 bits, the pixel format is set using the
118 * [RGBA]mask parameters.
119 *
120 * The [RGBA]mask parameters are the bitmasks used to extract that color from
121 * a pixel. For instance, `Rmask` being 0xFF000000 means the red data is
122 * stored in the most significant byte. Using zeros for the RGB masks sets a
123 * default value, based on the depth. For example:
124 *
125 * ```c++
126 * SDL_CreateRGBSurface(0,w,h,32,0,0,0,0);
127 * ```
128 *
129 * However, using zero for the Amask results in an Amask of 0.
130 *
131 * By default surfaces with an alpha mask are set up for blending as with:
132 *
133 * ```c++
134 * SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)
135 * ```
136 *
137 * You can change this by calling SDL_SetSurfaceBlendMode() and selecting a
138 * different `blendMode`.
139 *
140 * \param flags the flags are unused and should be set to 0
141 * \param width the width of the surface
142 * \param height the height of the surface
143 * \param depth the depth of the surface in bits
144 * \param Rmask the red mask for the pixels
145 * \param Gmask the green mask for the pixels
146 * \param Bmask the blue mask for the pixels
147 * \param Amask the alpha mask for the pixels
148 * \returns the new SDL_Surface structure that is created or NULL if it fails;
149 * call SDL_GetError() for more information.
150 *
151 * \since This function is available since SDL 2.0.0.
152 *
153 * \sa SDL_CreateRGBSurfaceFrom
154 * \sa SDL_CreateRGBSurfaceWithFormat
155 * \sa SDL_FreeSurface
156 */
157 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
158 (Uint32 flags, int width, int height, int depth,
159 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
160
161
162 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
163
164 /**
165 * Allocate a new RGB surface with a specific pixel format.
166 *
167 * This function operates mostly like SDL_CreateRGBSurface(), except instead
168 * of providing pixel color masks, you provide it with a predefined format
169 * from SDL_PixelFormatEnum.
170 *
171 * \param flags the flags are unused and should be set to 0
172 * \param width the width of the surface
173 * \param height the height of the surface
174 * \param depth the depth of the surface in bits
175 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
176 * \returns the new SDL_Surface structure that is created or NULL if it fails;
177 * call SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.5.
180 *
181 * \sa SDL_CreateRGBSurface
182 * \sa SDL_CreateRGBSurfaceFrom
183 * \sa SDL_FreeSurface
184 */
185 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
186 (Uint32 flags, int width, int height, int depth, Uint32 format);
187
188 /**
189 * Allocate a new RGB surface with existing pixel data.
190 *
191 * This function operates mostly like SDL_CreateRGBSurface(), except it does
192 * not allocate memory for the pixel data, instead the caller provides an
193 * existing buffer of data for the surface to use.
194 *
195 * No copy is made of the pixel data. Pixel data is not managed automatically;
196 * you must free the surface before you free the pixel data.
197 *
198 * \param pixels a pointer to existing pixel data
199 * \param width the width of the surface
200 * \param height the height of the surface
201 * \param depth the depth of the surface in bits
202 * \param pitch the pitch of the surface in bytes
203 * \param Rmask the red mask for the pixels
204 * \param Gmask the green mask for the pixels
205 * \param Bmask the blue mask for the pixels
206 * \param Amask the alpha mask for the pixels
207 * \returns the new SDL_Surface structure that is created or NULL if it fails;
208 * call SDL_GetError() for more information.
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_CreateRGBSurface
213 * \sa SDL_CreateRGBSurfaceWithFormat
214 * \sa SDL_FreeSurface
215 */
216 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
217 int width,
218 int height,
219 int depth,
220 int pitch,
221 Uint32 Rmask,
222 Uint32 Gmask,
223 Uint32 Bmask,
224 Uint32 Amask);
225
226 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
227
228 /**
229 * Allocate a new RGB surface with with a specific pixel format and existing
230 * pixel data.
231 *
232 * This function operates mostly like SDL_CreateRGBSurfaceFrom(), except
233 * instead of providing pixel color masks, you provide it with a predefined
234 * format from SDL_PixelFormatEnum.
235 *
236 * No copy is made of the pixel data. Pixel data is not managed automatically;
237 * you must free the surface before you free the pixel data.
238 *
239 * \param pixels a pointer to existing pixel data
240 * \param width the width of the surface
241 * \param height the height of the surface
242 * \param depth the depth of the surface in bits
243 * \param pitch the pitch of the surface in bytes
244 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
245 * \returns the new SDL_Surface structure that is created or NULL if it fails;
246 * call SDL_GetError() for more information.
247 *
248 * \since This function is available since SDL 2.0.5.
249 *
250 * \sa SDL_CreateRGBSurfaceFrom
251 * \sa SDL_CreateRGBSurfaceWithFormat
252 * \sa SDL_FreeSurface
253 */
254 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
255 (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
256
257 /**
258 * Free an RGB surface.
259 *
260 * It is safe to pass NULL to this function.
261 *
262 * \param surface the SDL_Surface to free.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_CreateRGBSurface
267 * \sa SDL_CreateRGBSurfaceFrom
268 * \sa SDL_LoadBMP
269 * \sa SDL_LoadBMP_RW
270 */
271 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
272
273 /**
274 * Set the palette used by a surface.
275 *
276 * A single palette can be shared with many surfaces.
277 *
278 * \param surface the SDL_Surface structure to update
279 * \param palette the SDL_Palette structure to use
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 */
285 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
286 SDL_Palette * palette);
287
288 /**
289 * Set up a surface for directly accessing the pixels.
290 *
291 * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
292 * and read from `surface->pixels`, using the pixel format stored in
293 * `surface->format`. Once you are done accessing the surface, you should use
294 * SDL_UnlockSurface() to release it.
295 *
296 * Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
297 * 0, then you can read and write to the surface at any time, and the pixel
298 * format of the surface will not change.
299 *
300 * \param surface the SDL_Surface structure to be locked
301 * \returns 0 on success or a negative error code on failure; call
302 * SDL_GetError() for more information.
303 *
304 * \since This function is available since SDL 2.0.0.
305 *
306 * \sa SDL_MUSTLOCK
307 * \sa SDL_UnlockSurface
308 */
309 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
310
311 /**
312 * Release a surface after directly accessing the pixels.
313 *
314 * \param surface the SDL_Surface structure to be unlocked
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_LockSurface
319 */
320 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
321
322 /**
323 * Load a BMP image from a seekable SDL data stream.
324 *
325 * The new surface should be freed with SDL_FreeSurface(). Not doing so will
326 * result in a memory leak.
327 *
328 * src is an open SDL_RWops buffer, typically loaded with SDL_RWFromFile.
329 * Alternitavely, you might also use the macro SDL_LoadBMP to load a bitmap
330 * from a file, convert it to an SDL_Surface and then close the file.
331 *
332 * \param src the data stream for the surface
333 * \param freesrc non-zero to close the stream after being read
334 * \returns a pointer to a new SDL_Surface structure or NULL if there was an
335 * error; call SDL_GetError() for more information.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_FreeSurface
340 * \sa SDL_RWFromFile
341 * \sa SDL_LoadBMP
342 * \sa SDL_SaveBMP_RW
343 */
344 extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
345 int freesrc);
346
347 /**
348 * Load a surface from a file.
349 *
350 * Convenience macro.
351 */
352 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
353
354 /**
355 * Save a surface to a seekable SDL data stream in BMP format.
356 *
357 * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
358 * BMP directly. Other RGB formats with 8-bit or higher get converted to a
359 * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
360 * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
361 * not supported.
362 *
363 * \param surface the SDL_Surface structure containing the image to be saved
364 * \param dst a data stream to save to
365 * \param freedst non-zero to close the stream after being written
366 * \returns 0 on success or a negative error code on failure; call
367 * SDL_GetError() for more information.
368 *
369 * \since This function is available since SDL 2.0.0.
370 *
371 * \sa SDL_LoadBMP_RW
372 * \sa SDL_SaveBMP
373 */
374 extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
375 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
376
377 /**
378 * Save a surface to a file.
379 *
380 * Convenience macro.
381 */
382 #define SDL_SaveBMP(surface, file) \
383 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
384
385 /**
386 * Set the RLE acceleration hint for a surface.
387 *
388 * If RLE is enabled, color key and alpha blending blits are much faster, but
389 * the surface must be locked before directly accessing the pixels.
390 *
391 * \param surface the SDL_Surface structure to optimize
392 * \param flag 0 to disable, non-zero to enable RLE acceleration
393 * \returns 0 on success or a negative error code on failure; call
394 * SDL_GetError() for more information.
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_BlitSurface
399 * \sa SDL_LockSurface
400 * \sa SDL_UnlockSurface
401 */
402 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
403 int flag);
404
405 /**
406 * Returns whether the surface is RLE enabled
407 *
408 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
409 *
410 * \param surface the SDL_Surface structure to query
411 * \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise.
412 *
413 * \since This function is available since SDL 2.0.14.
414 *
415 * \sa SDL_SetSurfaceRLE
416 */
417 extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
418
419 /**
420 * Set the color key (transparent pixel) in a surface.
421 *
422 * The color key defines a pixel value that will be treated as transparent in
423 * a blit. For example, one can use this to specify that cyan pixels should be
424 * considered transparent, and therefore not rendered.
425 *
426 * It is a pixel of the format used by the surface, as generated by
427 * SDL_MapRGB().
428 *
429 * RLE acceleration can substantially speed up blitting of images with large
430 * horizontal runs of transparent pixels. See SDL_SetSurfaceRLE() for details.
431 *
432 * \param surface the SDL_Surface structure to update
433 * \param flag SDL_TRUE to enable color key, SDL_FALSE to disable color key
434 * \param key the transparent pixel
435 * \returns 0 on success or a negative error code on failure; call
436 * SDL_GetError() for more information.
437 *
438 * \since This function is available since SDL 2.0.0.
439 *
440 * \sa SDL_BlitSurface
441 * \sa SDL_GetColorKey
442 */
443 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
444 int flag, Uint32 key);
445
446 /**
447 * Returns whether the surface has a color key
448 *
449 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
450 *
451 * \param surface the SDL_Surface structure to query
452 * \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.
453 *
454 * \since This function is available since SDL 2.0.9.
455 *
456 * \sa SDL_SetColorKey
457 * \sa SDL_GetColorKey
458 */
459 extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
460
461 /**
462 * Get the color key (transparent pixel) for a surface.
463 *
464 * The color key is a pixel of the format used by the surface, as generated by
465 * SDL_MapRGB().
466 *
467 * If the surface doesn't have color key enabled this function returns -1.
468 *
469 * \param surface the SDL_Surface structure to query
470 * \param key a pointer filled in with the transparent pixel
471 * \returns 0 on success or a negative error code on failure; call
472 * SDL_GetError() for more information.
473 *
474 * \since This function is available since SDL 2.0.0.
475 *
476 * \sa SDL_BlitSurface
477 * \sa SDL_SetColorKey
478 */
479 extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
480 Uint32 * key);
481
482 /**
483 * Set an additional color value multiplied into blit operations.
484 *
485 * When this surface is blitted, during the blit operation each source color
486 * channel is modulated by the appropriate color value according to the
487 * following formula:
488 *
489 * `srcC = srcC * (color / 255)`
490 *
491 * \param surface the SDL_Surface structure to update
492 * \param r the red color value multiplied into blit operations
493 * \param g the green color value multiplied into blit operations
494 * \param b the blue color value multiplied into blit operations
495 * \returns 0 on success or a negative error code on failure; call
496 * SDL_GetError() for more information.
497 *
498 * \since This function is available since SDL 2.0.0.
499 *
500 * \sa SDL_GetSurfaceColorMod
501 * \sa SDL_SetSurfaceAlphaMod
502 */
503 extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
504 Uint8 r, Uint8 g, Uint8 b);
505
506
507 /**
508 * Get the additional color value multiplied into blit operations.
509 *
510 * \param surface the SDL_Surface structure to query
511 * \param r a pointer filled in with the current red color value
512 * \param g a pointer filled in with the current green color value
513 * \param b a pointer filled in with the current blue color value
514 * \returns 0 on success or a negative error code on failure; call
515 * SDL_GetError() for more information.
516 *
517 * \since This function is available since SDL 2.0.0.
518 *
519 * \sa SDL_GetSurfaceAlphaMod
520 * \sa SDL_SetSurfaceColorMod
521 */
522 extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
523 Uint8 * r, Uint8 * g,
524 Uint8 * b);
525
526 /**
527 * Set an additional alpha value used in blit operations.
528 *
529 * When this surface is blitted, during the blit operation the source alpha
530 * value is modulated by this alpha value according to the following formula:
531 *
532 * `srcA = srcA * (alpha / 255)`
533 *
534 * \param surface the SDL_Surface structure to update
535 * \param alpha the alpha value multiplied into blit operations
536 * \returns 0 on success or a negative error code on failure; call
537 * SDL_GetError() for more information.
538 *
539 * \since This function is available since SDL 2.0.0.
540 *
541 * \sa SDL_GetSurfaceAlphaMod
542 * \sa SDL_SetSurfaceColorMod
543 */
544 extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
545 Uint8 alpha);
546
547 /**
548 * Get the additional alpha value used in blit operations.
549 *
550 * \param surface the SDL_Surface structure to query
551 * \param alpha a pointer filled in with the current alpha value
552 * \returns 0 on success or a negative error code on failure; call
553 * SDL_GetError() for more information.
554 *
555 * \since This function is available since SDL 2.0.0.
556 *
557 * \sa SDL_GetSurfaceColorMod
558 * \sa SDL_SetSurfaceAlphaMod
559 */
560 extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
561 Uint8 * alpha);
562
563 /**
564 * Set the blend mode used for blit operations.
565 *
566 * To copy a surface to another surface (or texture) without blending with the
567 * existing data, the blendmode of the SOURCE surface should be set to
568 * `SDL_BLENDMODE_NONE`.
569 *
570 * \param surface the SDL_Surface structure to update
571 * \param blendMode the SDL_BlendMode to use for blit blending
572 * \returns 0 on success or a negative error code on failure; call
573 * SDL_GetError() for more information.
574 *
575 * \since This function is available since SDL 2.0.0.
576 *
577 * \sa SDL_GetSurfaceBlendMode
578 */
579 extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
580 SDL_BlendMode blendMode);
581
582 /**
583 * Get the blend mode used for blit operations.
584 *
585 * \param surface the SDL_Surface structure to query
586 * \param blendMode a pointer filled in with the current SDL_BlendMode
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_SetSurfaceBlendMode
593 */
594 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
595 SDL_BlendMode *blendMode);
596
597 /**
598 * Set the clipping rectangle for a surface.
599 *
600 * When `surface` is the destination of a blit, only the area within the clip
601 * rectangle is drawn into.
602 *
603 * Note that blits are automatically clipped to the edges of the source and
604 * destination surfaces.
605 *
606 * \param surface the SDL_Surface structure to be clipped
607 * \param rect the SDL_Rect structure representing the clipping rectangle, or
608 * NULL to disable clipping
609 * \returns SDL_TRUE if the rectangle intersects the surface, otherwise
610 * SDL_FALSE and blits will be completely clipped.
611 *
612 * \since This function is available since SDL 2.0.0.
613 *
614 * \sa SDL_BlitSurface
615 * \sa SDL_GetClipRect
616 */
617 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
618 const SDL_Rect * rect);
619
620 /**
621 * Get the clipping rectangle for a surface.
622 *
623 * When `surface` is the destination of a blit, only the area within the clip
624 * rectangle is drawn into.
625 *
626 * \param surface the SDL_Surface structure representing the surface to be
627 * clipped
628 * \param rect an SDL_Rect structure filled in with the clipping rectangle for
629 * the surface
630 *
631 * \since This function is available since SDL 2.0.0.
632 *
633 * \sa SDL_BlitSurface
634 * \sa SDL_SetClipRect
635 */
636 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
637 SDL_Rect * rect);
638
639 /*
640 * Creates a new surface identical to the existing surface.
641 *
642 * The returned surface should be freed with SDL_FreeSurface().
643 *
644 * \param surface the surface to duplicate.
645 * \returns a copy of the surface, or NULL on failure; call SDL_GetError() for
646 * more information.
647 */
648 extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
649
650 /**
651 * Copy an existing surface to a new surface of the specified format.
652 *
653 * This function is used to optimize images for faster *repeat* blitting. This
654 * is accomplished by converting the original and storing the result as a new
655 * surface. The new, optimized surface can then be used as the source for
656 * future blits, making them faster.
657 *
658 * \param src the existing SDL_Surface structure to convert
659 * \param fmt the SDL_PixelFormat structure that the new surface is optimized
660 * for
661 * \param flags the flags are unused and should be set to 0; this is a
662 * leftover from SDL 1.2's API
663 * \returns the new SDL_Surface structure that is created or NULL if it fails;
664 * call SDL_GetError() for more information.
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_AllocFormat
669 * \sa SDL_ConvertSurfaceFormat
670 * \sa SDL_CreateRGBSurface
671 */
672 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
673 (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
674
675 /**
676 * Copy an existing surface to a new surface of the specified format enum.
677 *
678 * This function operates just like SDL_ConvertSurface(), but accepts an
679 * SDL_PixelFormatEnum value instead of an SDL_PixelFormat structure. As such,
680 * it might be easier to call but it doesn't have access to palette
681 * information for the destination surface, in case that would be important.
682 *
683 * \param src the existing SDL_Surface structure to convert
684 * \param pixel_format the SDL_PixelFormatEnum that the new surface is
685 * optimized for
686 * \param flags the flags are unused and should be set to 0; this is a
687 * leftover from SDL 1.2's API
688 * \returns the new SDL_Surface structure that is created or NULL if it fails;
689 * call SDL_GetError() for more information.
690 *
691 * \since This function is available since SDL 2.0.0.
692 *
693 * \sa SDL_AllocFormat
694 * \sa SDL_ConvertSurface
695 * \sa SDL_CreateRGBSurface
696 */
697 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
698 (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
699
700 /**
701 * Copy a block of pixels of one format to another format.
702 *
703 * \param width the width of the block to copy, in pixels
704 * \param height the height of the block to copy, in pixels
705 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
706 * \param src a pointer to the source pixels
707 * \param src_pitch the pitch of the source pixels, in bytes
708 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
709 * \param dst a pointer to be filled in with new pixel data
710 * \param dst_pitch the pitch of the destination pixels, in bytes
711 * \returns 0 on success or a negative error code on failure; call
712 * SDL_GetError() for more information.
713 *
714 * \since This function is available since SDL 2.0.0.
715 */
716 extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
717 Uint32 src_format,
718 const void * src, int src_pitch,
719 Uint32 dst_format,
720 void * dst, int dst_pitch);
721
722 /**
723 * Premultiply the alpha on a block of pixels.
724 *
725 * This is safe to use with src == dst, but not for other overlapping areas.
726 *
727 * This function is currently only implemented for SDL_PIXELFORMAT_ARGB8888.
728 *
729 * \param width the width of the block to convert, in pixels
730 * \param height the height of the block to convert, in pixels
731 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
732 * \param src a pointer to the source pixels
733 * \param src_pitch the pitch of the source pixels, in bytes
734 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
735 * \param dst a pointer to be filled in with premultiplied pixel data
736 * \param dst_pitch the pitch of the destination pixels, in bytes
737 * \returns 0 on success or a negative error code on failure; call
738 * SDL_GetError() for more information.
739 *
740 * \since This function is available since SDL 2.0.18.
741 */
742 extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height,
743 Uint32 src_format,
744 const void * src, int src_pitch,
745 Uint32 dst_format,
746 void * dst, int dst_pitch);
747
748 /**
749 * Perform a fast fill of a rectangle with a specific color.
750 *
751 * `color` should be a pixel of the format used by the surface, and can be
752 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
753 * alpha component then the destination is simply filled with that alpha
754 * information, no blending takes place.
755 *
756 * If there is a clip rectangle set on the destination (set via
757 * SDL_SetClipRect()), then this function will fill based on the intersection
758 * of the clip rectangle and `rect`.
759 *
760 * \param dst the SDL_Surface structure that is the drawing target
761 * \param rect the SDL_Rect structure representing the rectangle to fill, or
762 * NULL to fill the entire surface
763 * \param color the color to fill with
764 * \returns 0 on success or a negative error code on failure; call
765 * SDL_GetError() for more information.
766 *
767 * \since This function is available since SDL 2.0.0.
768 *
769 * \sa SDL_FillRects
770 */
771 extern DECLSPEC int SDLCALL SDL_FillRect
772 (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
773
774 /**
775 * Perform a fast fill of a set of rectangles with a specific color.
776 *
777 * `color` should be a pixel of the format used by the surface, and can be
778 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
779 * alpha component then the destination is simply filled with that alpha
780 * information, no blending takes place.
781 *
782 * If there is a clip rectangle set on the destination (set via
783 * SDL_SetClipRect()), then this function will fill based on the intersection
784 * of the clip rectangle and `rect`.
785 *
786 * \param dst the SDL_Surface structure that is the drawing target
787 * \param rects an array of SDL_Rects representing the rectangles to fill.
788 * \param count the number of rectangles in the array
789 * \param color the color to fill with
790 * \returns 0 on success or a negative error code on failure; call
791 * SDL_GetError() for more information.
792 *
793 * \since This function is available since SDL 2.0.0.
794 *
795 * \sa SDL_FillRect
796 */
797 extern DECLSPEC int SDLCALL SDL_FillRects
798 (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
799
800 /* !!! FIXME: merge this documentation with the wiki */
801 /**
802 * Performs a fast blit from the source surface to the destination surface.
803 *
804 * This assumes that the source and destination rectangles are
805 * the same size. If either \c srcrect or \c dstrect are NULL, the entire
806 * surface (\c src or \c dst) is copied. The final blit rectangles are saved
807 * in \c srcrect and \c dstrect after all clipping is performed.
808 *
809 * \returns 0 if the blit is successful, otherwise it returns -1.
810 *
811 * The blit function should not be called on a locked surface.
812 *
813 * The blit semantics for surfaces with and without blending and colorkey
814 * are defined as follows:
815 * \verbatim
816 RGBA->RGB:
817 Source surface blend mode set to SDL_BLENDMODE_BLEND:
818 alpha-blend (using the source alpha-channel and per-surface alpha)
819 SDL_SRCCOLORKEY ignored.
820 Source surface blend mode set to SDL_BLENDMODE_NONE:
821 copy RGB.
822 if SDL_SRCCOLORKEY set, only copy the pixels matching the
823 RGB values of the source color key, ignoring alpha in the
824 comparison.
825
826 RGB->RGBA:
827 Source surface blend mode set to SDL_BLENDMODE_BLEND:
828 alpha-blend (using the source per-surface alpha)
829 Source surface blend mode set to SDL_BLENDMODE_NONE:
830 copy RGB, set destination alpha to source per-surface alpha value.
831 both:
832 if SDL_SRCCOLORKEY set, only copy the pixels matching the
833 source color key.
834
835 RGBA->RGBA:
836 Source surface blend mode set to SDL_BLENDMODE_BLEND:
837 alpha-blend (using the source alpha-channel and per-surface alpha)
838 SDL_SRCCOLORKEY ignored.
839 Source surface blend mode set to SDL_BLENDMODE_NONE:
840 copy all of RGBA to the destination.
841 if SDL_SRCCOLORKEY set, only copy the pixels matching the
842 RGB values of the source color key, ignoring alpha in the
843 comparison.
844
845 RGB->RGB:
846 Source surface blend mode set to SDL_BLENDMODE_BLEND:
847 alpha-blend (using the source per-surface alpha)
848 Source surface blend mode set to SDL_BLENDMODE_NONE:
849 copy RGB.
850 both:
851 if SDL_SRCCOLORKEY set, only copy the pixels matching the
852 source color key.
853 \endverbatim
854 *
855 * You should call SDL_BlitSurface() unless you know exactly how SDL
856 * blitting works internally and how to use the other blit functions.
857 */
858 #define SDL_BlitSurface SDL_UpperBlit
859
860 /**
861 * Perform a fast blit from the source surface to the destination surface.
862 *
863 * SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
864 * macro for this function with a less confusing name.
865 *
866 * \since This function is available since SDL 2.0.0.
867 *
868 * \sa SDL_BlitSurface
869 */
870 extern DECLSPEC int SDLCALL SDL_UpperBlit
871 (SDL_Surface * src, const SDL_Rect * srcrect,
872 SDL_Surface * dst, SDL_Rect * dstrect);
873
874 /**
875 * Perform low-level surface blitting only.
876 *
877 * This is a semi-private blit function and it performs low-level surface
878 * blitting, assuming the input rectangles have already been clipped.
879 *
880 * Unless you know what you're doing, you should be using SDL_BlitSurface()
881 * instead.
882 *
883 * \param src the SDL_Surface structure to be copied from
884 * \param srcrect the SDL_Rect structure representing the rectangle to be
885 * copied, or NULL to copy the entire surface
886 * \param dst the SDL_Surface structure that is the blit target
887 * \param dstrect the SDL_Rect structure representing the rectangle that is
888 * copied into
889 * \returns 0 on success or a negative error code on failure; call
890 * SDL_GetError() for more information.
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_BlitSurface
895 */
896 extern DECLSPEC int SDLCALL SDL_LowerBlit
897 (SDL_Surface * src, SDL_Rect * srcrect,
898 SDL_Surface * dst, SDL_Rect * dstrect);
899
900
901 /**
902 * Perform a fast, low quality, stretch blit between two surfaces of the same
903 * format.
904 *
905 * Please use SDL_BlitScaled() instead.
906 *
907 * \since This function is available since SDL 2.0.0.
908 */
909 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
910 const SDL_Rect * srcrect,
911 SDL_Surface * dst,
912 const SDL_Rect * dstrect);
913
914 /**
915 * Perform bilinear scaling between two surfaces of the same format, 32BPP.
916 *
917 * \since This function is available since SDL 2.0.16.
918 */
919 extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
920 const SDL_Rect * srcrect,
921 SDL_Surface * dst,
922 const SDL_Rect * dstrect);
923
924
925 #define SDL_BlitScaled SDL_UpperBlitScaled
926
927 /**
928 * Perform a scaled surface copy to a destination surface.
929 *
930 * SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
931 * merely a macro for this function with a less confusing name.
932 *
933 * \since This function is available since SDL 2.0.0.
934 *
935 * \sa SDL_BlitScaled
936 */
937 extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
938 (SDL_Surface * src, const SDL_Rect * srcrect,
939 SDL_Surface * dst, SDL_Rect * dstrect);
940
941 /**
942 * Perform low-level surface scaled blitting only.
943 *
944 * This is a semi-private function and it performs low-level surface blitting,
945 * assuming the input rectangles have already been clipped.
946 *
947 * \param src the SDL_Surface structure to be copied from
948 * \param srcrect the SDL_Rect structure representing the rectangle to be
949 * copied
950 * \param dst the SDL_Surface structure that is the blit target
951 * \param dstrect the SDL_Rect structure representing the rectangle that is
952 * copied into
953 * \returns 0 on success or a negative error code on failure; call
954 * SDL_GetError() for more information.
955 *
956 * \since This function is available since SDL 2.0.0.
957 *
958 * \sa SDL_BlitScaled
959 */
960 extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
961 (SDL_Surface * src, SDL_Rect * srcrect,
962 SDL_Surface * dst, SDL_Rect * dstrect);
963
964 /**
965 * Set the YUV conversion mode
966 *
967 * \since This function is available since SDL 2.0.8.
968 */
969 extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
970
971 /**
972 * Get the YUV conversion mode
973 *
974 * \since This function is available since SDL 2.0.8.
975 */
976 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
977
978 /**
979 * Get the YUV conversion mode, returning the correct mode for the resolution
980 * when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
981 *
982 * \since This function is available since SDL 2.0.8.
983 */
984 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
985
986 /* Ends C function definitions when using C++ */
987 #ifdef __cplusplus
988 }
989 #endif
990 #include <SDL2/close_code.h>
991
992 #endif /* SDL_surface_h_ */
993
994 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_system.h
23 *
24 * Include file for platform specific SDL API functions
25 */
26
27 #ifndef SDL_system_h_
28 #define SDL_system_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_keyboard.h>
32 #include <SDL2/SDL_render.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42 /* Platform specific functions for Windows */
43 #ifdef __WIN32__
44
45 typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
46
47 /**
48 * Set a callback for every Windows message, run before TranslateMessage().
49 *
50 * \param callback The SDL_WindowsMessageHook function to call.
51 * \param userdata a pointer to pass to every iteration of `callback`
52 *
53 * \since This function is available since SDL 2.0.4.
54 */
55 extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
56
57 /**
58 * Get the D3D9 adapter index that matches the specified display index.
59 *
60 * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
61 * controls on which monitor a full screen application will appear.
62 *
63 * \param displayIndex the display index for which to get the D3D9 adapter
64 * index
65 * \returns the D3D9 adapter index on success or a negative error code on
66 * failure; call SDL_GetError() for more information.
67 *
68 * \since This function is available since SDL 2.0.1.
69 */
70 extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
71
72 typedef struct IDirect3DDevice9 IDirect3DDevice9;
73
74 /**
75 * Get the D3D9 device associated with a renderer.
76 *
77 * Once you are done using the device, you should release it to avoid a
78 * resource leak.
79 *
80 * \param renderer the renderer from which to get the associated D3D device
81 * \returns the D3D9 device associated with given renderer or NULL if it is
82 * not a D3D9 renderer; call SDL_GetError() for more information.
83 *
84 * \since This function is available since SDL 2.0.1.
85 */
86 extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
87
88 typedef struct ID3D11Device ID3D11Device;
89
90 /**
91 * Get the D3D11 device associated with a renderer.
92 *
93 * Once you are done using the device, you should release it to avoid a
94 * resource leak.
95 *
96 * \param renderer the renderer from which to get the associated D3D11 device
97 * \returns the D3D11 device associated with given renderer or NULL if it is
98 * not a D3D11 renderer; call SDL_GetError() for more information.
99 *
100 * \since This function is available since SDL 2.0.16.
101 */
102 extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
103
104 /**
105 * Get the DXGI Adapter and Output indices for the specified display index.
106 *
107 * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
108 * `EnumOutputs` respectively to get the objects required to create a DX10 or
109 * DX11 device and swap chain.
110 *
111 * Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it
112 * returns an SDL_bool.
113 *
114 * \param displayIndex the display index for which to get both indices
115 * \param adapterIndex a pointer to be filled in with the adapter index
116 * \param outputIndex a pointer to be filled in with the output index
117 * \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
118 * for more information.
119 *
120 * \since This function is available since SDL 2.0.2.
121 */
122 extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
123
124 #endif /* __WIN32__ */
125
126
127 /* Platform specific functions for Linux */
128 #ifdef __LINUX__
129
130 /**
131 * Sets the UNIX nice value for a thread.
132 *
133 * This uses setpriority() if possible, and RealtimeKit if available.
134 *
135 * \param threadID the Unix thread ID to change priority of.
136 * \param priority The new, Unix-specific, priority value.
137 * \returns 0 on success, or -1 on error.
138 *
139 * \since This function is available since SDL 2.0.9.
140 */
141 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
142
143 /**
144 * Sets the priority (not nice level) and scheduling policy for a thread.
145 *
146 * This uses setpriority() if possible, and RealtimeKit if available.
147 *
148 * \param threadID The Unix thread ID to change priority of.
149 * \param sdlPriority The new SDL_ThreadPriority value.
150 * \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR,
151 * SCHED_OTHER, etc...)
152 * \returns 0 on success, or -1 on error.
153 *
154 * \since This function is available since SDL 2.0.18.
155 */
156 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
157
158 #endif /* __LINUX__ */
159
160 /* Platform specific functions for iOS */
161 #ifdef __IPHONEOS__
162
163 #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
164
165 /**
166 * Use this function to set the animation callback on Apple iOS.
167 *
168 * The function prototype for `callback` is:
169 *
170 * ```c
171 * void callback(void* callbackParam);
172 * ```
173 *
174 * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
175 * to SDL_iPhoneSetAnimationCallback().
176 *
177 * This function is only available on Apple iOS.
178 *
179 * For more information see:
180 * [README-ios.md](https://hg.libsdl.org/SDL/file/default/docs/README-ios.md)
181 *
182 * This functions is also accessible using the macro
183 * SDL_iOSSetAnimationCallback() since SDL 2.0.4.
184 *
185 * \param window the window for which the animation callback should be set
186 * \param interval the number of frames after which **callback** will be
187 * called
188 * \param callback the function to call for every frame.
189 * \param callbackParam a pointer that is passed to `callback`.
190 * \returns 0 on success or a negative error code on failure; call
191 * SDL_GetError() for more information.
192 *
193 * \since This function is available since SDL 2.0.0.
194 *
195 * \sa SDL_iPhoneSetEventPump
196 */
197 extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
198
199 #define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
200
201 /**
202 * Use this function to enable or disable the SDL event pump on Apple iOS.
203 *
204 * This function is only available on Apple iOS.
205 *
206 * This functions is also accessible using the macro SDL_iOSSetEventPump()
207 * since SDL 2.0.4.
208 *
209 * \param enabled SDL_TRUE to enable the event pump, SDL_FALSE to disable it
210 *
211 * \since This function is available since SDL 2.0.0.
212 *
213 * \sa SDL_iPhoneSetAnimationCallback
214 */
215 extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
216
217 #endif /* __IPHONEOS__ */
218
219
220 /* Platform specific functions for Android */
221 #ifdef __ANDROID__
222
223 /**
224 * Get the Android Java Native Interface Environment of the current thread.
225 *
226 * This is the JNIEnv one needs to access the Java virtual machine from native
227 * code, and is needed for many Android APIs to be usable from C.
228 *
229 * The prototype of the function in SDL's code actually declare a void* return
230 * type, even if the implementation returns a pointer to a JNIEnv. The
231 * rationale being that the SDL headers can avoid including jni.h.
232 *
233 * \returns a pointer to Java native interface object (JNIEnv) to which the
234 * current thread is attached, or 0 on error.
235 *
236 * \since This function is available since SDL 2.0.0.
237 *
238 * \sa SDL_AndroidGetActivity
239 */
240 extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
241
242 /**
243 * Retrieve the Java instance of the Android activity class.
244 *
245 * The prototype of the function in SDL's code actually declares a void*
246 * return type, even if the implementation returns a jobject. The rationale
247 * being that the SDL headers can avoid including jni.h.
248 *
249 * The jobject returned by the function is a local reference and must be
250 * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
251 * DeleteLocalRef() functions of the Java native interface:
252 *
253 * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
254 *
255 * \returns the jobject representing the instance of the Activity class of the
256 * Android application, or NULL on error.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_AndroidGetJNIEnv
261 */
262 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
263
264 /**
265 * Query Android API level of the current device.
266 *
267 * - API level 31: Android 12
268 * - API level 30: Android 11
269 * - API level 29: Android 10
270 * - API level 28: Android 9
271 * - API level 27: Android 8.1
272 * - API level 26: Android 8.0
273 * - API level 25: Android 7.1
274 * - API level 24: Android 7.0
275 * - API level 23: Android 6.0
276 * - API level 22: Android 5.1
277 * - API level 21: Android 5.0
278 * - API level 20: Android 4.4W
279 * - API level 19: Android 4.4
280 * - API level 18: Android 4.3
281 * - API level 17: Android 4.2
282 * - API level 16: Android 4.1
283 * - API level 15: Android 4.0.3
284 * - API level 14: Android 4.0
285 * - API level 13: Android 3.2
286 * - API level 12: Android 3.1
287 * - API level 11: Android 3.0
288 * - API level 10: Android 2.3.3
289 *
290 * \returns the Android API level.
291 *
292 * \since This function is available since SDL 2.0.12.
293 */
294 extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
295
296 /**
297 * Query if the application is running on Android TV.
298 *
299 * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
300 *
301 * \since This function is available since SDL 2.0.8.
302 */
303 extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
304
305 /**
306 * Query if the application is running on a Chromebook.
307 *
308 * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
309 *
310 * \since This function is available since SDL 2.0.9.
311 */
312 extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
313
314 /**
315 * Query if the application is running on a Samsung DeX docking station.
316 *
317 * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
318 *
319 * \since This function is available since SDL 2.0.9.
320 */
321 extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
322
323 /**
324 * Trigger the Android system back button behavior.
325 *
326 * \since This function is available since SDL 2.0.9.
327 */
328 extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
329
330 /**
331 See the official Android developer guide for more information:
332 http://developer.android.com/guide/topics/data/data-storage.html
333 */
334 #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
335 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
336
337 /**
338 * Get the path used for internal storage for this application.
339 *
340 * This path is unique to your application and cannot be written to by other
341 * applications.
342 *
343 * Your internal storage path is typically:
344 * `/data/data/your.app.package/files`.
345 *
346 * \returns the path used for internal storage or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.0.
350 *
351 * \sa SDL_AndroidGetExternalStorageState
352 */
353 extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
354
355 /**
356 * Get the current state of external storage.
357 *
358 * The current state of external storage, a bitmask of these values:
359 * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
360 *
361 * If external storage is currently unavailable, this will return 0.
362 *
363 * \returns the current state of external storage on success or 0 on failure;
364 * call SDL_GetError() for more information.
365 *
366 * \since This function is available since SDL 2.0.0.
367 *
368 * \sa SDL_AndroidGetExternalStoragePath
369 */
370 extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
371
372 /**
373 * Get the path used for external storage for this application.
374 *
375 * This path is unique to your application, but is public and can be written
376 * to by other applications.
377 *
378 * Your external storage path is typically:
379 * `/storage/sdcard0/Android/data/your.app.package/files`.
380 *
381 * \returns the path used for external storage for this application on success
382 * or NULL on failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_AndroidGetExternalStorageState
387 */
388 extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
389
390 /**
391 * Request permissions at runtime.
392 *
393 * This blocks the calling thread until the permission is granted or denied.
394 *
395 * \param permission The permission to request.
396 * \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise.
397 *
398 * \since This function is available since SDL 2.0.14.
399 */
400 extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
401
402 /**
403 * Shows an Android toast notification.
404 *
405 * Toasts are a sort of lightweight notification that are unique to Android.
406 *
407 * https://developer.android.com/guide/topics/ui/notifiers/toasts
408 *
409 * Shows toast in UI thread.
410 *
411 * For the `gravity` parameter, choose a value from here, or -1 if you don't
412 * have a preference:
413 *
414 * https://developer.android.com/reference/android/view/Gravity
415 *
416 * \param message text message to be shown
417 * \param duration 0=short, 1=long
418 * \param gravity where the notification should appear on the screen.
419 * \param xoffset set this parameter only when gravity >=0
420 * \param yoffset set this parameter only when gravity >=0
421 * \returns 0 if success, -1 if any error occurs.
422 *
423 * \since This function is available since SDL 2.0.16.
424 */
425 extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
426
427 /**
428 * Send a user command to SDLActivity.
429 *
430 * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
431 *
432 * \param command user command that must be greater or equal to 0x8000
433 * \param param user parameter
434 *
435 * \since This function is available since SDL 2.0.22.
436 */
437 extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
438
439 #endif /* __ANDROID__ */
440
441 /* Platform specific functions for WinRT */
442 #ifdef __WINRT__
443
444 /**
445 * \brief WinRT / Windows Phone path types
446 */
447 typedef enum
448 {
449 /** \brief The installed app's root directory.
450 Files here are likely to be read-only. */
451 SDL_WINRT_PATH_INSTALLED_LOCATION,
452
453 /** \brief The app's local data store. Files may be written here */
454 SDL_WINRT_PATH_LOCAL_FOLDER,
455
456 /** \brief The app's roaming data store. Unsupported on Windows Phone.
457 Files written here may be copied to other machines via a network
458 connection.
459 */
460 SDL_WINRT_PATH_ROAMING_FOLDER,
461
462 /** \brief The app's temporary data store. Unsupported on Windows Phone.
463 Files written here may be deleted at any time. */
464 SDL_WINRT_PATH_TEMP_FOLDER
465 } SDL_WinRT_Path;
466
467
468 /**
469 * \brief WinRT Device Family
470 */
471 typedef enum
472 {
473 /** \brief Unknown family */
474 SDL_WINRT_DEVICEFAMILY_UNKNOWN,
475
476 /** \brief Desktop family*/
477 SDL_WINRT_DEVICEFAMILY_DESKTOP,
478
479 /** \brief Mobile family (for example smartphone) */
480 SDL_WINRT_DEVICEFAMILY_MOBILE,
481
482 /** \brief XBox family */
483 SDL_WINRT_DEVICEFAMILY_XBOX,
484 } SDL_WinRT_DeviceFamily;
485
486
487 /**
488 * Retrieve a WinRT defined path on the local file system.
489 *
490 * Not all paths are available on all versions of Windows. This is especially
491 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
492 * for more information on which path types are supported where.
493 *
494 * Documentation on most app-specific path types on WinRT can be found on
495 * MSDN, at the URL:
496 *
497 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
498 *
499 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
500 * \returns a UCS-2 string (16-bit, wide-char) containing the path, or NULL if
501 * the path is not available for any reason; call SDL_GetError() for
502 * more information.
503 *
504 * \since This function is available since SDL 2.0.3.
505 *
506 * \sa SDL_WinRTGetFSPathUTF8
507 */
508 extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
509
510 /**
511 * Retrieve a WinRT defined path on the local file system.
512 *
513 * Not all paths are available on all versions of Windows. This is especially
514 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
515 * for more information on which path types are supported where.
516 *
517 * Documentation on most app-specific path types on WinRT can be found on
518 * MSDN, at the URL:
519 *
520 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
521 *
522 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
523 * \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
524 * the path is not available for any reason; call SDL_GetError() for
525 * more information.
526 *
527 * \since This function is available since SDL 2.0.3.
528 *
529 * \sa SDL_WinRTGetFSPathUNICODE
530 */
531 extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
532
533 /**
534 * Detects the device family of WinRT plattform at runtime.
535 *
536 * \returns a value from the SDL_WinRT_DeviceFamily enum.
537 *
538 * \since This function is available since SDL 2.0.8.
539 */
540 extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
541
542 #endif /* __WINRT__ */
543
544 /**
545 * Query if the current device is a tablet.
546 *
547 * If SDL can't determine this, it will return SDL_FALSE.
548 *
549 * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
550 *
551 * \since This function is available since SDL 2.0.9.
552 */
553 extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
554
555 /* Functions used by iOS application delegates to notify SDL about state changes */
556 extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
557 extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
558 extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
559 extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
560 extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
561 extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
562 #ifdef __IPHONEOS__
563 extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
564 #endif
565
566 /* Ends C function definitions when using C++ */
567 #ifdef __cplusplus
568 }
569 #endif
570 #include <SDL2/close_code.h>
571
572 #endif /* SDL_system_h_ */
573
574 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_syswm.h
23 *
24 * Include file for SDL custom system window manager hooks.
25 */
26
27 #ifndef SDL_syswm_h_
28 #define SDL_syswm_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_version.h>
34
35 /**
36 * \brief SDL_syswm.h
37 *
38 * Your application has access to a special type of event ::SDL_SYSWMEVENT,
39 * which contains window-manager specific information and arrives whenever
40 * an unhandled window event occurs. This event is ignored by default, but
41 * you can enable it with SDL_EventState().
42 */
43 struct SDL_SysWMinfo;
44
45 #if !defined(SDL_PROTOTYPES_ONLY)
46
47 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
48 #ifndef WIN32_LEAN_AND_MEAN
49 #define WIN32_LEAN_AND_MEAN
50 #endif
51 #ifndef NOMINMAX /* don't define min() and max(). */
52 #define NOMINMAX
53 #endif
54 #include <windows.h>
55 #endif
56
57 #if defined(SDL_VIDEO_DRIVER_WINRT)
58 #include <Inspectable.h>
59 #endif
60
61 /* This is the structure for custom window manager events */
62 #if defined(SDL_VIDEO_DRIVER_X11)
63 #if defined(__APPLE__) && defined(__MACH__)
64 /* conflicts with Quickdraw.h */
65 #define Cursor X11Cursor
66 #endif
67
68 #include <X11/Xlib.h>
69 #include <X11/Xatom.h>
70
71 #if defined(__APPLE__) && defined(__MACH__)
72 /* matches the re-define above */
73 #undef Cursor
74 #endif
75
76 #endif /* defined(SDL_VIDEO_DRIVER_X11) */
77
78 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
79 #include <directfb.h>
80 #endif
81
82 #if defined(SDL_VIDEO_DRIVER_COCOA)
83 #ifdef __OBJC__
84 @class NSWindow;
85 #else
86 typedef struct _NSWindow NSWindow;
87 #endif
88 #endif
89
90 #if defined(SDL_VIDEO_DRIVER_UIKIT)
91 #ifdef __OBJC__
92 #include <UIKit/UIKit.h>
93 #else
94 typedef struct _UIWindow UIWindow;
95 typedef struct _UIViewController UIViewController;
96 #endif
97 typedef Uint32 GLuint;
98 #endif
99
100 #if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL)
101 #define SDL_METALVIEW_TAG 255
102 #endif
103
104 #if defined(SDL_VIDEO_DRIVER_ANDROID)
105 typedef struct ANativeWindow ANativeWindow;
106 typedef void *EGLSurface;
107 #endif
108
109 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
110 #include <SDL2/SDL_egl.h>
111 #endif
112
113 #if defined(SDL_VIDEO_DRIVER_OS2)
114 #define INCL_WIN
115 #include <os2.h>
116 #endif
117 #endif /* SDL_PROTOTYPES_ONLY */
118
119 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
120 struct gbm_device;
121 #endif
122
123
124 #include <SDL2/begin_code.h>
125 /* Set up for C function definitions, even when using C++ */
126 #ifdef __cplusplus
127 extern "C" {
128 #endif
129
130 #if !defined(SDL_PROTOTYPES_ONLY)
131 /**
132 * These are the various supported windowing subsystems
133 */
134 typedef enum
135 {
136 SDL_SYSWM_UNKNOWN,
137 SDL_SYSWM_WINDOWS,
138 SDL_SYSWM_X11,
139 SDL_SYSWM_DIRECTFB,
140 SDL_SYSWM_COCOA,
141 SDL_SYSWM_UIKIT,
142 SDL_SYSWM_WAYLAND,
143 SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
144 SDL_SYSWM_WINRT,
145 SDL_SYSWM_ANDROID,
146 SDL_SYSWM_VIVANTE,
147 SDL_SYSWM_OS2,
148 SDL_SYSWM_HAIKU,
149 SDL_SYSWM_KMSDRM,
150 SDL_SYSWM_RISCOS
151 } SDL_SYSWM_TYPE;
152
153 /**
154 * The custom event structure.
155 */
156 struct SDL_SysWMmsg
157 {
158 SDL_version version;
159 SDL_SYSWM_TYPE subsystem;
160 union
161 {
162 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
163 struct {
164 HWND hwnd; /**< The window for the message */
165 UINT msg; /**< The type of message */
166 WPARAM wParam; /**< WORD message parameter */
167 LPARAM lParam; /**< LONG message parameter */
168 } win;
169 #endif
170 #if defined(SDL_VIDEO_DRIVER_X11)
171 struct {
172 XEvent event;
173 } x11;
174 #endif
175 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
176 struct {
177 DFBEvent event;
178 } dfb;
179 #endif
180 #if defined(SDL_VIDEO_DRIVER_COCOA)
181 struct
182 {
183 /* Latest version of Xcode clang complains about empty structs in C v. C++:
184 error: empty struct has size 0 in C, size 1 in C++
185 */
186 int dummy;
187 /* No Cocoa window events yet */
188 } cocoa;
189 #endif
190 #if defined(SDL_VIDEO_DRIVER_UIKIT)
191 struct
192 {
193 int dummy;
194 /* No UIKit window events yet */
195 } uikit;
196 #endif
197 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
198 struct
199 {
200 int dummy;
201 /* No Vivante window events yet */
202 } vivante;
203 #endif
204 #if defined(SDL_VIDEO_DRIVER_OS2)
205 struct
206 {
207 BOOL fFrame; /**< TRUE if hwnd is a frame window */
208 HWND hwnd; /**< The window receiving the message */
209 ULONG msg; /**< The message identifier */
210 MPARAM mp1; /**< The first first message parameter */
211 MPARAM mp2; /**< The second first message parameter */
212 } os2;
213 #endif
214 /* Can't have an empty union */
215 int dummy;
216 } msg;
217 };
218
219 /**
220 * The custom window manager information structure.
221 *
222 * When this structure is returned, it holds information about which
223 * low level system it is using, and will be one of SDL_SYSWM_TYPE.
224 */
225 struct SDL_SysWMinfo
226 {
227 SDL_version version;
228 SDL_SYSWM_TYPE subsystem;
229 union
230 {
231 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
232 struct
233 {
234 HWND window; /**< The window handle */
235 HDC hdc; /**< The window device context */
236 HINSTANCE hinstance; /**< The instance handle */
237 } win;
238 #endif
239 #if defined(SDL_VIDEO_DRIVER_WINRT)
240 struct
241 {
242 IInspectable * window; /**< The WinRT CoreWindow */
243 } winrt;
244 #endif
245 #if defined(SDL_VIDEO_DRIVER_X11)
246 struct
247 {
248 Display *display; /**< The X11 display */
249 Window window; /**< The X11 window */
250 } x11;
251 #endif
252 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
253 struct
254 {
255 IDirectFB *dfb; /**< The directfb main interface */
256 IDirectFBWindow *window; /**< The directfb window handle */
257 IDirectFBSurface *surface; /**< The directfb client surface */
258 } dfb;
259 #endif
260 #if defined(SDL_VIDEO_DRIVER_COCOA)
261 struct
262 {
263 #if defined(__OBJC__) && defined(__has_feature)
264 #if __has_feature(objc_arc)
265 NSWindow __unsafe_unretained *window; /**< The Cocoa window */
266 #else
267 NSWindow *window; /**< The Cocoa window */
268 #endif
269 #else
270 NSWindow *window; /**< The Cocoa window */
271 #endif
272 } cocoa;
273 #endif
274 #if defined(SDL_VIDEO_DRIVER_UIKIT)
275 struct
276 {
277 #if defined(__OBJC__) && defined(__has_feature)
278 #if __has_feature(objc_arc)
279 UIWindow __unsafe_unretained *window; /**< The UIKit window */
280 #else
281 UIWindow *window; /**< The UIKit window */
282 #endif
283 #else
284 UIWindow *window; /**< The UIKit window */
285 #endif
286 GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
287 GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
288 GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
289 } uikit;
290 #endif
291 #if defined(SDL_VIDEO_DRIVER_WAYLAND)
292 struct
293 {
294 struct wl_display *display; /**< Wayland display */
295 struct wl_surface *surface; /**< Wayland surface */
296 void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */
297 struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
298 struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
299 struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */
300 struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */
301 struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */
302 } wl;
303 #endif
304 #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
305 struct
306 {
307 void *connection; /**< Mir display server connection */
308 void *surface; /**< Mir surface */
309 } mir;
310 #endif
311
312 #if defined(SDL_VIDEO_DRIVER_ANDROID)
313 struct
314 {
315 ANativeWindow *window;
316 EGLSurface surface;
317 } android;
318 #endif
319
320 #if defined(SDL_VIDEO_DRIVER_OS2)
321 struct
322 {
323 HWND hwnd; /**< The window handle */
324 HWND hwndFrame; /**< The frame window handle */
325 } os2;
326 #endif
327
328 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
329 struct
330 {
331 EGLNativeDisplayType display;
332 EGLNativeWindowType window;
333 } vivante;
334 #endif
335
336 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
337 struct
338 {
339 int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */
340 int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */
341 struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */
342 } kmsdrm;
343 #endif
344
345 /* Make sure this union is always 64 bytes (8 64-bit pointers). */
346 /* Be careful not to overflow this if you add a new target! */
347 Uint8 dummy[64];
348 } info;
349 };
350
351 #endif /* SDL_PROTOTYPES_ONLY */
352
353 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
354
355
356 /**
357 * Get driver-specific information about a window.
358 *
359 * You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.
360 *
361 * The caller must initialize the `info` structure's version by using
362 * `SDL_VERSION(&info.version)`, and then this function will fill in the rest
363 * of the structure with information about the given window.
364 *
365 * \param window the window about which information is being requested
366 * \param info an SDL_SysWMinfo structure filled in with window information
367 * \returns SDL_TRUE if the function is implemented and the `version` member
368 * of the `info` struct is valid, or SDL_FALSE if the information
369 * could not be retrieved; call SDL_GetError() for more information.
370 *
371 * \since This function is available since SDL 2.0.0.
372 */
373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
374 SDL_SysWMinfo * info);
375
376
377 /* Ends C function definitions when using C++ */
378 #ifdef __cplusplus
379 }
380 #endif
381 #include <SDL2/close_code.h>
382
383 #endif /* SDL_syswm_h_ */
384
385 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_thread_h_
22 #define SDL_thread_h_
23
24 /**
25 * \file SDL_thread.h
26 *
27 * Header for the SDL thread management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /* Thread synchronization primitives */
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_mutex.h>
36
37 #if defined(__WIN32__)
38 #include <process.h> /* _beginthreadex() and _endthreadex() */
39 #endif
40 #if defined(__OS2__) /* for _beginthread() and _endthread() */
41 #ifndef __EMX__
42 #include <process.h>
43 #else
44 #include <stdlib.h>
45 #endif
46 #endif
47
48 #include <SDL2/begin_code.h>
49 /* Set up for C function definitions, even when using C++ */
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 /* The SDL thread structure, defined in SDL_thread.c */
55 struct SDL_Thread;
56 typedef struct SDL_Thread SDL_Thread;
57
58 /* The SDL thread ID */
59 typedef unsigned long SDL_threadID;
60
61 /* Thread local storage ID, 0 is the invalid ID */
62 typedef unsigned int SDL_TLSID;
63
64 /**
65 * The SDL thread priority.
66 *
67 * SDL will make system changes as necessary in order to apply the thread priority.
68 * Code which attempts to control thread state related to priority should be aware
69 * that calling SDL_SetThreadPriority may alter such state.
70 * SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
71 *
72 * \note On many systems you require special privileges to set high or time critical priority.
73 */
74 typedef enum {
75 SDL_THREAD_PRIORITY_LOW,
76 SDL_THREAD_PRIORITY_NORMAL,
77 SDL_THREAD_PRIORITY_HIGH,
78 SDL_THREAD_PRIORITY_TIME_CRITICAL
79 } SDL_ThreadPriority;
80
81 /**
82 * The function passed to SDL_CreateThread().
83 *
84 * \param data what was passed as `data` to SDL_CreateThread()
85 * \returns a value that can be reported through SDL_WaitThread().
86 */
87 typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
88
89
90 #if defined(__WIN32__)
91 /**
92 * \file SDL_thread.h
93 *
94 * We compile SDL into a DLL. This means, that it's the DLL which
95 * creates a new thread for the calling process with the SDL_CreateThread()
96 * API. There is a problem with this, that only the RTL of the SDL2.DLL will
97 * be initialized for those threads, and not the RTL of the calling
98 * application!
99 *
100 * To solve this, we make a little hack here.
101 *
102 * We'll always use the caller's _beginthread() and _endthread() APIs to
103 * start a new thread. This way, if it's the SDL2.DLL which uses this API,
104 * then the RTL of SDL2.DLL will be used to create the new thread, and if it's
105 * the application, then the RTL of the application will be used.
106 *
107 * So, in short:
108 * Always use the _beginthread() and _endthread() of the calling runtime
109 * library!
110 */
111 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
112
113 typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
114 (void *, unsigned, unsigned (__stdcall *func)(void *),
115 void * /*arg*/, unsigned, unsigned * /* threadID */);
116 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
117
118 #ifndef SDL_beginthread
119 #define SDL_beginthread _beginthreadex
120 #endif
121 #ifndef SDL_endthread
122 #define SDL_endthread _endthreadex
123 #endif
124
125 extern DECLSPEC SDL_Thread *SDLCALL
126 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
127 pfnSDL_CurrentBeginThread pfnBeginThread,
128 pfnSDL_CurrentEndThread pfnEndThread);
129
130 extern DECLSPEC SDL_Thread *SDLCALL
131 SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
132 const char *name, const size_t stacksize, void *data,
133 pfnSDL_CurrentBeginThread pfnBeginThread,
134 pfnSDL_CurrentEndThread pfnEndThread);
135
136
137 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
138 #undef SDL_CreateThread
139 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
140 #undef SDL_CreateThreadWithStackSize
141 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
142 #else
143 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
144 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
145 #endif
146
147 #elif defined(__OS2__)
148 /*
149 * just like the windows case above: We compile SDL2
150 * into a dll with Watcom's runtime statically linked.
151 */
152 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
153
154 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
155 typedef void (*pfnSDL_CurrentEndThread)(void);
156
157 #ifndef SDL_beginthread
158 #define SDL_beginthread _beginthread
159 #endif
160 #ifndef SDL_endthread
161 #define SDL_endthread _endthread
162 #endif
163
164 extern DECLSPEC SDL_Thread *SDLCALL
165 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
166 pfnSDL_CurrentBeginThread pfnBeginThread,
167 pfnSDL_CurrentEndThread pfnEndThread);
168 extern DECLSPEC SDL_Thread *SDLCALL
169 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
170 pfnSDL_CurrentBeginThread pfnBeginThread,
171 pfnSDL_CurrentEndThread pfnEndThread);
172
173 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
174 #undef SDL_CreateThread
175 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
176 #undef SDL_CreateThreadWithStackSize
177 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
178 #else
179 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
180 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
181 #endif
182
183 #else
184
185 /**
186 * Create a new thread with a default stack size.
187 *
188 * This is equivalent to calling:
189 *
190 * ```c
191 * SDL_CreateThreadWithStackSize(fn, name, 0, data);
192 * ```
193 *
194 * \param fn the SDL_ThreadFunction function to call in the new thread
195 * \param name the name of the thread
196 * \param data a pointer that is passed to `fn`
197 * \returns an opaque pointer to the new thread object on success, NULL if the
198 * new thread could not be created; call SDL_GetError() for more
199 * information.
200 *
201 * \since This function is available since SDL 2.0.0.
202 *
203 * \sa SDL_CreateThreadWithStackSize
204 * \sa SDL_WaitThread
205 */
206 extern DECLSPEC SDL_Thread *SDLCALL
207 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
208
209 /**
210 * Create a new thread with a specific stack size.
211 *
212 * SDL makes an attempt to report `name` to the system, so that debuggers can
213 * display it. Not all platforms support this.
214 *
215 * Thread naming is a little complicated: Most systems have very small limits
216 * for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
217 * C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
218 * see what happens with your system's debugger. The name should be UTF-8 (but
219 * using the naming limits of C identifiers is a better bet). There are no
220 * requirements for thread naming conventions, so long as the string is
221 * null-terminated UTF-8, but these guidelines are helpful in choosing a name:
222 *
223 * https://stackoverflow.com/questions/149932/naming-conventions-for-threads
224 *
225 * If a system imposes requirements, SDL will try to munge the string for it
226 * (truncate, etc), but the original string contents will be available from
227 * SDL_GetThreadName().
228 *
229 * The size (in bytes) of the new stack can be specified. Zero means "use the
230 * system default" which might be wildly different between platforms. x86
231 * Linux generally defaults to eight megabytes, an embedded device might be a
232 * few kilobytes instead. You generally need to specify a stack that is a
233 * multiple of the system's page size (in many cases, this is 4 kilobytes, but
234 * check your system documentation).
235 *
236 * In SDL 2.1, stack size will be folded into the original SDL_CreateThread
237 * function, but for backwards compatibility, this is currently a separate
238 * function.
239 *
240 * \param fn the SDL_ThreadFunction function to call in the new thread
241 * \param name the name of the thread
242 * \param stacksize the size, in bytes, to allocate for the new thread stack.
243 * \param data a pointer that is passed to `fn`
244 * \returns an opaque pointer to the new thread object on success, NULL if the
245 * new thread could not be created; call SDL_GetError() for more
246 * information.
247 *
248 * \since This function is available since SDL 2.0.9.
249 *
250 * \sa SDL_WaitThread
251 */
252 extern DECLSPEC SDL_Thread *SDLCALL
253 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
254
255 #endif
256
257 /**
258 * Get the thread name as it was specified in SDL_CreateThread().
259 *
260 * This is internal memory, not to be freed by the caller, and remains valid
261 * until the specified thread is cleaned up by SDL_WaitThread().
262 *
263 * \param thread the thread to query
264 * \returns a pointer to a UTF-8 string that names the specified thread, or
265 * NULL if it doesn't have a name.
266 *
267 * \since This function is available since SDL 2.0.0.
268 *
269 * \sa SDL_CreateThread
270 */
271 extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
272
273 /**
274 * Get the thread identifier for the current thread.
275 *
276 * This thread identifier is as reported by the underlying operating system.
277 * If SDL is running on a platform that does not support threads the return
278 * value will always be zero.
279 *
280 * This function also returns a valid thread ID when called from the main
281 * thread.
282 *
283 * \returns the ID of the current thread.
284 *
285 * \since This function is available since SDL 2.0.0.
286 *
287 * \sa SDL_GetThreadID
288 */
289 extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
290
291 /**
292 * Get the thread identifier for the specified thread.
293 *
294 * This thread identifier is as reported by the underlying operating system.
295 * If SDL is running on a platform that does not support threads the return
296 * value will always be zero.
297 *
298 * \param thread the thread to query
299 * \returns the ID of the specified thread, or the ID of the current thread if
300 * `thread` is NULL.
301 *
302 * \since This function is available since SDL 2.0.0.
303 *
304 * \sa SDL_ThreadID
305 */
306 extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
307
308 /**
309 * Set the priority for the current thread.
310 *
311 * Note that some platforms will not let you alter the priority (or at least,
312 * promote the thread to a higher priority) at all, and some require you to be
313 * an administrator account. Be prepared for this to fail.
314 *
315 * \param priority the SDL_ThreadPriority to set
316 * \returns 0 on success or a negative error code on failure; call
317 * SDL_GetError() for more information.
318 *
319 * \since This function is available since SDL 2.0.0.
320 */
321 extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
322
323 /**
324 * Wait for a thread to finish.
325 *
326 * Threads that haven't been detached will remain (as a "zombie") until this
327 * function cleans them up. Not doing so is a resource leak.
328 *
329 * Once a thread has been cleaned up through this function, the SDL_Thread
330 * that references it becomes invalid and should not be referenced again. As
331 * such, only one thread may call SDL_WaitThread() on another.
332 *
333 * The return code for the thread function is placed in the area pointed to by
334 * `status`, if `status` is not NULL.
335 *
336 * You may not wait on a thread that has been used in a call to
337 * SDL_DetachThread(). Use either that function or this one, but not both, or
338 * behavior is undefined.
339 *
340 * It is safe to pass a NULL thread to this function; it is a no-op.
341 *
342 * Note that the thread pointer is freed by this function and is not valid
343 * afterward.
344 *
345 * \param thread the SDL_Thread pointer that was returned from the
346 * SDL_CreateThread() call that started this thread
347 * \param status pointer to an integer that will receive the value returned
348 * from the thread function by its 'return', or NULL to not
349 * receive such value back.
350 *
351 * \since This function is available since SDL 2.0.0.
352 *
353 * \sa SDL_CreateThread
354 * \sa SDL_DetachThread
355 */
356 extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
357
358 /**
359 * Let a thread clean up on exit without intervention.
360 *
361 * A thread may be "detached" to signify that it should not remain until
362 * another thread has called SDL_WaitThread() on it. Detaching a thread is
363 * useful for long-running threads that nothing needs to synchronize with or
364 * further manage. When a detached thread is done, it simply goes away.
365 *
366 * There is no way to recover the return code of a detached thread. If you
367 * need this, don't detach the thread and instead use SDL_WaitThread().
368 *
369 * Once a thread is detached, you should usually assume the SDL_Thread isn't
370 * safe to reference again, as it will become invalid immediately upon the
371 * detached thread's exit, instead of remaining until someone has called
372 * SDL_WaitThread() to finally clean it up. As such, don't detach the same
373 * thread more than once.
374 *
375 * If a thread has already exited when passed to SDL_DetachThread(), it will
376 * stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
377 * not safe to detach a thread that might be used with SDL_WaitThread().
378 *
379 * You may not call SDL_WaitThread() on a thread that has been detached. Use
380 * either that function or this one, but not both, or behavior is undefined.
381 *
382 * It is safe to pass NULL to this function; it is a no-op.
383 *
384 * \param thread the SDL_Thread pointer that was returned from the
385 * SDL_CreateThread() call that started this thread
386 *
387 * \since This function is available since SDL 2.0.2.
388 *
389 * \sa SDL_CreateThread
390 * \sa SDL_WaitThread
391 */
392 extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
393
394 /**
395 * Create a piece of thread-local storage.
396 *
397 * This creates an identifier that is globally visible to all threads but
398 * refers to data that is thread-specific.
399 *
400 * \returns the newly created thread local storage identifier or 0 on error.
401 *
402 * \since This function is available since SDL 2.0.0.
403 *
404 * \sa SDL_TLSGet
405 * \sa SDL_TLSSet
406 */
407 extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
408
409 /**
410 * Get the current thread's value associated with a thread local storage ID.
411 *
412 * \param id the thread local storage ID
413 * \returns the value associated with the ID for the current thread or NULL if
414 * no value has been set; call SDL_GetError() for more information.
415 *
416 * \since This function is available since SDL 2.0.0.
417 *
418 * \sa SDL_TLSCreate
419 * \sa SDL_TLSSet
420 */
421 extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
422
423 /**
424 * Set the current thread's value associated with a thread local storage ID.
425 *
426 * The function prototype for `destructor` is:
427 *
428 * ```c
429 * void destructor(void *value)
430 * ```
431 *
432 * where its parameter `value` is what was passed as `value` to SDL_TLSSet().
433 *
434 * \param id the thread local storage ID
435 * \param value the value to associate with the ID for the current thread
436 * \param destructor a function called when the thread exits, to free the
437 * value
438 * \returns 0 on success or a negative error code on failure; call
439 * SDL_GetError() for more information.
440 *
441 * \since This function is available since SDL 2.0.0.
442 *
443 * \sa SDL_TLSCreate
444 * \sa SDL_TLSGet
445 */
446 extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
447
448 /**
449 * Cleanup all TLS data for this thread.
450 *
451 * \since This function is available since SDL 2.0.16.
452 */
453 extern DECLSPEC void SDLCALL SDL_TLSCleanup(void);
454
455 /* Ends C function definitions when using C++ */
456 #ifdef __cplusplus
457 }
458 #endif
459 #include <SDL2/close_code.h>
460
461 #endif /* SDL_thread_h_ */
462
463 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_timer_h_
22 #define SDL_timer_h_
23
24 /**
25 * \file SDL_timer.h
26 *
27 * Header for the SDL time management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the number of milliseconds since SDL library initialization.
41 *
42 * This value wraps if the program runs for more than ~49 days.
43 *
44 * This function is not recommended as of SDL 2.0.18; use SDL_GetTicks64()
45 * instead, where the value doesn't wrap every ~49 days. There are places in
46 * SDL where we provide a 32-bit timestamp that can not change without
47 * breaking binary compatibility, though, so this function isn't officially
48 * deprecated.
49 *
50 * \returns an unsigned 32-bit value representing the number of milliseconds
51 * since the SDL library initialized.
52 *
53 * \since This function is available since SDL 2.0.0.
54 *
55 * \sa SDL_TICKS_PASSED
56 */
57 extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
58
59 /**
60 * Get the number of milliseconds since SDL library initialization.
61 *
62 * Note that you should not use the SDL_TICKS_PASSED macro with values
63 * returned by this function, as that macro does clever math to compensate for
64 * the 32-bit overflow every ~49 days that SDL_GetTicks() suffers from. 64-bit
65 * values from this function can be safely compared directly.
66 *
67 * For example, if you want to wait 100 ms, you could do this:
68 *
69 * ```c
70 * const Uint64 timeout = SDL_GetTicks64() + 100;
71 * while (SDL_GetTicks64() < timeout) {
72 * // ... do work until timeout has elapsed
73 * }
74 * ```
75 *
76 * \returns an unsigned 64-bit value representing the number of milliseconds
77 * since the SDL library initialized.
78 *
79 * \since This function is available since SDL 2.0.18.
80 */
81 extern DECLSPEC Uint64 SDLCALL SDL_GetTicks64(void);
82
83 /**
84 * Compare 32-bit SDL ticks values, and return true if `A` has passed `B`.
85 *
86 * This should be used with results from SDL_GetTicks(), as this macro
87 * attempts to deal with the 32-bit counter wrapping back to zero every ~49
88 * days, but should _not_ be used with SDL_GetTicks64(), which does not have
89 * that problem.
90 *
91 * For example, with SDL_GetTicks(), if you want to wait 100 ms, you could
92 * do this:
93 *
94 * ```c
95 * const Uint32 timeout = SDL_GetTicks() + 100;
96 * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
97 * // ... do work until timeout has elapsed
98 * }
99 * ```
100 *
101 * Note that this does not handle tick differences greater
102 * than 2^31 so take care when using the above kind of code
103 * with large timeout delays (tens of days).
104 */
105 #define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0)
106
107 /**
108 * Get the current value of the high resolution counter.
109 *
110 * This function is typically used for profiling.
111 *
112 * The counter values are only meaningful relative to each other. Differences
113 * between values can be converted to times by using
114 * SDL_GetPerformanceFrequency().
115 *
116 * \returns the current counter value.
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_GetPerformanceFrequency
121 */
122 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
123
124 /**
125 * Get the count per second of the high resolution counter.
126 *
127 * \returns a platform-specific count per second.
128 *
129 * \since This function is available since SDL 2.0.0.
130 *
131 * \sa SDL_GetPerformanceCounter
132 */
133 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
134
135 /**
136 * Wait a specified number of milliseconds before returning.
137 *
138 * This function waits a specified number of milliseconds before returning. It
139 * waits at least the specified time, but possibly longer due to OS
140 * scheduling.
141 *
142 * \param ms the number of milliseconds to delay
143 *
144 * \since This function is available since SDL 2.0.0.
145 */
146 extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
147
148 /**
149 * Function prototype for the timer callback function.
150 *
151 * The callback function is passed the current timer interval and returns
152 * the next timer interval. If the returned value is the same as the one
153 * passed in, the periodic alarm continues, otherwise a new alarm is
154 * scheduled. If the callback returns 0, the periodic alarm is cancelled.
155 */
156 typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);
157
158 /**
159 * Definition of the timer ID type.
160 */
161 typedef int SDL_TimerID;
162
163 /**
164 * Call a callback function at a future time.
165 *
166 * If you use this function, you must pass `SDL_INIT_TIMER` to SDL_Init().
167 *
168 * The callback function is passed the current timer interval and the user
169 * supplied parameter from the SDL_AddTimer() call and should return the next
170 * timer interval. If the value returned from the callback is 0, the timer is
171 * canceled.
172 *
173 * The callback is run on a separate thread.
174 *
175 * Timers take into account the amount of time it took to execute the
176 * callback. For example, if the callback took 250 ms to execute and returned
177 * 1000 (ms), the timer would only wait another 750 ms before its next
178 * iteration.
179 *
180 * Timing may be inexact due to OS scheduling. Be sure to note the current
181 * time with SDL_GetTicks() or SDL_GetPerformanceCounter() in case your
182 * callback needs to adjust for variances.
183 *
184 * \param interval the timer delay, in milliseconds, passed to `callback`
185 * \param callback the SDL_TimerCallback function to call when the specified
186 * `interval` elapses
187 * \param param a pointer that is passed to `callback`
188 * \returns a timer ID or 0 if an error occurs; call SDL_GetError() for more
189 * information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_RemoveTimer
194 */
195 extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
196 SDL_TimerCallback callback,
197 void *param);
198
199 /**
200 * Remove a timer created with SDL_AddTimer().
201 *
202 * \param id the ID of the timer to remove
203 * \returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't
204 * found.
205 *
206 * \since This function is available since SDL 2.0.0.
207 *
208 * \sa SDL_AddTimer
209 */
210 extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
211
212
213 /* Ends C function definitions when using C++ */
214 #ifdef __cplusplus
215 }
216 #endif
217 #include <SDL2/close_code.h>
218
219 #endif /* SDL_timer_h_ */
220
221 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_touch.h
23 *
24 * Include file for SDL touch event handling.
25 */
26
27 #ifndef SDL_touch_h_
28 #define SDL_touch_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef Sint64 SDL_TouchID;
41 typedef Sint64 SDL_FingerID;
42
43 typedef enum
44 {
45 SDL_TOUCH_DEVICE_INVALID = -1,
46 SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
47 SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
48 SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
49 } SDL_TouchDeviceType;
50
51 typedef struct SDL_Finger
52 {
53 SDL_FingerID id;
54 float x;
55 float y;
56 float pressure;
57 } SDL_Finger;
58
59 /* Used as the device ID for mouse events simulated with touch input */
60 #define SDL_TOUCH_MOUSEID ((Uint32)-1)
61
62 /* Used as the SDL_TouchID for touch events simulated with mouse input */
63 #define SDL_MOUSE_TOUCHID ((Sint64)-1)
64
65
66 /**
67 * Get the number of registered touch devices.
68 *
69 * On some platforms SDL first sees the touch device if it was actually used.
70 * Therefore SDL_GetNumTouchDevices() may return 0 although devices are
71 * available. After using all devices at least once the number will be
72 * correct.
73 *
74 * This was fixed for Android in SDL 2.0.1.
75 *
76 * \returns the number of registered touch devices.
77 *
78 * \since This function is available since SDL 2.0.0.
79 *
80 * \sa SDL_GetTouchDevice
81 */
82 extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
83
84 /**
85 * Get the touch ID with the given index.
86 *
87 * \param index the touch device index
88 * \returns the touch ID with the given index on success or 0 if the index is
89 * invalid; call SDL_GetError() for more information.
90 *
91 * \since This function is available since SDL 2.0.0.
92 *
93 * \sa SDL_GetNumTouchDevices
94 */
95 extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
96
97 /**
98 * Get the touch device name as reported from the driver or NULL if the index
99 * is invalid.
100 *
101 * \since This function is available since SDL 2.0.22.
102 */
103 extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index);
104
105 /**
106 * Get the type of the given touch device.
107 *
108 * \since This function is available since SDL 2.0.10.
109 */
110 extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
111
112 /**
113 * Get the number of active fingers for a given touch device.
114 *
115 * \param touchID the ID of a touch device
116 * \returns the number of active fingers for a given touch device on success
117 * or 0 on failure; call SDL_GetError() for more information.
118 *
119 * \since This function is available since SDL 2.0.0.
120 *
121 * \sa SDL_GetTouchFinger
122 */
123 extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
124
125 /**
126 * Get the finger object for specified touch device ID and finger index.
127 *
128 * The returned resource is owned by SDL and should not be deallocated.
129 *
130 * \param touchID the ID of the requested touch device
131 * \param index the index of the requested finger
132 * \returns a pointer to the SDL_Finger object or NULL if no object at the
133 * given ID and index could be found.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_RecordGesture
138 */
139 extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
140
141 /* Ends C function definitions when using C++ */
142 #ifdef __cplusplus
143 }
144 #endif
145 #include <SDL2/close_code.h>
146
147 #endif /* SDL_touch_h_ */
148
149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_types.h
23 *
24 * \deprecated
25 */
26
27 /* DEPRECATED */
28 #include <SDL2/SDL_stdinc.h>
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_version.h
23 *
24 * This header defines the current SDL version.
25 */
26
27 #ifndef SDL_version_h_
28 #define SDL_version_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * Information about the version of SDL in use.
40 *
41 * Represents the library's version as three levels: major revision
42 * (increments with massive changes, additions, and enhancements),
43 * minor revision (increments with backwards-compatible changes to the
44 * major revision), and patchlevel (increments with fixes to the minor
45 * revision).
46 *
47 * \sa SDL_VERSION
48 * \sa SDL_GetVersion
49 */
50 typedef struct SDL_version
51 {
52 Uint8 major; /**< major version */
53 Uint8 minor; /**< minor version */
54 Uint8 patch; /**< update version */
55 } SDL_version;
56
57 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
58 */
59 #define SDL_MAJOR_VERSION 2
60 #define SDL_MINOR_VERSION 0
61 #define SDL_PATCHLEVEL 22
62
63 /**
64 * Macro to determine SDL version program was compiled against.
65 *
66 * This macro fills in a SDL_version structure with the version of the
67 * library you compiled against. This is determined by what header the
68 * compiler uses. Note that if you dynamically linked the library, you might
69 * have a slightly newer or older version at runtime. That version can be
70 * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
71 * is not a macro.
72 *
73 * \param x A pointer to a SDL_version struct to initialize.
74 *
75 * \sa SDL_version
76 * \sa SDL_GetVersion
77 */
78 #define SDL_VERSION(x) \
79 { \
80 (x)->major = SDL_MAJOR_VERSION; \
81 (x)->minor = SDL_MINOR_VERSION; \
82 (x)->patch = SDL_PATCHLEVEL; \
83 }
84
85 /**
86 * This macro turns the version numbers into a numeric value:
87 * \verbatim
88 (1,2,3) -> (1203)
89 \endverbatim
90 *
91 * This assumes that there will never be more than 100 patchlevels.
92 */
93 #define SDL_VERSIONNUM(X, Y, Z) \
94 ((X)*1000 + (Y)*100 + (Z))
95
96 /**
97 * This is the version number macro for the current SDL version.
98 */
99 #define SDL_COMPILEDVERSION \
100 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
101
102 /**
103 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
104 */
105 #define SDL_VERSION_ATLEAST(X, Y, Z) \
106 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
107
108 /**
109 * Get the version of SDL that is linked against your program.
110 *
111 * If you are linking to SDL dynamically, then it is possible that the current
112 * version will be different than the version you compiled against. This
113 * function returns the current version, while SDL_VERSION() is a macro that
114 * tells you what version you compiled with.
115 *
116 * This function may be called safely at any time, even before SDL_Init().
117 *
118 * \param ver the SDL_version structure that contains the version information
119 *
120 * \since This function is available since SDL 2.0.0.
121 *
122 * \sa SDL_GetRevision
123 */
124 extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
125
126 /**
127 * Get the code revision of SDL that is linked against your program.
128 *
129 * This value is the revision of the code you are linked with and may be
130 * different from the code you are compiling with, which is found in the
131 * constant SDL_REVISION.
132 *
133 * The revision is arbitrary string (a hash value) uniquely identifying the
134 * exact revision of the SDL library in use, and is only useful in comparing
135 * against other revisions. It is NOT an incrementing number.
136 *
137 * If SDL wasn't built from a git repository with the appropriate tools, this
138 * will return an empty string.
139 *
140 * Prior to SDL 2.0.16, before development moved to GitHub, this returned a
141 * hash for a Mercurial repository.
142 *
143 * You shouldn't use this function for anything but logging it for debugging
144 * purposes. The string is not intended to be reliable in any way.
145 *
146 * \returns an arbitrary string, uniquely identifying the exact revision of
147 * the SDL library in use.
148 *
149 * \since This function is available since SDL 2.0.0.
150 *
151 * \sa SDL_GetVersion
152 */
153 extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
154
155 /**
156 * Obsolete function, do not use.
157 *
158 * When SDL was hosted in a Mercurial repository, and was built carefully,
159 * this would return the revision number that the build was created from. This
160 * number was not reliable for several reasons, but more importantly, SDL is
161 * now hosted in a git repository, which does not offer numbers at all, only
162 * hashes. This function only ever returns zero now. Don't use it.
163 *
164 * Before SDL 2.0.16, this might have returned an unreliable, but non-zero
165 * number.
166 *
167 * \deprecated Use SDL_GetRevision() instead; if SDL was carefully built, it
168 * will return a git hash.
169 *
170 * \returns zero, always, in modern SDL releases.
171 *
172 * \since This function is available since SDL 2.0.0.
173 *
174 * \sa SDL_GetRevision
175 */
176 extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
177
178
179 /* Ends C function definitions when using C++ */
180 #ifdef __cplusplus
181 }
182 #endif
183 #include <SDL2/close_code.h>
184
185 #endif /* SDL_version_h_ */
186
187 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_video.h
23 *
24 * Header file for SDL video functions.
25 */
26
27 #ifndef SDL_video_h_
28 #define SDL_video_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_surface.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The structure that defines a display mode
43 *
44 * \sa SDL_GetNumDisplayModes()
45 * \sa SDL_GetDisplayMode()
46 * \sa SDL_GetDesktopDisplayMode()
47 * \sa SDL_GetCurrentDisplayMode()
48 * \sa SDL_GetClosestDisplayMode()
49 * \sa SDL_SetWindowDisplayMode()
50 * \sa SDL_GetWindowDisplayMode()
51 */
52 typedef struct
53 {
54 Uint32 format; /**< pixel format */
55 int w; /**< width, in screen coordinates */
56 int h; /**< height, in screen coordinates */
57 int refresh_rate; /**< refresh rate (or zero for unspecified) */
58 void *driverdata; /**< driver-specific data, initialize to 0 */
59 } SDL_DisplayMode;
60
61 /**
62 * \brief The type used to identify a window
63 *
64 * \sa SDL_CreateWindow()
65 * \sa SDL_CreateWindowFrom()
66 * \sa SDL_DestroyWindow()
67 * \sa SDL_FlashWindow()
68 * \sa SDL_GetWindowData()
69 * \sa SDL_GetWindowFlags()
70 * \sa SDL_GetWindowGrab()
71 * \sa SDL_GetWindowKeyboardGrab()
72 * \sa SDL_GetWindowMouseGrab()
73 * \sa SDL_GetWindowPosition()
74 * \sa SDL_GetWindowSize()
75 * \sa SDL_GetWindowTitle()
76 * \sa SDL_HideWindow()
77 * \sa SDL_MaximizeWindow()
78 * \sa SDL_MinimizeWindow()
79 * \sa SDL_RaiseWindow()
80 * \sa SDL_RestoreWindow()
81 * \sa SDL_SetWindowData()
82 * \sa SDL_SetWindowFullscreen()
83 * \sa SDL_SetWindowGrab()
84 * \sa SDL_SetWindowKeyboardGrab()
85 * \sa SDL_SetWindowMouseGrab()
86 * \sa SDL_SetWindowIcon()
87 * \sa SDL_SetWindowPosition()
88 * \sa SDL_SetWindowSize()
89 * \sa SDL_SetWindowBordered()
90 * \sa SDL_SetWindowResizable()
91 * \sa SDL_SetWindowTitle()
92 * \sa SDL_ShowWindow()
93 */
94 typedef struct SDL_Window SDL_Window;
95
96 /**
97 * \brief The flags on a window
98 *
99 * \sa SDL_GetWindowFlags()
100 */
101 typedef enum
102 {
103 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
104 SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
105 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
106 SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
107 SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
108 SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
109 SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */
110 SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */
111 SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
112 SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
113 SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
114 SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
115 SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
116 SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported.
117 On macOS NSHighResolutionCapable must be set true in the
118 application's Info.plist for this to have any effect. */
119 SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
120 SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
121 SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
122 SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
123 SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
124 SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
125 SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
126 SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
127 SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
128
129 SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED /**< equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility */
130 } SDL_WindowFlags;
131
132 /**
133 * \brief Used to indicate that you don't care what the window position is.
134 */
135 #define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
136 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
137 #define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
138 #define SDL_WINDOWPOS_ISUNDEFINED(X) \
139 (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
140
141 /**
142 * \brief Used to indicate that the window position should be centered.
143 */
144 #define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
145 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
146 #define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
147 #define SDL_WINDOWPOS_ISCENTERED(X) \
148 (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
149
150 /**
151 * \brief Event subtype for window events
152 */
153 typedef enum
154 {
155 SDL_WINDOWEVENT_NONE, /**< Never used */
156 SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
157 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
158 SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be
159 redrawn */
160 SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
161 */
162 SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
163 SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
164 a result of an API call or through the
165 system or user changing the window size. */
166 SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
167 SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
168 SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
169 and position */
170 SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */
171 SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
172 SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
173 SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
174 SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
175 SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
176 SDL_WINDOWEVENT_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
177 SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
178 SDL_WINDOWEVENT_DISPLAY_CHANGED /**< Window has been moved to display data1. */
179 } SDL_WindowEventID;
180
181 /**
182 * \brief Event subtype for display events
183 */
184 typedef enum
185 {
186 SDL_DISPLAYEVENT_NONE, /**< Never used */
187 SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
188 SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
189 SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
190 } SDL_DisplayEventID;
191
192 /**
193 * \brief Display orientation
194 */
195 typedef enum
196 {
197 SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
198 SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
199 SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
200 SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
201 SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
202 } SDL_DisplayOrientation;
203
204 /**
205 * \brief Window flash operation
206 */
207 typedef enum
208 {
209 SDL_FLASH_CANCEL, /**< Cancel any window flash state */
210 SDL_FLASH_BRIEFLY, /**< Flash the window briefly to get attention */
211 SDL_FLASH_UNTIL_FOCUSED /**< Flash the window until it gets focus */
212 } SDL_FlashOperation;
213
214 /**
215 * \brief An opaque handle to an OpenGL context.
216 */
217 typedef void *SDL_GLContext;
218
219 /**
220 * \brief OpenGL configuration attributes
221 */
222 typedef enum
223 {
224 SDL_GL_RED_SIZE,
225 SDL_GL_GREEN_SIZE,
226 SDL_GL_BLUE_SIZE,
227 SDL_GL_ALPHA_SIZE,
228 SDL_GL_BUFFER_SIZE,
229 SDL_GL_DOUBLEBUFFER,
230 SDL_GL_DEPTH_SIZE,
231 SDL_GL_STENCIL_SIZE,
232 SDL_GL_ACCUM_RED_SIZE,
233 SDL_GL_ACCUM_GREEN_SIZE,
234 SDL_GL_ACCUM_BLUE_SIZE,
235 SDL_GL_ACCUM_ALPHA_SIZE,
236 SDL_GL_STEREO,
237 SDL_GL_MULTISAMPLEBUFFERS,
238 SDL_GL_MULTISAMPLESAMPLES,
239 SDL_GL_ACCELERATED_VISUAL,
240 SDL_GL_RETAINED_BACKING,
241 SDL_GL_CONTEXT_MAJOR_VERSION,
242 SDL_GL_CONTEXT_MINOR_VERSION,
243 SDL_GL_CONTEXT_EGL,
244 SDL_GL_CONTEXT_FLAGS,
245 SDL_GL_CONTEXT_PROFILE_MASK,
246 SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
247 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
248 SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
249 SDL_GL_CONTEXT_RESET_NOTIFICATION,
250 SDL_GL_CONTEXT_NO_ERROR
251 } SDL_GLattr;
252
253 typedef enum
254 {
255 SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
256 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
257 SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
258 } SDL_GLprofile;
259
260 typedef enum
261 {
262 SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001,
263 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
264 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004,
265 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
266 } SDL_GLcontextFlag;
267
268 typedef enum
269 {
270 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
271 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
272 } SDL_GLcontextReleaseFlag;
273
274 typedef enum
275 {
276 SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
277 SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
278 } SDL_GLContextResetNotification;
279
280 /* Function prototypes */
281
282 /**
283 * Get the number of video drivers compiled into SDL.
284 *
285 * \returns a number >= 1 on success or a negative error code on failure; call
286 * SDL_GetError() for more information.
287 *
288 * \since This function is available since SDL 2.0.0.
289 *
290 * \sa SDL_GetVideoDriver
291 */
292 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
293
294 /**
295 * Get the name of a built in video driver.
296 *
297 * The video drivers are presented in the order in which they are normally
298 * checked during initialization.
299 *
300 * \param index the index of a video driver
301 * \returns the name of the video driver with the given **index**.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetNumVideoDrivers
306 */
307 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
308
309 /**
310 * Initialize the video subsystem, optionally specifying a video driver.
311 *
312 * This function initializes the video subsystem, setting up a connection to
313 * the window manager, etc, and determines the available display modes and
314 * pixel formats, but does not initialize a window or graphics mode.
315 *
316 * If you use this function and you haven't used the SDL_INIT_VIDEO flag with
317 * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
318 * before calling SDL_Quit().
319 *
320 * It is safe to call this function multiple times. SDL_VideoInit() will call
321 * SDL_VideoQuit() itself if the video subsystem has already been initialized.
322 *
323 * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
324 * specific `driver_name`.
325 *
326 * \param driver_name the name of a video driver to initialize, or NULL for
327 * the default driver
328 * \returns 0 on success or a negative error code on failure; call
329 * SDL_GetError() for more information.
330 *
331 * \since This function is available since SDL 2.0.0.
332 *
333 * \sa SDL_GetNumVideoDrivers
334 * \sa SDL_GetVideoDriver
335 * \sa SDL_InitSubSystem
336 * \sa SDL_VideoQuit
337 */
338 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
339
340 /**
341 * Shut down the video subsystem, if initialized with SDL_VideoInit().
342 *
343 * This function closes all windows, and restores the original video mode.
344 *
345 * \since This function is available since SDL 2.0.0.
346 *
347 * \sa SDL_VideoInit
348 */
349 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
350
351 /**
352 * Get the name of the currently initialized video driver.
353 *
354 * \returns the name of the current video driver or NULL if no driver has been
355 * initialized.
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_GetNumVideoDrivers
360 * \sa SDL_GetVideoDriver
361 */
362 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
363
364 /**
365 * Get the number of available video displays.
366 *
367 * \returns a number >= 1 or a negative error code on failure; call
368 * SDL_GetError() for more information.
369 *
370 * \since This function is available since SDL 2.0.0.
371 *
372 * \sa SDL_GetDisplayBounds
373 */
374 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
375
376 /**
377 * Get the name of a display in UTF-8 encoding.
378 *
379 * \param displayIndex the index of display from which the name should be
380 * queried
381 * \returns the name of a display or NULL for an invalid display index or
382 * failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_GetNumVideoDisplays
387 */
388 extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
389
390 /**
391 * Get the desktop area represented by a display.
392 *
393 * The primary display (`displayIndex` zero) is always located at 0,0.
394 *
395 * \param displayIndex the index of the display to query
396 * \param rect the SDL_Rect structure filled in with the display bounds
397 * \returns 0 on success or a negative error code on failure; call
398 * SDL_GetError() for more information.
399 *
400 * \since This function is available since SDL 2.0.0.
401 *
402 * \sa SDL_GetNumVideoDisplays
403 */
404 extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
405
406 /**
407 * Get the usable desktop area represented by a display.
408 *
409 * The primary display (`displayIndex` zero) is always located at 0,0.
410 *
411 * This is the same area as SDL_GetDisplayBounds() reports, but with portions
412 * reserved by the system removed. For example, on Apple's macOS, this
413 * subtracts the area occupied by the menu bar and dock.
414 *
415 * Setting a window to be fullscreen generally bypasses these unusable areas,
416 * so these are good guidelines for the maximum space available to a
417 * non-fullscreen window.
418 *
419 * The parameter `rect` is ignored if it is NULL.
420 *
421 * This function also returns -1 if the parameter `displayIndex` is out of
422 * range.
423 *
424 * \param displayIndex the index of the display to query the usable bounds
425 * from
426 * \param rect the SDL_Rect structure filled in with the display bounds
427 * \returns 0 on success or a negative error code on failure; call
428 * SDL_GetError() for more information.
429 *
430 * \since This function is available since SDL 2.0.5.
431 *
432 * \sa SDL_GetDisplayBounds
433 * \sa SDL_GetNumVideoDisplays
434 */
435 extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
436
437 /**
438 * Get the dots/pixels-per-inch for a display.
439 *
440 * Diagonal, horizontal and vertical DPI can all be optionally returned if the
441 * appropriate parameter is non-NULL.
442 *
443 * A failure of this function usually means that either no DPI information is
444 * available or the `displayIndex` is out of range.
445 *
446 * \param displayIndex the index of the display from which DPI information
447 * should be queried
448 * \param ddpi a pointer filled in with the diagonal DPI of the display; may
449 * be NULL
450 * \param hdpi a pointer filled in with the horizontal DPI of the display; may
451 * be NULL
452 * \param vdpi a pointer filled in with the vertical DPI of the display; may
453 * be NULL
454 * \returns 0 on success or a negative error code on failure; call
455 * SDL_GetError() for more information.
456 *
457 * \since This function is available since SDL 2.0.4.
458 *
459 * \sa SDL_GetNumVideoDisplays
460 */
461 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
462
463 /**
464 * Get the orientation of a display.
465 *
466 * \param displayIndex the index of the display to query
467 * \returns The SDL_DisplayOrientation enum value of the display, or
468 * `SDL_ORIENTATION_UNKNOWN` if it isn't available.
469 *
470 * \since This function is available since SDL 2.0.9.
471 *
472 * \sa SDL_GetNumVideoDisplays
473 */
474 extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
475
476 /**
477 * Get the number of available display modes.
478 *
479 * The `displayIndex` needs to be in the range from 0 to
480 * SDL_GetNumVideoDisplays() - 1.
481 *
482 * \param displayIndex the index of the display to query
483 * \returns a number >= 1 on success or a negative error code on failure; call
484 * SDL_GetError() for more information.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetDisplayMode
489 * \sa SDL_GetNumVideoDisplays
490 */
491 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
492
493 /**
494 * Get information about a specific display mode.
495 *
496 * The display modes are sorted in this priority:
497 *
498 * - width -> largest to smallest
499 * - height -> largest to smallest
500 * - bits per pixel -> more colors to fewer colors
501 * - packed pixel layout -> largest to smallest
502 * - refresh rate -> highest to lowest
503 *
504 * \param displayIndex the index of the display to query
505 * \param modeIndex the index of the display mode to query
506 * \param mode an SDL_DisplayMode structure filled in with the mode at
507 * `modeIndex`
508 * \returns 0 on success or a negative error code on failure; call
509 * SDL_GetError() for more information.
510 *
511 * \since This function is available since SDL 2.0.0.
512 *
513 * \sa SDL_GetNumDisplayModes
514 */
515 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
516 SDL_DisplayMode * mode);
517
518 /**
519 * Get information about the desktop's display mode.
520 *
521 * There's a difference between this function and SDL_GetCurrentDisplayMode()
522 * when SDL runs fullscreen and has changed the resolution. In that case this
523 * function will return the previous native display mode, and not the current
524 * display mode.
525 *
526 * \param displayIndex the index of the display to query
527 * \param mode an SDL_DisplayMode structure filled in with the current display
528 * mode
529 * \returns 0 on success or a negative error code on failure; call
530 * SDL_GetError() for more information.
531 *
532 * \since This function is available since SDL 2.0.0.
533 *
534 * \sa SDL_GetCurrentDisplayMode
535 * \sa SDL_GetDisplayMode
536 * \sa SDL_SetWindowDisplayMode
537 */
538 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
539
540 /**
541 * Get information about the current display mode.
542 *
543 * There's a difference between this function and SDL_GetDesktopDisplayMode()
544 * when SDL runs fullscreen and has changed the resolution. In that case this
545 * function will return the current display mode, and not the previous native
546 * display mode.
547 *
548 * \param displayIndex the index of the display to query
549 * \param mode an SDL_DisplayMode structure filled in with the current display
550 * mode
551 * \returns 0 on success or a negative error code on failure; call
552 * SDL_GetError() for more information.
553 *
554 * \since This function is available since SDL 2.0.0.
555 *
556 * \sa SDL_GetDesktopDisplayMode
557 * \sa SDL_GetDisplayMode
558 * \sa SDL_GetNumVideoDisplays
559 * \sa SDL_SetWindowDisplayMode
560 */
561 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
562
563
564 /**
565 * Get the closest match to the requested display mode.
566 *
567 * The available display modes are scanned and `closest` is filled in with the
568 * closest mode matching the requested mode and returned. The mode format and
569 * refresh rate default to the desktop mode if they are set to 0. The modes
570 * are scanned with size being first priority, format being second priority,
571 * and finally checking the refresh rate. If all the available modes are too
572 * small, then NULL is returned.
573 *
574 * \param displayIndex the index of the display to query
575 * \param mode an SDL_DisplayMode structure containing the desired display
576 * mode
577 * \param closest an SDL_DisplayMode structure filled in with the closest
578 * match of the available display modes
579 * \returns the passed in value `closest` or NULL if no matching video mode
580 * was available; call SDL_GetError() for more information.
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetDisplayMode
585 * \sa SDL_GetNumDisplayModes
586 */
587 extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
588
589 /**
590 * Get the index of the display associated with a window.
591 *
592 * \param window the window to query
593 * \returns the index of the display containing the center of the window on
594 * success or a negative error code on failure; call SDL_GetError()
595 * for more information.
596 *
597 * \since This function is available since SDL 2.0.0.
598 *
599 * \sa SDL_GetDisplayBounds
600 * \sa SDL_GetNumVideoDisplays
601 */
602 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
603
604 /**
605 * Set the display mode to use when a window is visible at fullscreen.
606 *
607 * This only affects the display mode used when the window is fullscreen. To
608 * change the window size when the window is not fullscreen, use
609 * SDL_SetWindowSize().
610 *
611 * \param window the window to affect
612 * \param mode the SDL_DisplayMode structure representing the mode to use, or
613 * NULL to use the window's dimensions and the desktop's format
614 * and refresh rate
615 * \returns 0 on success or a negative error code on failure; call
616 * SDL_GetError() for more information.
617 *
618 * \since This function is available since SDL 2.0.0.
619 *
620 * \sa SDL_GetWindowDisplayMode
621 * \sa SDL_SetWindowFullscreen
622 */
623 extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
624 const SDL_DisplayMode * mode);
625
626 /**
627 * Query the display mode to use when a window is visible at fullscreen.
628 *
629 * \param window the window to query
630 * \param mode an SDL_DisplayMode structure filled in with the fullscreen
631 * display mode
632 * \returns 0 on success or a negative error code on failure; call
633 * SDL_GetError() for more information.
634 *
635 * \since This function is available since SDL 2.0.0.
636 *
637 * \sa SDL_SetWindowDisplayMode
638 * \sa SDL_SetWindowFullscreen
639 */
640 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
641 SDL_DisplayMode * mode);
642
643 /**
644 * Get the raw ICC profile data for the screen the window is currently on.
645 *
646 * Data returned should be freed with SDL_free.
647 *
648 * \param window the window to query
649 * \param size the size of the ICC profile
650 * \returns the raw ICC profile data on success or NULL on failure; call
651 * SDL_GetError() for more information.
652 *
653 * \since This function is available since SDL 2.0.18.
654 */
655 extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
656
657 /**
658 * Get the pixel format associated with the window.
659 *
660 * \param window the window to query
661 * \returns the pixel format of the window on success or
662 * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
663 * information.
664 *
665 * \since This function is available since SDL 2.0.0.
666 */
667 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
668
669 /**
670 * Create a window with the specified position, dimensions, and flags.
671 *
672 * `flags` may be any of the following OR'd together:
673 *
674 * - `SDL_WINDOW_FULLSCREEN`: fullscreen window
675 * - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
676 * - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
677 * - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
678 * - `SDL_WINDOW_METAL`: window usable with a Metal instance
679 * - `SDL_WINDOW_HIDDEN`: window is not visible
680 * - `SDL_WINDOW_BORDERLESS`: no window decoration
681 * - `SDL_WINDOW_RESIZABLE`: window can be resized
682 * - `SDL_WINDOW_MINIMIZED`: window is minimized
683 * - `SDL_WINDOW_MAXIMIZED`: window is maximized
684 * - `SDL_WINDOW_INPUT_GRABBED`: window has grabbed input focus
685 * - `SDL_WINDOW_ALLOW_HIGHDPI`: window should be created in high-DPI mode if
686 * supported (>= SDL 2.0.1)
687 *
688 * `SDL_WINDOW_SHOWN` is ignored by SDL_CreateWindow(). The SDL_Window is
689 * implicitly shown if SDL_WINDOW_HIDDEN is not set. `SDL_WINDOW_SHOWN` may be
690 * queried later using SDL_GetWindowFlags().
691 *
692 * On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
693 * property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
694 *
695 * If the window is created with the `SDL_WINDOW_ALLOW_HIGHDPI` flag, its size
696 * in pixels may differ from its size in screen coordinates on platforms with
697 * high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
698 * client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
699 * SDL_GetRendererOutputSize() to query the drawable size in pixels.
700 *
701 * If the window is set fullscreen, the width and height parameters `w` and
702 * `h` will not be used. However, invalid size parameters (e.g. too large) may
703 * still fail. Window size is actually limited to 16384 x 16384 for all
704 * platforms at window creation.
705 *
706 * If the window is created with any of the SDL_WINDOW_OPENGL or
707 * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
708 * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
709 * corresponding UnloadLibrary function is called by SDL_DestroyWindow().
710 *
711 * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
712 * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
713 *
714 * If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
715 * SDL_CreateWindow() will fail.
716 *
717 * On non-Apple devices, SDL requires you to either not link to the Vulkan
718 * loader or link to a dynamic library version. This limitation may be removed
719 * in a future version of SDL.
720 *
721 * \param title the title of the window, in UTF-8 encoding
722 * \param x the x position of the window, `SDL_WINDOWPOS_CENTERED`, or
723 * `SDL_WINDOWPOS_UNDEFINED`
724 * \param y the y position of the window, `SDL_WINDOWPOS_CENTERED`, or
725 * `SDL_WINDOWPOS_UNDEFINED`
726 * \param w the width of the window, in screen coordinates
727 * \param h the height of the window, in screen coordinates
728 * \param flags 0, or one or more SDL_WindowFlags OR'd together
729 * \returns the window that was created or NULL on failure; call
730 * SDL_GetError() for more information.
731 *
732 * \since This function is available since SDL 2.0.0.
733 *
734 * \sa SDL_CreateWindowFrom
735 * \sa SDL_DestroyWindow
736 */
737 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
738 int x, int y, int w,
739 int h, Uint32 flags);
740
741 /**
742 * Create an SDL window from an existing native window.
743 *
744 * In some cases (e.g. OpenGL) and on some platforms (e.g. Microsoft Windows)
745 * the hint `SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT` needs to be configured
746 * before using SDL_CreateWindowFrom().
747 *
748 * \param data a pointer to driver-dependent window creation data, typically
749 * your native window cast to a void*
750 * \returns the window that was created or NULL on failure; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_CreateWindow
756 * \sa SDL_DestroyWindow
757 */
758 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
759
760 /**
761 * Get the numeric ID of a window.
762 *
763 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
764 * these events to specific SDL_Window objects.
765 *
766 * \param window the window to query
767 * \returns the ID of the window on success or 0 on failure; call
768 * SDL_GetError() for more information.
769 *
770 * \since This function is available since SDL 2.0.0.
771 *
772 * \sa SDL_GetWindowFromID
773 */
774 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
775
776 /**
777 * Get a window from a stored ID.
778 *
779 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
780 * these events to specific SDL_Window objects.
781 *
782 * \param id the ID of the window
783 * \returns the window associated with `id` or NULL if it doesn't exist; call
784 * SDL_GetError() for more information.
785 *
786 * \since This function is available since SDL 2.0.0.
787 *
788 * \sa SDL_GetWindowID
789 */
790 extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
791
792 /**
793 * Get the window flags.
794 *
795 * \param window the window to query
796 * \returns a mask of the SDL_WindowFlags associated with `window`
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_CreateWindow
801 * \sa SDL_HideWindow
802 * \sa SDL_MaximizeWindow
803 * \sa SDL_MinimizeWindow
804 * \sa SDL_SetWindowFullscreen
805 * \sa SDL_SetWindowGrab
806 * \sa SDL_ShowWindow
807 */
808 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
809
810 /**
811 * Set the title of a window.
812 *
813 * This string is expected to be in UTF-8 encoding.
814 *
815 * \param window the window to change
816 * \param title the desired window title in UTF-8 format
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_GetWindowTitle
821 */
822 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
823 const char *title);
824
825 /**
826 * Get the title of a window.
827 *
828 * \param window the window to query
829 * \returns the title of the window in UTF-8 format or "" if there is no
830 * title.
831 *
832 * \since This function is available since SDL 2.0.0.
833 *
834 * \sa SDL_SetWindowTitle
835 */
836 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
837
838 /**
839 * Set the icon for a window.
840 *
841 * \param window the window to change
842 * \param icon an SDL_Surface structure containing the icon for the window
843 *
844 * \since This function is available since SDL 2.0.0.
845 */
846 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
847 SDL_Surface * icon);
848
849 /**
850 * Associate an arbitrary named pointer with a window.
851 *
852 * `name` is case-sensitive.
853 *
854 * \param window the window to associate with the pointer
855 * \param name the name of the pointer
856 * \param userdata the associated pointer
857 * \returns the previous value associated with `name`.
858 *
859 * \since This function is available since SDL 2.0.0.
860 *
861 * \sa SDL_GetWindowData
862 */
863 extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
864 const char *name,
865 void *userdata);
866
867 /**
868 * Retrieve the data pointer associated with a window.
869 *
870 * \param window the window to query
871 * \param name the name of the pointer
872 * \returns the value associated with `name`.
873 *
874 * \since This function is available since SDL 2.0.0.
875 *
876 * \sa SDL_SetWindowData
877 */
878 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
879 const char *name);
880
881 /**
882 * Set the position of a window.
883 *
884 * The window coordinate origin is the upper left of the display.
885 *
886 * \param window the window to reposition
887 * \param x the x coordinate of the window in screen coordinates, or
888 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
889 * \param y the y coordinate of the window in screen coordinates, or
890 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_GetWindowPosition
895 */
896 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
897 int x, int y);
898
899 /**
900 * Get the position of a window.
901 *
902 * If you do not need the value for one of the positions a NULL may be passed
903 * in the `x` or `y` parameter.
904 *
905 * \param window the window to query
906 * \param x a pointer filled in with the x position of the window, in screen
907 * coordinates, may be NULL
908 * \param y a pointer filled in with the y position of the window, in screen
909 * coordinates, may be NULL
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_SetWindowPosition
914 */
915 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
916 int *x, int *y);
917
918 /**
919 * Set the size of a window's client area.
920 *
921 * The window size in screen coordinates may differ from the size in pixels,
922 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
923 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize() or
924 * SDL_GetRendererOutputSize() to get the real client area size in pixels.
925 *
926 * Fullscreen windows automatically match the size of the display mode, and
927 * you should use SDL_SetWindowDisplayMode() to change their size.
928 *
929 * \param window the window to change
930 * \param w the width of the window in pixels, in screen coordinates, must be
931 * > 0
932 * \param h the height of the window in pixels, in screen coordinates, must be
933 * > 0
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_GetWindowSize
938 * \sa SDL_SetWindowDisplayMode
939 */
940 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
941 int h);
942
943 /**
944 * Get the size of a window's client area.
945 *
946 * NULL can safely be passed as the `w` or `h` parameter if the width or
947 * height value is not desired.
948 *
949 * The window size in screen coordinates may differ from the size in pixels,
950 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
951 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize(),
952 * SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to get the
953 * real client area size in pixels.
954 *
955 * \param window the window to query the width and height from
956 * \param w a pointer filled in with the width of the window, in screen
957 * coordinates, may be NULL
958 * \param h a pointer filled in with the height of the window, in screen
959 * coordinates, may be NULL
960 *
961 * \since This function is available since SDL 2.0.0.
962 *
963 * \sa SDL_GL_GetDrawableSize
964 * \sa SDL_Vulkan_GetDrawableSize
965 * \sa SDL_SetWindowSize
966 */
967 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
968 int *h);
969
970 /**
971 * Get the size of a window's borders (decorations) around the client area.
972 *
973 * Note: If this function fails (returns -1), the size values will be
974 * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
975 * window in question was borderless.
976 *
977 * Note: This function may fail on systems where the window has not yet been
978 * decorated by the display server (for example, immediately after calling
979 * SDL_CreateWindow). It is recommended that you wait at least until the
980 * window has been presented and composited, so that the window system has a
981 * chance to decorate the window and provide the border dimensions to SDL.
982 *
983 * This function also returns -1 if getting the information is not supported.
984 *
985 * \param window the window to query the size values of the border
986 * (decorations) from
987 * \param top pointer to variable for storing the size of the top border; NULL
988 * is permitted
989 * \param left pointer to variable for storing the size of the left border;
990 * NULL is permitted
991 * \param bottom pointer to variable for storing the size of the bottom
992 * border; NULL is permitted
993 * \param right pointer to variable for storing the size of the right border;
994 * NULL is permitted
995 * \returns 0 on success or a negative error code on failure; call
996 * SDL_GetError() for more information.
997 *
998 * \since This function is available since SDL 2.0.5.
999 *
1000 * \sa SDL_GetWindowSize
1001 */
1002 extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
1003 int *top, int *left,
1004 int *bottom, int *right);
1005
1006 /**
1007 * Set the minimum size of a window's client area.
1008 *
1009 * \param window the window to change
1010 * \param min_w the minimum width of the window in pixels
1011 * \param min_h the minimum height of the window in pixels
1012 *
1013 * \since This function is available since SDL 2.0.0.
1014 *
1015 * \sa SDL_GetWindowMinimumSize
1016 * \sa SDL_SetWindowMaximumSize
1017 */
1018 extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
1019 int min_w, int min_h);
1020
1021 /**
1022 * Get the minimum size of a window's client area.
1023 *
1024 * \param window the window to query
1025 * \param w a pointer filled in with the minimum width of the window, may be
1026 * NULL
1027 * \param h a pointer filled in with the minimum height of the window, may be
1028 * NULL
1029 *
1030 * \since This function is available since SDL 2.0.0.
1031 *
1032 * \sa SDL_GetWindowMaximumSize
1033 * \sa SDL_SetWindowMinimumSize
1034 */
1035 extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
1036 int *w, int *h);
1037
1038 /**
1039 * Set the maximum size of a window's client area.
1040 *
1041 * \param window the window to change
1042 * \param max_w the maximum width of the window in pixels
1043 * \param max_h the maximum height of the window in pixels
1044 *
1045 * \since This function is available since SDL 2.0.0.
1046 *
1047 * \sa SDL_GetWindowMaximumSize
1048 * \sa SDL_SetWindowMinimumSize
1049 */
1050 extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
1051 int max_w, int max_h);
1052
1053 /**
1054 * Get the maximum size of a window's client area.
1055 *
1056 * \param window the window to query
1057 * \param w a pointer filled in with the maximum width of the window, may be
1058 * NULL
1059 * \param h a pointer filled in with the maximum height of the window, may be
1060 * NULL
1061 *
1062 * \since This function is available since SDL 2.0.0.
1063 *
1064 * \sa SDL_GetWindowMinimumSize
1065 * \sa SDL_SetWindowMaximumSize
1066 */
1067 extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
1068 int *w, int *h);
1069
1070 /**
1071 * Set the border state of a window.
1072 *
1073 * This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add
1074 * or remove the border from the actual window. This is a no-op if the
1075 * window's border already matches the requested state.
1076 *
1077 * You can't change the border state of a fullscreen window.
1078 *
1079 * \param window the window of which to change the border state
1080 * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border
1081 *
1082 * \since This function is available since SDL 2.0.0.
1083 *
1084 * \sa SDL_GetWindowFlags
1085 */
1086 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
1087 SDL_bool bordered);
1088
1089 /**
1090 * Set the user-resizable state of a window.
1091 *
1092 * This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and
1093 * allow/disallow user resizing of the window. This is a no-op if the window's
1094 * resizable state already matches the requested state.
1095 *
1096 * You can't change the resizable state of a fullscreen window.
1097 *
1098 * \param window the window of which to change the resizable state
1099 * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow
1100 *
1101 * \since This function is available since SDL 2.0.5.
1102 *
1103 * \sa SDL_GetWindowFlags
1104 */
1105 extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
1106 SDL_bool resizable);
1107
1108 /**
1109 * Set the window to always be above the others.
1110 *
1111 * This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This
1112 * will bring the window to the front and keep the window above the rest.
1113 *
1114 * \param window The window of which to change the always on top state
1115 * \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to
1116 * disable
1117 *
1118 * \since This function is available since SDL 2.0.16.
1119 *
1120 * \sa SDL_GetWindowFlags
1121 */
1122 extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
1123 SDL_bool on_top);
1124
1125 /**
1126 * Show a window.
1127 *
1128 * \param window the window to show
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_HideWindow
1133 * \sa SDL_RaiseWindow
1134 */
1135 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
1136
1137 /**
1138 * Hide a window.
1139 *
1140 * \param window the window to hide
1141 *
1142 * \since This function is available since SDL 2.0.0.
1143 *
1144 * \sa SDL_ShowWindow
1145 */
1146 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
1147
1148 /**
1149 * Raise a window above other windows and set the input focus.
1150 *
1151 * \param window the window to raise
1152 *
1153 * \since This function is available since SDL 2.0.0.
1154 */
1155 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
1156
1157 /**
1158 * Make a window as large as possible.
1159 *
1160 * \param window the window to maximize
1161 *
1162 * \since This function is available since SDL 2.0.0.
1163 *
1164 * \sa SDL_MinimizeWindow
1165 * \sa SDL_RestoreWindow
1166 */
1167 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
1168
1169 /**
1170 * Minimize a window to an iconic representation.
1171 *
1172 * \param window the window to minimize
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_MaximizeWindow
1177 * \sa SDL_RestoreWindow
1178 */
1179 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
1180
1181 /**
1182 * Restore the size and position of a minimized or maximized window.
1183 *
1184 * \param window the window to restore
1185 *
1186 * \since This function is available since SDL 2.0.0.
1187 *
1188 * \sa SDL_MaximizeWindow
1189 * \sa SDL_MinimizeWindow
1190 */
1191 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
1192
1193 /**
1194 * Set a window's fullscreen state.
1195 *
1196 * `flags` may be `SDL_WINDOW_FULLSCREEN`, for "real" fullscreen with a
1197 * videomode change; `SDL_WINDOW_FULLSCREEN_DESKTOP` for "fake" fullscreen
1198 * that takes the size of the desktop; and 0 for windowed mode.
1199 *
1200 * \param window the window to change
1201 * \param flags `SDL_WINDOW_FULLSCREEN`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
1202 * \returns 0 on success or a negative error code on failure; call
1203 * SDL_GetError() for more information.
1204 *
1205 * \since This function is available since SDL 2.0.0.
1206 *
1207 * \sa SDL_GetWindowDisplayMode
1208 * \sa SDL_SetWindowDisplayMode
1209 */
1210 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
1211 Uint32 flags);
1212
1213 /**
1214 * Get the SDL surface associated with the window.
1215 *
1216 * A new surface will be created with the optimal format for the window, if
1217 * necessary. This surface will be freed when the window is destroyed. Do not
1218 * free this surface.
1219 *
1220 * This surface will be invalidated if the window is resized. After resizing a
1221 * window this function must be called again to return a valid surface.
1222 *
1223 * You may not combine this with 3D or the rendering API on this window.
1224 *
1225 * This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.
1226 *
1227 * \param window the window to query
1228 * \returns the surface associated with the window, or NULL on failure; call
1229 * SDL_GetError() for more information.
1230 *
1231 * \since This function is available since SDL 2.0.0.
1232 *
1233 * \sa SDL_UpdateWindowSurface
1234 * \sa SDL_UpdateWindowSurfaceRects
1235 */
1236 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
1237
1238 /**
1239 * Copy the window surface to the screen.
1240 *
1241 * This is the function you use to reflect any changes to the surface on the
1242 * screen.
1243 *
1244 * This function is equivalent to the SDL 1.2 API SDL_Flip().
1245 *
1246 * \param window the window to update
1247 * \returns 0 on success or a negative error code on failure; call
1248 * SDL_GetError() for more information.
1249 *
1250 * \since This function is available since SDL 2.0.0.
1251 *
1252 * \sa SDL_GetWindowSurface
1253 * \sa SDL_UpdateWindowSurfaceRects
1254 */
1255 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
1256
1257 /**
1258 * Copy areas of the window surface to the screen.
1259 *
1260 * This is the function you use to reflect changes to portions of the surface
1261 * on the screen.
1262 *
1263 * This function is equivalent to the SDL 1.2 API SDL_UpdateRects().
1264 *
1265 * \param window the window to update
1266 * \param rects an array of SDL_Rect structures representing areas of the
1267 * surface to copy
1268 * \param numrects the number of rectangles
1269 * \returns 0 on success or a negative error code on failure; call
1270 * SDL_GetError() for more information.
1271 *
1272 * \since This function is available since SDL 2.0.0.
1273 *
1274 * \sa SDL_GetWindowSurface
1275 * \sa SDL_UpdateWindowSurface
1276 */
1277 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
1278 const SDL_Rect * rects,
1279 int numrects);
1280
1281 /**
1282 * Set a window's input grab mode.
1283 *
1284 * When input is grabbed, the mouse is confined to the window. This function
1285 * will also grab the keyboard if `SDL_HINT_GRAB_KEYBOARD` is set. To grab the
1286 * keyboard without also grabbing the mouse, use SDL_SetWindowKeyboardGrab().
1287 *
1288 * If the caller enables a grab while another window is currently grabbed, the
1289 * other window loses its grab in favor of the caller's window.
1290 *
1291 * \param window the window for which the input grab mode should be set
1292 * \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input
1293 *
1294 * \since This function is available since SDL 2.0.0.
1295 *
1296 * \sa SDL_GetGrabbedWindow
1297 * \sa SDL_GetWindowGrab
1298 */
1299 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
1300 SDL_bool grabbed);
1301
1302 /**
1303 * Set a window's keyboard grab mode.
1304 *
1305 * Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or
1306 * the Meta/Super key. Note that not all system keyboard shortcuts can be
1307 * captured by applications (one example is Ctrl+Alt+Del on Windows).
1308 *
1309 * This is primarily intended for specialized applications such as VNC clients
1310 * or VM frontends. Normal games should not use keyboard grab.
1311 *
1312 * When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the
1313 * window is full-screen to ensure the user is not trapped in your
1314 * application. If you have a custom keyboard shortcut to exit fullscreen
1315 * mode, you may suppress this behavior with
1316 * `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.
1317 *
1318 * If the caller enables a grab while another window is currently grabbed, the
1319 * other window loses its grab in favor of the caller's window.
1320 *
1321 * \param window The window for which the keyboard grab mode should be set.
1322 * \param grabbed This is SDL_TRUE to grab keyboard, and SDL_FALSE to release.
1323 *
1324 * \since This function is available since SDL 2.0.16.
1325 *
1326 * \sa SDL_GetWindowKeyboardGrab
1327 * \sa SDL_SetWindowMouseGrab
1328 * \sa SDL_SetWindowGrab
1329 */
1330 extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
1331 SDL_bool grabbed);
1332
1333 /**
1334 * Set a window's mouse grab mode.
1335 *
1336 * Mouse grab confines the mouse cursor to the window.
1337 *
1338 * \param window The window for which the mouse grab mode should be set.
1339 * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
1340 *
1341 * \since This function is available since SDL 2.0.16.
1342 *
1343 * \sa SDL_GetWindowMouseGrab
1344 * \sa SDL_SetWindowKeyboardGrab
1345 * \sa SDL_SetWindowGrab
1346 */
1347 extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
1348 SDL_bool grabbed);
1349
1350 /**
1351 * Get a window's input grab mode.
1352 *
1353 * \param window the window to query
1354 * \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise.
1355 *
1356 * \since This function is available since SDL 2.0.0.
1357 *
1358 * \sa SDL_SetWindowGrab
1359 */
1360 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
1361
1362 /**
1363 * Get a window's keyboard grab mode.
1364 *
1365 * \param window the window to query
1366 * \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise.
1367 *
1368 * \since This function is available since SDL 2.0.16.
1369 *
1370 * \sa SDL_SetWindowKeyboardGrab
1371 * \sa SDL_GetWindowGrab
1372 */
1373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
1374
1375 /**
1376 * Get a window's mouse grab mode.
1377 *
1378 * \param window the window to query
1379 * \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.
1380 *
1381 * \since This function is available since SDL 2.0.16.
1382 *
1383 * \sa SDL_SetWindowKeyboardGrab
1384 * \sa SDL_GetWindowGrab
1385 */
1386 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window);
1387
1388 /**
1389 * Get the window that currently has an input grab enabled.
1390 *
1391 * \returns the window if input is grabbed or NULL otherwise.
1392 *
1393 * \since This function is available since SDL 2.0.4.
1394 *
1395 * \sa SDL_GetWindowGrab
1396 * \sa SDL_SetWindowGrab
1397 */
1398 extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
1399
1400 /**
1401 * Confines the cursor to the specified area of a window.
1402 *
1403 * Note that this does NOT grab the cursor, it only defines the area a cursor
1404 * is restricted to when the window has mouse focus.
1405 *
1406 * \param window The window that will be associated with the barrier.
1407 * \param rect A rectangle area in window-relative coordinates. If NULL the
1408 * barrier for the specified window will be destroyed.
1409 * \returns 0 on success or a negative error code on failure; call
1410 * SDL_GetError() for more information.
1411 *
1412 * \since This function is available since SDL 2.0.18.
1413 *
1414 * \sa SDL_GetWindowMouseRect
1415 * \sa SDL_SetWindowMouseGrab
1416 */
1417 extern DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect);
1418
1419 /**
1420 * Get the mouse confinement rectangle of a window.
1421 *
1422 * \param window The window to query
1423 * \returns A pointer to the mouse confinement rectangle of a window, or NULL
1424 * if there isn't one.
1425 *
1426 * \since This function is available since SDL 2.0.18.
1427 *
1428 * \sa SDL_SetWindowMouseRect
1429 */
1430 extern DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * window);
1431
1432 /**
1433 * Set the brightness (gamma multiplier) for a given window's display.
1434 *
1435 * Despite the name and signature, this method sets the brightness of the
1436 * entire display, not an individual window. A window is considered to be
1437 * owned by the display that contains the window's center pixel. (The index of
1438 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The
1439 * brightness set will not follow the window if it is moved to another
1440 * display.
1441 *
1442 * Many platforms will refuse to set the display brightness in modern times.
1443 * You are better off using a shader to adjust gamma during rendering, or
1444 * something similar.
1445 *
1446 * \param window the window used to select the display whose brightness will
1447 * be changed
1448 * \param brightness the brightness (gamma multiplier) value to set where 0.0
1449 * is completely dark and 1.0 is normal brightness
1450 * \returns 0 on success or a negative error code on failure; call
1451 * SDL_GetError() for more information.
1452 *
1453 * \since This function is available since SDL 2.0.0.
1454 *
1455 * \sa SDL_GetWindowBrightness
1456 * \sa SDL_SetWindowGammaRamp
1457 */
1458 extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
1459
1460 /**
1461 * Get the brightness (gamma multiplier) for a given window's display.
1462 *
1463 * Despite the name and signature, this method retrieves the brightness of the
1464 * entire display, not an individual window. A window is considered to be
1465 * owned by the display that contains the window's center pixel. (The index of
1466 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1467 *
1468 * \param window the window used to select the display whose brightness will
1469 * be queried
1470 * \returns the brightness for the display where 0.0 is completely dark and
1471 * 1.0 is normal brightness.
1472 *
1473 * \since This function is available since SDL 2.0.0.
1474 *
1475 * \sa SDL_SetWindowBrightness
1476 */
1477 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
1478
1479 /**
1480 * Set the opacity for a window.
1481 *
1482 * The parameter `opacity` will be clamped internally between 0.0f
1483 * (transparent) and 1.0f (opaque).
1484 *
1485 * This function also returns -1 if setting the opacity isn't supported.
1486 *
1487 * \param window the window which will be made transparent or opaque
1488 * \param opacity the opacity value (0.0f - transparent, 1.0f - opaque)
1489 * \returns 0 on success or a negative error code on failure; call
1490 * SDL_GetError() for more information.
1491 *
1492 * \since This function is available since SDL 2.0.5.
1493 *
1494 * \sa SDL_GetWindowOpacity
1495 */
1496 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
1497
1498 /**
1499 * Get the opacity of a window.
1500 *
1501 * If transparency isn't supported on this platform, opacity will be reported
1502 * as 1.0f without error.
1503 *
1504 * The parameter `opacity` is ignored if it is NULL.
1505 *
1506 * This function also returns -1 if an invalid window was provided.
1507 *
1508 * \param window the window to get the current opacity value from
1509 * \param out_opacity the float filled in (0.0f - transparent, 1.0f - opaque)
1510 * \returns 0 on success or a negative error code on failure; call
1511 * SDL_GetError() for more information.
1512 *
1513 * \since This function is available since SDL 2.0.5.
1514 *
1515 * \sa SDL_SetWindowOpacity
1516 */
1517 extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
1518
1519 /**
1520 * Set the window as a modal for another window.
1521 *
1522 * \param modal_window the window that should be set modal
1523 * \param parent_window the parent window for the modal window
1524 * \returns 0 on success or a negative error code on failure; call
1525 * SDL_GetError() for more information.
1526 *
1527 * \since This function is available since SDL 2.0.5.
1528 */
1529 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
1530
1531 /**
1532 * Explicitly set input focus to the window.
1533 *
1534 * You almost certainly want SDL_RaiseWindow() instead of this function. Use
1535 * this with caution, as you might give focus to a window that is completely
1536 * obscured by other windows.
1537 *
1538 * \param window the window that should get the input focus
1539 * \returns 0 on success or a negative error code on failure; call
1540 * SDL_GetError() for more information.
1541 *
1542 * \since This function is available since SDL 2.0.5.
1543 *
1544 * \sa SDL_RaiseWindow
1545 */
1546 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
1547
1548 /**
1549 * Set the gamma ramp for the display that owns a given window.
1550 *
1551 * Set the gamma translation table for the red, green, and blue channels of
1552 * the video hardware. Each table is an array of 256 16-bit quantities,
1553 * representing a mapping between the input and output for that channel. The
1554 * input is the index into the array, and the output is the 16-bit gamma value
1555 * at that index, scaled to the output color precision.
1556 *
1557 * Despite the name and signature, this method sets the gamma ramp of the
1558 * entire display, not an individual window. A window is considered to be
1559 * owned by the display that contains the window's center pixel. (The index of
1560 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The gamma
1561 * ramp set will not follow the window if it is moved to another display.
1562 *
1563 * \param window the window used to select the display whose gamma ramp will
1564 * be changed
1565 * \param red a 256 element array of 16-bit quantities representing the
1566 * translation table for the red channel, or NULL
1567 * \param green a 256 element array of 16-bit quantities representing the
1568 * translation table for the green channel, or NULL
1569 * \param blue a 256 element array of 16-bit quantities representing the
1570 * translation table for the blue channel, or NULL
1571 * \returns 0 on success or a negative error code on failure; call
1572 * SDL_GetError() for more information.
1573 *
1574 * \since This function is available since SDL 2.0.0.
1575 *
1576 * \sa SDL_GetWindowGammaRamp
1577 */
1578 extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
1579 const Uint16 * red,
1580 const Uint16 * green,
1581 const Uint16 * blue);
1582
1583 /**
1584 * Get the gamma ramp for a given window's display.
1585 *
1586 * Despite the name and signature, this method retrieves the gamma ramp of the
1587 * entire display, not an individual window. A window is considered to be
1588 * owned by the display that contains the window's center pixel. (The index of
1589 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1590 *
1591 * \param window the window used to select the display whose gamma ramp will
1592 * be queried
1593 * \param red a 256 element array of 16-bit quantities filled in with the
1594 * translation table for the red channel, or NULL
1595 * \param green a 256 element array of 16-bit quantities filled in with the
1596 * translation table for the green channel, or NULL
1597 * \param blue a 256 element array of 16-bit quantities filled in with the
1598 * translation table for the blue channel, or NULL
1599 * \returns 0 on success or a negative error code on failure; call
1600 * SDL_GetError() for more information.
1601 *
1602 * \since This function is available since SDL 2.0.0.
1603 *
1604 * \sa SDL_SetWindowGammaRamp
1605 */
1606 extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
1607 Uint16 * red,
1608 Uint16 * green,
1609 Uint16 * blue);
1610
1611 /**
1612 * Possible return values from the SDL_HitTest callback.
1613 *
1614 * \sa SDL_HitTest
1615 */
1616 typedef enum
1617 {
1618 SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
1619 SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
1620 SDL_HITTEST_RESIZE_TOPLEFT,
1621 SDL_HITTEST_RESIZE_TOP,
1622 SDL_HITTEST_RESIZE_TOPRIGHT,
1623 SDL_HITTEST_RESIZE_RIGHT,
1624 SDL_HITTEST_RESIZE_BOTTOMRIGHT,
1625 SDL_HITTEST_RESIZE_BOTTOM,
1626 SDL_HITTEST_RESIZE_BOTTOMLEFT,
1627 SDL_HITTEST_RESIZE_LEFT
1628 } SDL_HitTestResult;
1629
1630 /**
1631 * Callback used for hit-testing.
1632 *
1633 * \param win the SDL_Window where hit-testing was set on
1634 * \param area an SDL_Point which should be hit-tested
1635 * \param data what was passed as `callback_data` to SDL_SetWindowHitTest()
1636 * \return an SDL_HitTestResult value.
1637 *
1638 * \sa SDL_SetWindowHitTest
1639 */
1640 typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
1641 const SDL_Point *area,
1642 void *data);
1643
1644 /**
1645 * Provide a callback that decides if a window region has special properties.
1646 *
1647 * Normally windows are dragged and resized by decorations provided by the
1648 * system window manager (a title bar, borders, etc), but for some apps, it
1649 * makes sense to drag them from somewhere else inside the window itself; for
1650 * example, one might have a borderless window that wants to be draggable from
1651 * any part, or simulate its own title bar, etc.
1652 *
1653 * This function lets the app provide a callback that designates pieces of a
1654 * given window as special. This callback is run during event processing if we
1655 * need to tell the OS to treat a region of the window specially; the use of
1656 * this callback is known as "hit testing."
1657 *
1658 * Mouse input may not be delivered to your application if it is within a
1659 * special area; the OS will often apply that input to moving the window or
1660 * resizing the window and not deliver it to the application.
1661 *
1662 * Specifying NULL for a callback disables hit-testing. Hit-testing is
1663 * disabled by default.
1664 *
1665 * Platforms that don't support this functionality will return -1
1666 * unconditionally, even if you're attempting to disable hit-testing.
1667 *
1668 * Your callback may fire at any time, and its firing does not indicate any
1669 * specific behavior (for example, on Windows, this certainly might fire when
1670 * the OS is deciding whether to drag your window, but it fires for lots of
1671 * other reasons, too, some unrelated to anything you probably care about _and
1672 * when the mouse isn't actually at the location it is testing_). Since this
1673 * can fire at any time, you should try to keep your callback efficient,
1674 * devoid of allocations, etc.
1675 *
1676 * \param window the window to set hit-testing on
1677 * \param callback the function to call when doing a hit-test
1678 * \param callback_data an app-defined void pointer passed to **callback**
1679 * \returns 0 on success or -1 on error (including unsupported); call
1680 * SDL_GetError() for more information.
1681 *
1682 * \since This function is available since SDL 2.0.4.
1683 */
1684 extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
1685 SDL_HitTest callback,
1686 void *callback_data);
1687
1688 /**
1689 * Request a window to demand attention from the user.
1690 *
1691 * \param window the window to be flashed
1692 * \param operation the flash operation
1693 * \returns 0 on success or a negative error code on failure; call
1694 * SDL_GetError() for more information.
1695 *
1696 * \since This function is available since SDL 2.0.16.
1697 */
1698 extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
1699
1700 /**
1701 * Destroy a window.
1702 *
1703 * If `window` is NULL, this function will return immediately after setting
1704 * the SDL error message to "Invalid window". See SDL_GetError().
1705 *
1706 * \param window the window to destroy
1707 *
1708 * \since This function is available since SDL 2.0.0.
1709 *
1710 * \sa SDL_CreateWindow
1711 * \sa SDL_CreateWindowFrom
1712 */
1713 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1714
1715
1716 /**
1717 * Check whether the screensaver is currently enabled.
1718 *
1719 * The screensaver is disabled by default since SDL 2.0.2. Before SDL 2.0.2
1720 * the screensaver was enabled by default.
1721 *
1722 * The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.
1723 *
1724 * \returns SDL_TRUE if the screensaver is enabled, SDL_FALSE if it is
1725 * disabled.
1726 *
1727 * \since This function is available since SDL 2.0.0.
1728 *
1729 * \sa SDL_DisableScreenSaver
1730 * \sa SDL_EnableScreenSaver
1731 */
1732 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
1733
1734 /**
1735 * Allow the screen to be blanked by a screen saver.
1736 *
1737 * \since This function is available since SDL 2.0.0.
1738 *
1739 * \sa SDL_DisableScreenSaver
1740 * \sa SDL_IsScreenSaverEnabled
1741 */
1742 extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
1743
1744 /**
1745 * Prevent the screen from being blanked by a screen saver.
1746 *
1747 * If you disable the screensaver, it is automatically re-enabled when SDL
1748 * quits.
1749 *
1750 * \since This function is available since SDL 2.0.0.
1751 *
1752 * \sa SDL_EnableScreenSaver
1753 * \sa SDL_IsScreenSaverEnabled
1754 */
1755 extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
1756
1757
1758 /**
1759 * \name OpenGL support functions
1760 */
1761 /* @{ */
1762
1763 /**
1764 * Dynamically load an OpenGL library.
1765 *
1766 * This should be done after initializing the video driver, but before
1767 * creating any OpenGL windows. If no OpenGL library is loaded, the default
1768 * library will be loaded upon creation of the first OpenGL window.
1769 *
1770 * If you do this, you need to retrieve all of the GL functions used in your
1771 * program from the dynamic library using SDL_GL_GetProcAddress().
1772 *
1773 * \param path the platform dependent OpenGL library name, or NULL to open the
1774 * default OpenGL library
1775 * \returns 0 on success or a negative error code on failure; call
1776 * SDL_GetError() for more information.
1777 *
1778 * \since This function is available since SDL 2.0.0.
1779 *
1780 * \sa SDL_GL_GetProcAddress
1781 * \sa SDL_GL_UnloadLibrary
1782 */
1783 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
1784
1785 /**
1786 * Get an OpenGL function by name.
1787 *
1788 * If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all
1789 * GL functions must be retrieved this way. Usually this is used to retrieve
1790 * function pointers to OpenGL extensions.
1791 *
1792 * There are some quirks to looking up OpenGL functions that require some
1793 * extra care from the application. If you code carefully, you can handle
1794 * these quirks without any platform-specific code, though:
1795 *
1796 * - On Windows, function pointers are specific to the current GL context;
1797 * this means you need to have created a GL context and made it current
1798 * before calling SDL_GL_GetProcAddress(). If you recreate your context or
1799 * create a second context, you should assume that any existing function
1800 * pointers aren't valid to use with it. This is (currently) a
1801 * Windows-specific limitation, and in practice lots of drivers don't suffer
1802 * this limitation, but it is still the way the wgl API is documented to
1803 * work and you should expect crashes if you don't respect it. Store a copy
1804 * of the function pointers that comes and goes with context lifespan.
1805 * - On X11, function pointers returned by this function are valid for any
1806 * context, and can even be looked up before a context is created at all.
1807 * This means that, for at least some common OpenGL implementations, if you
1808 * look up a function that doesn't exist, you'll get a non-NULL result that
1809 * is _NOT_ safe to call. You must always make sure the function is actually
1810 * available for a given GL context before calling it, by checking for the
1811 * existence of the appropriate extension with SDL_GL_ExtensionSupported(),
1812 * or verifying that the version of OpenGL you're using offers the function
1813 * as core functionality.
1814 * - Some OpenGL drivers, on all platforms, *will* return NULL if a function
1815 * isn't supported, but you can't count on this behavior. Check for
1816 * extensions you use, and if you get a NULL anyway, act as if that
1817 * extension wasn't available. This is probably a bug in the driver, but you
1818 * can code defensively for this scenario anyhow.
1819 * - Just because you're on Linux/Unix, don't assume you'll be using X11.
1820 * Next-gen display servers are waiting to replace it, and may or may not
1821 * make the same promises about function pointers.
1822 * - OpenGL function pointers must be declared `APIENTRY` as in the example
1823 * code. This will ensure the proper calling convention is followed on
1824 * platforms where this matters (Win32) thereby avoiding stack corruption.
1825 *
1826 * \param proc the name of an OpenGL function
1827 * \returns a pointer to the named OpenGL function. The returned pointer
1828 * should be cast to the appropriate function signature.
1829 *
1830 * \since This function is available since SDL 2.0.0.
1831 *
1832 * \sa SDL_GL_ExtensionSupported
1833 * \sa SDL_GL_LoadLibrary
1834 * \sa SDL_GL_UnloadLibrary
1835 */
1836 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
1837
1838 /**
1839 * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
1840 *
1841 * \since This function is available since SDL 2.0.0.
1842 *
1843 * \sa SDL_GL_LoadLibrary
1844 */
1845 extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
1846
1847 /**
1848 * Check if an OpenGL extension is supported for the current context.
1849 *
1850 * This function operates on the current GL context; you must have created a
1851 * context and it must be current before calling this function. Do not assume
1852 * that all contexts you create will have the same set of extensions
1853 * available, or that recreating an existing context will offer the same
1854 * extensions again.
1855 *
1856 * While it's probably not a massive overhead, this function is not an O(1)
1857 * operation. Check the extensions you care about after creating the GL
1858 * context and save that information somewhere instead of calling the function
1859 * every time you need to know.
1860 *
1861 * \param extension the name of the extension to check
1862 * \returns SDL_TRUE if the extension is supported, SDL_FALSE otherwise.
1863 *
1864 * \since This function is available since SDL 2.0.0.
1865 */
1866 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
1867 *extension);
1868
1869 /**
1870 * Reset all previously set OpenGL context attributes to their default values.
1871 *
1872 * \since This function is available since SDL 2.0.2.
1873 *
1874 * \sa SDL_GL_GetAttribute
1875 * \sa SDL_GL_SetAttribute
1876 */
1877 extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
1878
1879 /**
1880 * Set an OpenGL window attribute before window creation.
1881 *
1882 * This function sets the OpenGL attribute `attr` to `value`. The requested
1883 * attributes should be set before creating an OpenGL window. You should use
1884 * SDL_GL_GetAttribute() to check the values after creating the OpenGL
1885 * context, since the values obtained can differ from the requested ones.
1886 *
1887 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to set
1888 * \param value the desired value for the attribute
1889 * \returns 0 on success or a negative error code on failure; call
1890 * SDL_GetError() for more information.
1891 *
1892 * \since This function is available since SDL 2.0.0.
1893 *
1894 * \sa SDL_GL_GetAttribute
1895 * \sa SDL_GL_ResetAttributes
1896 */
1897 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
1898
1899 /**
1900 * Get the actual value for an attribute from the current context.
1901 *
1902 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to get
1903 * \param value a pointer filled in with the current value of `attr`
1904 * \returns 0 on success or a negative error code on failure; call
1905 * SDL_GetError() for more information.
1906 *
1907 * \since This function is available since SDL 2.0.0.
1908 *
1909 * \sa SDL_GL_ResetAttributes
1910 * \sa SDL_GL_SetAttribute
1911 */
1912 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1913
1914 /**
1915 * Create an OpenGL context for an OpenGL window, and make it current.
1916 *
1917 * Windows users new to OpenGL should note that, for historical reasons, GL
1918 * functions added after OpenGL version 1.1 are not available by default.
1919 * Those functions must be loaded at run-time, either with an OpenGL
1920 * extension-handling library or with SDL_GL_GetProcAddress() and its related
1921 * functions.
1922 *
1923 * SDL_GLContext is an alias for `void *`. It's opaque to the application.
1924 *
1925 * \param window the window to associate with the context
1926 * \returns the OpenGL context associated with `window` or NULL on error; call
1927 * SDL_GetError() for more details.
1928 *
1929 * \since This function is available since SDL 2.0.0.
1930 *
1931 * \sa SDL_GL_DeleteContext
1932 * \sa SDL_GL_MakeCurrent
1933 */
1934 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
1935 window);
1936
1937 /**
1938 * Set up an OpenGL context for rendering into an OpenGL window.
1939 *
1940 * The context must have been created with a compatible window.
1941 *
1942 * \param window the window to associate with the context
1943 * \param context the OpenGL context to associate with the window
1944 * \returns 0 on success or a negative error code on failure; call
1945 * SDL_GetError() for more information.
1946 *
1947 * \since This function is available since SDL 2.0.0.
1948 *
1949 * \sa SDL_GL_CreateContext
1950 */
1951 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
1952 SDL_GLContext context);
1953
1954 /**
1955 * Get the currently active OpenGL window.
1956 *
1957 * \returns the currently active OpenGL window on success or NULL on failure;
1958 * call SDL_GetError() for more information.
1959 *
1960 * \since This function is available since SDL 2.0.0.
1961 */
1962 extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
1963
1964 /**
1965 * Get the currently active OpenGL context.
1966 *
1967 * \returns the currently active OpenGL context or NULL on failure; call
1968 * SDL_GetError() for more information.
1969 *
1970 * \since This function is available since SDL 2.0.0.
1971 *
1972 * \sa SDL_GL_MakeCurrent
1973 */
1974 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
1975
1976 /**
1977 * Get the size of a window's underlying drawable in pixels.
1978 *
1979 * This returns info useful for calling glViewport().
1980 *
1981 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
1982 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
1983 * platform with high-DPI support (Apple calls this "Retina"), and not
1984 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
1985 *
1986 * \param window the window from which the drawable size should be queried
1987 * \param w a pointer to variable for storing the width in pixels, may be NULL
1988 * \param h a pointer to variable for storing the height in pixels, may be
1989 * NULL
1990 *
1991 * \since This function is available since SDL 2.0.1.
1992 *
1993 * \sa SDL_CreateWindow
1994 * \sa SDL_GetWindowSize
1995 */
1996 extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
1997 int *h);
1998
1999 /**
2000 * Set the swap interval for the current OpenGL context.
2001 *
2002 * Some systems allow specifying -1 for the interval, to enable adaptive
2003 * vsync. Adaptive vsync works the same as vsync, but if you've already missed
2004 * the vertical retrace for a given frame, it swaps buffers immediately, which
2005 * might be less jarring for the user during occasional framerate drops. If an
2006 * application requests adaptive vsync and the system does not support it,
2007 * this function will fail and return -1. In such a case, you should probably
2008 * retry the call with 1 for the interval.
2009 *
2010 * Adaptive vsync is implemented for some glX drivers with
2011 * GLX_EXT_swap_control_tear:
2012 *
2013 * https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt
2014 *
2015 * and for some Windows drivers with WGL_EXT_swap_control_tear:
2016 *
2017 * https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt
2018 *
2019 * Read more on the Khronos wiki:
2020 * https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
2021 *
2022 * \param interval 0 for immediate updates, 1 for updates synchronized with
2023 * the vertical retrace, -1 for adaptive vsync
2024 * \returns 0 on success or -1 if setting the swap interval is not supported;
2025 * call SDL_GetError() for more information.
2026 *
2027 * \since This function is available since SDL 2.0.0.
2028 *
2029 * \sa SDL_GL_GetSwapInterval
2030 */
2031 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
2032
2033 /**
2034 * Get the swap interval for the current OpenGL context.
2035 *
2036 * If the system can't determine the swap interval, or there isn't a valid
2037 * current context, this function will return 0 as a safe default.
2038 *
2039 * \returns 0 if there is no vertical retrace synchronization, 1 if the buffer
2040 * swap is synchronized with the vertical retrace, and -1 if late
2041 * swaps happen immediately instead of waiting for the next retrace;
2042 * call SDL_GetError() for more information.
2043 *
2044 * \since This function is available since SDL 2.0.0.
2045 *
2046 * \sa SDL_GL_SetSwapInterval
2047 */
2048 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
2049
2050 /**
2051 * Update a window with OpenGL rendering.
2052 *
2053 * This is used with double-buffered OpenGL contexts, which are the default.
2054 *
2055 * On macOS, make sure you bind 0 to the draw framebuffer before swapping the
2056 * window, otherwise nothing will happen. If you aren't using
2057 * glBindFramebuffer(), this is the default and you won't have to do anything
2058 * extra.
2059 *
2060 * \param window the window to change
2061 *
2062 * \since This function is available since SDL 2.0.0.
2063 */
2064 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
2065
2066 /**
2067 * Delete an OpenGL context.
2068 *
2069 * \param context the OpenGL context to be deleted
2070 *
2071 * \since This function is available since SDL 2.0.0.
2072 *
2073 * \sa SDL_GL_CreateContext
2074 */
2075 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
2076
2077 /* @} *//* OpenGL support functions */
2078
2079
2080 /* Ends C function definitions when using C++ */
2081 #ifdef __cplusplus
2082 }
2083 #endif
2084 #include <SDL2/close_code.h>
2085
2086 #endif /* SDL_video_h_ */
2087
2088 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 2017, Mark Callow
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_vulkan.h
23 *
24 * Header file for functions to creating Vulkan surfaces on SDL windows.
25 */
26
27 #ifndef SDL_vulkan_h_
28 #define SDL_vulkan_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Avoid including vulkan.h, don't define VkInstance if it's already included */
39 #ifdef VULKAN_H_
40 #define NO_SDL_VULKAN_TYPEDEFS
41 #endif
42 #ifndef NO_SDL_VULKAN_TYPEDEFS
43 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
44
45 #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
46 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
47 #else
48 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
49 #endif
50
51 VK_DEFINE_HANDLE(VkInstance)
52 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
53
54 #endif /* !NO_SDL_VULKAN_TYPEDEFS */
55
56 typedef VkInstance SDL_vulkanInstance;
57 typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
58
59 /**
60 * \name Vulkan support functions
61 *
62 * \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API
63 * is compatable with Tizen's implementation of Vulkan in SDL.
64 */
65 /* @{ */
66
67 /**
68 * Dynamically load the Vulkan loader library.
69 *
70 * This should be called after initializing the video driver, but before
71 * creating any Vulkan windows. If no Vulkan loader library is loaded, the
72 * default library will be loaded upon creation of the first Vulkan window.
73 *
74 * It is fairly common for Vulkan applications to link with libvulkan instead
75 * of explicitly loading it at run time. This will work with SDL provided the
76 * application links to a dynamic library and both it and SDL use the same
77 * search path.
78 *
79 * If you specify a non-NULL `path`, an application should retrieve all of the
80 * Vulkan functions it uses from the dynamic library using
81 * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
82 * to the same vulkan loader library the application linked to.
83 *
84 * On Apple devices, if `path` is NULL, SDL will attempt to find the
85 * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
86 * process. This is because it is fairly common for Vulkan applications to
87 * link with libvulkan (and historically MoltenVK was provided as a static
88 * library). If it is not found, on macOS, SDL will attempt to load
89 * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
90 * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
91 * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
92 * dynamic framework or .dylib must ensure it is included in its application
93 * bundle.
94 *
95 * On non-Apple devices, application linking with a static libvulkan is not
96 * supported. Either do not link to the Vulkan loader or link to a dynamic
97 * library version.
98 *
99 * \param path The platform dependent Vulkan loader library name or NULL
100 * \returns 0 on success or -1 if the library couldn't be loaded; call
101 * SDL_GetError() for more information.
102 *
103 * \since This function is available since SDL 2.0.6.
104 *
105 * \sa SDL_Vulkan_GetVkInstanceProcAddr
106 * \sa SDL_Vulkan_UnloadLibrary
107 */
108 extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
109
110 /**
111 * Get the address of the `vkGetInstanceProcAddr` function.
112 *
113 * This should be called after either calling SDL_Vulkan_LoadLibrary() or
114 * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
115 *
116 * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error.
117 *
118 * \since This function is available since SDL 2.0.6.
119 */
120 extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
121
122 /**
123 * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
124 *
125 * \since This function is available since SDL 2.0.6.
126 *
127 * \sa SDL_Vulkan_LoadLibrary
128 */
129 extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
130
131 /**
132 * Get the names of the Vulkan instance extensions needed to create a surface
133 * with SDL_Vulkan_CreateSurface.
134 *
135 * If `pNames` is NULL, then the number of required Vulkan instance extensions
136 * is returned in `pCount`. Otherwise, `pCount` must point to a variable set
137 * to the number of elements in the `pNames` array, and on return the variable
138 * is overwritten with the number of names actually written to `pNames`. If
139 * `pCount` is less than the number of required extensions, at most `pCount`
140 * structures will be written. If `pCount` is smaller than the number of
141 * required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
142 * indicate that not all the required extensions were returned.
143 *
144 * The `window` parameter is currently needed to be valid as of SDL 2.0.8,
145 * however, this parameter will likely be removed in future releases
146 *
147 * \param window A window for which the required Vulkan instance extensions
148 * should be retrieved (will be deprecated in a future release)
149 * \param pCount A pointer to an unsigned int corresponding to the number of
150 * extensions to be returned
151 * \param pNames NULL or a pointer to an array to be filled with required
152 * Vulkan instance extensions
153 * \returns SDL_TRUE on success, SDL_FALSE on error.
154 *
155 * \since This function is available since SDL 2.0.6.
156 *
157 * \sa SDL_Vulkan_CreateSurface
158 */
159 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
160 unsigned int *pCount,
161 const char **pNames);
162
163 /**
164 * Create a Vulkan rendering surface for a window.
165 *
166 * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
167 * `instance` must have been created with extensions returned by
168 * SDL_Vulkan_GetInstanceExtensions() enabled.
169 *
170 * \param window The window to which to attach the Vulkan surface
171 * \param instance The Vulkan instance handle
172 * \param surface A pointer to a VkSurfaceKHR handle to output the newly
173 * created surface
174 * \returns SDL_TRUE on success, SDL_FALSE on error.
175 *
176 * \since This function is available since SDL 2.0.6.
177 *
178 * \sa SDL_Vulkan_GetInstanceExtensions
179 * \sa SDL_Vulkan_GetDrawableSize
180 */
181 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
182 VkInstance instance,
183 VkSurfaceKHR* surface);
184
185 /**
186 * Get the size of the window's underlying drawable dimensions in pixels.
187 *
188 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
189 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
190 * platform with high-DPI support (Apple calls this "Retina"), and not
191 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
192 *
193 * \param window an SDL_Window for which the size is to be queried
194 * \param w Pointer to the variable to write the width to or NULL
195 * \param h Pointer to the variable to write the height to or NULL
196 *
197 * \since This function is available since SDL 2.0.6.
198 *
199 * \sa SDL_GetWindowSize
200 * \sa SDL_CreateWindow
201 * \sa SDL_Vulkan_CreateSurface
202 */
203 extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
204 int *w, int *h);
205
206 /* @} *//* Vulkan support functions */
207
208 /* Ends C function definitions when using C++ */
209 #ifdef __cplusplus
210 }
211 #endif
212 #include <SDL2/close_code.h>
213
214 #endif /* SDL_vulkan_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file begin_code.h
23 *
24 * This file sets things up for C dynamic library function definitions,
25 * static inlined functions, and structures aligned at 4-byte alignment.
26 * If you don't like ugly C preprocessor code, don't look at this file. :)
27 */
28
29 /* This shouldn't be nested -- included it around code only. */
30 #ifdef _begin_code_h
31 #error Nested inclusion of begin_code.h
32 #endif
33 #define _begin_code_h
34
35 #ifndef SDL_DEPRECATED
36 # if (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
37 # define SDL_DEPRECATED __attribute__((deprecated))
38 # else
39 # define SDL_DEPRECATED
40 # endif
41 #endif
42
43 #ifndef SDL_UNUSED
44 # ifdef __GNUC__
45 # define SDL_UNUSED __attribute__((unused))
46 # else
47 # define SDL_UNUSED
48 # endif
49 #endif
50
51 /* Some compilers use a special export keyword */
52 #ifndef DECLSPEC
53 # if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
54 # ifdef DLL_EXPORT
55 # define DECLSPEC __declspec(dllexport)
56 # else
57 # define DECLSPEC
58 # endif
59 # elif defined(__OS2__)
60 # ifdef BUILD_SDL
61 # define DECLSPEC __declspec(dllexport)
62 # else
63 # define DECLSPEC
64 # endif
65 # else
66 # if defined(__GNUC__) && __GNUC__ >= 4
67 # define DECLSPEC __attribute__ ((visibility("default")))
68 # else
69 # define DECLSPEC
70 # endif
71 # endif
72 #endif
73
74 /* By default SDL uses the C calling convention */
75 #ifndef SDLCALL
76 #if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
77 #define SDLCALL __cdecl
78 #elif defined(__OS2__) || defined(__EMX__)
79 #define SDLCALL _System
80 # if defined (__GNUC__) && !defined(_System)
81 # define _System /* for old EMX/GCC compat. */
82 # endif
83 #else
84 #define SDLCALL
85 #endif
86 #endif /* SDLCALL */
87
88 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
89 #ifdef __SYMBIAN32__
90 #undef DECLSPEC
91 #define DECLSPEC
92 #endif /* __SYMBIAN32__ */
93
94 /* Force structure packing at 4 byte alignment.
95 This is necessary if the header is included in code which has structure
96 packing set to an alternate value, say for loading structures from disk.
97 The packing is reset to the previous value in close_code.h
98 */
99 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
100 #ifdef _MSC_VER
101 #pragma warning(disable: 4103)
102 #endif
103 #ifdef __clang__
104 #pragma clang diagnostic ignored "-Wpragma-pack"
105 #endif
106 #ifdef __BORLANDC__
107 #pragma nopackwarning
108 #endif
109 #ifdef _WIN64
110 /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
111 #pragma pack(push,8)
112 #else
113 #pragma pack(push,4)
114 #endif
115 #endif /* Compiler needs structure packing set */
116
117 #ifndef SDL_INLINE
118 #if defined(__GNUC__)
119 #define SDL_INLINE __inline__
120 #elif defined(_MSC_VER) || defined(__BORLANDC__) || \
121 defined(__DMC__) || defined(__SC__) || \
122 defined(__WATCOMC__) || defined(__LCC__) || \
123 defined(__DECC) || defined(__CC_ARM)
124 #define SDL_INLINE __inline
125 #ifndef __inline__
126 #define __inline__ __inline
127 #endif
128 #else
129 #define SDL_INLINE inline
130 #ifndef __inline__
131 #define __inline__ inline
132 #endif
133 #endif
134 #endif /* SDL_INLINE not defined */
135
136 #ifndef SDL_FORCE_INLINE
137 #if defined(_MSC_VER)
138 #define SDL_FORCE_INLINE __forceinline
139 #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
140 #define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
141 #else
142 #define SDL_FORCE_INLINE static SDL_INLINE
143 #endif
144 #endif /* SDL_FORCE_INLINE not defined */
145
146 #ifndef SDL_NORETURN
147 #if defined(__GNUC__)
148 #define SDL_NORETURN __attribute__((noreturn))
149 #elif defined(_MSC_VER)
150 #define SDL_NORETURN __declspec(noreturn)
151 #else
152 #define SDL_NORETURN
153 #endif
154 #endif /* SDL_NORETURN not defined */
155
156 /* Apparently this is needed by several Windows compilers */
157 #if !defined(__MACH__)
158 #ifndef NULL
159 #ifdef __cplusplus
160 #define NULL 0
161 #else
162 #define NULL ((void *)0)
163 #endif
164 #endif /* NULL */
165 #endif /* ! Mac OS X - breaks precompiled headers */
166
167 #ifndef SDL_FALLTHROUGH
168 #if (defined(__cplusplus) && __cplusplus >= 201703L) || \
169 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
170 #define SDL_FALLTHROUGH [[fallthrough]]
171 #else
172 #if defined(__has_attribute)
173 #define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
174 #else
175 #define _HAS_FALLTHROUGH 0
176 #endif /* __has_attribute */
177 #if _HAS_FALLTHROUGH && \
178 ((defined(__GNUC__) && __GNUC__ >= 7) || \
179 (defined(__clang_major__) && __clang_major__ >= 10))
180 #define SDL_FALLTHROUGH __attribute__((__fallthrough__))
181 #else
182 #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
183 #endif /* _HAS_FALLTHROUGH */
184 #undef _HAS_FALLTHROUGH
185 #endif /* C++17 or C2x */
186 #endif /* SDL_FALLTHROUGH not defined */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file close_code.h
23 *
24 * This file reverses the effects of begin_code.h and should be included
25 * after you finish any function and structure declarations in your headers
26 */
27
28 #ifndef _begin_code_h
29 #error close_code.h included without matching begin_code.h
30 #endif
31 #undef _begin_code_h
32
33 /* Reset structure packing at previous byte alignment */
34 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
35 #ifdef __BORLANDC__
36 #pragma nopackwarning
37 #endif
38 #pragma pack(pop)
39 #endif /* Compiler needs structure packing set */
0 <?xml version="1.0" encoding="UTF-8"?>
1 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2 <plist version="1.0">
3 <dict>
4 <key>BuildMachineOSBuild</key>
5 <string>21E258</string>
6 <key>CFBundleDevelopmentRegion</key>
7 <string>English</string>
8 <key>CFBundleExecutable</key>
9 <string>SDL2</string>
10 <key>CFBundleGetInfoString</key>
11 <string>http://www.libsdl.org</string>
12 <key>CFBundleIdentifier</key>
13 <string>org.libsdl.SDL2</string>
14 <key>CFBundleInfoDictionaryVersion</key>
15 <string>6.0</string>
16 <key>CFBundleName</key>
17 <string>Simple DirectMedia Layer</string>
18 <key>CFBundlePackageType</key>
19 <string>FMWK</string>
20 <key>CFBundleShortVersionString</key>
21 <string>2.0.22</string>
22 <key>CFBundleSignature</key>
23 <string>SDLX</string>
24 <key>CFBundleSupportedPlatforms</key>
25 <array>
26 <string>MacOSX</string>
27 </array>
28 <key>CFBundleVersion</key>
29 <string>2.0.22</string>
30 <key>DTCompiler</key>
31 <string>com.apple.compilers.llvm.clang.1_0</string>
32 <key>DTPlatformBuild</key>
33 <string>13E500a</string>
34 <key>DTPlatformName</key>
35 <string>macosx</string>
36 <key>DTPlatformVersion</key>
37 <string>12.3</string>
38 <key>DTSDKBuild</key>
39 <string>21E226</string>
40 <key>DTSDKName</key>
41 <string>macosx12.3</string>
42 <key>DTXcode</key>
43 <string>1331</string>
44 <key>DTXcodeBuild</key>
45 <string>13E500a</string>
46 <key>LSMinimumSystemVersion</key>
47 <string>10.6</string>
48 </dict>
49 </plist>
0
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
0 The Simple DirectMedia Layer (SDL for short) is a cross-platform
1 library designed to make it easy to write multi-media software,
2 such as games and emulators.
3
4 The Simple DirectMedia Layer library source code is available from:
5 http://www.libsdl.org/
6
7 This library is distributed under the terms of the zlib license:
8 http://zlib.net/zlib_license.html
9
10
11 This packages contains the SDL framework for OS X.
12 Conforming with Apple guidelines, this framework
13 contains both the SDL runtime component and development header files.
14
15
16 To Install:
17 Copy the SDL2.framework to /Library/Frameworks
18
19 You may alternatively install it in <Your home directory>/Library/Frameworks
20 if your access privileges are not high enough.
21
22
23 Additional References:
24
25 - Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are
26 available at:
27 http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
28 Though these are OpenSceneGraph centric, the same exact concepts apply to
29 SDL, thus the videos are recommended for everybody getting started with
30 developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
31 doesn't have any PlugIns to worry about.)
0 <?xml version="1.0" encoding="UTF-8"?>
1 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2 <plist version="1.0">
3 <dict>
4 <key>files</key>
5 <dict>
6 <key>Resources/Info.plist</key>
7 <data>
8 OxWHBbdJFecUEehMjei2Rc0U5Fs=
9 </data>
10 <key>Resources/License.txt</key>
11 <data>
12 VoVWJNSXNFkj10nxdQKhgCnXJjE=
13 </data>
14 <key>Resources/ReadMe.txt</key>
15 <data>
16 JbxWZUxpvG/D7Yb/DvLh6Aunla0=
17 </data>
18 <key>Resources/default.metallib</key>
19 <data>
20 50m0avYLiIBc6a4gWqXN3tnFlpU=
21 </data>
22 </dict>
23 <key>files2</key>
24 <dict>
25 <key>Headers/SDL.h</key>
26 <dict>
27 <key>hash</key>
28 <data>
29 ivQTJoPsJpEaBYqB5MhVDoWXG7k=
30 </data>
31 <key>hash2</key>
32 <data>
33 RGmVeRj5DRrFUa5MXdmNFkBjgQ36aeQry/lA1BPouVw=
34 </data>
35 </dict>
36 <key>Headers/SDL_assert.h</key>
37 <dict>
38 <key>hash</key>
39 <data>
40 jivoIZ5yW7MgO2v6F+1YvGOJWR8=
41 </data>
42 <key>hash2</key>
43 <data>
44 yMKv6HVRTXC2W7l452UuXgdW+M+vibiq4LQ2aCdnqwY=
45 </data>
46 </dict>
47 <key>Headers/SDL_atomic.h</key>
48 <dict>
49 <key>hash</key>
50 <data>
51 rOcZ6HNCHAmsNs8YUDZhXHsr5ZY=
52 </data>
53 <key>hash2</key>
54 <data>
55 1HDtzTX/jmfZ9ot8/D5HCsWy4IZ1uDldT+9Dzmj9s/0=
56 </data>
57 </dict>
58 <key>Headers/SDL_audio.h</key>
59 <dict>
60 <key>hash</key>
61 <data>
62 LshWT/F/ti28u082zh8NR5Heyfs=
63 </data>
64 <key>hash2</key>
65 <data>
66 nYKKb/uO2/Bv0v3q3PXCHYVKQbbI6oKpU48lOfnqKng=
67 </data>
68 </dict>
69 <key>Headers/SDL_bits.h</key>
70 <dict>
71 <key>hash</key>
72 <data>
73 6MCXzkSXZ4Ba7/9ksdUPcPxqpLc=
74 </data>
75 <key>hash2</key>
76 <data>
77 moRKyE7GpCyBzoyt2Eib7jqJ/ZMO1vTCWSjtHxP3Few=
78 </data>
79 </dict>
80 <key>Headers/SDL_blendmode.h</key>
81 <dict>
82 <key>hash</key>
83 <data>
84 R0DC+lE1tBOALESAuGbbBcDXF24=
85 </data>
86 <key>hash2</key>
87 <data>
88 RenGdg0rma2j6y9cRvHsTayslInVYfxWvAS3fGUv+Aw=
89 </data>
90 </dict>
91 <key>Headers/SDL_clipboard.h</key>
92 <dict>
93 <key>hash</key>
94 <data>
95 b+5HV8QB/rNcY8Xz71ajJZhr9FY=
96 </data>
97 <key>hash2</key>
98 <data>
99 XVgTrx+C/8H9Hrh/SRD4u4/rsx5MeBiKb2Orzx6fKVI=
100 </data>
101 </dict>
102 <key>Headers/SDL_config.h</key>
103 <dict>
104 <key>hash</key>
105 <data>
106 l5ABB4L5TeaS330tbcy9KDXLPac=
107 </data>
108 <key>hash2</key>
109 <data>
110 sE2G4pd3n561p4+21N81iP4tfDYZZJzBZXWPP6p/mBg=
111 </data>
112 </dict>
113 <key>Headers/SDL_config_macosx.h</key>
114 <dict>
115 <key>hash</key>
116 <data>
117 3lY30NQIV7sFo+Ce/0XJBB+YflQ=
118 </data>
119 <key>hash2</key>
120 <data>
121 se0xLNfnj5Ig1d+lztpy3TwLAcobQpuZyazQEIq4CWY=
122 </data>
123 </dict>
124 <key>Headers/SDL_copying.h</key>
125 <dict>
126 <key>hash</key>
127 <data>
128 topzn4TKpy+ywX5uHtzXPOb/EWk=
129 </data>
130 <key>hash2</key>
131 <data>
132 nXmV15qsx3hLFUWnzkeUClLg3jiNhHqPhtRo9asqkPI=
133 </data>
134 </dict>
135 <key>Headers/SDL_cpuinfo.h</key>
136 <dict>
137 <key>hash</key>
138 <data>
139 8lfAvzjR1oAp7NCnQ3BWcg+1r9Q=
140 </data>
141 <key>hash2</key>
142 <data>
143 qYzYfXAi/BYNeEbnQYmUlPLUL/PulaOOr8OsHfSjsRg=
144 </data>
145 </dict>
146 <key>Headers/SDL_endian.h</key>
147 <dict>
148 <key>hash</key>
149 <data>
150 H1L8fY4HW+f8vQV7wfwg8l8InNE=
151 </data>
152 <key>hash2</key>
153 <data>
154 hNZWtHixgbKiE2tKI9keHXwROhYkBEIJNQ2+z7/wMsY=
155 </data>
156 </dict>
157 <key>Headers/SDL_error.h</key>
158 <dict>
159 <key>hash</key>
160 <data>
161 49T3z69eEOBmcFSD+a3fLxkRZOI=
162 </data>
163 <key>hash2</key>
164 <data>
165 opYHpNi3KkdFqGsd3UAYaRbjKh6kPnu16gD/ZZQ/jt8=
166 </data>
167 </dict>
168 <key>Headers/SDL_events.h</key>
169 <dict>
170 <key>hash</key>
171 <data>
172 FuEAwdraV8RQUvikwiJsBU+BvgU=
173 </data>
174 <key>hash2</key>
175 <data>
176 1cCZTd0bp9wCMWIgIskBJ/lcKp9+oCIIsv29VH1cig4=
177 </data>
178 </dict>
179 <key>Headers/SDL_filesystem.h</key>
180 <dict>
181 <key>hash</key>
182 <data>
183 Crb7zcawxwO9xIPsgIN3ReJoxOw=
184 </data>
185 <key>hash2</key>
186 <data>
187 gbEIOb+sole9bGyyqz07wj5AtyPnXo24/K5VfkhvLeo=
188 </data>
189 </dict>
190 <key>Headers/SDL_gamecontroller.h</key>
191 <dict>
192 <key>hash</key>
193 <data>
194 0NV7L1j2TuK3E6FdhL0czeer1to=
195 </data>
196 <key>hash2</key>
197 <data>
198 MJHprGlkMStQF9QI6MCXQKuhrR1tJTXdijIAEpPL530=
199 </data>
200 </dict>
201 <key>Headers/SDL_gesture.h</key>
202 <dict>
203 <key>hash</key>
204 <data>
205 eOm09gklTuHk4CAnY8+N+AOWU1w=
206 </data>
207 <key>hash2</key>
208 <data>
209 3Jzx8qKPiLBEeimWYGEMjqACvDfAm8j8qVyKZPyot6o=
210 </data>
211 </dict>
212 <key>Headers/SDL_haptic.h</key>
213 <dict>
214 <key>hash</key>
215 <data>
216 2P/RhAx7yVVau0ImN4IRu0PKJwM=
217 </data>
218 <key>hash2</key>
219 <data>
220 Irx+pJE/K0azzSlTpm9Rst1n2EmNLTpbLY3kmpEinJ0=
221 </data>
222 </dict>
223 <key>Headers/SDL_hidapi.h</key>
224 <dict>
225 <key>hash</key>
226 <data>
227 gerk57ttnkfcx6wYtwW4C8Utt60=
228 </data>
229 <key>hash2</key>
230 <data>
231 KYySNLgkVh6cIAiPYvDk/Yk2SvQafFytdHZOKvxzZOw=
232 </data>
233 </dict>
234 <key>Headers/SDL_hints.h</key>
235 <dict>
236 <key>hash</key>
237 <data>
238 +M2qodT/2soISYAEpdT3MEr/6Vs=
239 </data>
240 <key>hash2</key>
241 <data>
242 G81ks4vg4d2wX8M1A4lvtGhjcn4JELUWG530HusZ/uc=
243 </data>
244 </dict>
245 <key>Headers/SDL_joystick.h</key>
246 <dict>
247 <key>hash</key>
248 <data>
249 jysMk9XSVCu1RsQaKMy7NK/ydEk=
250 </data>
251 <key>hash2</key>
252 <data>
253 +Uayc+1W3Cr4Zk6MCAlZCVapvL3/N0AoGj3mnzYkTbI=
254 </data>
255 </dict>
256 <key>Headers/SDL_keyboard.h</key>
257 <dict>
258 <key>hash</key>
259 <data>
260 OMk4UgbZGcy1RSun2YUn80lMUf4=
261 </data>
262 <key>hash2</key>
263 <data>
264 6tXVx8/1/Znz22jiWHAYj5HabbWFy6OX8ja/wjVsdQU=
265 </data>
266 </dict>
267 <key>Headers/SDL_keycode.h</key>
268 <dict>
269 <key>hash</key>
270 <data>
271 /gYNJozr+yBDTnj6PPj3IF13uAo=
272 </data>
273 <key>hash2</key>
274 <data>
275 AAntYN4oYvALmT9TZZQllgQaaaqpuhHkSarIrtuqey0=
276 </data>
277 </dict>
278 <key>Headers/SDL_loadso.h</key>
279 <dict>
280 <key>hash</key>
281 <data>
282 BnfRn8au8VfS8nOYd+Og6CqxQtQ=
283 </data>
284 <key>hash2</key>
285 <data>
286 ViHwtMagclIe0iTK9fUbYuesvQ1nv8rC+9675X5dk3Y=
287 </data>
288 </dict>
289 <key>Headers/SDL_locale.h</key>
290 <dict>
291 <key>hash</key>
292 <data>
293 B7JrCP37jV9Gs+1YoxkyXgaA3/0=
294 </data>
295 <key>hash2</key>
296 <data>
297 NfBH1vQU0RfPYtW0AzShJFmv8MulTUzc/kAQZ9C6ygw=
298 </data>
299 </dict>
300 <key>Headers/SDL_log.h</key>
301 <dict>
302 <key>hash</key>
303 <data>
304 XPI2+5BeRRt4r4AZFyBHx6NFfLI=
305 </data>
306 <key>hash2</key>
307 <data>
308 7ZQQ+sD80Xz3gFNPv1VmGtlUrhJ7btQpnXfH0yYftmg=
309 </data>
310 </dict>
311 <key>Headers/SDL_main.h</key>
312 <dict>
313 <key>hash</key>
314 <data>
315 mt6Qt7cysL9ELiX/afcdCS8j8fE=
316 </data>
317 <key>hash2</key>
318 <data>
319 3rtYDjufA+B1dK46pyBCWiIWZamOcuMyyrTTh8vQBcE=
320 </data>
321 </dict>
322 <key>Headers/SDL_messagebox.h</key>
323 <dict>
324 <key>hash</key>
325 <data>
326 Jyd+Z0oJkOyu7GqxrGoj92kX33E=
327 </data>
328 <key>hash2</key>
329 <data>
330 b/2BVaUV14/zSF4P4vqsBKHdmHO39bcQh+Iw5cIjiUs=
331 </data>
332 </dict>
333 <key>Headers/SDL_metal.h</key>
334 <dict>
335 <key>hash</key>
336 <data>
337 lgw/jPhvwM+nsqA0HITlLaESI1Y=
338 </data>
339 <key>hash2</key>
340 <data>
341 8e2u8Lp9cp5tnfxLkwSsyerOA213Z/Con+WQe/U+QYI=
342 </data>
343 </dict>
344 <key>Headers/SDL_misc.h</key>
345 <dict>
346 <key>hash</key>
347 <data>
348 GDQyA6cRKZi3FJ3qPXMgIG19Xic=
349 </data>
350 <key>hash2</key>
351 <data>
352 ouIje4tauHjysbz3ObtyFzAB6lTCyhdwb4ndhQ3Z9n4=
353 </data>
354 </dict>
355 <key>Headers/SDL_mouse.h</key>
356 <dict>
357 <key>hash</key>
358 <data>
359 /zT8qbG7n+yGKjzdYvJb35NHMQA=
360 </data>
361 <key>hash2</key>
362 <data>
363 2ery5DHLhfdNZqIkXFi5IxAwNnbfG2TMJlFCGymAHvQ=
364 </data>
365 </dict>
366 <key>Headers/SDL_mutex.h</key>
367 <dict>
368 <key>hash</key>
369 <data>
370 aG58/w/wU0G8N8tgCdD8ecbbbe4=
371 </data>
372 <key>hash2</key>
373 <data>
374 XUDMtaFm4qzh0iFhMP4Gnl9H7BDRtZnfFZx6UVvw6uQ=
375 </data>
376 </dict>
377 <key>Headers/SDL_name.h</key>
378 <dict>
379 <key>hash</key>
380 <data>
381 gOOcQtMKUerG67yCwPV+v0SxzCw=
382 </data>
383 <key>hash2</key>
384 <data>
385 1axhwEeJjGS3A6JMrU9788wocEZRLyZNcaB/B6XRAMs=
386 </data>
387 </dict>
388 <key>Headers/SDL_opengl.h</key>
389 <dict>
390 <key>hash</key>
391 <data>
392 7MOKOotpNv44gQkv/pUbTkn8IoE=
393 </data>
394 <key>hash2</key>
395 <data>
396 zkUzBymyrkFMTK7R21v1NrPrq1gm+FRVcWQ+BUYXbjo=
397 </data>
398 </dict>
399 <key>Headers/SDL_opengl_glext.h</key>
400 <dict>
401 <key>hash</key>
402 <data>
403 R1nHUIy7DpXf2BZyzO+VT33j3bE=
404 </data>
405 <key>hash2</key>
406 <data>
407 RwZcYEr740srGsvbe4jQhHYTTNwp+e05VGDjqyNkYr4=
408 </data>
409 </dict>
410 <key>Headers/SDL_opengles.h</key>
411 <dict>
412 <key>hash</key>
413 <data>
414 gNgYlz+/uLgvjec6r0AW7Be2DJI=
415 </data>
416 <key>hash2</key>
417 <data>
418 gpV8CPolshDeFDmSwWdoE1szEa7jY6uW06q61w+0g8k=
419 </data>
420 </dict>
421 <key>Headers/SDL_opengles2.h</key>
422 <dict>
423 <key>hash</key>
424 <data>
425 JAC+taTpU61KVFADpZvYguHPY/A=
426 </data>
427 <key>hash2</key>
428 <data>
429 4VPaduWoVpL5jy0A9S+tAoRXm0of4K+lqTZ2HRlDNT8=
430 </data>
431 </dict>
432 <key>Headers/SDL_opengles2_gl2.h</key>
433 <dict>
434 <key>hash</key>
435 <data>
436 g4y04zPFy1H/qujSNGRd0vB7ClQ=
437 </data>
438 <key>hash2</key>
439 <data>
440 9GAwK0cg8YPrZHWVqMGpyVwKFz3Ay9VHiyz70jzWltA=
441 </data>
442 </dict>
443 <key>Headers/SDL_opengles2_gl2ext.h</key>
444 <dict>
445 <key>hash</key>
446 <data>
447 bTlnL+42kbi+n/gH//X2p0pqeuM=
448 </data>
449 <key>hash2</key>
450 <data>
451 5404JOHXH4pGO60gR/uLhz9zW6fKy9jvdMw5i1WTcpo=
452 </data>
453 </dict>
454 <key>Headers/SDL_opengles2_gl2platform.h</key>
455 <dict>
456 <key>hash</key>
457 <data>
458 ByFMXJFtjcRglS/e0+DujyjC3dM=
459 </data>
460 <key>hash2</key>
461 <data>
462 wlKRTsmTMrnniYqSvQklJfb9VF07J0MDpqzYOcfiDDY=
463 </data>
464 </dict>
465 <key>Headers/SDL_opengles2_khrplatform.h</key>
466 <dict>
467 <key>hash</key>
468 <data>
469 NLpJq9uBqjOpWhXISOQHPnTp/XQ=
470 </data>
471 <key>hash2</key>
472 <data>
473 djHeDyzmR0e/2JNIbqpBqgi56MXlxlAbgcBFxuvwSyo=
474 </data>
475 </dict>
476 <key>Headers/SDL_pixels.h</key>
477 <dict>
478 <key>hash</key>
479 <data>
480 APvnWU71OTgg8nF2ZBdVu+N0OGo=
481 </data>
482 <key>hash2</key>
483 <data>
484 6VtEW9W48E5QT0eLhrzHm6TM2ZuskMlgjcaAwsilSlY=
485 </data>
486 </dict>
487 <key>Headers/SDL_platform.h</key>
488 <dict>
489 <key>hash</key>
490 <data>
491 JyhvZJ6mimIDxPRre47+A+osGd0=
492 </data>
493 <key>hash2</key>
494 <data>
495 kFkda6rujclSedLQHSLp3sHKJvJ2hAFf2+7Q2dot404=
496 </data>
497 </dict>
498 <key>Headers/SDL_power.h</key>
499 <dict>
500 <key>hash</key>
501 <data>
502 CZt1YqOCoPff+ZX5nsgeLs2abiM=
503 </data>
504 <key>hash2</key>
505 <data>
506 WuENeZEjbiPGXwmzKPi9End4ZRDqxD7gCGDnrgDjgJc=
507 </data>
508 </dict>
509 <key>Headers/SDL_quit.h</key>
510 <dict>
511 <key>hash</key>
512 <data>
513 tPbozXmJ7atsNAXI2sOnYySxxE0=
514 </data>
515 <key>hash2</key>
516 <data>
517 2OKt3rHgSNG9eTiP7SP0r7oy3zP+xN2i4s6r9i2FLOg=
518 </data>
519 </dict>
520 <key>Headers/SDL_rect.h</key>
521 <dict>
522 <key>hash</key>
523 <data>
524 kqjXkTEBuW6w8WzZHdU/d2WAUFo=
525 </data>
526 <key>hash2</key>
527 <data>
528 2mPgLRzSwu+/R1wEa7Y+XEMCET2BiR9zlShcJwP5cs8=
529 </data>
530 </dict>
531 <key>Headers/SDL_render.h</key>
532 <dict>
533 <key>hash</key>
534 <data>
535 CLUOyCUt6T3xY6E9lFiBLY1i/QE=
536 </data>
537 <key>hash2</key>
538 <data>
539 VCJZrEOy3hcl7Bq30mH27Jcu+Gp18hcYV+D66fVIEBg=
540 </data>
541 </dict>
542 <key>Headers/SDL_revision.h</key>
543 <dict>
544 <key>hash</key>
545 <data>
546 OmV6TNE1P8Dm+ekO7PlOPkvpJJM=
547 </data>
548 <key>hash2</key>
549 <data>
550 N8c2dyfn8XOV6qOfJ3wvKHDejG3snUbYdTt3G3/xhUQ=
551 </data>
552 </dict>
553 <key>Headers/SDL_rwops.h</key>
554 <dict>
555 <key>hash</key>
556 <data>
557 IXS0xK9O3gbA348D/K54bX00jMQ=
558 </data>
559 <key>hash2</key>
560 <data>
561 MrzLK/Rr9ocRxfcTqnfCsK9d9yk0LWeEUpY0K0W75fk=
562 </data>
563 </dict>
564 <key>Headers/SDL_scancode.h</key>
565 <dict>
566 <key>hash</key>
567 <data>
568 hdZZsrw3GG9ip8M6vPnOL15uMdw=
569 </data>
570 <key>hash2</key>
571 <data>
572 nW0t4/HcTU6vmHaWe09doRAegyK9csf/JGzmtt2/BrU=
573 </data>
574 </dict>
575 <key>Headers/SDL_sensor.h</key>
576 <dict>
577 <key>hash</key>
578 <data>
579 cAqB17JLRyFN5n8MAJrIkY1AqBw=
580 </data>
581 <key>hash2</key>
582 <data>
583 uBC/ANStES2g4wtWn7Mk/4MJeHp+wr7wEfurKfzv3dc=
584 </data>
585 </dict>
586 <key>Headers/SDL_shape.h</key>
587 <dict>
588 <key>hash</key>
589 <data>
590 UWs6SO78LJYdrBlGs1tY10DrJUI=
591 </data>
592 <key>hash2</key>
593 <data>
594 CFJEICmokjpIcOYx1hTgGJ8fqLjaj+k9VuxREOUDJaA=
595 </data>
596 </dict>
597 <key>Headers/SDL_stdinc.h</key>
598 <dict>
599 <key>hash</key>
600 <data>
601 szUPEBCjG3ebEMe82C6eQMLI/y8=
602 </data>
603 <key>hash2</key>
604 <data>
605 qGT36qQMxAikB+sXlGCds+Aq/0qtbWavnirGCAZgDbY=
606 </data>
607 </dict>
608 <key>Headers/SDL_surface.h</key>
609 <dict>
610 <key>hash</key>
611 <data>
612 ftoqu6gZKB/N3yryQou+cUh9je8=
613 </data>
614 <key>hash2</key>
615 <data>
616 vLUFvoxnI/PrGU536Zn/Gnmn5xKGyT90odV9xWq6tMI=
617 </data>
618 </dict>
619 <key>Headers/SDL_system.h</key>
620 <dict>
621 <key>hash</key>
622 <data>
623 1s3wXhPZadLYb9TJ91XF00EMR18=
624 </data>
625 <key>hash2</key>
626 <data>
627 Vc+19XPMeZqmwF2RlFN971kwfHkfZdnLfIsUkY9F7Ns=
628 </data>
629 </dict>
630 <key>Headers/SDL_syswm.h</key>
631 <dict>
632 <key>hash</key>
633 <data>
634 oxVccR9E/ARZqqPl+BjVMKNdDNw=
635 </data>
636 <key>hash2</key>
637 <data>
638 LRcM/Fhcqwv6Qf3YhgaLGkkEuFqXFTvl6pWfaQCNw9g=
639 </data>
640 </dict>
641 <key>Headers/SDL_thread.h</key>
642 <dict>
643 <key>hash</key>
644 <data>
645 DIPlScdm3rXv8lLpnZO8dv3WdqA=
646 </data>
647 <key>hash2</key>
648 <data>
649 QHM6ylW6Lc4ABxZGkpUMKrwV7Ej2UJcjVmZgJh+dxjY=
650 </data>
651 </dict>
652 <key>Headers/SDL_timer.h</key>
653 <dict>
654 <key>hash</key>
655 <data>
656 Ltnz4OrvTc2eABw8uX/0L/nuca4=
657 </data>
658 <key>hash2</key>
659 <data>
660 W+hRt3f94ZHPIpQ4xN7D/U0OVtTTZBAA9Nphtq8fgeg=
661 </data>
662 </dict>
663 <key>Headers/SDL_touch.h</key>
664 <dict>
665 <key>hash</key>
666 <data>
667 rwC4gDU7l5kY0ZZEIhd7RT3axUU=
668 </data>
669 <key>hash2</key>
670 <data>
671 DVFA8C77fiVhyFFtqV/lglia5PShpk967pt+huaItwo=
672 </data>
673 </dict>
674 <key>Headers/SDL_types.h</key>
675 <dict>
676 <key>hash</key>
677 <data>
678 ARZgD/WKM8LbXYcplBCyws5jmmo=
679 </data>
680 <key>hash2</key>
681 <data>
682 vvFj+McRdgHRX9HrooW/E7jX5C74rxEwVv18wMyvSC0=
683 </data>
684 </dict>
685 <key>Headers/SDL_version.h</key>
686 <dict>
687 <key>hash</key>
688 <data>
689 AMz/OkviAL5DxrVsU10QNjaUNco=
690 </data>
691 <key>hash2</key>
692 <data>
693 I0igXaRZ/ebCnnacXopXPvIyGPd7+h4Yrs0ydEG0V5M=
694 </data>
695 </dict>
696 <key>Headers/SDL_video.h</key>
697 <dict>
698 <key>hash</key>
699 <data>
700 ZqBdFUmdUvi+QDEU++tA3zZQNpE=
701 </data>
702 <key>hash2</key>
703 <data>
704 c9F2lhGXv5qDM8uuWXFpMn5gIzzcrrfRk5vczLtR3X4=
705 </data>
706 </dict>
707 <key>Headers/SDL_vulkan.h</key>
708 <dict>
709 <key>hash</key>
710 <data>
711 k22upiGXgz0TzSKkWtDwaKrV2fw=
712 </data>
713 <key>hash2</key>
714 <data>
715 kg2f48mMRh4+Ev5cnsEDDyQqf6YbP7YqWNhykRYzgDo=
716 </data>
717 </dict>
718 <key>Headers/begin_code.h</key>
719 <dict>
720 <key>hash</key>
721 <data>
722 A52Lh/nQ4BliCI+RMHIt9xSD6Fs=
723 </data>
724 <key>hash2</key>
725 <data>
726 KDdUdsUtYxmo0ZyQLNwOHuWTKFaJnujcoeF6edzp4SE=
727 </data>
728 </dict>
729 <key>Headers/close_code.h</key>
730 <dict>
731 <key>hash</key>
732 <data>
733 l886gK0WewF9TLQ2N3wuuk5YOK8=
734 </data>
735 <key>hash2</key>
736 <data>
737 9JEAM14hpDRV6tDnQvfIFtBJQXHOEJSONje5q/PKlTo=
738 </data>
739 </dict>
740 <key>Resources/Info.plist</key>
741 <dict>
742 <key>hash</key>
743 <data>
744 OxWHBbdJFecUEehMjei2Rc0U5Fs=
745 </data>
746 <key>hash2</key>
747 <data>
748 ScLuGB7K21JNtYbbGu7tXZiTvB3bCi8bFdDLJGAMcOs=
749 </data>
750 </dict>
751 <key>Resources/License.txt</key>
752 <dict>
753 <key>hash</key>
754 <data>
755 VoVWJNSXNFkj10nxdQKhgCnXJjE=
756 </data>
757 <key>hash2</key>
758 <data>
759 IY4SCBLx/QICUzUIfTw/MBGoah4TzstyMeoTfwWSuDM=
760 </data>
761 </dict>
762 <key>Resources/ReadMe.txt</key>
763 <dict>
764 <key>hash</key>
765 <data>
766 JbxWZUxpvG/D7Yb/DvLh6Aunla0=
767 </data>
768 <key>hash2</key>
769 <data>
770 pOpMHiFjj3pIWQqZ5KDvYNyp0twU7vCZmLwAQJLVkT4=
771 </data>
772 </dict>
773 <key>Resources/default.metallib</key>
774 <dict>
775 <key>hash</key>
776 <data>
777 50m0avYLiIBc6a4gWqXN3tnFlpU=
778 </data>
779 <key>hash2</key>
780 <data>
781 w8jS3DIw3CKDRfJsmiA4MWFVPhdpi2zi+WEO1Zfw8+8=
782 </data>
783 </dict>
784 </dict>
785 <key>rules</key>
786 <dict>
787 <key>^Resources/</key>
788 <true/>
789 <key>^Resources/.*\.lproj/</key>
790 <dict>
791 <key>optional</key>
792 <true/>
793 <key>weight</key>
794 <real>1000</real>
795 </dict>
796 <key>^Resources/.*\.lproj/locversion.plist$</key>
797 <dict>
798 <key>omit</key>
799 <true/>
800 <key>weight</key>
801 <real>1100</real>
802 </dict>
803 <key>^Resources/Base\.lproj/</key>
804 <dict>
805 <key>weight</key>
806 <real>1010</real>
807 </dict>
808 <key>^version.plist$</key>
809 <true/>
810 </dict>
811 <key>rules2</key>
812 <dict>
813 <key>.*\.dSYM($|/)</key>
814 <dict>
815 <key>weight</key>
816 <real>11</real>
817 </dict>
818 <key>^(.*/)?\.DS_Store$</key>
819 <dict>
820 <key>omit</key>
821 <true/>
822 <key>weight</key>
823 <real>2000</real>
824 </dict>
825 <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
826 <dict>
827 <key>nested</key>
828 <true/>
829 <key>weight</key>
830 <real>10</real>
831 </dict>
832 <key>^.*</key>
833 <true/>
834 <key>^Info\.plist$</key>
835 <dict>
836 <key>omit</key>
837 <true/>
838 <key>weight</key>
839 <real>20</real>
840 </dict>
841 <key>^PkgInfo$</key>
842 <dict>
843 <key>omit</key>
844 <true/>
845 <key>weight</key>
846 <real>20</real>
847 </dict>
848 <key>^Resources/</key>
849 <dict>
850 <key>weight</key>
851 <real>20</real>
852 </dict>
853 <key>^Resources/.*\.lproj/</key>
854 <dict>
855 <key>optional</key>
856 <true/>
857 <key>weight</key>
858 <real>1000</real>
859 </dict>
860 <key>^Resources/.*\.lproj/locversion.plist$</key>
861 <dict>
862 <key>omit</key>
863 <true/>
864 <key>weight</key>
865 <real>1100</real>
866 </dict>
867 <key>^Resources/Base\.lproj/</key>
868 <dict>
869 <key>weight</key>
870 <real>1010</real>
871 </dict>
872 <key>^[^/]+$</key>
873 <dict>
874 <key>nested</key>
875 <true/>
876 <key>weight</key>
877 <real>10</real>
878 </dict>
879 <key>^embedded\.provisionprofile$</key>
880 <dict>
881 <key>weight</key>
882 <real>20</real>
883 </dict>
884 <key>^version\.plist$</key>
885 <dict>
886 <key>weight</key>
887 <real>20</real>
888 </dict>
889 </dict>
890 </dict>
891 </plist>
0 #! /bin/csh -ef
1
2 set prog = `/usr/bin/basename $0`
3 set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar]"
4 set noglob
5
6 if (-x /usr/bin/mkbom) then
7 set mkbom=/usr/bin/mkbom
8 set lsbom=/usr/bin/lsbom
9 else
10 set mkbom=/usr/etc/mkbom
11 set lsbom=/usr/etc/lsbom
12 endif
13
14 if (-x /usr/bin/awk) then
15 set awk=/usr/bin/awk
16 else
17 set awk=/bin/awk
18 endif
19
20 set gnutar=/usr/bin/gnutar
21 set tar=/usr/bin/tar
22 set pax=/bin/pax
23
24 # gather parameters
25 if ($#argv == 0) then
26 echo $usage
27 exit(1)
28 endif
29
30 while ( $#argv > 0 )
31 switch ( $argv[1] )
32 case -d:
33 if ( $?destDir ) then
34 echo ${prog}: dest-dir parameter already set to ${destDir}.
35 echo $usage
36 exit(1)
37 else if ( $#argv < 2 ) then
38 echo ${prog}: -d option requires destination directory.
39 echo $usage
40 exit(1)
41 else
42 set destDir = $argv[2]
43 shift; shift
44 breaksw
45 endif
46 case -f:
47 if ( $?rootDir ) then
48 echo ${prog}: root-dir parameter already set to ${rootDir}.
49 echo $usage
50 exit(1)
51 else if ( $#argv < 2 ) then
52 echo ${prog}: -f option requires package root directory.
53 echo $usage
54 exit(1)
55 else
56 set rootDir = $argv[2]
57 set fflag
58 shift; shift
59 breaksw
60 endif
61 case -r:
62 if ( $?resDir ) then
63 echo ${prog}: resource-dir parameter already set to ${resDir}.
64 echo $usage
65 exit(1)
66 else if ( $#argv < 2 ) then
67 echo ${prog}: -r option requires package resource directory.
68 echo $usage
69 exit(1)
70 else
71 set resDir = $argv[2]
72 shift; shift
73 breaksw
74 endif
75 case -traditional:
76 set usetar
77 unset usegnutar
78 unset usepax
79 breaksw
80 case -gnutar:
81 set usegnutar
82 unset usepax
83 unset usetar
84 case -B:
85 # We got long file names, better use bigtar instead
86 #set archiver = /NextAdmin/Installer.app/Resources/installer_bigtar
87 echo 2>&1 ${prog}: -B flag is no longer relevant.
88 shift
89 breaksw
90 case -*:
91 echo ${prog}: Unknown option: $argv[1]
92 echo $usage
93 exit(1)
94 case *.info:
95 if ( $?info ) then
96 echo ${prog}: info-file parameter already set to ${info}.
97 echo $usage
98 exit(1)
99 else
100 set info = "$argv[1]"
101 shift
102 breaksw
103 endif
104 case *.tiff:
105 if ( $?tiff ) then
106 echo ${prog}: tiff-file parameter already set to ${tiff}.
107 echo $usage
108 exit(1)
109 else
110 set tiff = "$argv[1]"
111 shift
112 breaksw
113 endif
114 default:
115 if ( $?rootDir ) then
116 echo ${prog}: unrecognized parameter: $argv[1]
117 echo $usage
118 exit(1)
119 else
120 set rootDir = "$argv[1]"
121 shift
122 breaksw
123 endif
124 endsw
125 end
126
127 # check for mandatory parameters
128 if ( ! $?rootDir ) then
129 echo ${prog}: missing root-dir parameter.
130 echo $usage
131 exit(1)
132 else if ( ! $?info) then
133 echo ${prog}: missing info-file parameter.
134 echo $usage
135 exit(1)
136 endif
137
138 # destDir gets default value if unset on command line
139 if ( $?destDir ) then
140 /bin/mkdir -p $destDir
141 else
142 set destDir = .
143 endif
144
145 # derive the root name for the package from the root name of the info file
146 set root = `/usr/bin/basename $info .info`
147
148 # create package directory
149 set pkg = ${destDir}/${root}.pkg
150 echo Generating Installer package $pkg ...
151 if ( -e $pkg ) /bin/rm -rf $pkg
152 /bin/mkdir -p -m 755 $pkg
153
154 # (gnu)tar/pax and compress root directory to package archive
155 echo -n " creating package archive ... "
156 if ( $?fflag ) then
157 set pkgTop = ${rootDir:t}
158 set parent = ${rootDir:h}
159 if ( "$parent" == "$pkgTop" ) set parent = "."
160 else
161 set parent = $rootDir
162 set pkgTop = .
163 endif
164 if ( $?usetar ) then
165 set pkgArchive = $pkg/$root.tar.Z
166 (cd $parent; $tar -w $pkgTop) | /usr/bin/compress -f -c > $pkgArchive
167 else if ( $?usegnutar ) then
168 set pkgArchive = $pkg/$root.tar.gz
169 (cd $parent; $gnutar zcf $pkgArchive $pkgTop)
170 else
171 set pkgArchive = $pkg/$root.pax.gz
172 (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive
173 endif
174 /bin/chmod 444 $pkgArchive
175 echo done.
176
177 # copy info file to package
178 set pkgInfo = $pkg/$root.info
179 echo -n " copying ${info:t} ... "
180 /bin/cp $info $pkgInfo
181 /bin/chmod 444 $pkgInfo
182 echo done.
183
184 # copy tiff file to package
185 if ( $?tiff ) then
186 set pkgTiff = $pkg/$root.tiff
187 echo -n " copying ${tiff:t} ... "
188 /bin/cp $tiff $pkgTiff
189 /bin/chmod 444 $pkgTiff
190 echo done.
191 endif
192
193 # copy resources to package
194 if ( $?resDir ) then
195 echo -n " copying ${resDir:t} ... "
196
197 # don't want to see push/pop output
198 pushd $resDir > /dev/null
199 # get lists of resources. We'll want to change
200 # permissions on just these things later.
201 set directoriesInResDir = `find . -type d`
202 set filesInResDir = `find . -type f`
203 popd > /dev/null
204
205 # copy the resource directory contents into the package directory
206 foreach resFile (`ls $resDir`)
207 cp -r $resDir/$resFile $pkg
208 end
209
210 pushd $pkg > /dev/null
211 # Change all directories to +r+x, except the package
212 # directory itself
213 foreach resFileItem ($directoriesInResDir)
214 if ( $resFileItem != "." ) then
215 chmod 555 $resFileItem
216 endif
217 end
218 # change all flat files to read only
219 foreach resFileItem ($filesInResDir)
220 chmod 444 $resFileItem
221 end
222 popd > /dev/null
223
224 echo done.
225 endif
226
227 # generate bom file
228 set pkgBom = $pkg/$root.bom
229 echo -n " generating bom file ... "
230 /bin/rm -f $pkgBom
231 if ( $?fflag ) then
232 $mkbom $parent $pkgBom >& /dev/null
233 else
234 $mkbom $rootDir $pkgBom >& /dev/null
235 endif
236 /bin/chmod 444 $pkgArchive
237 echo done.
238
239 # generate sizes file
240 set pkgSizes = $pkg/$root.sizes
241 echo -n " generating sizes file ... "
242
243 # compute number of files in package
244 set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l`
245
246 # compute package size when compressed
247 @ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'`
248 @ compressedSize += 3 # add 1KB each for sizes, location, status files
249
250 @ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'`
251 @ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'`
252 if ( $?tiff ) then
253 @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'`
254 else
255 @ tiffSize = 0
256 endif
257
258 @ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'`
259 @ installedSize += $infoSize + $bomSize + $tiffSize + 3
260
261 # echo size parameters to sizes file
262 echo NumFiles $numFiles > $pkgSizes
263 echo InstalledSize $installedSize >> $pkgSizes
264 echo CompressedSize $compressedSize >> $pkgSizes
265 echo done.
266 echo " ... finished generating $pkg."
267
268 exit(0)
269
270 # end package
271
0 Title SDL_net 1.2.5
1 Version 1
2 Description SDL_net Library for Mac OS X (http://www.libsdl.org/projects/SDL_net)
3 DefaultLocation /Library/Frameworks
4 Diskname (null)
5 DeleteWarning
6 NeedsAuthorization NO
7 DisableStop NO
8 UseUserMask NO
9 Application NO
10 Relocatable YES
11 Required NO
12 InstallOnly NO
13 RequiresReboot NO
14 InstallFat NO
0 #!/bin/sh
1
2 # Generic script to create a package with Project Builder in mind
3 # There should only be one version of this script for all projects!
4
5 FRAMEWORK="$1"
6 VARIANT="$2"
7
8 PACKAGE="$FRAMEWORK"
9 PACKAGE_RESOURCES="pkg-support/resources"
10
11 echo "Building package for $FRAMEWORK.framework"
12 echo "Will fetch resources from $PACKAGE_RESOURCES"
13 echo "Will create the package $PACKAGE.pkg"
14
15 # create a copy of the framework
16 mkdir -p build/pkg-tmp
17 xcrun CpMac -r "build/$FRAMEWORK.framework" build/pkg-tmp/
18
19 ./package build/pkg-tmp "pkg-support/$PACKAGE.info" -d build -r "$PACKAGE_RESOURCES"
20
21 # remove temporary files
22 rm -rf build/pkg-tmp
23
24 # compress
25 (cd build; tar -zcvf "$PACKAGE.pkg.tar.gz" "$PACKAGE.pkg")
26
0 # based on the files generated by CMake's write_basic_package_version_file
1
2 # SDL2_net CMake version configuration file:
3 # This file is meant to be placed in Resources/CMake of a SDL2_net framework
4
5 if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_net.h")
6 message(AUTHOR_WARNING "Could not find SDL_net.h. This script is meant to be placed in the Resources/CMake directory of SDL2_net.framework")
7 return()
8 endif()
9
10 file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_net.h" _sdl_net_h)
11 string(REGEX MATCH "#define[ \t]+SDL_NET_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_net_h}")
12 set(_sdl_major "${CMAKE_MATCH_1}")
13 string(REGEX MATCH "#define[ \t]+SDL_NET_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_net_h}")
14 set(_sdl_minor "${CMAKE_MATCH_1}")
15 string(REGEX MATCH "#define[ \t]+SDL_NET_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_net_h}")
16 set(_sdl_patch "${CMAKE_MATCH_1}")
17 if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
18 set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")
19 else()
20 message(AUTHOR_WARNING "Could not extract version from SDL_net.h.")
21 return()
22 endif()
23
24 if(PACKAGE_FIND_VERSION_RANGE)
25 # Package version must be in the requested version range
26 if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
27 OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
28 OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
29 set(PACKAGE_VERSION_COMPATIBLE FALSE)
30 else()
31 set(PACKAGE_VERSION_COMPATIBLE TRUE)
32 endif()
33 else()
34 if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
35 set(PACKAGE_VERSION_COMPATIBLE FALSE)
36 else()
37 set(PACKAGE_VERSION_COMPATIBLE TRUE)
38 if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
39 set(PACKAGE_VERSION_EXACT TRUE)
40 endif()
41 endif()
42 endif()
43
44 # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
45 if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
46 set(PACKAGE_VERSION_UNSUITABLE TRUE)
47 endif()
0 # SDL2_net CMake configuration file:
1 # This file is meant to be placed in Resources/CMake of a SDL2_net framework
2
3 # INTERFACE_LINK_OPTIONS needs CMake 3.12
4 cmake_minimum_required(VERSION 3.12)
5
6 include(FeatureSummary)
7 set_package_properties(SDL2_net PROPERTIES
8 URL "https://www.libsdl.org/projects/SDL_net/"
9 DESCRIPTION "SDL_net is an example portable network library for use with SDL."
10 )
11
12 set(SDL2_net_FOUND TRUE)
13
14 string(REGEX REPLACE "SDL2_net\\.framework.*" "SDL2_net.framework" _sdl2net_framework_path "${CMAKE_CURRENT_LIST_DIR}")
15 string(REGEX REPLACE "SDL2_net\\.framework.*" "" _sdl2net_framework_parent_path "${CMAKE_CURRENT_LIST_DIR}")
16
17
18 if(NOT TARGET SDL2_net::SDL2_net)
19 add_library(SDL2_net::SDL2_net INTERFACE IMPORTED)
20 set_target_properties(SDL2_net::SDL2_net
21 PROPERTIES
22 INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${_sdl2net_framework_parent_path}\""
23 INTERFACE_INCLUDE_DIRECTORIES "${_sdl2net_framework_path}/Headers"
24 INTERFACE_LINK_OPTIONS "SHELL:-F \"${_sdl2net_framework_parent_path}\";SHELL:-framework SDL2_net"
25 COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
26 INTERFACE_SDL2_SHARED "ON"
27 )
28 endif()
29
30 unset(_sdl2net_framework_path)
31 unset(_sdl2net_framework_parent_path)
0 SDL_net is an example portable network library for use with SDL.
1
2 The source code is available from: http://www.libsdl.org/projects/SDL_net
3
4 This library is distributed under the terms of the zlib license: http://www.zlib.net/zlib_license.html
5
6 This packages contains the SDL2_net.framework for OS X. Conforming with Apple guidelines, this framework contains both the SDL runtime component and development header files.
7
8 Requirements:
9 You must have the SDL2.framework installed.
10
11 To Install:
12 Copy the SDL2_net.framework to /Library/Frameworks
13
14 You may alternatively install it in <your home directory>/Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.)
15
16 Use in CMake projects:
17 SDL2_net.framework can be used in CMake projects using the following pattern:
18 ```
19 find_package(SDL2_net REQUIRED)
20 add_executable(my_game ${MY_SOURCES})
21 target_link_libraries(my_game PRIVATE SDL2_net::SDL2_net)
22 ```
23 If SDL2_net.framework is installed in a non-standard location,
24 please refer to the following link for ways to configure CMake:
25 https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
0 This package installs the SDL_net library into /Library/Frameworks. You can also install it in
1 <your home directory>/Library/Frameworks if your access privileges are not high enough.
2
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL.h
23 *
24 * Main include header for the SDL library
25 */
26
27
28 #ifndef SDL_h_
29 #define SDL_h_
30
31 #include <SDL2/SDL_main.h>
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_assert.h>
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_audio.h>
36 #include <SDL2/SDL_clipboard.h>
37 #include <SDL2/SDL_cpuinfo.h>
38 #include <SDL2/SDL_endian.h>
39 #include <SDL2/SDL_error.h>
40 #include <SDL2/SDL_events.h>
41 #include <SDL2/SDL_filesystem.h>
42 #include <SDL2/SDL_gamecontroller.h>
43 #include <SDL2/SDL_haptic.h>
44 #include <SDL2/SDL_hidapi.h>
45 #include <SDL2/SDL_hints.h>
46 #include <SDL2/SDL_joystick.h>
47 #include <SDL2/SDL_loadso.h>
48 #include <SDL2/SDL_log.h>
49 #include <SDL2/SDL_messagebox.h>
50 #include <SDL2/SDL_metal.h>
51 #include <SDL2/SDL_mutex.h>
52 #include <SDL2/SDL_power.h>
53 #include <SDL2/SDL_render.h>
54 #include <SDL2/SDL_rwops.h>
55 #include <SDL2/SDL_sensor.h>
56 #include <SDL2/SDL_shape.h>
57 #include <SDL2/SDL_system.h>
58 #include <SDL2/SDL_thread.h>
59 #include <SDL2/SDL_timer.h>
60 #include <SDL2/SDL_version.h>
61 #include <SDL2/SDL_video.h>
62 #include <SDL2/SDL_locale.h>
63 #include <SDL2/SDL_misc.h>
64
65 #include <SDL2/begin_code.h>
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /* As of version 0.5, SDL is loaded dynamically into the application */
72
73 /**
74 * \name SDL_INIT_*
75 *
76 * These are the flags which may be passed to SDL_Init(). You should
77 * specify the subsystems which you will be using in your application.
78 */
79 /* @{ */
80 #define SDL_INIT_TIMER 0x00000001u
81 #define SDL_INIT_AUDIO 0x00000010u
82 #define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
83 #define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
84 #define SDL_INIT_HAPTIC 0x00001000u
85 #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
86 #define SDL_INIT_EVENTS 0x00004000u
87 #define SDL_INIT_SENSOR 0x00008000u
88 #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
89 #define SDL_INIT_EVERYTHING ( \
90 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
91 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
92 )
93 /* @} */
94
95 /**
96 * Initialize the SDL library.
97 *
98 * SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
99 * two may be used interchangeably. Though for readability of your code
100 * SDL_InitSubSystem() might be preferred.
101 *
102 * The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
103 * subsystems are initialized by default. Message boxes
104 * (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
105 * video subsystem, in hopes of being useful in showing an error dialog when
106 * SDL_Init fails. You must specifically initialize other subsystems if you
107 * use them in your application.
108 *
109 * Logging (such as SDL_Log) works without initialization, too.
110 *
111 * `flags` may be any of the following OR'd together:
112 *
113 * - `SDL_INIT_TIMER`: timer subsystem
114 * - `SDL_INIT_AUDIO`: audio subsystem
115 * - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
116 * subsystem
117 * - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
118 * events subsystem
119 * - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
120 * - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
121 * initializes the joystick subsystem
122 * - `SDL_INIT_EVENTS`: events subsystem
123 * - `SDL_INIT_EVERYTHING`: all of the above subsystems
124 * - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
125 *
126 * Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
127 * for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
128 * call SDL_Quit() to force shutdown). If a subsystem is already loaded then
129 * this call will increase the ref-count and return.
130 *
131 * \param flags subsystem initialization flags
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_InitSubSystem
138 * \sa SDL_Quit
139 * \sa SDL_SetMainReady
140 * \sa SDL_WasInit
141 */
142 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
143
144 /**
145 * Compatibility function to initialize the SDL library.
146 *
147 * In SDL2, this function and SDL_Init() are interchangeable.
148 *
149 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
150 * \returns 0 on success or a negative error code on failure; call
151 * SDL_GetError() for more information.
152 *
153 * \since This function is available since SDL 2.0.0.
154 *
155 * \sa SDL_Init
156 * \sa SDL_Quit
157 * \sa SDL_QuitSubSystem
158 */
159 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
160
161 /**
162 * Shut down specific SDL subsystems.
163 *
164 * If you start a subsystem using a call to that subsystem's init function
165 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
166 * SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
167 * that subsystem's quit function (SDL_VideoQuit()) directly instead. But
168 * generally, you should not be using those functions directly anyhow; use
169 * SDL_Init() instead.
170 *
171 * You still need to call SDL_Quit() even if you close all open subsystems
172 * with SDL_QuitSubSystem().
173 *
174 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
175 *
176 * \since This function is available since SDL 2.0.0.
177 *
178 * \sa SDL_InitSubSystem
179 * \sa SDL_Quit
180 */
181 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
182
183 /**
184 * Get a mask of the specified subsystems which are currently initialized.
185 *
186 * \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
187 * \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
188 * returns the initialization status of the specified subsystems.
189 *
190 * The return value does not include SDL_INIT_NOPARACHUTE.
191 *
192 * \since This function is available since SDL 2.0.0.
193 *
194 * \sa SDL_Init
195 * \sa SDL_InitSubSystem
196 */
197 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
198
199 /**
200 * Clean up all initialized subsystems.
201 *
202 * You should call this function even if you have already shutdown each
203 * initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
204 * function even in the case of errors in initialization.
205 *
206 * If you start a subsystem using a call to that subsystem's init function
207 * (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
208 * then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
209 * it down before calling SDL_Quit(). But generally, you should not be using
210 * those functions directly anyhow; use SDL_Init() instead.
211 *
212 * You can use this function with atexit() to ensure that it is run when your
213 * application is shutdown, but it is not wise to do this from a library or
214 * other dynamically loaded code.
215 *
216 * \since This function is available since SDL 2.0.0.
217 *
218 * \sa SDL_Init
219 * \sa SDL_QuitSubSystem
220 */
221 extern DECLSPEC void SDLCALL SDL_Quit(void);
222
223 /* Ends C function definitions when using C++ */
224 #ifdef __cplusplus
225 }
226 #endif
227 #include <SDL2/close_code.h>
228
229 #endif /* SDL_h_ */
230
231 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_assert_h_
22 #define SDL_assert_h_
23
24 #include <SDL2/SDL_config.h>
25
26 #include <SDL2/begin_code.h>
27 /* Set up for C function definitions, even when using C++ */
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #ifndef SDL_ASSERT_LEVEL
33 #ifdef SDL_DEFAULT_ASSERT_LEVEL
34 #define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
35 #elif defined(_DEBUG) || defined(DEBUG) || \
36 (defined(__GNUC__) && !defined(__OPTIMIZE__))
37 #define SDL_ASSERT_LEVEL 2
38 #else
39 #define SDL_ASSERT_LEVEL 1
40 #endif
41 #endif /* SDL_ASSERT_LEVEL */
42
43 /*
44 These are macros and not first class functions so that the debugger breaks
45 on the assertion line and not in some random guts of SDL, and so each
46 assert can have unique static variables associated with it.
47 */
48
49 #if defined(_MSC_VER)
50 /* Don't include intrin.h here because it contains C++ code */
51 extern void __cdecl __debugbreak(void);
52 #define SDL_TriggerBreakpoint() __debugbreak()
53 #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
54 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
55 #elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
56 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
57 #elif defined(__APPLE__) && defined(__arm__)
58 #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
59 #elif defined(__386__) && defined(__WATCOMC__)
60 #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
61 #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
62 #include <signal.h>
63 #define SDL_TriggerBreakpoint() raise(SIGTRAP)
64 #else
65 /* How do we trigger breakpoints on this platform? */
66 #define SDL_TriggerBreakpoint()
67 #endif
68
69 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
70 # define SDL_FUNCTION __func__
71 #elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
72 # define SDL_FUNCTION __FUNCTION__
73 #else
74 # define SDL_FUNCTION "???"
75 #endif
76 #define SDL_FILE __FILE__
77 #define SDL_LINE __LINE__
78
79 /*
80 sizeof (x) makes the compiler still parse the expression even without
81 assertions enabled, so the code is always checked at compile time, but
82 doesn't actually generate code for it, so there are no side effects or
83 expensive checks at run time, just the constant size of what x WOULD be,
84 which presumably gets optimized out as unused.
85 This also solves the problem of...
86
87 int somevalue = blah();
88 SDL_assert(somevalue == 1);
89
90 ...which would cause compiles to complain that somevalue is unused if we
91 disable assertions.
92 */
93
94 /* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
95 this condition isn't constant. And looks like an owl's face! */
96 #ifdef _MSC_VER /* stupid /W4 warnings. */
97 #define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
98 #else
99 #define SDL_NULL_WHILE_LOOP_CONDITION (0)
100 #endif
101
102 #define SDL_disabled_assert(condition) \
103 do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
104
105 typedef enum
106 {
107 SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
108 SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
109 SDL_ASSERTION_ABORT, /**< Terminate the program. */
110 SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
111 SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
112 } SDL_AssertState;
113
114 typedef struct SDL_AssertData
115 {
116 int always_ignore;
117 unsigned int trigger_count;
118 const char *condition;
119 const char *filename;
120 int linenum;
121 const char *function;
122 const struct SDL_AssertData *next;
123 } SDL_AssertData;
124
125 #if (SDL_ASSERT_LEVEL > 0)
126
127 /* Never call this directly. Use the SDL_assert* macros. */
128 extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
129 const char *,
130 const char *, int)
131 #if defined(__clang__)
132 #if __has_feature(attribute_analyzer_noreturn)
133 /* this tells Clang's static analysis that we're a custom assert function,
134 and that the analyzer should assume the condition was always true past this
135 SDL_assert test. */
136 __attribute__((analyzer_noreturn))
137 #endif
138 #endif
139 ;
140
141 /* the do {} while(0) avoids dangling else problems:
142 if (x) SDL_assert(y); else blah();
143 ... without the do/while, the "else" could attach to this macro's "if".
144 We try to handle just the minimum we need here in a macro...the loop,
145 the static vars, and break points. The heavy lifting is handled in
146 SDL_ReportAssertion(), in SDL_assert.c.
147 */
148 #define SDL_enabled_assert(condition) \
149 do { \
150 while ( !(condition) ) { \
151 static struct SDL_AssertData sdl_assert_data = { \
152 0, 0, #condition, 0, 0, 0, 0 \
153 }; \
154 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
155 if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
156 continue; /* go again. */ \
157 } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
158 SDL_TriggerBreakpoint(); \
159 } \
160 break; /* not retrying. */ \
161 } \
162 } while (SDL_NULL_WHILE_LOOP_CONDITION)
163
164 #endif /* enabled assertions support code */
165
166 /* Enable various levels of assertions. */
167 #if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
168 # define SDL_assert(condition) SDL_disabled_assert(condition)
169 # define SDL_assert_release(condition) SDL_disabled_assert(condition)
170 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
171 #elif SDL_ASSERT_LEVEL == 1 /* release settings. */
172 # define SDL_assert(condition) SDL_disabled_assert(condition)
173 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
174 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
175 #elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
176 # define SDL_assert(condition) SDL_enabled_assert(condition)
177 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
178 # define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
179 #elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
180 # define SDL_assert(condition) SDL_enabled_assert(condition)
181 # define SDL_assert_release(condition) SDL_enabled_assert(condition)
182 # define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
183 #else
184 # error Unknown assertion level.
185 #endif
186
187 /* this assertion is never disabled at any level. */
188 #define SDL_assert_always(condition) SDL_enabled_assert(condition)
189
190
191 /**
192 * A callback that fires when an SDL assertion fails.
193 *
194 * \param data a pointer to the SDL_AssertData structure corresponding to the
195 * current assertion
196 * \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
197 * \returns an SDL_AssertState value indicating how to handle the failure.
198 */
199 typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
200 const SDL_AssertData* data, void* userdata);
201
202 /**
203 * Set an application-defined assertion handler.
204 *
205 * This function allows an application to show its own assertion UI and/or
206 * force the response to an assertion failure. If the application doesn't
207 * provide this, SDL will try to do the right thing, popping up a
208 * system-specific GUI dialog, and probably minimizing any fullscreen windows.
209 *
210 * This callback may fire from any thread, but it runs wrapped in a mutex, so
211 * it will only fire from one thread at a time.
212 *
213 * This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
214 *
215 * \param handler the SDL_AssertionHandler function to call when an assertion
216 * fails or NULL for the default handler
217 * \param userdata a pointer that is passed to `handler`
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_GetAssertionHandler
222 */
223 extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
224 SDL_AssertionHandler handler,
225 void *userdata);
226
227 /**
228 * Get the default assertion handler.
229 *
230 * This returns the function pointer that is called by default when an
231 * assertion is triggered. This is an internal function provided by SDL, that
232 * is used for assertions when SDL_SetAssertionHandler() hasn't been used to
233 * provide a different function.
234 *
235 * \returns the default SDL_AssertionHandler that is called when an assert
236 * triggers.
237 *
238 * \since This function is available since SDL 2.0.2.
239 *
240 * \sa SDL_GetAssertionHandler
241 */
242 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
243
244 /**
245 * Get the current assertion handler.
246 *
247 * This returns the function pointer that is called when an assertion is
248 * triggered. This is either the value last passed to
249 * SDL_SetAssertionHandler(), or if no application-specified function is set,
250 * is equivalent to calling SDL_GetDefaultAssertionHandler().
251 *
252 * The parameter `puserdata` is a pointer to a void*, which will store the
253 * "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
254 * will always be NULL for the default handler. If you don't care about this
255 * data, it is safe to pass a NULL pointer to this function to ignore it.
256 *
257 * \param puserdata pointer which is filled with the "userdata" pointer that
258 * was passed to SDL_SetAssertionHandler()
259 * \returns the SDL_AssertionHandler that is called when an assert triggers.
260 *
261 * \since This function is available since SDL 2.0.2.
262 *
263 * \sa SDL_SetAssertionHandler
264 */
265 extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
266
267 /**
268 * Get a list of all assertion failures.
269 *
270 * This function gets all assertions triggered since the last call to
271 * SDL_ResetAssertionReport(), or the start of the program.
272 *
273 * The proper way to examine this data looks something like this:
274 *
275 * ```c
276 * const SDL_AssertData *item = SDL_GetAssertionReport();
277 * while (item) {
278 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
279 * item->condition, item->function, item->filename,
280 * item->linenum, item->trigger_count,
281 * item->always_ignore ? "yes" : "no");
282 * item = item->next;
283 * }
284 * ```
285 *
286 * \returns a list of all failed assertions or NULL if the list is empty. This
287 * memory should not be modified or freed by the application.
288 *
289 * \since This function is available since SDL 2.0.0.
290 *
291 * \sa SDL_ResetAssertionReport
292 */
293 extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
294
295 /**
296 * Clear the list of all assertion failures.
297 *
298 * This function will clear the list of all assertions triggered up to that
299 * point. Immediately following this call, SDL_GetAssertionReport will return
300 * no items. In addition, any previously-triggered assertions will be reset to
301 * a trigger_count of zero, and their always_ignore state will be false.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetAssertionReport
306 */
307 extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
308
309
310 /* these had wrong naming conventions until 2.0.4. Please update your app! */
311 #define SDL_assert_state SDL_AssertState
312 #define SDL_assert_data SDL_AssertData
313
314
315 /* Ends C function definitions when using C++ */
316 #ifdef __cplusplus
317 }
318 #endif
319 #include <SDL2/close_code.h>
320
321 #endif /* SDL_assert_h_ */
322
323 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_atomic.h
23 *
24 * Atomic operations.
25 *
26 * IMPORTANT:
27 * If you are not an expert in concurrent lockless programming, you should
28 * only be using the atomic lock and reference counting functions in this
29 * file. In all other cases you should be protecting your data structures
30 * with full mutexes.
31 *
32 * The list of "safe" functions to use are:
33 * SDL_AtomicLock()
34 * SDL_AtomicUnlock()
35 * SDL_AtomicIncRef()
36 * SDL_AtomicDecRef()
37 *
38 * Seriously, here be dragons!
39 * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 *
41 * You can find out a little more about lockless programming and the
42 * subtle issues that can arise here:
43 * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
44 *
45 * There's also lots of good information here:
46 * http://www.1024cores.net/home/lock-free-algorithms
47 * http://preshing.com/
48 *
49 * These operations may or may not actually be implemented using
50 * processor specific atomic operations. When possible they are
51 * implemented as true processor specific atomic operations. When that
52 * is not possible the are implemented using locks that *do* use the
53 * available atomic operations.
54 *
55 * All of the atomic operations that modify memory are full memory barriers.
56 */
57
58 #ifndef SDL_atomic_h_
59 #define SDL_atomic_h_
60
61 #include <SDL2/SDL_stdinc.h>
62 #include <SDL2/SDL_platform.h>
63
64 #include <SDL2/begin_code.h>
65
66 /* Set up for C function definitions, even when using C++ */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71 /**
72 * \name SDL AtomicLock
73 *
74 * The atomic locks are efficient spinlocks using CPU instructions,
75 * but are vulnerable to starvation and can spin forever if a thread
76 * holding a lock has been terminated. For this reason you should
77 * minimize the code executed inside an atomic lock and never do
78 * expensive things like API or system calls while holding them.
79 *
80 * The atomic locks are not safe to lock recursively.
81 *
82 * Porting Note:
83 * The spin lock functions and type are required and can not be
84 * emulated because they are used in the atomic emulation code.
85 */
86 /* @{ */
87
88 typedef int SDL_SpinLock;
89
90 /**
91 * Try to lock a spin lock by setting it to a non-zero value.
92 *
93 * ***Please note that spinlocks are dangerous if you don't know what you're
94 * doing. Please be careful using any sort of spinlock!***
95 *
96 * \param lock a pointer to a lock variable
97 * \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
98 * held.
99 *
100 * \since This function is available since SDL 2.0.0.
101 *
102 * \sa SDL_AtomicLock
103 * \sa SDL_AtomicUnlock
104 */
105 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
106
107 /**
108 * Lock a spin lock by setting it to a non-zero value.
109 *
110 * ***Please note that spinlocks are dangerous if you don't know what you're
111 * doing. Please be careful using any sort of spinlock!***
112 *
113 * \param lock a pointer to a lock variable
114 *
115 * \since This function is available since SDL 2.0.0.
116 *
117 * \sa SDL_AtomicTryLock
118 * \sa SDL_AtomicUnlock
119 */
120 extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
121
122 /**
123 * Unlock a spin lock by setting it to 0.
124 *
125 * Always returns immediately.
126 *
127 * ***Please note that spinlocks are dangerous if you don't know what you're
128 * doing. Please be careful using any sort of spinlock!***
129 *
130 * \param lock a pointer to a lock variable
131 *
132 * \since This function is available since SDL 2.0.0.
133 *
134 * \sa SDL_AtomicLock
135 * \sa SDL_AtomicTryLock
136 */
137 extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
138
139 /* @} *//* SDL AtomicLock */
140
141
142 /**
143 * The compiler barrier prevents the compiler from reordering
144 * reads and writes to globally visible variables across the call.
145 */
146 #if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
147 void _ReadWriteBarrier(void);
148 #pragma intrinsic(_ReadWriteBarrier)
149 #define SDL_CompilerBarrier() _ReadWriteBarrier()
150 #elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
151 /* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
152 #define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
153 #elif defined(__WATCOMC__)
154 extern __inline void SDL_CompilerBarrier(void);
155 #pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
156 #else
157 #define SDL_CompilerBarrier() \
158 { SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
159 #endif
160
161 /**
162 * Memory barriers are designed to prevent reads and writes from being
163 * reordered by the compiler and being seen out of order on multi-core CPUs.
164 *
165 * A typical pattern would be for thread A to write some data and a flag, and
166 * for thread B to read the flag and get the data. In this case you would
167 * insert a release barrier between writing the data and the flag,
168 * guaranteeing that the data write completes no later than the flag is
169 * written, and you would insert an acquire barrier between reading the flag
170 * and reading the data, to ensure that all the reads associated with the flag
171 * have completed.
172 *
173 * In this pattern you should always see a release barrier paired with an
174 * acquire barrier and you should gate the data reads/writes with a single
175 * flag variable.
176 *
177 * For more information on these semantics, take a look at the blog post:
178 * http://preshing.com/20120913/acquire-and-release-semantics
179 *
180 * \since This function is available since SDL 2.0.6.
181 */
182 extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
183 extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
184
185 #if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
186 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
187 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
188 #elif defined(__GNUC__) && defined(__aarch64__)
189 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
190 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
191 #elif defined(__GNUC__) && defined(__arm__)
192 #if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
193 /* Information from:
194 https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
195
196 The Linux kernel provides a helper function which provides the right code for a memory barrier,
197 hard-coded at address 0xffff0fa0
198 */
199 typedef void (*SDL_KernelMemoryBarrierFunc)();
200 #define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
201 #define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
202 #elif 0 /* defined(__QNXNTO__) */
203 #include <sys/cpuinline.h>
204
205 #define SDL_MemoryBarrierRelease() __cpu_membarrier()
206 #define SDL_MemoryBarrierAcquire() __cpu_membarrier()
207 #else
208 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
209 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
210 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
211 #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
212 #ifdef __thumb__
213 /* The mcr instruction isn't available in thumb mode, use real functions */
214 #define SDL_MEMORY_BARRIER_USES_FUNCTION
215 #define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
216 #define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
217 #else
218 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
219 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
220 #endif /* __thumb__ */
221 #else
222 #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
223 #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
224 #endif /* __LINUX__ || __ANDROID__ */
225 #endif /* __GNUC__ && __arm__ */
226 #else
227 #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
228 /* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
229 #include <mbarrier.h>
230 #define SDL_MemoryBarrierRelease() __machine_rel_barrier()
231 #define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
232 #else
233 /* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
234 #define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
235 #define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
236 #endif
237 #endif
238
239 /**
240 * \brief A type representing an atomic integer value. It is a struct
241 * so people don't accidentally use numeric operations on it.
242 */
243 typedef struct { int value; } SDL_atomic_t;
244
245 /**
246 * Set an atomic variable to a new value if it is currently an old value.
247 *
248 * ***Note: If you don't know what this function is for, you shouldn't use
249 * it!***
250 *
251 * \param a a pointer to an SDL_atomic_t variable to be modified
252 * \param oldval the old value
253 * \param newval the new value
254 * \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
255 *
256 * \since This function is available since SDL 2.0.0.
257 *
258 * \sa SDL_AtomicCASPtr
259 * \sa SDL_AtomicGet
260 * \sa SDL_AtomicSet
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
263
264 /**
265 * Set an atomic variable to a value.
266 *
267 * This function also acts as a full memory barrier.
268 *
269 * ***Note: If you don't know what this function is for, you shouldn't use
270 * it!***
271 *
272 * \param a a pointer to an SDL_atomic_t variable to be modified
273 * \param v the desired value
274 * \returns the previous value of the atomic variable.
275 *
276 * \since This function is available since SDL 2.0.2.
277 *
278 * \sa SDL_AtomicGet
279 */
280 extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
281
282 /**
283 * Get the value of an atomic variable.
284 *
285 * ***Note: If you don't know what this function is for, you shouldn't use
286 * it!***
287 *
288 * \param a a pointer to an SDL_atomic_t variable
289 * \returns the current value of an atomic variable.
290 *
291 * \since This function is available since SDL 2.0.2.
292 *
293 * \sa SDL_AtomicSet
294 */
295 extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
296
297 /**
298 * Add to an atomic variable.
299 *
300 * This function also acts as a full memory barrier.
301 *
302 * ***Note: If you don't know what this function is for, you shouldn't use
303 * it!***
304 *
305 * \param a a pointer to an SDL_atomic_t variable to be modified
306 * \param v the desired value to add
307 * \returns the previous value of the atomic variable.
308 *
309 * \since This function is available since SDL 2.0.2.
310 *
311 * \sa SDL_AtomicDecRef
312 * \sa SDL_AtomicIncRef
313 */
314 extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
315
316 /**
317 * \brief Increment an atomic variable used as a reference count.
318 */
319 #ifndef SDL_AtomicIncRef
320 #define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
321 #endif
322
323 /**
324 * \brief Decrement an atomic variable used as a reference count.
325 *
326 * \return SDL_TRUE if the variable reached zero after decrementing,
327 * SDL_FALSE otherwise
328 */
329 #ifndef SDL_AtomicDecRef
330 #define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
331 #endif
332
333 /**
334 * Set a pointer to a new value if it is currently an old value.
335 *
336 * ***Note: If you don't know what this function is for, you shouldn't use
337 * it!***
338 *
339 * \param a a pointer to a pointer
340 * \param oldval the old pointer value
341 * \param newval the new pointer value
342 * \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
343 *
344 * \since This function is available since SDL 2.0.0.
345 *
346 * \sa SDL_AtomicCAS
347 * \sa SDL_AtomicGetPtr
348 * \sa SDL_AtomicSetPtr
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
351
352 /**
353 * Set a pointer to a value atomically.
354 *
355 * ***Note: If you don't know what this function is for, you shouldn't use
356 * it!***
357 *
358 * \param a a pointer to a pointer
359 * \param v the desired pointer value
360 * \returns the previous value of the pointer.
361 *
362 * \since This function is available since SDL 2.0.2.
363 *
364 * \sa SDL_AtomicCASPtr
365 * \sa SDL_AtomicGetPtr
366 */
367 extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
368
369 /**
370 * Get the value of a pointer atomically.
371 *
372 * ***Note: If you don't know what this function is for, you shouldn't use
373 * it!***
374 *
375 * \param a a pointer to a pointer
376 * \returns the current value of a pointer.
377 *
378 * \since This function is available since SDL 2.0.2.
379 *
380 * \sa SDL_AtomicCASPtr
381 * \sa SDL_AtomicSetPtr
382 */
383 extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
384
385 /* Ends C function definitions when using C++ */
386 #ifdef __cplusplus
387 }
388 #endif
389
390 #include <SDL2/close_code.h>
391
392 #endif /* SDL_atomic_h_ */
393
394 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /* !!! FIXME: several functions in here need Doxygen comments. */
22
23 /**
24 * \file SDL_audio.h
25 *
26 * Access to the raw audio mixing buffer for the SDL library.
27 */
28
29 #ifndef SDL_audio_h_
30 #define SDL_audio_h_
31
32 #include <SDL2/SDL_stdinc.h>
33 #include <SDL2/SDL_error.h>
34 #include <SDL2/SDL_endian.h>
35 #include <SDL2/SDL_mutex.h>
36 #include <SDL2/SDL_thread.h>
37 #include <SDL2/SDL_rwops.h>
38
39 #include <SDL2/begin_code.h>
40 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 /**
46 * \brief Audio format flags.
47 *
48 * These are what the 16 bits in SDL_AudioFormat currently mean...
49 * (Unspecified bits are always zero).
50 *
51 * \verbatim
52 ++-----------------------sample is signed if set
53 ||
54 || ++-----------sample is bigendian if set
55 || ||
56 || || ++---sample is float if set
57 || || ||
58 || || || +---sample bit size---+
59 || || || | |
60 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
61 \endverbatim
62 *
63 * There are macros in SDL 2.0 and later to query these bits.
64 */
65 typedef Uint16 SDL_AudioFormat;
66
67 /**
68 * \name Audio flags
69 */
70 /* @{ */
71
72 #define SDL_AUDIO_MASK_BITSIZE (0xFF)
73 #define SDL_AUDIO_MASK_DATATYPE (1<<8)
74 #define SDL_AUDIO_MASK_ENDIAN (1<<12)
75 #define SDL_AUDIO_MASK_SIGNED (1<<15)
76 #define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
77 #define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
78 #define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
79 #define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
80 #define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
81 #define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
82 #define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
83
84 /**
85 * \name Audio format flags
86 *
87 * Defaults to LSB byte order.
88 */
89 /* @{ */
90 #define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
91 #define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
92 #define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */
93 #define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
94 #define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */
95 #define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
96 #define AUDIO_U16 AUDIO_U16LSB
97 #define AUDIO_S16 AUDIO_S16LSB
98 /* @} */
99
100 /**
101 * \name int32 support
102 */
103 /* @{ */
104 #define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
105 #define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
106 #define AUDIO_S32 AUDIO_S32LSB
107 /* @} */
108
109 /**
110 * \name float32 support
111 */
112 /* @{ */
113 #define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
114 #define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
115 #define AUDIO_F32 AUDIO_F32LSB
116 /* @} */
117
118 /**
119 * \name Native audio byte ordering
120 */
121 /* @{ */
122 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
123 #define AUDIO_U16SYS AUDIO_U16LSB
124 #define AUDIO_S16SYS AUDIO_S16LSB
125 #define AUDIO_S32SYS AUDIO_S32LSB
126 #define AUDIO_F32SYS AUDIO_F32LSB
127 #else
128 #define AUDIO_U16SYS AUDIO_U16MSB
129 #define AUDIO_S16SYS AUDIO_S16MSB
130 #define AUDIO_S32SYS AUDIO_S32MSB
131 #define AUDIO_F32SYS AUDIO_F32MSB
132 #endif
133 /* @} */
134
135 /**
136 * \name Allow change flags
137 *
138 * Which audio format changes are allowed when opening a device.
139 */
140 /* @{ */
141 #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
142 #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
143 #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
144 #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
145 #define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
146 /* @} */
147
148 /* @} *//* Audio flags */
149
150 /**
151 * This function is called when the audio device needs more data.
152 *
153 * \param userdata An application-specific parameter saved in
154 * the SDL_AudioSpec structure
155 * \param stream A pointer to the audio data buffer.
156 * \param len The length of that buffer in bytes.
157 *
158 * Once the callback returns, the buffer will no longer be valid.
159 * Stereo samples are stored in a LRLRLR ordering.
160 *
161 * You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
162 * you like. Just open your audio device with a NULL callback.
163 */
164 typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
165 int len);
166
167 /**
168 * The calculated values in this structure are calculated by SDL_OpenAudio().
169 *
170 * For multi-channel audio, the default SDL channel mapping is:
171 * 2: FL FR (stereo)
172 * 3: FL FR LFE (2.1 surround)
173 * 4: FL FR BL BR (quad)
174 * 5: FL FR FC BL BR (quad + center)
175 * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
176 * 7: FL FR FC LFE BC SL SR (6.1 surround)
177 * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
178 */
179 typedef struct SDL_AudioSpec
180 {
181 int freq; /**< DSP frequency -- samples per second */
182 SDL_AudioFormat format; /**< Audio data format */
183 Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
184 Uint8 silence; /**< Audio buffer silence value (calculated) */
185 Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
186 Uint16 padding; /**< Necessary for some compile environments */
187 Uint32 size; /**< Audio buffer size in bytes (calculated) */
188 SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
189 void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */
190 } SDL_AudioSpec;
191
192
193 struct SDL_AudioCVT;
194 typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
195 SDL_AudioFormat format);
196
197 /**
198 * \brief Upper limit of filters in SDL_AudioCVT
199 *
200 * The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
201 * currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
202 * one of which is the terminating NULL pointer.
203 */
204 #define SDL_AUDIOCVT_MAX_FILTERS 9
205
206 /**
207 * \struct SDL_AudioCVT
208 * \brief A structure to hold a set of audio conversion filters and buffers.
209 *
210 * Note that various parts of the conversion pipeline can take advantage
211 * of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
212 * you to pass it aligned data, but can possibly run much faster if you
213 * set both its (buf) field to a pointer that is aligned to 16 bytes, and its
214 * (len) field to something that's a multiple of 16, if possible.
215 */
216 #if defined(__GNUC__) && !defined(__CHERI_PURE_CAPABILITY__)
217 /* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
218 pad it out to 88 bytes to guarantee ABI compatibility between compilers.
219 This is not a concern on CHERI architectures, where pointers must be stored
220 at aligned locations otherwise they will become invalid, and thus structs
221 containing pointers cannot be packed without giving a warning or error.
222 vvv
223 The next time we rev the ABI, make sure to size the ints and add padding.
224 */
225 #define SDL_AUDIOCVT_PACKED __attribute__((packed))
226 #else
227 #define SDL_AUDIOCVT_PACKED
228 #endif
229 /* */
230 typedef struct SDL_AudioCVT
231 {
232 int needed; /**< Set to 1 if conversion possible */
233 SDL_AudioFormat src_format; /**< Source audio format */
234 SDL_AudioFormat dst_format; /**< Target audio format */
235 double rate_incr; /**< Rate conversion increment */
236 Uint8 *buf; /**< Buffer to hold entire audio data */
237 int len; /**< Length of original audio buffer */
238 int len_cvt; /**< Length of converted audio buffer */
239 int len_mult; /**< buffer must be len*len_mult big */
240 double len_ratio; /**< Given len, final size is len*len_ratio */
241 SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */
242 int filter_index; /**< Current audio conversion function */
243 } SDL_AUDIOCVT_PACKED SDL_AudioCVT;
244
245
246 /* Function prototypes */
247
248 /**
249 * \name Driver discovery functions
250 *
251 * These functions return the list of built in audio drivers, in the
252 * order that they are normally initialized by default.
253 */
254 /* @{ */
255
256 /**
257 * Use this function to get the number of built-in audio drivers.
258 *
259 * This function returns a hardcoded number. This never returns a negative
260 * value; if there are no drivers compiled into this build of SDL, this
261 * function returns zero. The presence of a driver in this list does not mean
262 * it will function, it just means SDL is capable of interacting with that
263 * interface. For example, a build of SDL might have esound support, but if
264 * there's no esound server available, SDL's esound driver would fail if used.
265 *
266 * By default, SDL tries all drivers, in its preferred order, until one is
267 * found to be usable.
268 *
269 * \returns the number of built-in audio drivers.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_GetAudioDriver
274 */
275 extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
276
277 /**
278 * Use this function to get the name of a built in audio driver.
279 *
280 * The list of audio drivers is given in the order that they are normally
281 * initialized by default; the drivers that seem more reasonable to choose
282 * first (as far as the SDL developers believe) are earlier in the list.
283 *
284 * The names of drivers are all simple, low-ASCII identifiers, like "alsa",
285 * "coreaudio" or "xaudio2". These never have Unicode characters, and are not
286 * meant to be proper names.
287 *
288 * \param index the index of the audio driver; the value ranges from 0 to
289 * SDL_GetNumAudioDrivers() - 1
290 * \returns the name of the audio driver at the requested index, or NULL if an
291 * invalid index was specified.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_GetNumAudioDrivers
296 */
297 extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
298 /* @} */
299
300 /**
301 * \name Initialization and cleanup
302 *
303 * \internal These functions are used internally, and should not be used unless
304 * you have a specific need to specify the audio driver you want to
305 * use. You should normally use SDL_Init() or SDL_InitSubSystem().
306 */
307 /* @{ */
308
309 /**
310 * Use this function to initialize a particular audio driver.
311 *
312 * This function is used internally, and should not be used unless you have a
313 * specific need to designate the audio driver you want to use. You should
314 * normally use SDL_Init() or SDL_InitSubSystem().
315 *
316 * \param driver_name the name of the desired audio driver
317 * \returns 0 on success or a negative error code on failure; call
318 * SDL_GetError() for more information.
319 *
320 * \since This function is available since SDL 2.0.0.
321 *
322 * \sa SDL_AudioQuit
323 */
324 extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
325
326 /**
327 * Use this function to shut down audio if you initialized it with
328 * SDL_AudioInit().
329 *
330 * This function is used internally, and should not be used unless you have a
331 * specific need to specify the audio driver you want to use. You should
332 * normally use SDL_Quit() or SDL_QuitSubSystem().
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_AudioInit
337 */
338 extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
339 /* @} */
340
341 /**
342 * Get the name of the current audio driver.
343 *
344 * The returned string points to internal static memory and thus never becomes
345 * invalid, even if you quit the audio subsystem and initialize a new driver
346 * (although such a case would return a different static string from another
347 * call to this function, of course). As such, you should not modify or free
348 * the returned string.
349 *
350 * \returns the name of the current audio driver or NULL if no driver has been
351 * initialized.
352 *
353 * \since This function is available since SDL 2.0.0.
354 *
355 * \sa SDL_AudioInit
356 */
357 extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
358
359 /**
360 * This function is a legacy means of opening the audio device.
361 *
362 * This function remains for compatibility with SDL 1.2, but also because it's
363 * slightly easier to use than the new functions in SDL 2.0. The new, more
364 * powerful, and preferred way to do this is SDL_OpenAudioDevice().
365 *
366 * This function is roughly equivalent to:
367 *
368 * ```c
369 * SDL_OpenAudioDevice(NULL, 0, desired, obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
370 * ```
371 *
372 * With two notable exceptions:
373 *
374 * - If `obtained` is NULL, we use `desired` (and allow no changes), which
375 * means desired will be modified to have the correct values for silence,
376 * etc, and SDL will convert any differences between your app's specific
377 * request and the hardware behind the scenes.
378 * - The return value is always success or failure, and not a device ID, which
379 * means you can only have one device open at a time with this function.
380 *
381 * \param desired an SDL_AudioSpec structure representing the desired output
382 * format. Please refer to the SDL_OpenAudioDevice
383 * documentation for details on how to prepare this structure.
384 * \param obtained an SDL_AudioSpec structure filled in with the actual
385 * parameters, or NULL.
386 * \returns 0 if successful, placing the actual hardware parameters in the
387 * structure pointed to by `obtained`.
388 *
389 * If `obtained` is NULL, the audio data passed to the callback
390 * function will be guaranteed to be in the requested format, and
391 * will be automatically converted to the actual hardware audio
392 * format if necessary. If `obtained` is NULL, `desired` will have
393 * fields modified.
394 *
395 * This function returns a negative error code on failure to open the
396 * audio device or failure to set up the audio thread; call
397 * SDL_GetError() for more information.
398 *
399 * \since This function is available since SDL 2.0.0.
400 *
401 * \sa SDL_CloseAudio
402 * \sa SDL_LockAudio
403 * \sa SDL_PauseAudio
404 * \sa SDL_UnlockAudio
405 */
406 extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
407 SDL_AudioSpec * obtained);
408
409 /**
410 * SDL Audio Device IDs.
411 *
412 * A successful call to SDL_OpenAudio() is always device id 1, and legacy
413 * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
414 * always returns devices >= 2 on success. The legacy calls are good both
415 * for backwards compatibility and when you don't care about multiple,
416 * specific, or capture devices.
417 */
418 typedef Uint32 SDL_AudioDeviceID;
419
420 /**
421 * Get the number of built-in audio devices.
422 *
423 * This function is only valid after successfully initializing the audio
424 * subsystem.
425 *
426 * Note that audio capture support is not implemented as of SDL 2.0.4, so the
427 * `iscapture` parameter is for future expansion and should always be zero for
428 * now.
429 *
430 * This function will return -1 if an explicit list of devices can't be
431 * determined. Returning -1 is not an error. For example, if SDL is set up to
432 * talk to a remote audio server, it can't list every one available on the
433 * Internet, but it will still allow a specific host to be specified in
434 * SDL_OpenAudioDevice().
435 *
436 * In many common cases, when this function returns a value <= 0, it can still
437 * successfully open the default device (NULL for first argument of
438 * SDL_OpenAudioDevice()).
439 *
440 * This function may trigger a complete redetect of available hardware. It
441 * should not be called for each iteration of a loop, but rather once at the
442 * start of a loop:
443 *
444 * ```c
445 * // Don't do this:
446 * for (int i = 0; i < SDL_GetNumAudioDevices(0); i++)
447 *
448 * // do this instead:
449 * const int count = SDL_GetNumAudioDevices(0);
450 * for (int i = 0; i < count; ++i) { do_something_here(); }
451 * ```
452 *
453 * \param iscapture zero to request playback devices, non-zero to request
454 * recording devices
455 * \returns the number of available devices exposed by the current driver or
456 * -1 if an explicit list of devices can't be determined. A return
457 * value of -1 does not necessarily mean an error condition.
458 *
459 * \since This function is available since SDL 2.0.0.
460 *
461 * \sa SDL_GetAudioDeviceName
462 * \sa SDL_OpenAudioDevice
463 */
464 extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
465
466 /**
467 * Get the human-readable name of a specific audio device.
468 *
469 * This function is only valid after successfully initializing the audio
470 * subsystem. The values returned by this function reflect the latest call to
471 * SDL_GetNumAudioDevices(); re-call that function to redetect available
472 * hardware.
473 *
474 * The string returned by this function is UTF-8 encoded, read-only, and
475 * managed internally. You are not to free it. If you need to keep the string
476 * for any length of time, you should make your own copy of it, as it will be
477 * invalid next time any of several other SDL functions are called.
478 *
479 * \param index the index of the audio device; valid values range from 0 to
480 * SDL_GetNumAudioDevices() - 1
481 * \param iscapture non-zero to query the list of recording devices, zero to
482 * query the list of output devices.
483 * \returns the name of the audio device at the requested index, or NULL on
484 * error.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetNumAudioDevices
489 */
490 extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
491 int iscapture);
492
493 /**
494 * Get the preferred audio format of a specific audio device.
495 *
496 * This function is only valid after a successfully initializing the audio
497 * subsystem. The values returned by this function reflect the latest call to
498 * SDL_GetNumAudioDevices(); re-call that function to redetect available
499 * hardware.
500 *
501 * `spec` will be filled with the sample rate, sample format, and channel
502 * count.
503 *
504 * \param index the index of the audio device; valid values range from 0 to
505 * SDL_GetNumAudioDevices() - 1
506 * \param iscapture non-zero to query the list of recording devices, zero to
507 * query the list of output devices.
508 * \param spec The SDL_AudioSpec to be initialized by this function.
509 * \returns 0 on success, nonzero on error
510 *
511 * \since This function is available since SDL 2.0.16.
512 *
513 * \sa SDL_GetNumAudioDevices
514 */
515 extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
516 int iscapture,
517 SDL_AudioSpec *spec);
518
519
520 /**
521 * Open a specific audio device.
522 *
523 * SDL_OpenAudio(), unlike this function, always acts on device ID 1. As such,
524 * this function will never return a 1 so as not to conflict with the legacy
525 * function.
526 *
527 * Please note that SDL 2.0 before 2.0.5 did not support recording; as such,
528 * this function would fail if `iscapture` was not zero. Starting with SDL
529 * 2.0.5, recording is implemented and this value can be non-zero.
530 *
531 * Passing in a `device` name of NULL requests the most reasonable default
532 * (and is equivalent to what SDL_OpenAudio() does to choose a device). The
533 * `device` name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
534 * some drivers allow arbitrary and driver-specific strings, such as a
535 * hostname/IP address for a remote audio server, or a filename in the
536 * diskaudio driver.
537 *
538 * An opened audio device starts out paused, and should be enabled for playing
539 * by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
540 * callback function to be called. Since the audio driver may modify the
541 * requested size of the audio buffer, you should allocate any local mixing
542 * buffers after you open the audio device.
543 *
544 * The audio callback runs in a separate thread in most cases; you can prevent
545 * race conditions between your callback and other threads without fully
546 * pausing playback with SDL_LockAudioDevice(). For more information about the
547 * callback, see SDL_AudioSpec.
548 *
549 * Managing the audio spec via 'desired' and 'obtained':
550 *
551 * When filling in the desired audio spec structure:
552 *
553 * - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
554 * - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
555 * - `desired->samples` is the desired size of the audio buffer, in _sample
556 * frames_ (with stereo output, two samples--left and right--would make a
557 * single sample frame). This number should be a power of two, and may be
558 * adjusted by the audio driver to a value more suitable for the hardware.
559 * Good values seem to range between 512 and 8096 inclusive, depending on
560 * the application and CPU speed. Smaller values reduce latency, but can
561 * lead to underflow if the application is doing heavy processing and cannot
562 * fill the audio buffer in time. Note that the number of sample frames is
563 * directly related to time by the following formula: `ms =
564 * (sampleframes*1000)/freq`
565 * - `desired->size` is the size in _bytes_ of the audio buffer, and is
566 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
567 * - `desired->silence` is the value used to set the buffer to silence, and is
568 * calculated by SDL_OpenAudioDevice(). You don't initialize this.
569 * - `desired->callback` should be set to a function that will be called when
570 * the audio device is ready for more data. It is passed a pointer to the
571 * audio buffer, and the length in bytes of the audio buffer. This function
572 * usually runs in a separate thread, and so you should protect data
573 * structures that it accesses by calling SDL_LockAudioDevice() and
574 * SDL_UnlockAudioDevice() in your code. Alternately, you may pass a NULL
575 * pointer here, and call SDL_QueueAudio() with some frequency, to queue
576 * more audio samples to be played (or for capture devices, call
577 * SDL_DequeueAudio() with some frequency, to obtain audio samples).
578 * - `desired->userdata` is passed as the first parameter to your callback
579 * function. If you passed a NULL callback, this value is ignored.
580 *
581 * `allowed_changes` can have the following flags OR'd together:
582 *
583 * - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
584 * - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
585 * - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
586 * - `SDL_AUDIO_ALLOW_ANY_CHANGE`
587 *
588 * These flags specify how SDL should behave when a device cannot offer a
589 * specific feature. If the application requests a feature that the hardware
590 * doesn't offer, SDL will always try to get the closest equivalent.
591 *
592 * For example, if you ask for float32 audio format, but the sound card only
593 * supports int16, SDL will set the hardware to int16. If you had set
594 * SDL_AUDIO_ALLOW_FORMAT_CHANGE, SDL will change the format in the `obtained`
595 * structure. If that flag was *not* set, SDL will prepare to convert your
596 * callback's float32 audio to int16 before feeding it to the hardware and
597 * will keep the originally requested format in the `obtained` structure.
598 *
599 * The resulting audio specs, varying depending on hardware and on what
600 * changes were allowed, will then be written back to `obtained`.
601 *
602 * If your application can only handle one specific data format, pass a zero
603 * for `allowed_changes` and let SDL transparently handle any differences.
604 *
605 * \param device a UTF-8 string reported by SDL_GetAudioDeviceName() or a
606 * driver-specific name as appropriate. NULL requests the most
607 * reasonable default device.
608 * \param iscapture non-zero to specify a device should be opened for
609 * recording, not playback
610 * \param desired an SDL_AudioSpec structure representing the desired output
611 * format; see SDL_OpenAudio() for more information
612 * \param obtained an SDL_AudioSpec structure filled in with the actual output
613 * format; see SDL_OpenAudio() for more information
614 * \param allowed_changes 0, or one or more flags OR'd together
615 * \returns a valid device ID that is > 0 on success or 0 on failure; call
616 * SDL_GetError() for more information.
617 *
618 * For compatibility with SDL 1.2, this will never return 1, since
619 * SDL reserves that ID for the legacy SDL_OpenAudio() function.
620 *
621 * \since This function is available since SDL 2.0.0.
622 *
623 * \sa SDL_CloseAudioDevice
624 * \sa SDL_GetAudioDeviceName
625 * \sa SDL_LockAudioDevice
626 * \sa SDL_OpenAudio
627 * \sa SDL_PauseAudioDevice
628 * \sa SDL_UnlockAudioDevice
629 */
630 extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(
631 const char *device,
632 int iscapture,
633 const SDL_AudioSpec *desired,
634 SDL_AudioSpec *obtained,
635 int allowed_changes);
636
637
638
639 /**
640 * \name Audio state
641 *
642 * Get the current audio state.
643 */
644 /* @{ */
645 typedef enum
646 {
647 SDL_AUDIO_STOPPED = 0,
648 SDL_AUDIO_PLAYING,
649 SDL_AUDIO_PAUSED
650 } SDL_AudioStatus;
651
652 /**
653 * This function is a legacy means of querying the audio device.
654 *
655 * New programs might want to use SDL_GetAudioDeviceStatus() instead. This
656 * function is equivalent to calling...
657 *
658 * ```c
659 * SDL_GetAudioDeviceStatus(1);
660 * ```
661 *
662 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
663 *
664 * \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio().
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_GetAudioDeviceStatus
669 */
670 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
671
672 /**
673 * Use this function to get the current audio state of an audio device.
674 *
675 * \param dev the ID of an audio device previously opened with
676 * SDL_OpenAudioDevice()
677 * \returns the SDL_AudioStatus of the specified audio device.
678 *
679 * \since This function is available since SDL 2.0.0.
680 *
681 * \sa SDL_PauseAudioDevice
682 */
683 extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
684 /* @} *//* Audio State */
685
686 /**
687 * \name Pause audio functions
688 *
689 * These functions pause and unpause the audio callback processing.
690 * They should be called with a parameter of 0 after opening the audio
691 * device to start playing sound. This is so you can safely initialize
692 * data for your callback function after opening the audio device.
693 * Silence will be written to the audio device during the pause.
694 */
695 /* @{ */
696
697 /**
698 * This function is a legacy means of pausing the audio device.
699 *
700 * New programs might want to use SDL_PauseAudioDevice() instead. This
701 * function is equivalent to calling...
702 *
703 * ```c
704 * SDL_PauseAudioDevice(1, pause_on);
705 * ```
706 *
707 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
708 *
709 * \param pause_on non-zero to pause, 0 to unpause
710 *
711 * \since This function is available since SDL 2.0.0.
712 *
713 * \sa SDL_GetAudioStatus
714 * \sa SDL_PauseAudioDevice
715 */
716 extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
717
718 /**
719 * Use this function to pause and unpause audio playback on a specified
720 * device.
721 *
722 * This function pauses and unpauses the audio callback processing for a given
723 * device. Newly-opened audio devices start in the paused state, so you must
724 * call this function with **pause_on**=0 after opening the specified audio
725 * device to start playing sound. This allows you to safely initialize data
726 * for your callback function after opening the audio device. Silence will be
727 * written to the audio device while paused, and the audio callback is
728 * guaranteed to not be called. Pausing one device does not prevent other
729 * unpaused devices from running their callbacks.
730 *
731 * Pausing state does not stack; even if you pause a device several times, a
732 * single unpause will start the device playing again, and vice versa. This is
733 * different from how SDL_LockAudioDevice() works.
734 *
735 * If you just need to protect a few variables from race conditions vs your
736 * callback, you shouldn't pause the audio device, as it will lead to dropouts
737 * in the audio playback. Instead, you should use SDL_LockAudioDevice().
738 *
739 * \param dev a device opened by SDL_OpenAudioDevice()
740 * \param pause_on non-zero to pause, 0 to unpause
741 *
742 * \since This function is available since SDL 2.0.0.
743 *
744 * \sa SDL_LockAudioDevice
745 */
746 extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
747 int pause_on);
748 /* @} *//* Pause audio functions */
749
750 /**
751 * Load the audio data of a WAVE file into memory.
752 *
753 * Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to
754 * be valid pointers. The entire data portion of the file is then loaded into
755 * memory and decoded if necessary.
756 *
757 * If `freesrc` is non-zero, the data source gets automatically closed and
758 * freed before the function returns.
759 *
760 * Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
761 * 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
762 * A-law and mu-law (8 bits). Other formats are currently unsupported and
763 * cause an error.
764 *
765 * If this function succeeds, the pointer returned by it is equal to `spec`
766 * and the pointer to the audio data allocated by the function is written to
767 * `audio_buf` and its length in bytes to `audio_len`. The SDL_AudioSpec
768 * members `freq`, `channels`, and `format` are set to the values of the audio
769 * data in the buffer. The `samples` member is set to a sane default and all
770 * others are set to zero.
771 *
772 * It's necessary to use SDL_FreeWAV() to free the audio data returned in
773 * `audio_buf` when it is no longer used.
774 *
775 * Because of the underspecification of the .WAV format, there are many
776 * problematic files in the wild that cause issues with strict decoders. To
777 * provide compatibility with these files, this decoder is lenient in regards
778 * to the truncation of the file, the fact chunk, and the size of the RIFF
779 * chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,
780 * `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to
781 * tune the behavior of the loading process.
782 *
783 * Any file that is invalid (due to truncation, corruption, or wrong values in
784 * the headers), too big, or unsupported causes an error. Additionally, any
785 * critical I/O error from the data source will terminate the loading process
786 * with an error. The function returns NULL on error and in all cases (with
787 * the exception of `src` being NULL), an appropriate error message will be
788 * set.
789 *
790 * It is required that the data source supports seeking.
791 *
792 * Example:
793 *
794 * ```c
795 * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
796 * ```
797 *
798 * Note that the SDL_LoadWAV macro does this same thing for you, but in a less
799 * messy way:
800 *
801 * ```c
802 * SDL_LoadWAV("sample.wav", &spec, &buf, &len);
803 * ```
804 *
805 * \param src The data source for the WAVE data
806 * \param freesrc If non-zero, SDL will _always_ free the data source
807 * \param spec An SDL_AudioSpec that will be filled in with the wave file's
808 * format details
809 * \param audio_buf A pointer filled with the audio data, allocated by the
810 * function.
811 * \param audio_len A pointer filled with the length of the audio data buffer
812 * in bytes
813 * \returns This function, if successfully called, returns `spec`, which will
814 * be filled with the audio data format of the wave source data.
815 * `audio_buf` will be filled with a pointer to an allocated buffer
816 * containing the audio data, and `audio_len` is filled with the
817 * length of that audio buffer in bytes.
818 *
819 * This function returns NULL if the .WAV file cannot be opened, uses
820 * an unknown data format, or is corrupt; call SDL_GetError() for
821 * more information.
822 *
823 * When the application is done with the data returned in
824 * `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
825 *
826 * \since This function is available since SDL 2.0.0.
827 *
828 * \sa SDL_FreeWAV
829 * \sa SDL_LoadWAV
830 */
831 extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
832 int freesrc,
833 SDL_AudioSpec * spec,
834 Uint8 ** audio_buf,
835 Uint32 * audio_len);
836
837 /**
838 * Loads a WAV from a file.
839 * Compatibility convenience function.
840 */
841 #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
842 SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
843
844 /**
845 * Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
846 *
847 * After a WAVE file has been opened with SDL_LoadWAV() or SDL_LoadWAV_RW()
848 * its data can eventually be freed with SDL_FreeWAV(). It is safe to call
849 * this function with a NULL pointer.
850 *
851 * \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
852 * SDL_LoadWAV_RW()
853 *
854 * \since This function is available since SDL 2.0.0.
855 *
856 * \sa SDL_LoadWAV
857 * \sa SDL_LoadWAV_RW
858 */
859 extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
860
861 /**
862 * Initialize an SDL_AudioCVT structure for conversion.
863 *
864 * Before an SDL_AudioCVT structure can be used to convert audio data it must
865 * be initialized with source and destination information.
866 *
867 * This function will zero out every field of the SDL_AudioCVT, so it must be
868 * called before the application fills in the final buffer information.
869 *
870 * Once this function has returned successfully, and reported that a
871 * conversion is necessary, the application fills in the rest of the fields in
872 * SDL_AudioCVT, now that it knows how large a buffer it needs to allocate,
873 * and then can call SDL_ConvertAudio() to complete the conversion.
874 *
875 * \param cvt an SDL_AudioCVT structure filled in with audio conversion
876 * information
877 * \param src_format the source format of the audio data; for more info see
878 * SDL_AudioFormat
879 * \param src_channels the number of channels in the source
880 * \param src_rate the frequency (sample-frames-per-second) of the source
881 * \param dst_format the destination format of the audio data; for more info
882 * see SDL_AudioFormat
883 * \param dst_channels the number of channels in the destination
884 * \param dst_rate the frequency (sample-frames-per-second) of the destination
885 * \returns 1 if the audio filter is prepared, 0 if no conversion is needed,
886 * or a negative error code on failure; call SDL_GetError() for more
887 * information.
888 *
889 * \since This function is available since SDL 2.0.0.
890 *
891 * \sa SDL_ConvertAudio
892 */
893 extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
894 SDL_AudioFormat src_format,
895 Uint8 src_channels,
896 int src_rate,
897 SDL_AudioFormat dst_format,
898 Uint8 dst_channels,
899 int dst_rate);
900
901 /**
902 * Convert audio data to a desired audio format.
903 *
904 * This function does the actual audio data conversion, after the application
905 * has called SDL_BuildAudioCVT() to prepare the conversion information and
906 * then filled in the buffer details.
907 *
908 * Once the application has initialized the `cvt` structure using
909 * SDL_BuildAudioCVT(), allocated an audio buffer and filled it with audio
910 * data in the source format, this function will convert the buffer, in-place,
911 * to the desired format.
912 *
913 * The data conversion may go through several passes; any given pass may
914 * possibly temporarily increase the size of the data. For example, SDL might
915 * expand 16-bit data to 32 bits before resampling to a lower frequency,
916 * shrinking the data size after having grown it briefly. Since the supplied
917 * buffer will be both the source and destination, converting as necessary
918 * in-place, the application must allocate a buffer that will fully contain
919 * the data during its largest conversion pass. After SDL_BuildAudioCVT()
920 * returns, the application should set the `cvt->len` field to the size, in
921 * bytes, of the source data, and allocate a buffer that is `cvt->len *
922 * cvt->len_mult` bytes long for the `buf` field.
923 *
924 * The source data should be copied into this buffer before the call to
925 * SDL_ConvertAudio(). Upon successful return, this buffer will contain the
926 * converted audio, and `cvt->len_cvt` will be the size of the converted data,
927 * in bytes. Any bytes in the buffer past `cvt->len_cvt` are undefined once
928 * this function returns.
929 *
930 * \param cvt an SDL_AudioCVT structure that was previously set up by
931 * SDL_BuildAudioCVT().
932 * \returns 0 if the conversion was completed successfully or a negative error
933 * code on failure; call SDL_GetError() for more information.
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_BuildAudioCVT
938 */
939 extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
940
941 /* SDL_AudioStream is a new audio conversion interface.
942 The benefits vs SDL_AudioCVT:
943 - it can handle resampling data in chunks without generating
944 artifacts, when it doesn't have the complete buffer available.
945 - it can handle incoming data in any variable size.
946 - You push data as you have it, and pull it when you need it
947 */
948 /* this is opaque to the outside world. */
949 struct _SDL_AudioStream;
950 typedef struct _SDL_AudioStream SDL_AudioStream;
951
952 /**
953 * Create a new audio stream.
954 *
955 * \param src_format The format of the source audio
956 * \param src_channels The number of channels of the source audio
957 * \param src_rate The sampling rate of the source audio
958 * \param dst_format The format of the desired audio output
959 * \param dst_channels The number of channels of the desired audio output
960 * \param dst_rate The sampling rate of the desired audio output
961 * \returns 0 on success, or -1 on error.
962 *
963 * \since This function is available since SDL 2.0.7.
964 *
965 * \sa SDL_AudioStreamPut
966 * \sa SDL_AudioStreamGet
967 * \sa SDL_AudioStreamAvailable
968 * \sa SDL_AudioStreamFlush
969 * \sa SDL_AudioStreamClear
970 * \sa SDL_FreeAudioStream
971 */
972 extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
973 const Uint8 src_channels,
974 const int src_rate,
975 const SDL_AudioFormat dst_format,
976 const Uint8 dst_channels,
977 const int dst_rate);
978
979 /**
980 * Add data to be converted/resampled to the stream.
981 *
982 * \param stream The stream the audio data is being added to
983 * \param buf A pointer to the audio data to add
984 * \param len The number of bytes to write to the stream
985 * \returns 0 on success, or -1 on error.
986 *
987 * \since This function is available since SDL 2.0.7.
988 *
989 * \sa SDL_NewAudioStream
990 * \sa SDL_AudioStreamGet
991 * \sa SDL_AudioStreamAvailable
992 * \sa SDL_AudioStreamFlush
993 * \sa SDL_AudioStreamClear
994 * \sa SDL_FreeAudioStream
995 */
996 extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
997
998 /**
999 * Get converted/resampled data from the stream
1000 *
1001 * \param stream The stream the audio is being requested from
1002 * \param buf A buffer to fill with audio data
1003 * \param len The maximum number of bytes to fill
1004 * \returns the number of bytes read from the stream, or -1 on error
1005 *
1006 * \since This function is available since SDL 2.0.7.
1007 *
1008 * \sa SDL_NewAudioStream
1009 * \sa SDL_AudioStreamPut
1010 * \sa SDL_AudioStreamAvailable
1011 * \sa SDL_AudioStreamFlush
1012 * \sa SDL_AudioStreamClear
1013 * \sa SDL_FreeAudioStream
1014 */
1015 extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
1016
1017 /**
1018 * Get the number of converted/resampled bytes available.
1019 *
1020 * The stream may be buffering data behind the scenes until it has enough to
1021 * resample correctly, so this number might be lower than what you expect, or
1022 * even be zero. Add more data or flush the stream if you need the data now.
1023 *
1024 * \since This function is available since SDL 2.0.7.
1025 *
1026 * \sa SDL_NewAudioStream
1027 * \sa SDL_AudioStreamPut
1028 * \sa SDL_AudioStreamGet
1029 * \sa SDL_AudioStreamFlush
1030 * \sa SDL_AudioStreamClear
1031 * \sa SDL_FreeAudioStream
1032 */
1033 extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
1034
1035 /**
1036 * Tell the stream that you're done sending data, and anything being buffered
1037 * should be converted/resampled and made available immediately.
1038 *
1039 * It is legal to add more data to a stream after flushing, but there will be
1040 * audio gaps in the output. Generally this is intended to signal the end of
1041 * input, so the complete output becomes available.
1042 *
1043 * \since This function is available since SDL 2.0.7.
1044 *
1045 * \sa SDL_NewAudioStream
1046 * \sa SDL_AudioStreamPut
1047 * \sa SDL_AudioStreamGet
1048 * \sa SDL_AudioStreamAvailable
1049 * \sa SDL_AudioStreamClear
1050 * \sa SDL_FreeAudioStream
1051 */
1052 extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
1053
1054 /**
1055 * Clear any pending data in the stream without converting it
1056 *
1057 * \since This function is available since SDL 2.0.7.
1058 *
1059 * \sa SDL_NewAudioStream
1060 * \sa SDL_AudioStreamPut
1061 * \sa SDL_AudioStreamGet
1062 * \sa SDL_AudioStreamAvailable
1063 * \sa SDL_AudioStreamFlush
1064 * \sa SDL_FreeAudioStream
1065 */
1066 extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
1067
1068 /**
1069 * Free an audio stream
1070 *
1071 * \since This function is available since SDL 2.0.7.
1072 *
1073 * \sa SDL_NewAudioStream
1074 * \sa SDL_AudioStreamPut
1075 * \sa SDL_AudioStreamGet
1076 * \sa SDL_AudioStreamAvailable
1077 * \sa SDL_AudioStreamFlush
1078 * \sa SDL_AudioStreamClear
1079 */
1080 extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
1081
1082 #define SDL_MIX_MAXVOLUME 128
1083
1084 /**
1085 * This function is a legacy means of mixing audio.
1086 *
1087 * This function is equivalent to calling...
1088 *
1089 * ```c
1090 * SDL_MixAudioFormat(dst, src, format, len, volume);
1091 * ```
1092 *
1093 * ...where `format` is the obtained format of the audio device from the
1094 * legacy SDL_OpenAudio() function.
1095 *
1096 * \param dst the destination for the mixed audio
1097 * \param src the source audio buffer to be mixed
1098 * \param len the length of the audio buffer in bytes
1099 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1100 * for full audio volume
1101 *
1102 * \since This function is available since SDL 2.0.0.
1103 *
1104 * \sa SDL_MixAudioFormat
1105 */
1106 extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
1107 Uint32 len, int volume);
1108
1109 /**
1110 * Mix audio data in a specified format.
1111 *
1112 * This takes an audio buffer `src` of `len` bytes of `format` data and mixes
1113 * it into `dst`, performing addition, volume adjustment, and overflow
1114 * clipping. The buffer pointed to by `dst` must also be `len` bytes of
1115 * `format` data.
1116 *
1117 * This is provided for convenience -- you can mix your own audio data.
1118 *
1119 * Do not use this function for mixing together more than two streams of
1120 * sample data. The output from repeated application of this function may be
1121 * distorted by clipping, because there is no accumulator with greater range
1122 * than the input (not to mention this being an inefficient way of doing it).
1123 *
1124 * It is a common misconception that this function is required to write audio
1125 * data to an output stream in an audio callback. While you can do that,
1126 * SDL_MixAudioFormat() is really only needed when you're mixing a single
1127 * audio stream with a volume adjustment.
1128 *
1129 * \param dst the destination for the mixed audio
1130 * \param src the source audio buffer to be mixed
1131 * \param format the SDL_AudioFormat structure representing the desired audio
1132 * format
1133 * \param len the length of the audio buffer in bytes
1134 * \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
1135 * for full audio volume
1136 *
1137 * \since This function is available since SDL 2.0.0.
1138 */
1139 extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
1140 const Uint8 * src,
1141 SDL_AudioFormat format,
1142 Uint32 len, int volume);
1143
1144 /**
1145 * Queue more audio on non-callback devices.
1146 *
1147 * If you are looking to retrieve queued audio from a non-callback capture
1148 * device, you want SDL_DequeueAudio() instead. SDL_QueueAudio() will return
1149 * -1 to signify an error if you use it with capture devices.
1150 *
1151 * SDL offers two ways to feed audio to the device: you can either supply a
1152 * callback that SDL triggers with some frequency to obtain more audio (pull
1153 * method), or you can supply no callback, and then SDL will expect you to
1154 * supply data at regular intervals (push method) with this function.
1155 *
1156 * There are no limits on the amount of data you can queue, short of
1157 * exhaustion of address space. Queued data will drain to the device as
1158 * necessary without further intervention from you. If the device needs audio
1159 * but there is not enough queued, it will play silence to make up the
1160 * difference. This means you will have skips in your audio playback if you
1161 * aren't routinely queueing sufficient data.
1162 *
1163 * This function copies the supplied data, so you are safe to free it when the
1164 * function returns. This function is thread-safe, but queueing to the same
1165 * device from two threads at once does not promise which buffer will be
1166 * queued first.
1167 *
1168 * You may not queue audio on a device that is using an application-supplied
1169 * callback; doing so returns an error. You have to use the audio callback or
1170 * queue audio with this function, but not both.
1171 *
1172 * You should not call SDL_LockAudio() on the device before queueing; SDL
1173 * handles locking internally for this function.
1174 *
1175 * Note that SDL2 does not support planar audio. You will need to resample
1176 * from planar audio formats into a non-planar one (see SDL_AudioFormat)
1177 * before queuing audio.
1178 *
1179 * \param dev the device ID to which we will queue audio
1180 * \param data the data to queue to the device for later playback
1181 * \param len the number of bytes (not samples!) to which `data` points
1182 * \returns 0 on success or a negative error code on failure; call
1183 * SDL_GetError() for more information.
1184 *
1185 * \since This function is available since SDL 2.0.4.
1186 *
1187 * \sa SDL_ClearQueuedAudio
1188 * \sa SDL_GetQueuedAudioSize
1189 */
1190 extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
1191
1192 /**
1193 * Dequeue more audio on non-callback devices.
1194 *
1195 * If you are looking to queue audio for output on a non-callback playback
1196 * device, you want SDL_QueueAudio() instead. SDL_DequeueAudio() will always
1197 * return 0 if you use it with playback devices.
1198 *
1199 * SDL offers two ways to retrieve audio from a capture device: you can either
1200 * supply a callback that SDL triggers with some frequency as the device
1201 * records more audio data, (push method), or you can supply no callback, and
1202 * then SDL will expect you to retrieve data at regular intervals (pull
1203 * method) with this function.
1204 *
1205 * There are no limits on the amount of data you can queue, short of
1206 * exhaustion of address space. Data from the device will keep queuing as
1207 * necessary without further intervention from you. This means you will
1208 * eventually run out of memory if you aren't routinely dequeueing data.
1209 *
1210 * Capture devices will not queue data when paused; if you are expecting to
1211 * not need captured audio for some length of time, use SDL_PauseAudioDevice()
1212 * to stop the capture device from queueing more data. This can be useful
1213 * during, say, level loading times. When unpaused, capture devices will start
1214 * queueing data from that point, having flushed any capturable data available
1215 * while paused.
1216 *
1217 * This function is thread-safe, but dequeueing from the same device from two
1218 * threads at once does not promise which thread will dequeue data first.
1219 *
1220 * You may not dequeue audio from a device that is using an
1221 * application-supplied callback; doing so returns an error. You have to use
1222 * the audio callback, or dequeue audio with this function, but not both.
1223 *
1224 * You should not call SDL_LockAudio() on the device before dequeueing; SDL
1225 * handles locking internally for this function.
1226 *
1227 * \param dev the device ID from which we will dequeue audio
1228 * \param data a pointer into where audio data should be copied
1229 * \param len the number of bytes (not samples!) to which (data) points
1230 * \returns the number of bytes dequeued, which could be less than requested;
1231 * call SDL_GetError() for more information.
1232 *
1233 * \since This function is available since SDL 2.0.5.
1234 *
1235 * \sa SDL_ClearQueuedAudio
1236 * \sa SDL_GetQueuedAudioSize
1237 */
1238 extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);
1239
1240 /**
1241 * Get the number of bytes of still-queued audio.
1242 *
1243 * For playback devices: this is the number of bytes that have been queued for
1244 * playback with SDL_QueueAudio(), but have not yet been sent to the hardware.
1245 *
1246 * Once we've sent it to the hardware, this function can not decide the exact
1247 * byte boundary of what has been played. It's possible that we just gave the
1248 * hardware several kilobytes right before you called this function, but it
1249 * hasn't played any of it yet, or maybe half of it, etc.
1250 *
1251 * For capture devices, this is the number of bytes that have been captured by
1252 * the device and are waiting for you to dequeue. This number may grow at any
1253 * time, so this only informs of the lower-bound of available data.
1254 *
1255 * You may not queue or dequeue audio on a device that is using an
1256 * application-supplied callback; calling this function on such a device
1257 * always returns 0. You have to use the audio callback or queue audio, but
1258 * not both.
1259 *
1260 * You should not call SDL_LockAudio() on the device before querying; SDL
1261 * handles locking internally for this function.
1262 *
1263 * \param dev the device ID of which we will query queued audio size
1264 * \returns the number of bytes (not samples!) of queued audio.
1265 *
1266 * \since This function is available since SDL 2.0.4.
1267 *
1268 * \sa SDL_ClearQueuedAudio
1269 * \sa SDL_QueueAudio
1270 * \sa SDL_DequeueAudio
1271 */
1272 extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
1273
1274 /**
1275 * Drop any queued audio data waiting to be sent to the hardware.
1276 *
1277 * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
1278 * output devices, the hardware will start playing silence if more audio isn't
1279 * queued. For capture devices, the hardware will start filling the empty
1280 * queue with new data if the capture device isn't paused.
1281 *
1282 * This will not prevent playback of queued audio that's already been sent to
1283 * the hardware, as we can not undo that, so expect there to be some fraction
1284 * of a second of audio that might still be heard. This can be useful if you
1285 * want to, say, drop any pending music or any unprocessed microphone input
1286 * during a level change in your game.
1287 *
1288 * You may not queue or dequeue audio on a device that is using an
1289 * application-supplied callback; calling this function on such a device
1290 * always returns 0. You have to use the audio callback or queue audio, but
1291 * not both.
1292 *
1293 * You should not call SDL_LockAudio() on the device before clearing the
1294 * queue; SDL handles locking internally for this function.
1295 *
1296 * This function always succeeds and thus returns void.
1297 *
1298 * \param dev the device ID of which to clear the audio queue
1299 *
1300 * \since This function is available since SDL 2.0.4.
1301 *
1302 * \sa SDL_GetQueuedAudioSize
1303 * \sa SDL_QueueAudio
1304 * \sa SDL_DequeueAudio
1305 */
1306 extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
1307
1308
1309 /**
1310 * \name Audio lock functions
1311 *
1312 * The lock manipulated by these functions protects the callback function.
1313 * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
1314 * the callback function is not running. Do not call these from the callback
1315 * function or you will cause deadlock.
1316 */
1317 /* @{ */
1318
1319 /**
1320 * This function is a legacy means of locking the audio device.
1321 *
1322 * New programs might want to use SDL_LockAudioDevice() instead. This function
1323 * is equivalent to calling...
1324 *
1325 * ```c
1326 * SDL_LockAudioDevice(1);
1327 * ```
1328 *
1329 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1330 *
1331 * \since This function is available since SDL 2.0.0.
1332 *
1333 * \sa SDL_LockAudioDevice
1334 * \sa SDL_UnlockAudio
1335 * \sa SDL_UnlockAudioDevice
1336 */
1337 extern DECLSPEC void SDLCALL SDL_LockAudio(void);
1338
1339 /**
1340 * Use this function to lock out the audio callback function for a specified
1341 * device.
1342 *
1343 * The lock manipulated by these functions protects the audio callback
1344 * function specified in SDL_OpenAudioDevice(). During a
1345 * SDL_LockAudioDevice()/SDL_UnlockAudioDevice() pair, you can be guaranteed
1346 * that the callback function for that device is not running, even if the
1347 * device is not paused. While a device is locked, any other unpaused,
1348 * unlocked devices may still run their callbacks.
1349 *
1350 * Calling this function from inside your audio callback is unnecessary. SDL
1351 * obtains this lock before calling your function, and releases it when the
1352 * function returns.
1353 *
1354 * You should not hold the lock longer than absolutely necessary. If you hold
1355 * it too long, you'll experience dropouts in your audio playback. Ideally,
1356 * your application locks the device, sets a few variables and unlocks again.
1357 * Do not do heavy work while holding the lock for a device.
1358 *
1359 * It is safe to lock the audio device multiple times, as long as you unlock
1360 * it an equivalent number of times. The callback will not run until the
1361 * device has been unlocked completely in this way. If your application fails
1362 * to unlock the device appropriately, your callback will never run, you might
1363 * hear repeating bursts of audio, and SDL_CloseAudioDevice() will probably
1364 * deadlock.
1365 *
1366 * Internally, the audio device lock is a mutex; if you lock from two threads
1367 * at once, not only will you block the audio callback, you'll block the other
1368 * thread.
1369 *
1370 * \param dev the ID of the device to be locked
1371 *
1372 * \since This function is available since SDL 2.0.0.
1373 *
1374 * \sa SDL_UnlockAudioDevice
1375 */
1376 extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
1377
1378 /**
1379 * This function is a legacy means of unlocking the audio device.
1380 *
1381 * New programs might want to use SDL_UnlockAudioDevice() instead. This
1382 * function is equivalent to calling...
1383 *
1384 * ```c
1385 * SDL_UnlockAudioDevice(1);
1386 * ```
1387 *
1388 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1389 *
1390 * \since This function is available since SDL 2.0.0.
1391 *
1392 * \sa SDL_LockAudio
1393 * \sa SDL_UnlockAudioDevice
1394 */
1395 extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
1396
1397 /**
1398 * Use this function to unlock the audio callback function for a specified
1399 * device.
1400 *
1401 * This function should be paired with a previous SDL_LockAudioDevice() call.
1402 *
1403 * \param dev the ID of the device to be unlocked
1404 *
1405 * \since This function is available since SDL 2.0.0.
1406 *
1407 * \sa SDL_LockAudioDevice
1408 */
1409 extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
1410 /* @} *//* Audio lock functions */
1411
1412 /**
1413 * This function is a legacy means of closing the audio device.
1414 *
1415 * This function is equivalent to calling...
1416 *
1417 * ```c
1418 * SDL_CloseAudioDevice(1);
1419 * ```
1420 *
1421 * ...and is only useful if you used the legacy SDL_OpenAudio() function.
1422 *
1423 * \since This function is available since SDL 2.0.0.
1424 *
1425 * \sa SDL_OpenAudio
1426 */
1427 extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
1428
1429 /**
1430 * Use this function to shut down audio processing and close the audio device.
1431 *
1432 * The application should close open audio devices once they are no longer
1433 * needed. Calling this function will wait until the device's audio callback
1434 * is not running, release the audio hardware and then clean up internal
1435 * state. No further audio will play from this device once this function
1436 * returns.
1437 *
1438 * This function may block briefly while pending audio data is played by the
1439 * hardware, so that applications don't drop the last buffer of data they
1440 * supplied.
1441 *
1442 * The device ID is invalid as soon as the device is closed, and is eligible
1443 * for reuse in a new SDL_OpenAudioDevice() call immediately.
1444 *
1445 * \param dev an audio device previously opened with SDL_OpenAudioDevice()
1446 *
1447 * \since This function is available since SDL 2.0.0.
1448 *
1449 * \sa SDL_OpenAudioDevice
1450 */
1451 extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
1452
1453 /* Ends C function definitions when using C++ */
1454 #ifdef __cplusplus
1455 }
1456 #endif
1457 #include <SDL2/close_code.h>
1458
1459 #endif /* SDL_audio_h_ */
1460
1461 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_bits.h
23 *
24 * Functions for fiddling with bits and bitmasks.
25 */
26
27 #ifndef SDL_bits_h_
28 #define SDL_bits_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \file SDL_bits.h
40 */
41
42 /**
43 * Get the index of the most significant bit. Result is undefined when called
44 * with 0. This operation can also be stated as "count leading zeroes" and
45 * "log base 2".
46 *
47 * \return the index of the most significant bit, or -1 if the value is 0.
48 */
49 #if defined(__WATCOMC__) && defined(__386__)
50 extern __inline int _SDL_bsr_watcom(Uint32);
51 #pragma aux _SDL_bsr_watcom = \
52 "bsr eax, eax" \
53 parm [eax] nomemory \
54 value [eax] \
55 modify exact [eax] nomemory;
56 #endif
57
58 SDL_FORCE_INLINE int
59 SDL_MostSignificantBitIndex32(Uint32 x)
60 {
61 #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
62 /* Count Leading Zeroes builtin in GCC.
63 * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
64 */
65 if (x == 0) {
66 return -1;
67 }
68 return 31 - __builtin_clz(x);
69 #elif defined(__WATCOMC__) && defined(__386__)
70 if (x == 0) {
71 return -1;
72 }
73 return _SDL_bsr_watcom(x);
74 #elif defined(_MSC_VER)
75 unsigned long index;
76 if (_BitScanReverse(&index, x)) {
77 return index;
78 }
79 return -1;
80 #else
81 /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
82 * <seander@cs.stanford.edu>, released in the public domain.
83 * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
84 */
85 const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
86 const int S[] = {1, 2, 4, 8, 16};
87
88 int msbIndex = 0;
89 int i;
90
91 if (x == 0) {
92 return -1;
93 }
94
95 for (i = 4; i >= 0; i--)
96 {
97 if (x & b[i])
98 {
99 x >>= S[i];
100 msbIndex |= S[i];
101 }
102 }
103
104 return msbIndex;
105 #endif
106 }
107
108 SDL_FORCE_INLINE SDL_bool
109 SDL_HasExactlyOneBitSet32(Uint32 x)
110 {
111 if (x && !(x & (x - 1))) {
112 return SDL_TRUE;
113 }
114 return SDL_FALSE;
115 }
116
117 /* Ends C function definitions when using C++ */
118 #ifdef __cplusplus
119 }
120 #endif
121 #include <SDL2/close_code.h>
122
123 #endif /* SDL_bits_h_ */
124
125 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_blendmode.h
23 *
24 * Header file declaring the SDL_BlendMode enumeration
25 */
26
27 #ifndef SDL_blendmode_h_
28 #define SDL_blendmode_h_
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /**
37 * \brief The blend mode used in SDL_RenderCopy() and drawing operations.
38 */
39 typedef enum
40 {
41 SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
42 dstRGBA = srcRGBA */
43 SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
44 dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
45 dstA = srcA + (dstA * (1-srcA)) */
46 SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
47 dstRGB = (srcRGB * srcA) + dstRGB
48 dstA = dstA */
49 SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
50 dstRGB = srcRGB * dstRGB
51 dstA = dstA */
52 SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
53 dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
54 dstA = (srcA * dstA) + (dstA * (1-srcA)) */
55 SDL_BLENDMODE_INVALID = 0x7FFFFFFF
56
57 /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
58
59 } SDL_BlendMode;
60
61 /**
62 * \brief The blend operation used when combining source and destination pixel components
63 */
64 typedef enum
65 {
66 SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
67 SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
68 SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
69 SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
70 SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
71 } SDL_BlendOperation;
72
73 /**
74 * \brief The normalized factor used to multiply pixel components
75 */
76 typedef enum
77 {
78 SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
79 SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
80 SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
81 SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
82 SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
83 SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
84 SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
85 SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
86 SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
87 SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
88 } SDL_BlendFactor;
89
90 /**
91 * Compose a custom blend mode for renderers.
92 *
93 * The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
94 * the SDL_BlendMode returned by this function if the renderer supports it.
95 *
96 * A blend mode controls how the pixels from a drawing operation (source) get
97 * combined with the pixels from the render target (destination). First, the
98 * components of the source and destination pixels get multiplied with their
99 * blend factors. Then, the blend operation takes the two products and
100 * calculates the result that will get stored in the render target.
101 *
102 * Expressed in pseudocode, it would look like this:
103 *
104 * ```c
105 * dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
106 * dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
107 * ```
108 *
109 * Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
110 * dst)` can return one of the following:
111 *
112 * - `src + dst`
113 * - `src - dst`
114 * - `dst - src`
115 * - `min(src, dst)`
116 * - `max(src, dst)`
117 *
118 * The red, green, and blue components are always multiplied with the first,
119 * second, and third components of the SDL_BlendFactor, respectively. The
120 * fourth component is not used.
121 *
122 * The alpha component is always multiplied with the fourth component of the
123 * SDL_BlendFactor. The other components are not used in the alpha
124 * calculation.
125 *
126 * Support for these blend modes varies for each renderer. To check if a
127 * specific SDL_BlendMode is supported, create a renderer and pass it to
128 * either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
129 * return with an error if the blend mode is not supported.
130 *
131 * This list describes the support of custom blend modes for each renderer in
132 * SDL 2.0.6. All renderers support the four blend modes listed in the
133 * SDL_BlendMode enumeration.
134 *
135 * - **direct3d**: Supports all operations with all factors. However, some
136 * factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
137 * `SDL_BLENDOPERATION_MAXIMUM`.
138 * - **direct3d11**: Same as Direct3D 9.
139 * - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
140 * factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
141 * 2.0.6.
142 * - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
143 * factors. Color and alpha factors need to be the same. OpenGL ES 1
144 * implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
145 * and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
146 * operations being different from each other. May support color and alpha
147 * factors being different from each other.
148 * - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
149 * `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
150 * operations with all factors.
151 * - **psp**: No custom blend mode support.
152 * - **software**: No custom blend mode support.
153 *
154 * Some renderers do not provide an alpha component for the default render
155 * target. The `SDL_BLENDFACTOR_DST_ALPHA` and
156 * `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
157 * case.
158 *
159 * \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
160 * blue components of the source pixels
161 * \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
162 * blue components of the destination pixels
163 * \param colorOperation the SDL_BlendOperation used to combine the red,
164 * green, and blue components of the source and
165 * destination pixels
166 * \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
167 * the source pixels
168 * \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
169 * the destination pixels
170 * \param alphaOperation the SDL_BlendOperation used to combine the alpha
171 * component of the source and destination pixels
172 * \returns an SDL_BlendMode that represents the chosen factors and
173 * operations.
174 *
175 * \since This function is available since SDL 2.0.6.
176 *
177 * \sa SDL_SetRenderDrawBlendMode
178 * \sa SDL_GetRenderDrawBlendMode
179 * \sa SDL_SetTextureBlendMode
180 * \sa SDL_GetTextureBlendMode
181 */
182 extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
183 SDL_BlendFactor dstColorFactor,
184 SDL_BlendOperation colorOperation,
185 SDL_BlendFactor srcAlphaFactor,
186 SDL_BlendFactor dstAlphaFactor,
187 SDL_BlendOperation alphaOperation);
188
189 /* Ends C function definitions when using C++ */
190 #ifdef __cplusplus
191 }
192 #endif
193 #include <SDL2/close_code.h>
194
195 #endif /* SDL_blendmode_h_ */
196
197 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_clipboard.h
23 *
24 * Include file for SDL clipboard handling
25 */
26
27 #ifndef SDL_clipboard_h_
28 #define SDL_clipboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Function prototypes */
39
40 /**
41 * Put UTF-8 text into the clipboard.
42 *
43 * \param text the text to store in the clipboard
44 * \returns 0 on success or a negative error code on failure; call
45 * SDL_GetError() for more information.
46 *
47 * \since This function is available since SDL 2.0.0.
48 *
49 * \sa SDL_GetClipboardText
50 * \sa SDL_HasClipboardText
51 */
52 extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
53
54 /**
55 * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
56 *
57 * This functions returns empty string if there was not enough memory left for
58 * a copy of the clipboard's content.
59 *
60 * \returns the clipboard text on success or an empty string on failure; call
61 * SDL_GetError() for more information. Caller must call SDL_free()
62 * on the returned pointer when done with it (even if there was an
63 * error).
64 *
65 * \since This function is available since SDL 2.0.0.
66 *
67 * \sa SDL_HasClipboardText
68 * \sa SDL_SetClipboardText
69 */
70 extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
71
72 /**
73 * Query whether the clipboard exists and contains a non-empty text string.
74 *
75 * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_GetClipboardText
80 * \sa SDL_SetClipboardText
81 */
82 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
83
84
85 /* Ends C function definitions when using C++ */
86 #ifdef __cplusplus
87 }
88 #endif
89 #include <SDL2/close_code.h>
90
91 #endif /* SDL_clipboard_h_ */
92
93 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_h_
22 #define SDL_config_h_
23
24 #include <SDL2/SDL_platform.h>
25
26 /**
27 * \file SDL_config.h
28 */
29
30 /* Add any platform that doesn't build using the configure system. */
31 #if defined(__WIN32__)
32 #include <SDL2/SDL_config_windows.h>
33 #elif defined(__WINRT__)
34 #include <SDL2/SDL_config_winrt.h>
35 #elif defined(__MACOSX__)
36 #include <SDL2/SDL_config_macosx.h>
37 #elif defined(__IPHONEOS__)
38 #include <SDL2/SDL_config_iphoneos.h>
39 #elif defined(__ANDROID__)
40 #include <SDL2/SDL_config_android.h>
41 #elif defined(__OS2__)
42 #include <SDL2/SDL_config_os2.h>
43 #elif defined(__EMSCRIPTEN__)
44 #include <SDL2/SDL_config_emscripten.h>
45 #else
46 /* This is a minimal configuration just to get SDL running on new platforms. */
47 #include <SDL2/SDL_config_minimal.h>
48 #endif /* platform config */
49
50 #ifdef USING_GENERATED_CONFIG_H
51 #error Wrong SDL_config.h, check your include path?
52 #endif
53
54 #endif /* SDL_config_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_config_iphoneos_h_
22 #define SDL_config_iphoneos_h_
23 #define SDL_config_h_
24
25 #include <SDL2/SDL_platform.h>
26
27 #ifdef __LP64__
28 #define SIZEOF_VOIDP 8
29 #else
30 #define SIZEOF_VOIDP 4
31 #endif
32
33 #define HAVE_GCC_ATOMICS 1
34
35 #define STDC_HEADERS 1
36 #define HAVE_ALLOCA_H 1
37 #define HAVE_CTYPE_H 1
38 #define HAVE_INTTYPES_H 1
39 #define HAVE_LIMITS_H 1
40 #define HAVE_MATH_H 1
41 #define HAVE_SIGNAL_H 1
42 #define HAVE_STDINT_H 1
43 #define HAVE_STDIO_H 1
44 #define HAVE_STRING_H 1
45 #define HAVE_SYS_TYPES_H 1
46 /* The libunwind functions are only available on x86 */
47 /* #undef HAVE_LIBUNWIND_H */
48
49 /* C library functions */
50 #define HAVE_DLOPEN 1
51 #define HAVE_MALLOC 1
52 #define HAVE_CALLOC 1
53 #define HAVE_REALLOC 1
54 #define HAVE_FREE 1
55 #define HAVE_ALLOCA 1
56 #define HAVE_GETENV 1
57 #define HAVE_SETENV 1
58 #define HAVE_PUTENV 1
59 #define HAVE_SETENV 1
60 #define HAVE_UNSETENV 1
61 #define HAVE_QSORT 1
62 #define HAVE_ABS 1
63 #define HAVE_BCOPY 1
64 #define HAVE_MEMSET 1
65 #define HAVE_MEMCPY 1
66 #define HAVE_MEMMOVE 1
67 #define HAVE_MEMCMP 1
68 #define HAVE_STRLEN 1
69 #define HAVE_STRLCPY 1
70 #define HAVE_STRLCAT 1
71 #define HAVE_STRCHR 1
72 #define HAVE_STRRCHR 1
73 #define HAVE_STRSTR 1
74 #define HAVE_STRTOK_R 1
75 #define HAVE_STRTOL 1
76 #define HAVE_STRTOUL 1
77 #define HAVE_STRTOLL 1
78 #define HAVE_STRTOULL 1
79 #define HAVE_STRTOD 1
80 #define HAVE_ATOI 1
81 #define HAVE_ATOF 1
82 #define HAVE_STRCMP 1
83 #define HAVE_STRNCMP 1
84 #define HAVE_STRCASECMP 1
85 #define HAVE_STRNCASECMP 1
86 #define HAVE_VSSCANF 1
87 #define HAVE_VSNPRINTF 1
88 #define HAVE_M_PI 1
89 #define HAVE_ACOS 1
90 #define HAVE_ACOSF 1
91 #define HAVE_ASIN 1
92 #define HAVE_ASINF 1
93 #define HAVE_ATAN 1
94 #define HAVE_ATANF 1
95 #define HAVE_ATAN2 1
96 #define HAVE_ATAN2F 1
97 #define HAVE_CEIL 1
98 #define HAVE_CEILF 1
99 #define HAVE_COPYSIGN 1
100 #define HAVE_COPYSIGNF 1
101 #define HAVE_COS 1
102 #define HAVE_COSF 1
103 #define HAVE_EXP 1
104 #define HAVE_EXPF 1
105 #define HAVE_FABS 1
106 #define HAVE_FABSF 1
107 #define HAVE_FLOOR 1
108 #define HAVE_FLOORF 1
109 #define HAVE_FMOD 1
110 #define HAVE_FMODF 1
111 #define HAVE_LOG 1
112 #define HAVE_LOGF 1
113 #define HAVE_LOG10 1
114 #define HAVE_LOG10F 1
115 #define HAVE_LROUND 1
116 #define HAVE_LROUNDF 1
117 #define HAVE_POW 1
118 #define HAVE_POWF 1
119 #define HAVE_ROUND 1
120 #define HAVE_ROUNDF 1
121 #define HAVE_SCALBN 1
122 #define HAVE_SCALBNF 1
123 #define HAVE_SIN 1
124 #define HAVE_SINF 1
125 #define HAVE_SQRT 1
126 #define HAVE_SQRTF 1
127 #define HAVE_TAN 1
128 #define HAVE_TANF 1
129 #define HAVE_TRUNC 1
130 #define HAVE_TRUNCF 1
131 #define HAVE_SIGACTION 1
132 #define HAVE_SETJMP 1
133 #define HAVE_NANOSLEEP 1
134 #define HAVE_SYSCONF 1
135 #define HAVE_SYSCTLBYNAME 1
136 #define HAVE_O_CLOEXEC 1
137
138 /* enable iPhone version of Core Audio driver */
139 #define SDL_AUDIO_DRIVER_COREAUDIO 1
140 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
141 #define SDL_AUDIO_DRIVER_DUMMY 1
142
143 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
144 #define SDL_HAPTIC_DUMMY 1
145
146 /* Enable joystick support */
147 /* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
148 /*#define SDL_JOYSTICK_HIDAPI 1*/
149 #define SDL_JOYSTICK_MFI 1
150 #define SDL_JOYSTICK_VIRTUAL 1
151
152 #ifdef __TVOS__
153 #define SDL_SENSOR_DUMMY 1
154 #else
155 /* Enable the CoreMotion sensor driver */
156 #define SDL_SENSOR_COREMOTION 1
157 #endif
158
159 /* Enable Unix style SO loading */
160 #define SDL_LOADSO_DLOPEN 1
161
162 /* Enable various threading systems */
163 #define SDL_THREAD_PTHREAD 1
164 #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
165
166 /* Enable various timer systems */
167 #define SDL_TIMER_UNIX 1
168
169 /* Supported video drivers */
170 #define SDL_VIDEO_DRIVER_UIKIT 1
171 #define SDL_VIDEO_DRIVER_DUMMY 1
172
173 /* Enable OpenGL ES */
174 #if !TARGET_OS_MACCATALYST
175 #define SDL_VIDEO_OPENGL_ES2 1
176 #define SDL_VIDEO_OPENGL_ES 1
177 #define SDL_VIDEO_RENDER_OGL_ES 1
178 #define SDL_VIDEO_RENDER_OGL_ES2 1
179 #endif
180
181 /* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
182 Also supported in simulator from iOS 13.0 and tvOS 13.0
183 */
184 #if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
185 #define SDL_PLATFORM_SUPPORTS_METAL 1
186 #else
187 #define SDL_PLATFORM_SUPPORTS_METAL 0
188 #endif
189
190 #if SDL_PLATFORM_SUPPORTS_METAL
191 #define SDL_VIDEO_RENDER_METAL 1
192 #endif
193
194 #if SDL_PLATFORM_SUPPORTS_METAL
195 #define SDL_VIDEO_VULKAN 1
196 #endif
197
198 #if SDL_PLATFORM_SUPPORTS_METAL
199 #define SDL_VIDEO_METAL 1
200 #endif
201
202 /* Enable system power support */
203 #define SDL_POWER_UIKIT 1
204
205 /* enable iPhone keyboard support */
206 #define SDL_IPHONE_KEYBOARD 1
207
208 /* enable iOS extended launch screen */
209 #define SDL_IPHONE_LAUNCHSCREEN 1
210
211 /* enable filesystem support */
212 #define SDL_FILESYSTEM_COCOA 1
213
214 #endif /* SDL_config_iphoneos_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_cpuinfo.h
23 *
24 * CPU feature detection for SDL.
25 */
26
27 #ifndef SDL_cpuinfo_h_
28 #define SDL_cpuinfo_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /* Need to do this here because intrin.h has C++ code in it */
33 /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
34 #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
35 #ifdef __clang__
36 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
37 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
38
39 #ifndef __PRFCHWINTRIN_H
40 #define __PRFCHWINTRIN_H
41
42 static __inline__ void __attribute__((__always_inline__, __nodebug__))
43 _m_prefetch(void *__P)
44 {
45 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
46 }
47
48 #endif /* __PRFCHWINTRIN_H */
49 #endif /* __clang__ */
50 #include <intrin.h>
51 #ifndef _WIN64
52 #ifndef __MMX__
53 #define __MMX__
54 #endif
55 #ifndef __3dNOW__
56 #define __3dNOW__
57 #endif
58 #endif
59 #ifndef __SSE__
60 #define __SSE__
61 #endif
62 #ifndef __SSE2__
63 #define __SSE2__
64 #endif
65 #ifndef __SSE3__
66 #define __SSE3__
67 #endif
68 #elif defined(__MINGW64_VERSION_MAJOR)
69 #include <intrin.h>
70 #if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
71 # include <arm_neon.h>
72 #endif
73 #else
74 /* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
75 #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
76 #include <altivec.h>
77 #endif
78 #if !defined(SDL_DISABLE_ARM_NEON_H)
79 # if defined(__ARM_NEON)
80 # include <arm_neon.h>
81 # elif defined(__WINDOWS__) || defined(__WINRT__)
82 /* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
83 # if defined(_M_ARM)
84 # include <armintr.h>
85 # include <arm_neon.h>
86 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
87 # endif
88 # if defined (_M_ARM64)
89 # include <arm64intr.h>
90 # include <arm64_neon.h>
91 # define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
92 # endif
93 # endif
94 #endif
95 #endif /* compiler version */
96
97 #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
98 #include <mm3dnow.h>
99 #endif
100 #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
101 #include <immintrin.h>
102 #else
103 #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
104 #include <mmintrin.h>
105 #endif
106 #if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
107 #include <xmmintrin.h>
108 #endif
109 #if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
110 #include <emmintrin.h>
111 #endif
112 #if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
113 #include <pmmintrin.h>
114 #endif
115 #endif /* HAVE_IMMINTRIN_H */
116
117 #include <SDL2/begin_code.h>
118 /* Set up for C function definitions, even when using C++ */
119 #ifdef __cplusplus
120 extern "C" {
121 #endif
122
123 /* This is a guess for the cacheline size used for padding.
124 * Most x86 processors have a 64 byte cache line.
125 * The 64-bit PowerPC processors have a 128 byte cache line.
126 * We'll use the larger value to be generally safe.
127 */
128 #define SDL_CACHELINE_SIZE 128
129
130 /**
131 * Get the number of CPU cores available.
132 *
133 * \returns the total number of logical CPU cores. On CPUs that include
134 * technologies such as hyperthreading, the number of logical cores
135 * may be more than the number of physical cores.
136 *
137 * \since This function is available since SDL 2.0.0.
138 */
139 extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
140
141 /**
142 * Determine the L1 cache line size of the CPU.
143 *
144 * This is useful for determining multi-threaded structure padding or SIMD
145 * prefetch sizes.
146 *
147 * \returns the L1 cache line size of the CPU, in bytes.
148 *
149 * \since This function is available since SDL 2.0.0.
150 */
151 extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
152
153 /**
154 * Determine whether the CPU has the RDTSC instruction.
155 *
156 * This always returns false on CPUs that aren't using Intel instruction sets.
157 *
158 * \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
159 *
160 * \since This function is available since SDL 2.0.0.
161 *
162 * \sa SDL_Has3DNow
163 * \sa SDL_HasAltiVec
164 * \sa SDL_HasAVX
165 * \sa SDL_HasAVX2
166 * \sa SDL_HasMMX
167 * \sa SDL_HasSSE
168 * \sa SDL_HasSSE2
169 * \sa SDL_HasSSE3
170 * \sa SDL_HasSSE41
171 * \sa SDL_HasSSE42
172 */
173 extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
174
175 /**
176 * Determine whether the CPU has AltiVec features.
177 *
178 * This always returns false on CPUs that aren't using PowerPC instruction
179 * sets.
180 *
181 * \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
182 *
183 * \since This function is available since SDL 2.0.0.
184 *
185 * \sa SDL_Has3DNow
186 * \sa SDL_HasAVX
187 * \sa SDL_HasAVX2
188 * \sa SDL_HasMMX
189 * \sa SDL_HasRDTSC
190 * \sa SDL_HasSSE
191 * \sa SDL_HasSSE2
192 * \sa SDL_HasSSE3
193 * \sa SDL_HasSSE41
194 * \sa SDL_HasSSE42
195 */
196 extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
197
198 /**
199 * Determine whether the CPU has MMX features.
200 *
201 * This always returns false on CPUs that aren't using Intel instruction sets.
202 *
203 * \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
204 *
205 * \since This function is available since SDL 2.0.0.
206 *
207 * \sa SDL_Has3DNow
208 * \sa SDL_HasAltiVec
209 * \sa SDL_HasAVX
210 * \sa SDL_HasAVX2
211 * \sa SDL_HasRDTSC
212 * \sa SDL_HasSSE
213 * \sa SDL_HasSSE2
214 * \sa SDL_HasSSE3
215 * \sa SDL_HasSSE41
216 * \sa SDL_HasSSE42
217 */
218 extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
219
220 /**
221 * Determine whether the CPU has 3DNow! features.
222 *
223 * This always returns false on CPUs that aren't using AMD instruction sets.
224 *
225 * \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
226 *
227 * \since This function is available since SDL 2.0.0.
228 *
229 * \sa SDL_HasAltiVec
230 * \sa SDL_HasAVX
231 * \sa SDL_HasAVX2
232 * \sa SDL_HasMMX
233 * \sa SDL_HasRDTSC
234 * \sa SDL_HasSSE
235 * \sa SDL_HasSSE2
236 * \sa SDL_HasSSE3
237 * \sa SDL_HasSSE41
238 * \sa SDL_HasSSE42
239 */
240 extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
241
242 /**
243 * Determine whether the CPU has SSE features.
244 *
245 * This always returns false on CPUs that aren't using Intel instruction sets.
246 *
247 * \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
248 *
249 * \since This function is available since SDL 2.0.0.
250 *
251 * \sa SDL_Has3DNow
252 * \sa SDL_HasAltiVec
253 * \sa SDL_HasAVX
254 * \sa SDL_HasAVX2
255 * \sa SDL_HasMMX
256 * \sa SDL_HasRDTSC
257 * \sa SDL_HasSSE2
258 * \sa SDL_HasSSE3
259 * \sa SDL_HasSSE41
260 * \sa SDL_HasSSE42
261 */
262 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
263
264 /**
265 * Determine whether the CPU has SSE2 features.
266 *
267 * This always returns false on CPUs that aren't using Intel instruction sets.
268 *
269 * \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
270 *
271 * \since This function is available since SDL 2.0.0.
272 *
273 * \sa SDL_Has3DNow
274 * \sa SDL_HasAltiVec
275 * \sa SDL_HasAVX
276 * \sa SDL_HasAVX2
277 * \sa SDL_HasMMX
278 * \sa SDL_HasRDTSC
279 * \sa SDL_HasSSE
280 * \sa SDL_HasSSE3
281 * \sa SDL_HasSSE41
282 * \sa SDL_HasSSE42
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
285
286 /**
287 * Determine whether the CPU has SSE3 features.
288 *
289 * This always returns false on CPUs that aren't using Intel instruction sets.
290 *
291 * \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
292 *
293 * \since This function is available since SDL 2.0.0.
294 *
295 * \sa SDL_Has3DNow
296 * \sa SDL_HasAltiVec
297 * \sa SDL_HasAVX
298 * \sa SDL_HasAVX2
299 * \sa SDL_HasMMX
300 * \sa SDL_HasRDTSC
301 * \sa SDL_HasSSE
302 * \sa SDL_HasSSE2
303 * \sa SDL_HasSSE41
304 * \sa SDL_HasSSE42
305 */
306 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
307
308 /**
309 * Determine whether the CPU has SSE4.1 features.
310 *
311 * This always returns false on CPUs that aren't using Intel instruction sets.
312 *
313 * \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
314 *
315 * \since This function is available since SDL 2.0.0.
316 *
317 * \sa SDL_Has3DNow
318 * \sa SDL_HasAltiVec
319 * \sa SDL_HasAVX
320 * \sa SDL_HasAVX2
321 * \sa SDL_HasMMX
322 * \sa SDL_HasRDTSC
323 * \sa SDL_HasSSE
324 * \sa SDL_HasSSE2
325 * \sa SDL_HasSSE3
326 * \sa SDL_HasSSE42
327 */
328 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
329
330 /**
331 * Determine whether the CPU has SSE4.2 features.
332 *
333 * This always returns false on CPUs that aren't using Intel instruction sets.
334 *
335 * \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_Has3DNow
340 * \sa SDL_HasAltiVec
341 * \sa SDL_HasAVX
342 * \sa SDL_HasAVX2
343 * \sa SDL_HasMMX
344 * \sa SDL_HasRDTSC
345 * \sa SDL_HasSSE
346 * \sa SDL_HasSSE2
347 * \sa SDL_HasSSE3
348 * \sa SDL_HasSSE41
349 */
350 extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
351
352 /**
353 * Determine whether the CPU has AVX features.
354 *
355 * This always returns false on CPUs that aren't using Intel instruction sets.
356 *
357 * \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
358 *
359 * \since This function is available since SDL 2.0.2.
360 *
361 * \sa SDL_Has3DNow
362 * \sa SDL_HasAltiVec
363 * \sa SDL_HasAVX2
364 * \sa SDL_HasMMX
365 * \sa SDL_HasRDTSC
366 * \sa SDL_HasSSE
367 * \sa SDL_HasSSE2
368 * \sa SDL_HasSSE3
369 * \sa SDL_HasSSE41
370 * \sa SDL_HasSSE42
371 */
372 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
373
374 /**
375 * Determine whether the CPU has AVX2 features.
376 *
377 * This always returns false on CPUs that aren't using Intel instruction sets.
378 *
379 * \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
380 *
381 * \since This function is available since SDL 2.0.4.
382 *
383 * \sa SDL_Has3DNow
384 * \sa SDL_HasAltiVec
385 * \sa SDL_HasAVX
386 * \sa SDL_HasMMX
387 * \sa SDL_HasRDTSC
388 * \sa SDL_HasSSE
389 * \sa SDL_HasSSE2
390 * \sa SDL_HasSSE3
391 * \sa SDL_HasSSE41
392 * \sa SDL_HasSSE42
393 */
394 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
395
396 /**
397 * Determine whether the CPU has AVX-512F (foundation) features.
398 *
399 * This always returns false on CPUs that aren't using Intel instruction sets.
400 *
401 * \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
402 *
403 * \since This function is available since SDL 2.0.9.
404 *
405 * \sa SDL_HasAVX
406 */
407 extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
408
409 /**
410 * Determine whether the CPU has ARM SIMD (ARMv6) features.
411 *
412 * This is different from ARM NEON, which is a different instruction set.
413 *
414 * This always returns false on CPUs that aren't using ARM instruction sets.
415 *
416 * \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
417 *
418 * \since This function is available since SDL 2.0.12.
419 *
420 * \sa SDL_HasNEON
421 */
422 extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
423
424 /**
425 * Determine whether the CPU has NEON (ARM SIMD) features.
426 *
427 * This always returns false on CPUs that aren't using ARM instruction sets.
428 *
429 * \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
434
435 /**
436 * Get the amount of RAM configured in the system.
437 *
438 * \returns the amount of RAM configured in the system in MB.
439 *
440 * \since This function is available since SDL 2.0.1.
441 */
442 extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
443
444 /**
445 * Report the alignment this system needs for SIMD allocations.
446 *
447 * This will return the minimum number of bytes to which a pointer must be
448 * aligned to be compatible with SIMD instructions on the current machine. For
449 * example, if the machine supports SSE only, it will return 16, but if it
450 * supports AVX-512F, it'll return 64 (etc). This only reports values for
451 * instruction sets SDL knows about, so if your SDL build doesn't have
452 * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
453 * not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
454 * Plan accordingly.
455 *
456 * \returns the alignment in bytes needed for available, known SIMD
457 * instructions.
458 *
459 * \since This function is available since SDL 2.0.10.
460 */
461 extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
462
463 /**
464 * Allocate memory in a SIMD-friendly way.
465 *
466 * This will allocate a block of memory that is suitable for use with SIMD
467 * instructions. Specifically, it will be properly aligned and padded for the
468 * system's supported vector instructions.
469 *
470 * The memory returned will be padded such that it is safe to read or write an
471 * incomplete vector at the end of the memory block. This can be useful so you
472 * don't have to drop back to a scalar fallback at the end of your SIMD
473 * processing loop to deal with the final elements without overflowing the
474 * allocated buffer.
475 *
476 * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
477 * delete[], etc.
478 *
479 * Note that SDL will only deal with SIMD instruction sets it is aware of; for
480 * example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
481 * AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
482 * 64. To be clear: if you can't decide to use an instruction set with an
483 * SDL_Has*() function, don't use that instruction set with memory allocated
484 * through here.
485 *
486 * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
487 * out of memory, but you are not allowed to dereference it (because you only
488 * own zero bytes of that buffer).
489 *
490 * \param len The length, in bytes, of the block to allocate. The actual
491 * allocated block might be larger due to padding, etc.
492 * \returns a pointer to the newly-allocated block, NULL if out of memory.
493 *
494 * \since This function is available since SDL 2.0.10.
495 *
496 * \sa SDL_SIMDAlignment
497 * \sa SDL_SIMDRealloc
498 * \sa SDL_SIMDFree
499 */
500 extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
501
502 /**
503 * Reallocate memory obtained from SDL_SIMDAlloc
504 *
505 * It is not valid to use this function on a pointer from anything but
506 * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
507 * SDL_malloc, memalign, new[], etc.
508 *
509 * \param mem The pointer obtained from SDL_SIMDAlloc. This function also
510 * accepts NULL, at which point this function is the same as
511 * calling SDL_SIMDAlloc with a NULL pointer.
512 * \param len The length, in bytes, of the block to allocated. The actual
513 * allocated block might be larger due to padding, etc. Passing 0
514 * will return a non-NULL pointer, assuming the system isn't out of
515 * memory.
516 * \returns a pointer to the newly-reallocated block, NULL if out of memory.
517 *
518 * \since This function is available since SDL 2.0.14.
519 *
520 * \sa SDL_SIMDAlignment
521 * \sa SDL_SIMDAlloc
522 * \sa SDL_SIMDFree
523 */
524 extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
525
526 /**
527 * Deallocate memory obtained from SDL_SIMDAlloc
528 *
529 * It is not valid to use this function on a pointer from anything but
530 * SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
531 * malloc, realloc, SDL_malloc, memalign, new[], etc.
532 *
533 * However, SDL_SIMDFree(NULL) is a legal no-op.
534 *
535 * The memory pointed to by `ptr` is no longer valid for access upon return,
536 * and may be returned to the system or reused by a future allocation. The
537 * pointer passed to this function is no longer safe to dereference once this
538 * function returns, and should be discarded.
539 *
540 * \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
541 * deallocate. NULL is a legal no-op.
542 *
543 * \since This function is available since SDL 2.0.10.
544 *
545 * \sa SDL_SIMDAlloc
546 * \sa SDL_SIMDRealloc
547 */
548 extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
549
550 /* Ends C function definitions when using C++ */
551 #ifdef __cplusplus
552 }
553 #endif
554 #include <SDL2/close_code.h>
555
556 #endif /* SDL_cpuinfo_h_ */
557
558 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_endian.h
23 *
24 * Functions for reading and writing endian-specific values
25 */
26
27 #ifndef SDL_endian_h_
28 #define SDL_endian_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
33 /* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
34 so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
35 #ifdef __clang__
36 #ifndef __PRFCHWINTRIN_H
37 #define __PRFCHWINTRIN_H
38 static __inline__ void __attribute__((__always_inline__, __nodebug__))
39 _m_prefetch(void *__P)
40 {
41 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
42 }
43 #endif /* __PRFCHWINTRIN_H */
44 #endif /* __clang__ */
45
46 #include <intrin.h>
47 #endif
48
49 /**
50 * \name The two types of endianness
51 */
52 /* @{ */
53 #define SDL_LIL_ENDIAN 1234
54 #define SDL_BIG_ENDIAN 4321
55 /* @} */
56
57 #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
58 #ifdef __linux__
59 #include <endian.h>
60 #define SDL_BYTEORDER __BYTE_ORDER
61 #elif defined(__OpenBSD__)
62 #include <endian.h>
63 #define SDL_BYTEORDER BYTE_ORDER
64 #elif defined(__FreeBSD__) || defined(__NetBSD__)
65 #include <sys/endian.h>
66 #define SDL_BYTEORDER BYTE_ORDER
67 /* predefs from newer gcc and clang versions: */
68 #elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
69 #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
70 #define SDL_BYTEORDER SDL_LIL_ENDIAN
71 #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
72 #define SDL_BYTEORDER SDL_BIG_ENDIAN
73 #else
74 #error Unsupported endianness
75 #endif /**/
76 #else
77 #if defined(__hppa__) || \
78 defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
79 (defined(__MIPS__) && defined(__MIPSEB__)) || \
80 defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
81 defined(__sparc__)
82 #define SDL_BYTEORDER SDL_BIG_ENDIAN
83 #else
84 #define SDL_BYTEORDER SDL_LIL_ENDIAN
85 #endif
86 #endif /* __linux__ */
87 #endif /* !SDL_BYTEORDER */
88
89
90 #include <SDL2/begin_code.h>
91 /* Set up for C function definitions, even when using C++ */
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95
96 /**
97 * \file SDL_endian.h
98 */
99
100 /* various modern compilers may have builtin swap */
101 #if defined(__GNUC__) || defined(__clang__)
102 # define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
103 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
104 # define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
105 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
106 # define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
107 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
108
109 /* this one is broken */
110 # define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
111 #else
112 # define HAS_BUILTIN_BSWAP16 0
113 # define HAS_BUILTIN_BSWAP32 0
114 # define HAS_BUILTIN_BSWAP64 0
115 # define HAS_BROKEN_BSWAP 0
116 #endif
117
118 #if HAS_BUILTIN_BSWAP16
119 #define SDL_Swap16(x) __builtin_bswap16(x)
120 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
121 #pragma intrinsic(_byteswap_ushort)
122 #define SDL_Swap16(x) _byteswap_ushort(x)
123 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
124 SDL_FORCE_INLINE Uint16
125 SDL_Swap16(Uint16 x)
126 {
127 __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
128 return x;
129 }
130 #elif defined(__x86_64__)
131 SDL_FORCE_INLINE Uint16
132 SDL_Swap16(Uint16 x)
133 {
134 __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
135 return x;
136 }
137 #elif (defined(__powerpc__) || defined(__ppc__))
138 SDL_FORCE_INLINE Uint16
139 SDL_Swap16(Uint16 x)
140 {
141 int result;
142
143 __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
144 return (Uint16)result;
145 }
146 #elif (defined(__m68k__) && !defined(__mcoldfire__))
147 SDL_FORCE_INLINE Uint16
148 SDL_Swap16(Uint16 x)
149 {
150 __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
151 return x;
152 }
153 #elif defined(__WATCOMC__) && defined(__386__)
154 extern __inline Uint16 SDL_Swap16(Uint16);
155 #pragma aux SDL_Swap16 = \
156 "xchg al, ah" \
157 parm [ax] \
158 modify [ax];
159 #else
160 SDL_FORCE_INLINE Uint16
161 SDL_Swap16(Uint16 x)
162 {
163 return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
164 }
165 #endif
166
167 #if HAS_BUILTIN_BSWAP32
168 #define SDL_Swap32(x) __builtin_bswap32(x)
169 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
170 #pragma intrinsic(_byteswap_ulong)
171 #define SDL_Swap32(x) _byteswap_ulong(x)
172 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
173 SDL_FORCE_INLINE Uint32
174 SDL_Swap32(Uint32 x)
175 {
176 __asm__("bswap %0": "=r"(x):"0"(x));
177 return x;
178 }
179 #elif defined(__x86_64__)
180 SDL_FORCE_INLINE Uint32
181 SDL_Swap32(Uint32 x)
182 {
183 __asm__("bswapl %0": "=r"(x):"0"(x));
184 return x;
185 }
186 #elif (defined(__powerpc__) || defined(__ppc__))
187 SDL_FORCE_INLINE Uint32
188 SDL_Swap32(Uint32 x)
189 {
190 Uint32 result;
191
192 __asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
193 __asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
194 __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
195 return result;
196 }
197 #elif (defined(__m68k__) && !defined(__mcoldfire__))
198 SDL_FORCE_INLINE Uint32
199 SDL_Swap32(Uint32 x)
200 {
201 __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
202 return x;
203 }
204 #elif defined(__WATCOMC__) && defined(__386__)
205 extern __inline Uint32 SDL_Swap32(Uint32);
206 #pragma aux SDL_Swap32 = \
207 "bswap eax" \
208 parm [eax] \
209 modify [eax];
210 #else
211 SDL_FORCE_INLINE Uint32
212 SDL_Swap32(Uint32 x)
213 {
214 return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
215 ((x >> 8) & 0x0000FF00) | (x >> 24)));
216 }
217 #endif
218
219 #if HAS_BUILTIN_BSWAP64
220 #define SDL_Swap64(x) __builtin_bswap64(x)
221 #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
222 #pragma intrinsic(_byteswap_uint64)
223 #define SDL_Swap64(x) _byteswap_uint64(x)
224 #elif defined(__i386__) && !HAS_BROKEN_BSWAP
225 SDL_FORCE_INLINE Uint64
226 SDL_Swap64(Uint64 x)
227 {
228 union {
229 struct {
230 Uint32 a, b;
231 } s;
232 Uint64 u;
233 } v;
234 v.u = x;
235 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
236 : "=r"(v.s.a), "=r"(v.s.b)
237 : "0" (v.s.a), "1"(v.s.b));
238 return v.u;
239 }
240 #elif defined(__x86_64__)
241 SDL_FORCE_INLINE Uint64
242 SDL_Swap64(Uint64 x)
243 {
244 __asm__("bswapq %0": "=r"(x):"0"(x));
245 return x;
246 }
247 #elif defined(__WATCOMC__) && defined(__386__)
248 extern __inline Uint64 SDL_Swap64(Uint64);
249 #pragma aux SDL_Swap64 = \
250 "bswap eax" \
251 "bswap edx" \
252 "xchg eax,edx" \
253 parm [eax edx] \
254 modify [eax edx];
255 #else
256 SDL_FORCE_INLINE Uint64
257 SDL_Swap64(Uint64 x)
258 {
259 Uint32 hi, lo;
260
261 /* Separate into high and low 32-bit values and swap them */
262 lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
263 x >>= 32;
264 hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
265 x = SDL_Swap32(lo);
266 x <<= 32;
267 x |= SDL_Swap32(hi);
268 return (x);
269 }
270 #endif
271
272
273 SDL_FORCE_INLINE float
274 SDL_SwapFloat(float x)
275 {
276 union {
277 float f;
278 Uint32 ui32;
279 } swapper;
280 swapper.f = x;
281 swapper.ui32 = SDL_Swap32(swapper.ui32);
282 return swapper.f;
283 }
284
285 /* remove extra macros */
286 #undef HAS_BROKEN_BSWAP
287 #undef HAS_BUILTIN_BSWAP16
288 #undef HAS_BUILTIN_BSWAP32
289 #undef HAS_BUILTIN_BSWAP64
290
291 /**
292 * \name Swap to native
293 * Byteswap item from the specified endianness to the native endianness.
294 */
295 /* @{ */
296 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
297 #define SDL_SwapLE16(X) (X)
298 #define SDL_SwapLE32(X) (X)
299 #define SDL_SwapLE64(X) (X)
300 #define SDL_SwapFloatLE(X) (X)
301 #define SDL_SwapBE16(X) SDL_Swap16(X)
302 #define SDL_SwapBE32(X) SDL_Swap32(X)
303 #define SDL_SwapBE64(X) SDL_Swap64(X)
304 #define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
305 #else
306 #define SDL_SwapLE16(X) SDL_Swap16(X)
307 #define SDL_SwapLE32(X) SDL_Swap32(X)
308 #define SDL_SwapLE64(X) SDL_Swap64(X)
309 #define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
310 #define SDL_SwapBE16(X) (X)
311 #define SDL_SwapBE32(X) (X)
312 #define SDL_SwapBE64(X) (X)
313 #define SDL_SwapFloatBE(X) (X)
314 #endif
315 /* @} *//* Swap to native */
316
317 /* Ends C function definitions when using C++ */
318 #ifdef __cplusplus
319 }
320 #endif
321 #include <SDL2/close_code.h>
322
323 #endif /* SDL_endian_h_ */
324
325 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_error.h
23 *
24 * Simple error message routines for SDL.
25 */
26
27 #ifndef SDL_error_h_
28 #define SDL_error_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Public functions */
39
40
41 /**
42 * Set the SDL error message for the current thread.
43 *
44 * Calling this function will replace any previous error message that was set.
45 *
46 * This function always returns -1, since SDL frequently uses -1 to signify an
47 * failing result, leading to this idiom:
48 *
49 * ```c
50 * if (error_code) {
51 * return SDL_SetError("This operation has failed: %d", error_code);
52 * }
53 * ```
54 *
55 * \param fmt a printf()-style message format string
56 * \param ... additional parameters matching % tokens in the `fmt` string, if
57 * any
58 * \returns always -1.
59 *
60 * \since This function is available since SDL 2.0.0.
61 *
62 * \sa SDL_ClearError
63 * \sa SDL_GetError
64 */
65 extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
66
67 /**
68 * Retrieve a message about the last error that occurred on the current
69 * thread.
70 *
71 * It is possible for multiple errors to occur before calling SDL_GetError().
72 * Only the last error is returned.
73 *
74 * The message is only applicable when an SDL function has signaled an error.
75 * You must check the return values of SDL function calls to determine when to
76 * appropriately call SDL_GetError(). You should *not* use the results of
77 * SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
78 * an error string even when reporting success.
79 *
80 * SDL will *not* clear the error string for successful API calls. You *must*
81 * check return values for failure cases before you can assume the error
82 * string applies.
83 *
84 * Error strings are set per-thread, so an error set in a different thread
85 * will not interfere with the current thread's operation.
86 *
87 * The returned string is internally allocated and must not be freed by the
88 * application.
89 *
90 * \returns a message with information about the specific error that occurred,
91 * or an empty string if there hasn't been an error message set since
92 * the last call to SDL_ClearError(). The message is only applicable
93 * when an SDL function has signaled an error. You must check the
94 * return values of SDL function calls to determine when to
95 * appropriately call SDL_GetError().
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_ClearError
100 * \sa SDL_SetError
101 */
102 extern DECLSPEC const char *SDLCALL SDL_GetError(void);
103
104 /**
105 * Get the last error message that was set for the current thread.
106 *
107 * This allows the caller to copy the error string into a provided buffer, but
108 * otherwise operates exactly the same as SDL_GetError().
109 *
110 * \param errstr A buffer to fill with the last error message that was set for
111 * the current thread
112 * \param maxlen The size of the buffer pointed to by the errstr parameter
113 * \returns the pointer passed in as the `errstr` parameter.
114 *
115 * \since This function is available since SDL 2.0.14.
116 *
117 * \sa SDL_GetError
118 */
119 extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
120
121 /**
122 * Clear any previous error message for this thread.
123 *
124 * \since This function is available since SDL 2.0.0.
125 *
126 * \sa SDL_GetError
127 * \sa SDL_SetError
128 */
129 extern DECLSPEC void SDLCALL SDL_ClearError(void);
130
131 /**
132 * \name Internal error functions
133 *
134 * \internal
135 * Private error reporting function - used internally.
136 */
137 /* @{ */
138 #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
139 #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
140 #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
141 typedef enum
142 {
143 SDL_ENOMEM,
144 SDL_EFREAD,
145 SDL_EFWRITE,
146 SDL_EFSEEK,
147 SDL_UNSUPPORTED,
148 SDL_LASTERROR
149 } SDL_errorcode;
150 /* SDL_Error() unconditionally returns -1. */
151 extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
152 /* @} *//* Internal error functions */
153
154 /* Ends C function definitions when using C++ */
155 #ifdef __cplusplus
156 }
157 #endif
158 #include <SDL2/close_code.h>
159
160 #endif /* SDL_error_h_ */
161
162 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_events.h
23 *
24 * Include file for SDL event handling.
25 */
26
27 #ifndef SDL_events_h_
28 #define SDL_events_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_keyboard.h>
34 #include <SDL2/SDL_mouse.h>
35 #include <SDL2/SDL_joystick.h>
36 #include <SDL2/SDL_gamecontroller.h>
37 #include <SDL2/SDL_quit.h>
38 #include <SDL2/SDL_gesture.h>
39 #include <SDL2/SDL_touch.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 /* General keyboard/mouse state definitions */
48 #define SDL_RELEASED 0
49 #define SDL_PRESSED 1
50
51 /**
52 * The types of events that can be delivered.
53 */
54 typedef enum
55 {
56 SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
57
58 /* Application events */
59 SDL_QUIT = 0x100, /**< User-requested quit */
60
61 /* These application events have special meaning on iOS, see README-ios.md for details */
62 SDL_APP_TERMINATING, /**< The application is being terminated by the OS
63 Called on iOS in applicationWillTerminate()
64 Called on Android in onDestroy()
65 */
66 SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible.
67 Called on iOS in applicationDidReceiveMemoryWarning()
68 Called on Android in onLowMemory()
69 */
70 SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
71 Called on iOS in applicationWillResignActive()
72 Called on Android in onPause()
73 */
74 SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
75 Called on iOS in applicationDidEnterBackground()
76 Called on Android in onPause()
77 */
78 SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
79 Called on iOS in applicationWillEnterForeground()
80 Called on Android in onResume()
81 */
82 SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
83 Called on iOS in applicationDidBecomeActive()
84 Called on Android in onResume()
85 */
86
87 SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
88
89 /* Display events */
90 SDL_DISPLAYEVENT = 0x150, /**< Display state change */
91
92 /* Window events */
93 SDL_WINDOWEVENT = 0x200, /**< Window state change */
94 SDL_SYSWMEVENT, /**< System specific event */
95
96 /* Keyboard events */
97 SDL_KEYDOWN = 0x300, /**< Key pressed */
98 SDL_KEYUP, /**< Key released */
99 SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
100 SDL_TEXTINPUT, /**< Keyboard text input */
101 SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
102 input language or keyboard layout change.
103 */
104 SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
105
106 /* Mouse events */
107 SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
108 SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
109 SDL_MOUSEBUTTONUP, /**< Mouse button released */
110 SDL_MOUSEWHEEL, /**< Mouse wheel motion */
111
112 /* Joystick events */
113 SDL_JOYAXISMOTION = 0x600, /**< Joystick axis motion */
114 SDL_JOYBALLMOTION, /**< Joystick trackball motion */
115 SDL_JOYHATMOTION, /**< Joystick hat position change */
116 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
117 SDL_JOYBUTTONUP, /**< Joystick button released */
118 SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
119 SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
120
121 /* Game controller events */
122 SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
123 SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */
124 SDL_CONTROLLERBUTTONUP, /**< Game controller button released */
125 SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
126 SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
127 SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
128 SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
129 SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
130 SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
131 SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
132
133 /* Touch events */
134 SDL_FINGERDOWN = 0x700,
135 SDL_FINGERUP,
136 SDL_FINGERMOTION,
137
138 /* Gesture events */
139 SDL_DOLLARGESTURE = 0x800,
140 SDL_DOLLARRECORD,
141 SDL_MULTIGESTURE,
142
143 /* Clipboard events */
144 SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
145
146 /* Drag and drop events */
147 SDL_DROPFILE = 0x1000, /**< The system requests a file open */
148 SDL_DROPTEXT, /**< text/plain drag-and-drop event */
149 SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
150 SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
151
152 /* Audio hotplug events */
153 SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
154 SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
155
156 /* Sensor events */
157 SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
158
159 /* Render events */
160 SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
161 SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
162
163 /* Internal events */
164 SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
165
166 /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
167 * and should be allocated with SDL_RegisterEvents()
168 */
169 SDL_USEREVENT = 0x8000,
170
171 /**
172 * This last event is only for bounding internal arrays
173 */
174 SDL_LASTEVENT = 0xFFFF
175 } SDL_EventType;
176
177 /**
178 * \brief Fields shared by every event
179 */
180 typedef struct SDL_CommonEvent
181 {
182 Uint32 type;
183 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
184 } SDL_CommonEvent;
185
186 /**
187 * \brief Display state change event data (event.display.*)
188 */
189 typedef struct SDL_DisplayEvent
190 {
191 Uint32 type; /**< ::SDL_DISPLAYEVENT */
192 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
193 Uint32 display; /**< The associated display index */
194 Uint8 event; /**< ::SDL_DisplayEventID */
195 Uint8 padding1;
196 Uint8 padding2;
197 Uint8 padding3;
198 Sint32 data1; /**< event dependent data */
199 } SDL_DisplayEvent;
200
201 /**
202 * \brief Window state change event data (event.window.*)
203 */
204 typedef struct SDL_WindowEvent
205 {
206 Uint32 type; /**< ::SDL_WINDOWEVENT */
207 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
208 Uint32 windowID; /**< The associated window */
209 Uint8 event; /**< ::SDL_WindowEventID */
210 Uint8 padding1;
211 Uint8 padding2;
212 Uint8 padding3;
213 Sint32 data1; /**< event dependent data */
214 Sint32 data2; /**< event dependent data */
215 } SDL_WindowEvent;
216
217 /**
218 * \brief Keyboard button event structure (event.key.*)
219 */
220 typedef struct SDL_KeyboardEvent
221 {
222 Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
223 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
224 Uint32 windowID; /**< The window with keyboard focus, if any */
225 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
226 Uint8 repeat; /**< Non-zero if this is a key repeat */
227 Uint8 padding2;
228 Uint8 padding3;
229 SDL_Keysym keysym; /**< The key that was pressed or released */
230 } SDL_KeyboardEvent;
231
232 #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
233 /**
234 * \brief Keyboard text editing event structure (event.edit.*)
235 */
236 typedef struct SDL_TextEditingEvent
237 {
238 Uint32 type; /**< ::SDL_TEXTEDITING */
239 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
240 Uint32 windowID; /**< The window with keyboard focus, if any */
241 char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
242 Sint32 start; /**< The start cursor of selected editing text */
243 Sint32 length; /**< The length of selected editing text */
244 } SDL_TextEditingEvent;
245
246 /**
247 * \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
248 * truncated if stored in the text buffer SDL_TextEditingEvent
249 */
250 typedef struct SDL_TextEditingExtEvent
251 {
252 Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
253 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
254 Uint32 windowID; /**< The window with keyboard focus, if any */
255 char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
256 Sint32 start; /**< The start cursor of selected editing text */
257 Sint32 length; /**< The length of selected editing text */
258 } SDL_TextEditingExtEvent;
259
260 #define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
261 /**
262 * \brief Keyboard text input event structure (event.text.*)
263 */
264 typedef struct SDL_TextInputEvent
265 {
266 Uint32 type; /**< ::SDL_TEXTINPUT */
267 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
268 Uint32 windowID; /**< The window with keyboard focus, if any */
269 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
270 } SDL_TextInputEvent;
271
272 /**
273 * \brief Mouse motion event structure (event.motion.*)
274 */
275 typedef struct SDL_MouseMotionEvent
276 {
277 Uint32 type; /**< ::SDL_MOUSEMOTION */
278 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
279 Uint32 windowID; /**< The window with mouse focus, if any */
280 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
281 Uint32 state; /**< The current button state */
282 Sint32 x; /**< X coordinate, relative to window */
283 Sint32 y; /**< Y coordinate, relative to window */
284 Sint32 xrel; /**< The relative motion in the X direction */
285 Sint32 yrel; /**< The relative motion in the Y direction */
286 } SDL_MouseMotionEvent;
287
288 /**
289 * \brief Mouse button event structure (event.button.*)
290 */
291 typedef struct SDL_MouseButtonEvent
292 {
293 Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
294 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
295 Uint32 windowID; /**< The window with mouse focus, if any */
296 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
297 Uint8 button; /**< The mouse button index */
298 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
299 Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
300 Uint8 padding1;
301 Sint32 x; /**< X coordinate, relative to window */
302 Sint32 y; /**< Y coordinate, relative to window */
303 } SDL_MouseButtonEvent;
304
305 /**
306 * \brief Mouse wheel event structure (event.wheel.*)
307 */
308 typedef struct SDL_MouseWheelEvent
309 {
310 Uint32 type; /**< ::SDL_MOUSEWHEEL */
311 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
312 Uint32 windowID; /**< The window with mouse focus, if any */
313 Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
314 Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
315 Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
316 Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
317 float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
318 float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
319 } SDL_MouseWheelEvent;
320
321 /**
322 * \brief Joystick axis motion event structure (event.jaxis.*)
323 */
324 typedef struct SDL_JoyAxisEvent
325 {
326 Uint32 type; /**< ::SDL_JOYAXISMOTION */
327 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
328 SDL_JoystickID which; /**< The joystick instance id */
329 Uint8 axis; /**< The joystick axis index */
330 Uint8 padding1;
331 Uint8 padding2;
332 Uint8 padding3;
333 Sint16 value; /**< The axis value (range: -32768 to 32767) */
334 Uint16 padding4;
335 } SDL_JoyAxisEvent;
336
337 /**
338 * \brief Joystick trackball motion event structure (event.jball.*)
339 */
340 typedef struct SDL_JoyBallEvent
341 {
342 Uint32 type; /**< ::SDL_JOYBALLMOTION */
343 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
344 SDL_JoystickID which; /**< The joystick instance id */
345 Uint8 ball; /**< The joystick trackball index */
346 Uint8 padding1;
347 Uint8 padding2;
348 Uint8 padding3;
349 Sint16 xrel; /**< The relative motion in the X direction */
350 Sint16 yrel; /**< The relative motion in the Y direction */
351 } SDL_JoyBallEvent;
352
353 /**
354 * \brief Joystick hat position change event structure (event.jhat.*)
355 */
356 typedef struct SDL_JoyHatEvent
357 {
358 Uint32 type; /**< ::SDL_JOYHATMOTION */
359 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
360 SDL_JoystickID which; /**< The joystick instance id */
361 Uint8 hat; /**< The joystick hat index */
362 Uint8 value; /**< The hat position value.
363 * \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
364 * \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
365 * \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
366 *
367 * Note that zero means the POV is centered.
368 */
369 Uint8 padding1;
370 Uint8 padding2;
371 } SDL_JoyHatEvent;
372
373 /**
374 * \brief Joystick button event structure (event.jbutton.*)
375 */
376 typedef struct SDL_JoyButtonEvent
377 {
378 Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
379 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
380 SDL_JoystickID which; /**< The joystick instance id */
381 Uint8 button; /**< The joystick button index */
382 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
383 Uint8 padding1;
384 Uint8 padding2;
385 } SDL_JoyButtonEvent;
386
387 /**
388 * \brief Joystick device event structure (event.jdevice.*)
389 */
390 typedef struct SDL_JoyDeviceEvent
391 {
392 Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
393 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
394 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
395 } SDL_JoyDeviceEvent;
396
397
398 /**
399 * \brief Game controller axis motion event structure (event.caxis.*)
400 */
401 typedef struct SDL_ControllerAxisEvent
402 {
403 Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
404 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
405 SDL_JoystickID which; /**< The joystick instance id */
406 Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
407 Uint8 padding1;
408 Uint8 padding2;
409 Uint8 padding3;
410 Sint16 value; /**< The axis value (range: -32768 to 32767) */
411 Uint16 padding4;
412 } SDL_ControllerAxisEvent;
413
414
415 /**
416 * \brief Game controller button event structure (event.cbutton.*)
417 */
418 typedef struct SDL_ControllerButtonEvent
419 {
420 Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
421 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
422 SDL_JoystickID which; /**< The joystick instance id */
423 Uint8 button; /**< The controller button (SDL_GameControllerButton) */
424 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
425 Uint8 padding1;
426 Uint8 padding2;
427 } SDL_ControllerButtonEvent;
428
429
430 /**
431 * \brief Controller device event structure (event.cdevice.*)
432 */
433 typedef struct SDL_ControllerDeviceEvent
434 {
435 Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
436 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
437 Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
438 } SDL_ControllerDeviceEvent;
439
440 /**
441 * \brief Game controller touchpad event structure (event.ctouchpad.*)
442 */
443 typedef struct SDL_ControllerTouchpadEvent
444 {
445 Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
446 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
447 SDL_JoystickID which; /**< The joystick instance id */
448 Sint32 touchpad; /**< The index of the touchpad */
449 Sint32 finger; /**< The index of the finger on the touchpad */
450 float x; /**< Normalized in the range 0...1 with 0 being on the left */
451 float y; /**< Normalized in the range 0...1 with 0 being at the top */
452 float pressure; /**< Normalized in the range 0...1 */
453 } SDL_ControllerTouchpadEvent;
454
455 /**
456 * \brief Game controller sensor event structure (event.csensor.*)
457 */
458 typedef struct SDL_ControllerSensorEvent
459 {
460 Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
461 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
462 SDL_JoystickID which; /**< The joystick instance id */
463 Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
464 float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
465 } SDL_ControllerSensorEvent;
466
467 /**
468 * \brief Audio device event structure (event.adevice.*)
469 */
470 typedef struct SDL_AudioDeviceEvent
471 {
472 Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
473 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
474 Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
475 Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
476 Uint8 padding1;
477 Uint8 padding2;
478 Uint8 padding3;
479 } SDL_AudioDeviceEvent;
480
481
482 /**
483 * \brief Touch finger event structure (event.tfinger.*)
484 */
485 typedef struct SDL_TouchFingerEvent
486 {
487 Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
488 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
489 SDL_TouchID touchId; /**< The touch device id */
490 SDL_FingerID fingerId;
491 float x; /**< Normalized in the range 0...1 */
492 float y; /**< Normalized in the range 0...1 */
493 float dx; /**< Normalized in the range -1...1 */
494 float dy; /**< Normalized in the range -1...1 */
495 float pressure; /**< Normalized in the range 0...1 */
496 Uint32 windowID; /**< The window underneath the finger, if any */
497 } SDL_TouchFingerEvent;
498
499
500 /**
501 * \brief Multiple Finger Gesture Event (event.mgesture.*)
502 */
503 typedef struct SDL_MultiGestureEvent
504 {
505 Uint32 type; /**< ::SDL_MULTIGESTURE */
506 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
507 SDL_TouchID touchId; /**< The touch device id */
508 float dTheta;
509 float dDist;
510 float x;
511 float y;
512 Uint16 numFingers;
513 Uint16 padding;
514 } SDL_MultiGestureEvent;
515
516
517 /**
518 * \brief Dollar Gesture Event (event.dgesture.*)
519 */
520 typedef struct SDL_DollarGestureEvent
521 {
522 Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
523 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
524 SDL_TouchID touchId; /**< The touch device id */
525 SDL_GestureID gestureId;
526 Uint32 numFingers;
527 float error;
528 float x; /**< Normalized center of gesture */
529 float y; /**< Normalized center of gesture */
530 } SDL_DollarGestureEvent;
531
532
533 /**
534 * \brief An event used to request a file open by the system (event.drop.*)
535 * This event is enabled by default, you can disable it with SDL_EventState().
536 * \note If this event is enabled, you must free the filename in the event.
537 */
538 typedef struct SDL_DropEvent
539 {
540 Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
541 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
542 char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
543 Uint32 windowID; /**< The window that was dropped on, if any */
544 } SDL_DropEvent;
545
546
547 /**
548 * \brief Sensor event structure (event.sensor.*)
549 */
550 typedef struct SDL_SensorEvent
551 {
552 Uint32 type; /**< ::SDL_SENSORUPDATE */
553 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
554 Sint32 which; /**< The instance ID of the sensor */
555 float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
556 } SDL_SensorEvent;
557
558 /**
559 * \brief The "quit requested" event
560 */
561 typedef struct SDL_QuitEvent
562 {
563 Uint32 type; /**< ::SDL_QUIT */
564 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
565 } SDL_QuitEvent;
566
567 /**
568 * \brief OS Specific event
569 */
570 typedef struct SDL_OSEvent
571 {
572 Uint32 type; /**< ::SDL_QUIT */
573 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
574 } SDL_OSEvent;
575
576 /**
577 * \brief A user-defined event type (event.user.*)
578 */
579 typedef struct SDL_UserEvent
580 {
581 Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
582 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
583 Uint32 windowID; /**< The associated window if any */
584 Sint32 code; /**< User defined event code */
585 void *data1; /**< User defined data pointer */
586 void *data2; /**< User defined data pointer */
587 } SDL_UserEvent;
588
589
590 struct SDL_SysWMmsg;
591 typedef struct SDL_SysWMmsg SDL_SysWMmsg;
592
593 /**
594 * \brief A video driver dependent system event (event.syswm.*)
595 * This event is disabled by default, you can enable it with SDL_EventState()
596 *
597 * \note If you want to use this event, you should include SDL_syswm.h.
598 */
599 typedef struct SDL_SysWMEvent
600 {
601 Uint32 type; /**< ::SDL_SYSWMEVENT */
602 Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
603 SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
604 } SDL_SysWMEvent;
605
606 /**
607 * \brief General event structure
608 */
609 typedef union SDL_Event
610 {
611 Uint32 type; /**< Event type, shared with all events */
612 SDL_CommonEvent common; /**< Common event data */
613 SDL_DisplayEvent display; /**< Display event data */
614 SDL_WindowEvent window; /**< Window event data */
615 SDL_KeyboardEvent key; /**< Keyboard event data */
616 SDL_TextEditingEvent edit; /**< Text editing event data */
617 SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
618 SDL_TextInputEvent text; /**< Text input event data */
619 SDL_MouseMotionEvent motion; /**< Mouse motion event data */
620 SDL_MouseButtonEvent button; /**< Mouse button event data */
621 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
622 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
623 SDL_JoyBallEvent jball; /**< Joystick ball event data */
624 SDL_JoyHatEvent jhat; /**< Joystick hat event data */
625 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
626 SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
627 SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
628 SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
629 SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
630 SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
631 SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
632 SDL_AudioDeviceEvent adevice; /**< Audio device event data */
633 SDL_SensorEvent sensor; /**< Sensor event data */
634 SDL_QuitEvent quit; /**< Quit request event data */
635 SDL_UserEvent user; /**< Custom event data */
636 SDL_SysWMEvent syswm; /**< System dependent window event data */
637 SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
638 SDL_MultiGestureEvent mgesture; /**< Gesture event data */
639 SDL_DollarGestureEvent dgesture; /**< Gesture event data */
640 SDL_DropEvent drop; /**< Drag and drop event data */
641
642 /* This is necessary for ABI compatibility between Visual C++ and GCC.
643 Visual C++ will respect the push pack pragma and use 52 bytes (size of
644 SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
645 architectures) for this union, and GCC will use the alignment of the
646 largest datatype within the union, which is 8 bytes on 64-bit
647 architectures.
648
649 So... we'll add padding to force the size to be 56 bytes for both.
650
651 On architectures where pointers are 16 bytes, this needs rounding up to
652 the next multiple of 16, 64, and on architectures where pointers are
653 even larger the size of SDL_UserEvent will dominate as being 3 pointers.
654 */
655 Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
656 } SDL_Event;
657
658 /* Make sure we haven't broken binary compatibility */
659 SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
660
661
662 /* Function prototypes */
663
664 /**
665 * Pump the event loop, gathering events from the input devices.
666 *
667 * This function updates the event queue and internal input device state.
668 *
669 * **WARNING**: This should only be run in the thread that initialized the
670 * video subsystem, and for extra safety, you should consider only doing those
671 * things on the main thread in any case.
672 *
673 * SDL_PumpEvents() gathers all the pending input information from devices and
674 * places it in the event queue. Without calls to SDL_PumpEvents() no events
675 * would ever be placed on the queue. Often the need for calls to
676 * SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
677 * SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
678 * polling or waiting for events (e.g. you are filtering them), then you must
679 * call SDL_PumpEvents() to force an event queue update.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_PollEvent
684 * \sa SDL_WaitEvent
685 */
686 extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
687
688 /* @{ */
689 typedef enum
690 {
691 SDL_ADDEVENT,
692 SDL_PEEKEVENT,
693 SDL_GETEVENT
694 } SDL_eventaction;
695
696 /**
697 * Check the event queue for messages and optionally return them.
698 *
699 * `action` may be any of the following:
700 *
701 * - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
702 * event queue.
703 * - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
704 * within the specified minimum and maximum type, will be returned to the
705 * caller and will _not_ be removed from the queue.
706 * - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
707 * within the specified minimum and maximum type, will be returned to the
708 * caller and will be removed from the queue.
709 *
710 * You may have to call SDL_PumpEvents() before calling this function.
711 * Otherwise, the events may not be ready to be filtered when you call
712 * SDL_PeepEvents().
713 *
714 * This function is thread-safe.
715 *
716 * \param events destination buffer for the retrieved events
717 * \param numevents if action is SDL_ADDEVENT, the number of events to add
718 * back to the event queue; if action is SDL_PEEKEVENT or
719 * SDL_GETEVENT, the maximum number of events to retrieve
720 * \param action action to take; see [[#action|Remarks]] for details
721 * \param minType minimum value of the event type to be considered;
722 * SDL_FIRSTEVENT is a safe choice
723 * \param maxType maximum value of the event type to be considered;
724 * SDL_LASTEVENT is a safe choice
725 * \returns the number of events actually stored or a negative error code on
726 * failure; call SDL_GetError() for more information.
727 *
728 * \since This function is available since SDL 2.0.0.
729 *
730 * \sa SDL_PollEvent
731 * \sa SDL_PumpEvents
732 * \sa SDL_PushEvent
733 */
734 extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
735 SDL_eventaction action,
736 Uint32 minType, Uint32 maxType);
737 /* @} */
738
739 /**
740 * Check for the existence of a certain event type in the event queue.
741 *
742 * If you need to check for a range of event types, use SDL_HasEvents()
743 * instead.
744 *
745 * \param type the type of event to be queried; see SDL_EventType for details
746 * \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
747 * events matching `type` are not present.
748 *
749 * \since This function is available since SDL 2.0.0.
750 *
751 * \sa SDL_HasEvents
752 */
753 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
754
755
756 /**
757 * Check for the existence of certain event types in the event queue.
758 *
759 * If you need to check for a single event type, use SDL_HasEvent() instead.
760 *
761 * \param minType the low end of event type to be queried, inclusive; see
762 * SDL_EventType for details
763 * \param maxType the high end of event type to be queried, inclusive; see
764 * SDL_EventType for details
765 * \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
766 * present, or SDL_FALSE if not.
767 *
768 * \since This function is available since SDL 2.0.0.
769 *
770 * \sa SDL_HasEvents
771 */
772 extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
773
774 /**
775 * Clear events of a specific type from the event queue.
776 *
777 * This will unconditionally remove any events from the queue that match
778 * `type`. If you need to remove a range of event types, use SDL_FlushEvents()
779 * instead.
780 *
781 * It's also normal to just ignore events you don't care about in your event
782 * loop without calling this function.
783 *
784 * This function only affects currently queued events. If you want to make
785 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
786 * on the main thread immediately before the flush call.
787 *
788 * \param type the type of event to be cleared; see SDL_EventType for details
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_FlushEvents
793 */
794 extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
795
796 /**
797 * Clear events of a range of types from the event queue.
798 *
799 * This will unconditionally remove any events from the queue that are in the
800 * range of `minType` to `maxType`, inclusive. If you need to remove a single
801 * event type, use SDL_FlushEvent() instead.
802 *
803 * It's also normal to just ignore events you don't care about in your event
804 * loop without calling this function.
805 *
806 * This function only affects currently queued events. If you want to make
807 * sure that all pending OS events are flushed, you can call SDL_PumpEvents()
808 * on the main thread immediately before the flush call.
809 *
810 * \param minType the low end of event type to be cleared, inclusive; see
811 * SDL_EventType for details
812 * \param maxType the high end of event type to be cleared, inclusive; see
813 * SDL_EventType for details
814 *
815 * \since This function is available since SDL 2.0.0.
816 *
817 * \sa SDL_FlushEvent
818 */
819 extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
820
821 /**
822 * Poll for currently pending events.
823 *
824 * If `event` is not NULL, the next event is removed from the queue and stored
825 * in the SDL_Event structure pointed to by `event`. The 1 returned refers to
826 * this event, immediately stored in the SDL Event structure -- not an event
827 * to follow.
828 *
829 * If `event` is NULL, it simply returns 1 if there is an event in the queue,
830 * but will not remove it from the queue.
831 *
832 * As this function may implicitly call SDL_PumpEvents(), you can only call
833 * this function in the thread that set the video mode.
834 *
835 * SDL_PollEvent() is the favored way of receiving system events since it can
836 * be done from the main loop and does not suspend the main loop while waiting
837 * on an event to be posted.
838 *
839 * The common practice is to fully process the event queue once every frame,
840 * usually as a first step before updating the game's state:
841 *
842 * ```c
843 * while (game_is_still_running) {
844 * SDL_Event event;
845 * while (SDL_PollEvent(&event)) { // poll until all events are handled!
846 * // decide what to do with this event.
847 * }
848 *
849 * // update game state, draw the current frame
850 * }
851 * ```
852 *
853 * \param event the SDL_Event structure to be filled with the next event from
854 * the queue, or NULL
855 * \returns 1 if there is a pending event or 0 if there are none available.
856 *
857 * \since This function is available since SDL 2.0.0.
858 *
859 * \sa SDL_GetEventFilter
860 * \sa SDL_PeepEvents
861 * \sa SDL_PushEvent
862 * \sa SDL_SetEventFilter
863 * \sa SDL_WaitEvent
864 * \sa SDL_WaitEventTimeout
865 */
866 extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
867
868 /**
869 * Wait indefinitely for the next available event.
870 *
871 * If `event` is not NULL, the next event is removed from the queue and stored
872 * in the SDL_Event structure pointed to by `event`.
873 *
874 * As this function may implicitly call SDL_PumpEvents(), you can only call
875 * this function in the thread that initialized the video subsystem.
876 *
877 * \param event the SDL_Event structure to be filled in with the next event
878 * from the queue, or NULL
879 * \returns 1 on success or 0 if there was an error while waiting for events;
880 * call SDL_GetError() for more information.
881 *
882 * \since This function is available since SDL 2.0.0.
883 *
884 * \sa SDL_PollEvent
885 * \sa SDL_PumpEvents
886 * \sa SDL_WaitEventTimeout
887 */
888 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
889
890 /**
891 * Wait until the specified timeout (in milliseconds) for the next available
892 * event.
893 *
894 * If `event` is not NULL, the next event is removed from the queue and stored
895 * in the SDL_Event structure pointed to by `event`.
896 *
897 * As this function may implicitly call SDL_PumpEvents(), you can only call
898 * this function in the thread that initialized the video subsystem.
899 *
900 * \param event the SDL_Event structure to be filled in with the next event
901 * from the queue, or NULL
902 * \param timeout the maximum number of milliseconds to wait for the next
903 * available event
904 * \returns 1 on success or 0 if there was an error while waiting for events;
905 * call SDL_GetError() for more information. This also returns 0 if
906 * the timeout elapsed without an event arriving.
907 *
908 * \since This function is available since SDL 2.0.0.
909 *
910 * \sa SDL_PollEvent
911 * \sa SDL_PumpEvents
912 * \sa SDL_WaitEvent
913 */
914 extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
915 int timeout);
916
917 /**
918 * Add an event to the event queue.
919 *
920 * The event queue can actually be used as a two way communication channel.
921 * Not only can events be read from the queue, but the user can also push
922 * their own events onto it. `event` is a pointer to the event structure you
923 * wish to push onto the queue. The event is copied into the queue, and the
924 * caller may dispose of the memory pointed to after SDL_PushEvent() returns.
925 *
926 * Note: Pushing device input events onto the queue doesn't modify the state
927 * of the device within SDL.
928 *
929 * This function is thread-safe, and can be called from other threads safely.
930 *
931 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
932 * the event filter but events added with SDL_PeepEvents() do not.
933 *
934 * For pushing application-specific events, please use SDL_RegisterEvents() to
935 * get an event type that does not conflict with other code that also wants
936 * its own custom event types.
937 *
938 * \param event the SDL_Event to be added to the queue
939 * \returns 1 on success, 0 if the event was filtered, or a negative error
940 * code on failure; call SDL_GetError() for more information. A
941 * common reason for error is the event queue being full.
942 *
943 * \since This function is available since SDL 2.0.0.
944 *
945 * \sa SDL_PeepEvents
946 * \sa SDL_PollEvent
947 * \sa SDL_RegisterEvents
948 */
949 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
950
951 /**
952 * A function pointer used for callbacks that watch the event queue.
953 *
954 * \param userdata what was passed as `userdata` to SDL_SetEventFilter()
955 * or SDL_AddEventWatch, etc
956 * \param event the event that triggered the callback
957 * \returns 1 to permit event to be added to the queue, and 0 to disallow
958 * it. When used with SDL_AddEventWatch, the return value is ignored.
959 *
960 * \sa SDL_SetEventFilter
961 * \sa SDL_AddEventWatch
962 */
963 typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
964
965 /**
966 * Set up a filter to process all events before they change internal state and
967 * are posted to the internal event queue.
968 *
969 * If the filter function returns 1 when called, then the event will be added
970 * to the internal queue. If it returns 0, then the event will be dropped from
971 * the queue, but the internal state will still be updated. This allows
972 * selective filtering of dynamically arriving events.
973 *
974 * **WARNING**: Be very careful of what you do in the event filter function,
975 * as it may run in a different thread!
976 *
977 * On platforms that support it, if the quit event is generated by an
978 * interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
979 * application at the next event poll.
980 *
981 * There is one caveat when dealing with the ::SDL_QuitEvent event type. The
982 * event filter is only called when the window manager desires to close the
983 * application window. If the event filter returns 1, then the window will be
984 * closed, otherwise the window will remain open if possible.
985 *
986 * Note: Disabled events never make it to the event filter function; see
987 * SDL_EventState().
988 *
989 * Note: If you just want to inspect events without filtering, you should use
990 * SDL_AddEventWatch() instead.
991 *
992 * Note: Events pushed onto the queue with SDL_PushEvent() get passed through
993 * the event filter, but events pushed onto the queue with SDL_PeepEvents() do
994 * not.
995 *
996 * \param filter An SDL_EventFilter function to call when an event happens
997 * \param userdata a pointer that is passed to `filter`
998 *
999 * \since This function is available since SDL 2.0.0.
1000 *
1001 * \sa SDL_AddEventWatch
1002 * \sa SDL_EventState
1003 * \sa SDL_GetEventFilter
1004 * \sa SDL_PeepEvents
1005 * \sa SDL_PushEvent
1006 */
1007 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
1008 void *userdata);
1009
1010 /**
1011 * Query the current event filter.
1012 *
1013 * This function can be used to "chain" filters, by saving the existing filter
1014 * before replacing it with a function that will call that saved filter.
1015 *
1016 * \param filter the current callback function will be stored here
1017 * \param userdata the pointer that is passed to the current event filter will
1018 * be stored here
1019 * \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_SetEventFilter
1024 */
1025 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
1026 void **userdata);
1027
1028 /**
1029 * Add a callback to be triggered when an event is added to the event queue.
1030 *
1031 * `filter` will be called when an event happens, and its return value is
1032 * ignored.
1033 *
1034 * **WARNING**: Be very careful of what you do in the event filter function,
1035 * as it may run in a different thread!
1036 *
1037 * If the quit event is generated by a signal (e.g. SIGINT), it will bypass
1038 * the internal queue and be delivered to the watch callback immediately, and
1039 * arrive at the next event poll.
1040 *
1041 * Note: the callback is called for events posted by the user through
1042 * SDL_PushEvent(), but not for disabled events, nor for events by a filter
1043 * callback set with SDL_SetEventFilter(), nor for events posted by the user
1044 * through SDL_PeepEvents().
1045 *
1046 * \param filter an SDL_EventFilter function to call when an event happens.
1047 * \param userdata a pointer that is passed to `filter`
1048 *
1049 * \since This function is available since SDL 2.0.0.
1050 *
1051 * \sa SDL_DelEventWatch
1052 * \sa SDL_SetEventFilter
1053 */
1054 extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
1055 void *userdata);
1056
1057 /**
1058 * Remove an event watch callback added with SDL_AddEventWatch().
1059 *
1060 * This function takes the same input as SDL_AddEventWatch() to identify and
1061 * delete the corresponding callback.
1062 *
1063 * \param filter the function originally passed to SDL_AddEventWatch()
1064 * \param userdata the pointer originally passed to SDL_AddEventWatch()
1065 *
1066 * \since This function is available since SDL 2.0.0.
1067 *
1068 * \sa SDL_AddEventWatch
1069 */
1070 extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
1071 void *userdata);
1072
1073 /**
1074 * Run a specific filter function on the current event queue, removing any
1075 * events for which the filter returns 0.
1076 *
1077 * See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
1078 * this function does not change the filter permanently, it only uses the
1079 * supplied filter until this function returns.
1080 *
1081 * \param filter the SDL_EventFilter function to call when an event happens
1082 * \param userdata a pointer that is passed to `filter`
1083 *
1084 * \since This function is available since SDL 2.0.0.
1085 *
1086 * \sa SDL_GetEventFilter
1087 * \sa SDL_SetEventFilter
1088 */
1089 extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
1090 void *userdata);
1091
1092 /* @{ */
1093 #define SDL_QUERY -1
1094 #define SDL_IGNORE 0
1095 #define SDL_DISABLE 0
1096 #define SDL_ENABLE 1
1097
1098 /**
1099 * Set the state of processing events by type.
1100 *
1101 * `state` may be any of the following:
1102 *
1103 * - `SDL_QUERY`: returns the current processing state of the specified event
1104 * - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
1105 * from the event queue and will not be filtered
1106 * - `SDL_ENABLE`: the event will be processed normally
1107 *
1108 * \param type the type of event; see SDL_EventType for details
1109 * \param state how to process the event
1110 * \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
1111 * of the event before this function makes any changes to it.
1112 *
1113 * \since This function is available since SDL 2.0.0.
1114 *
1115 * \sa SDL_GetEventState
1116 */
1117 extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
1118 /* @} */
1119 #define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
1120
1121 /**
1122 * Allocate a set of user-defined events, and return the beginning event
1123 * number for that set of events.
1124 *
1125 * Calling this function with `numevents` <= 0 is an error and will return
1126 * (Uint32)-1.
1127 *
1128 * Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
1129 * 0xFFFFFFFF), but is clearer to write.
1130 *
1131 * \param numevents the number of events to be allocated
1132 * \returns the beginning event number, or (Uint32)-1 if there are not enough
1133 * user-defined events left.
1134 *
1135 * \since This function is available since SDL 2.0.0.
1136 *
1137 * \sa SDL_PushEvent
1138 */
1139 extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
1140
1141 /* Ends C function definitions when using C++ */
1142 #ifdef __cplusplus
1143 }
1144 #endif
1145 #include <SDL2/close_code.h>
1146
1147 #endif /* SDL_events_h_ */
1148
1149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_filesystem.h
23 *
24 * \brief Include file for filesystem SDL API functions
25 */
26
27 #ifndef SDL_filesystem_h_
28 #define SDL_filesystem_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the directory where the application was run from.
41 *
42 * This is not necessarily a fast call, so you should call this once near
43 * startup and save the string if you need it.
44 *
45 * **Mac OS X and iOS Specific Functionality**: If the application is in a
46 * ".app" bundle, this function returns the Resource directory (e.g.
47 * MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
48 * a property to the Info.plist file. Adding a string key with the name
49 * SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
50 * behaviour.
51 *
52 * Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
53 * application in /Applications/SDLApp/MyApp.app):
54 *
55 * - `resource`: bundle resource directory (the default). For example:
56 * `/Applications/SDLApp/MyApp.app/Contents/Resources`
57 * - `bundle`: the Bundle directory. For example:
58 * `/Applications/SDLApp/MyApp.app/`
59 * - `parent`: the containing directory of the bundle. For example:
60 * `/Applications/SDLApp/`
61 *
62 * The returned path is guaranteed to end with a path separator ('\' on
63 * Windows, '/' on most other platforms).
64 *
65 * The pointer returned is owned by the caller. Please call SDL_free() on the
66 * pointer when done with it.
67 *
68 * \returns an absolute path in UTF-8 encoding to the application data
69 * directory. NULL will be returned on error or when the platform
70 * doesn't implement this functionality, call SDL_GetError() for more
71 * information.
72 *
73 * \since This function is available since SDL 2.0.1.
74 *
75 * \sa SDL_GetPrefPath
76 */
77 extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
78
79 /**
80 * Get the user-and-app-specific path where files can be written.
81 *
82 * Get the "pref dir". This is meant to be where users can write personal
83 * files (preferences and save games, etc) that are specific to your
84 * application. This directory is unique per user, per application.
85 *
86 * This function will decide the appropriate location in the native
87 * filesystem, create the directory if necessary, and return a string of the
88 * absolute path to the directory in UTF-8 encoding.
89 *
90 * On Windows, the string might look like:
91 *
92 * `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
93 *
94 * On Linux, the string might look like"
95 *
96 * `/home/bob/.local/share/My Program Name/`
97 *
98 * On Mac OS X, the string might look like:
99 *
100 * `/Users/bob/Library/Application Support/My Program Name/`
101 *
102 * You should assume the path returned by this function is the only safe place
103 * to write files (and that SDL_GetBasePath(), while it might be writable, or
104 * even the parent of the returned path, isn't where you should be writing
105 * things).
106 *
107 * Both the org and app strings may become part of a directory name, so please
108 * follow these rules:
109 *
110 * - Try to use the same org string (_including case-sensitivity_) for all
111 * your applications that use this function.
112 * - Always use a unique app string for each one, and make sure it never
113 * changes for an app once you've decided on it.
114 * - Unicode characters are legal, as long as it's UTF-8 encoded, but...
115 * - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
116 * Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
117 *
118 * The returned path is guaranteed to end with a path separator ('\' on
119 * Windows, '/' on most other platforms).
120 *
121 * The pointer returned is owned by the caller. Please call SDL_free() on the
122 * pointer when done with it.
123 *
124 * \param org the name of your organization
125 * \param app the name of your application
126 * \returns a UTF-8 string of the user directory in platform-dependent
127 * notation. NULL if there's a problem (creating directory failed,
128 * etc.).
129 *
130 * \since This function is available since SDL 2.0.1.
131 *
132 * \sa SDL_GetBasePath
133 */
134 extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
135
136 /* Ends C function definitions when using C++ */
137 #ifdef __cplusplus
138 }
139 #endif
140 #include <SDL2/close_code.h>
141
142 #endif /* SDL_filesystem_h_ */
143
144 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gamecontroller.h
23 *
24 * Include file for SDL game controller event handling
25 */
26
27 #ifndef SDL_gamecontroller_h_
28 #define SDL_gamecontroller_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_rwops.h>
33 #include <SDL2/SDL_sensor.h>
34 #include <SDL2/SDL_joystick.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \file SDL_gamecontroller.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
47 * for game controllers, and load appropriate drivers.
48 *
49 * If you would like to receive controller updates while the application
50 * is in the background, you should set the following hint before calling
51 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
52 */
53
54 /**
55 * The gamecontroller structure used to identify an SDL game controller
56 */
57 struct _SDL_GameController;
58 typedef struct _SDL_GameController SDL_GameController;
59
60 typedef enum
61 {
62 SDL_CONTROLLER_TYPE_UNKNOWN = 0,
63 SDL_CONTROLLER_TYPE_XBOX360,
64 SDL_CONTROLLER_TYPE_XBOXONE,
65 SDL_CONTROLLER_TYPE_PS3,
66 SDL_CONTROLLER_TYPE_PS4,
67 SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
68 SDL_CONTROLLER_TYPE_VIRTUAL,
69 SDL_CONTROLLER_TYPE_PS5,
70 SDL_CONTROLLER_TYPE_AMAZON_LUNA,
71 SDL_CONTROLLER_TYPE_GOOGLE_STADIA
72 } SDL_GameControllerType;
73
74 typedef enum
75 {
76 SDL_CONTROLLER_BINDTYPE_NONE = 0,
77 SDL_CONTROLLER_BINDTYPE_BUTTON,
78 SDL_CONTROLLER_BINDTYPE_AXIS,
79 SDL_CONTROLLER_BINDTYPE_HAT
80 } SDL_GameControllerBindType;
81
82 /**
83 * Get the SDL joystick layer binding for this controller button/axis mapping
84 */
85 typedef struct SDL_GameControllerButtonBind
86 {
87 SDL_GameControllerBindType bindType;
88 union
89 {
90 int button;
91 int axis;
92 struct {
93 int hat;
94 int hat_mask;
95 } hat;
96 } value;
97
98 } SDL_GameControllerButtonBind;
99
100
101 /**
102 * To count the number of game controllers in the system for the following:
103 *
104 * ```c
105 * int nJoysticks = SDL_NumJoysticks();
106 * int nGameControllers = 0;
107 * for (int i = 0; i < nJoysticks; i++) {
108 * if (SDL_IsGameController(i)) {
109 * nGameControllers++;
110 * }
111 * }
112 * ```
113 *
114 * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
115 * guid,name,mappings
116 *
117 * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
118 * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
119 * The mapping format for joystick is:
120 * bX - a joystick button, index X
121 * hX.Y - hat X with value Y
122 * aX - axis X of the joystick
123 * Buttons can be used as a controller axis and vice versa.
124 *
125 * This string shows an example of a valid mapping for a controller
126 *
127 * ```c
128 * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
129 * ```
130 */
131
132 /**
133 * Load a set of Game Controller mappings from a seekable SDL data stream.
134 *
135 * You can call this function several times, if needed, to load different
136 * database files.
137 *
138 * If a new mapping is loaded for an already known controller GUID, the later
139 * version will overwrite the one currently loaded.
140 *
141 * Mappings not belonging to the current platform or with no platform field
142 * specified will be ignored (i.e. mappings for Linux will be ignored in
143 * Windows, etc).
144 *
145 * This function will load the text database entirely in memory before
146 * processing it, so take this into consideration if you are in a memory
147 * constrained environment.
148 *
149 * \param rw the data stream for the mappings to be added
150 * \param freerw non-zero to close the stream after being read
151 * \returns the number of mappings added or -1 on error; call SDL_GetError()
152 * for more information.
153 *
154 * \since This function is available since SDL 2.0.2.
155 *
156 * \sa SDL_GameControllerAddMapping
157 * \sa SDL_GameControllerAddMappingsFromFile
158 * \sa SDL_GameControllerMappingForGUID
159 */
160 extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
161
162 /**
163 * Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
164 *
165 * Convenience macro.
166 */
167 #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
168
169 /**
170 * Add support for controllers that SDL is unaware of or to cause an existing
171 * controller to have a different binding.
172 *
173 * The mapping string has the format "GUID,name,mapping", where GUID is the
174 * string value from SDL_JoystickGetGUIDString(), name is the human readable
175 * string for the device and mappings are controller mappings to joystick
176 * ones. Under Windows there is a reserved GUID of "xinput" that covers all
177 * XInput devices. The mapping format for joystick is: {| |bX |a joystick
178 * button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
179 * |} Buttons can be used as a controller axes and vice versa.
180 *
181 * This string shows an example of a valid mapping for a controller:
182 *
183 * ```c
184 * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
185 * ```
186 *
187 * \param mappingString the mapping string
188 * \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
189 * -1 on error; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GameControllerMapping
194 * \sa SDL_GameControllerMappingForGUID
195 */
196 extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
197
198 /**
199 * Get the number of mappings installed.
200 *
201 * \returns the number of mappings.
202 *
203 * \since This function is available since SDL 2.0.6.
204 */
205 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
206
207 /**
208 * Get the mapping at a particular index.
209 *
210 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
211 * the index is out of range.
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
216
217 /**
218 * Get the game controller mapping string for a given GUID.
219 *
220 * The returned string must be freed with SDL_free().
221 *
222 * \param guid a structure containing the GUID for which a mapping is desired
223 * \returns a mapping string or NULL on error; call SDL_GetError() for more
224 * information.
225 *
226 * \since This function is available since SDL 2.0.0.
227 *
228 * \sa SDL_JoystickGetDeviceGUID
229 * \sa SDL_JoystickGetGUID
230 */
231 extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
232
233 /**
234 * Get the current mapping of a Game Controller.
235 *
236 * The returned string must be freed with SDL_free().
237 *
238 * Details about mappings are discussed with SDL_GameControllerAddMapping().
239 *
240 * \param gamecontroller the game controller you want to get the current
241 * mapping for
242 * \returns a string that has the controller's mapping or NULL if no mapping
243 * is available; call SDL_GetError() for more information.
244 *
245 * \since This function is available since SDL 2.0.0.
246 *
247 * \sa SDL_GameControllerAddMapping
248 * \sa SDL_GameControllerMappingForGUID
249 */
250 extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
251
252 /**
253 * Check if the given joystick is supported by the game controller interface.
254 *
255 * `joystick_index` is the same as the `device_index` passed to
256 * SDL_JoystickOpen().
257 *
258 * \param joystick_index the device_index of a device, up to
259 * SDL_NumJoysticks()
260 * \returns SDL_TRUE if the given joystick is supported by the game controller
261 * interface, SDL_FALSE if it isn't or it's an invalid index.
262 *
263 * \since This function is available since SDL 2.0.0.
264 *
265 * \sa SDL_GameControllerNameForIndex
266 * \sa SDL_GameControllerOpen
267 */
268 extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
269
270 /**
271 * Get the implementation dependent name for the game controller.
272 *
273 * This function can be called before any controllers are opened.
274 *
275 * `joystick_index` is the same as the `device_index` passed to
276 * SDL_JoystickOpen().
277 *
278 * \param joystick_index the device_index of a device, from zero to
279 * SDL_NumJoysticks()-1
280 * \returns the implementation-dependent name for the game controller, or NULL
281 * if there is no name or the index is invalid.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_GameControllerName
286 * \sa SDL_GameControllerOpen
287 * \sa SDL_IsGameController
288 */
289 extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
290
291 /**
292 * Get the type of a game controller.
293 *
294 * This can be called before any controllers are opened.
295 *
296 * \param joystick_index the device_index of a device, from zero to
297 * SDL_NumJoysticks()-1
298 * \returns the controller type.
299 *
300 * \since This function is available since SDL 2.0.12.
301 */
302 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
303
304 /**
305 * Get the mapping of a game controller.
306 *
307 * This can be called before any controllers are opened.
308 *
309 * \param joystick_index the device_index of a device, from zero to
310 * SDL_NumJoysticks()-1
311 * \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
312 * no mapping is available.
313 *
314 * \since This function is available since SDL 2.0.9.
315 */
316 extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
317
318 /**
319 * Open a game controller for use.
320 *
321 * `joystick_index` is the same as the `device_index` passed to
322 * SDL_JoystickOpen().
323 *
324 * The index passed as an argument refers to the N'th game controller on the
325 * system. This index is not the value which will identify this controller in
326 * future controller events. The joystick's instance id (SDL_JoystickID) will
327 * be used there instead.
328 *
329 * \param joystick_index the device_index of a device, up to
330 * SDL_NumJoysticks()
331 * \returns a gamecontroller identifier or NULL if an error occurred; call
332 * SDL_GetError() for more information.
333 *
334 * \since This function is available since SDL 2.0.0.
335 *
336 * \sa SDL_GameControllerClose
337 * \sa SDL_GameControllerNameForIndex
338 * \sa SDL_IsGameController
339 */
340 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
341
342 /**
343 * Get the SDL_GameController associated with an instance id.
344 *
345 * \param joyid the instance id to get the SDL_GameController for
346 * \returns an SDL_GameController on success or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.4.
350 */
351 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
352
353 /**
354 * Get the SDL_GameController associated with a player index.
355 *
356 * Please note that the player index is _not_ the device index, nor is it the
357 * instance id!
358 *
359 * \param player_index the player index, which is not the device index or the
360 * instance id!
361 * \returns the SDL_GameController associated with a player index.
362 *
363 * \since This function is available since SDL 2.0.12.
364 *
365 * \sa SDL_GameControllerGetPlayerIndex
366 * \sa SDL_GameControllerSetPlayerIndex
367 */
368 extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
369
370 /**
371 * Get the implementation-dependent name for an opened game controller.
372 *
373 * This is the same name as returned by SDL_GameControllerNameForIndex(), but
374 * it takes a controller identifier instead of the (unstable) device index.
375 *
376 * \param gamecontroller a game controller identifier previously returned by
377 * SDL_GameControllerOpen()
378 * \returns the implementation dependent name for the game controller, or NULL
379 * if there is no name or the identifier passed is invalid.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_GameControllerNameForIndex
384 * \sa SDL_GameControllerOpen
385 */
386 extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
387
388 /**
389 * Get the type of this currently opened controller
390 *
391 * This is the same name as returned by SDL_GameControllerTypeForIndex(), but
392 * it takes a controller identifier instead of the (unstable) device index.
393 *
394 * \param gamecontroller the game controller object to query.
395 * \returns the controller type.
396 *
397 * \since This function is available since SDL 2.0.12.
398 */
399 extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
400
401 /**
402 * Get the player index of an opened game controller.
403 *
404 * For XInput controllers this returns the XInput user index.
405 *
406 * \param gamecontroller the game controller object to query.
407 * \returns the player index for controller, or -1 if it's not available.
408 *
409 * \since This function is available since SDL 2.0.9.
410 */
411 extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
412
413 /**
414 * Set the player index of an opened game controller.
415 *
416 * \param gamecontroller the game controller object to adjust.
417 * \param player_index Player index to assign to this controller.
418 *
419 * \since This function is available since SDL 2.0.12.
420 */
421 extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
422
423 /**
424 * Get the USB vendor ID of an opened controller, if available.
425 *
426 * If the vendor ID isn't available this function returns 0.
427 *
428 * \param gamecontroller the game controller object to query.
429 * \return the USB vendor ID, or zero if unavailable.
430 *
431 * \since This function is available since SDL 2.0.6.
432 */
433 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
434
435 /**
436 * Get the USB product ID of an opened controller, if available.
437 *
438 * If the product ID isn't available this function returns 0.
439 *
440 * \param gamecontroller the game controller object to query.
441 * \return the USB product ID, or zero if unavailable.
442 *
443 * \since This function is available since SDL 2.0.6.
444 */
445 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
446
447 /**
448 * Get the product version of an opened controller, if available.
449 *
450 * If the product version isn't available this function returns 0.
451 *
452 * \param gamecontroller the game controller object to query.
453 * \return the USB product version, or zero if unavailable.
454 *
455 * \since This function is available since SDL 2.0.6.
456 */
457 extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
458
459 /**
460 * Get the serial number of an opened controller, if available.
461 *
462 * Returns the serial number of the controller, or NULL if it is not
463 * available.
464 *
465 * \param gamecontroller the game controller object to query.
466 * \return the serial number, or NULL if unavailable.
467 *
468 * \since This function is available since SDL 2.0.14.
469 */
470 extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
471
472 /**
473 * Check if a controller has been opened and is currently connected.
474 *
475 * \param gamecontroller a game controller identifier previously returned by
476 * SDL_GameControllerOpen()
477 * \returns SDL_TRUE if the controller has been opened and is currently
478 * connected, or SDL_FALSE if not.
479 *
480 * \since This function is available since SDL 2.0.0.
481 *
482 * \sa SDL_GameControllerClose
483 * \sa SDL_GameControllerOpen
484 */
485 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
486
487 /**
488 * Get the Joystick ID from a Game Controller.
489 *
490 * This function will give you a SDL_Joystick object, which allows you to use
491 * the SDL_Joystick functions with a SDL_GameController object. This would be
492 * useful for getting a joystick's position at any given time, even if it
493 * hasn't moved (moving it would produce an event, which would have the axis'
494 * value).
495 *
496 * The pointer returned is owned by the SDL_GameController. You should not
497 * call SDL_JoystickClose() on it, for example, since doing so will likely
498 * cause SDL to crash.
499 *
500 * \param gamecontroller the game controller object that you want to get a
501 * joystick from
502 * \returns a SDL_Joystick object; call SDL_GetError() for more information.
503 *
504 * \since This function is available since SDL 2.0.0.
505 */
506 extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
507
508 /**
509 * Query or change current state of Game Controller events.
510 *
511 * If controller events are disabled, you must call SDL_GameControllerUpdate()
512 * yourself and check the state of the controller when you want controller
513 * information.
514 *
515 * Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
516 * and 1 will have any effect. Other numbers will just be returned.
517 *
518 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
519 * \returns the same value passed to the function, with exception to -1
520 * (SDL_QUERY), which will return the current state.
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_JoystickEventState
525 */
526 extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
527
528 /**
529 * Manually pump game controller updates if not using the loop.
530 *
531 * This function is called automatically by the event loop if events are
532 * enabled. Under such circumstances, it will not be necessary to call this
533 * function.
534 *
535 * \since This function is available since SDL 2.0.0.
536 */
537 extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
538
539
540 /**
541 * The list of axes available from a controller
542 *
543 * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
544 * and are centered within ~8000 of zero, though advanced UI will allow users to set
545 * or autodetect the dead zone, which varies between controllers.
546 *
547 * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
548 */
549 typedef enum
550 {
551 SDL_CONTROLLER_AXIS_INVALID = -1,
552 SDL_CONTROLLER_AXIS_LEFTX,
553 SDL_CONTROLLER_AXIS_LEFTY,
554 SDL_CONTROLLER_AXIS_RIGHTX,
555 SDL_CONTROLLER_AXIS_RIGHTY,
556 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
557 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
558 SDL_CONTROLLER_AXIS_MAX
559 } SDL_GameControllerAxis;
560
561 /**
562 * Convert a string into SDL_GameControllerAxis enum.
563 *
564 * This function is called internally to translate SDL_GameController mapping
565 * strings for the underlying joystick device into the consistent
566 * SDL_GameController mapping. You do not normally need to call this function
567 * unless you are parsing SDL_GameController mappings in your own code.
568 *
569 * Note specially that "righttrigger" and "lefttrigger" map to
570 * `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
571 * respectively.
572 *
573 * \param str string representing a SDL_GameController axis
574 * \returns the SDL_GameControllerAxis enum corresponding to the input string,
575 * or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
576 *
577 * \since This function is available since SDL 2.0.0.
578 *
579 * \sa SDL_GameControllerGetStringForAxis
580 */
581 extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
582
583 /**
584 * Convert from an SDL_GameControllerAxis enum to a string.
585 *
586 * The caller should not SDL_free() the returned string.
587 *
588 * \param axis an enum value for a given SDL_GameControllerAxis
589 * \returns a string for the given axis, or NULL if an invalid axis is
590 * specified. The string returned is of the format used by
591 * SDL_GameController mapping strings.
592 *
593 * \since This function is available since SDL 2.0.0.
594 *
595 * \sa SDL_GameControllerGetAxisFromString
596 */
597 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
598
599 /**
600 * Get the SDL joystick layer binding for a controller axis mapping.
601 *
602 * \param gamecontroller a game controller
603 * \param axis an axis enum value (one of the SDL_GameControllerAxis values)
604 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
605 * (like the given Controller axis doesn't exist on the device), its
606 * `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
607 *
608 * \since This function is available since SDL 2.0.0.
609 *
610 * \sa SDL_GameControllerGetBindForButton
611 */
612 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
613 SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
614 SDL_GameControllerAxis axis);
615
616 /**
617 * Query whether a game controller has a given axis.
618 *
619 * This merely reports whether the controller's mapping defined this axis, as
620 * that is all the information SDL has about the physical device.
621 *
622 * \param gamecontroller a game controller
623 * \param axis an axis enum value (an SDL_GameControllerAxis value)
624 * \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
625 *
626 * \since This function is available since SDL 2.0.14.
627 */
628 extern DECLSPEC SDL_bool SDLCALL
629 SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
630
631 /**
632 * Get the current state of an axis control on a game controller.
633 *
634 * The axis indices start at index 0.
635 *
636 * The state is a value ranging from -32768 to 32767. Triggers, however, range
637 * from 0 to 32767 (they never return a negative value).
638 *
639 * \param gamecontroller a game controller
640 * \param axis an axis index (one of the SDL_GameControllerAxis values)
641 * \returns axis state (including 0) on success or 0 (also) on failure; call
642 * SDL_GetError() for more information.
643 *
644 * \since This function is available since SDL 2.0.0.
645 *
646 * \sa SDL_GameControllerGetButton
647 */
648 extern DECLSPEC Sint16 SDLCALL
649 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
650
651 /**
652 * The list of buttons available from a controller
653 */
654 typedef enum
655 {
656 SDL_CONTROLLER_BUTTON_INVALID = -1,
657 SDL_CONTROLLER_BUTTON_A,
658 SDL_CONTROLLER_BUTTON_B,
659 SDL_CONTROLLER_BUTTON_X,
660 SDL_CONTROLLER_BUTTON_Y,
661 SDL_CONTROLLER_BUTTON_BACK,
662 SDL_CONTROLLER_BUTTON_GUIDE,
663 SDL_CONTROLLER_BUTTON_START,
664 SDL_CONTROLLER_BUTTON_LEFTSTICK,
665 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
666 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
667 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
668 SDL_CONTROLLER_BUTTON_DPAD_UP,
669 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
670 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
671 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
672 SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
673 SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
674 SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
675 SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
676 SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
677 SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
678 SDL_CONTROLLER_BUTTON_MAX
679 } SDL_GameControllerButton;
680
681 /**
682 * Convert a string into an SDL_GameControllerButton enum.
683 *
684 * This function is called internally to translate SDL_GameController mapping
685 * strings for the underlying joystick device into the consistent
686 * SDL_GameController mapping. You do not normally need to call this function
687 * unless you are parsing SDL_GameController mappings in your own code.
688 *
689 * \param str string representing a SDL_GameController axis
690 * \returns the SDL_GameControllerButton enum corresponding to the input
691 * string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
692 *
693 * \since This function is available since SDL 2.0.0.
694 */
695 extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
696
697 /**
698 * Convert from an SDL_GameControllerButton enum to a string.
699 *
700 * The caller should not SDL_free() the returned string.
701 *
702 * \param button an enum value for a given SDL_GameControllerButton
703 * \returns a string for the given button, or NULL if an invalid axis is
704 * specified. The string returned is of the format used by
705 * SDL_GameController mapping strings.
706 *
707 * \since This function is available since SDL 2.0.0.
708 *
709 * \sa SDL_GameControllerGetButtonFromString
710 */
711 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
712
713 /**
714 * Get the SDL joystick layer binding for a controller button mapping.
715 *
716 * \param gamecontroller a game controller
717 * \param button an button enum value (an SDL_GameControllerButton value)
718 * \returns a SDL_GameControllerButtonBind describing the bind. On failure
719 * (like the given Controller button doesn't exist on the device),
720 * its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
721 *
722 * \since This function is available since SDL 2.0.0.
723 *
724 * \sa SDL_GameControllerGetBindForAxis
725 */
726 extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
727 SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
728 SDL_GameControllerButton button);
729
730 /**
731 * Query whether a game controller has a given button.
732 *
733 * This merely reports whether the controller's mapping defined this button,
734 * as that is all the information SDL has about the physical device.
735 *
736 * \param gamecontroller a game controller
737 * \param button a button enum value (an SDL_GameControllerButton value)
738 * \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
739 *
740 * \since This function is available since SDL 2.0.14.
741 */
742 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
743 SDL_GameControllerButton button);
744
745 /**
746 * Get the current state of a button on a game controller.
747 *
748 * \param gamecontroller a game controller
749 * \param button a button index (one of the SDL_GameControllerButton values)
750 * \returns 1 for pressed state or 0 for not pressed state or error; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_GameControllerGetAxis
756 */
757 extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
758 SDL_GameControllerButton button);
759
760 /**
761 * Get the number of touchpads on a game controller.
762 *
763 * \since This function is available since SDL 2.0.14.
764 */
765 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
766
767 /**
768 * Get the number of supported simultaneous fingers on a touchpad on a game
769 * controller.
770 *
771 * \since This function is available since SDL 2.0.14.
772 */
773 extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
774
775 /**
776 * Get the current state of a finger on a touchpad on a game controller.
777 *
778 * \since This function is available since SDL 2.0.14.
779 */
780 extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
781
782 /**
783 * Return whether a game controller has a particular sensor.
784 *
785 * \param gamecontroller The controller to query
786 * \param type The type of sensor to query
787 * \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
788 *
789 * \since This function is available since SDL 2.0.14.
790 */
791 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
792
793 /**
794 * Set whether data reporting for a game controller sensor is enabled.
795 *
796 * \param gamecontroller The controller to update
797 * \param type The type of sensor to enable/disable
798 * \param enabled Whether data reporting should be enabled
799 * \returns 0 or -1 if an error occurred.
800 *
801 * \since This function is available since SDL 2.0.14.
802 */
803 extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
804
805 /**
806 * Query whether sensor data reporting is enabled for a game controller.
807 *
808 * \param gamecontroller The controller to query
809 * \param type The type of sensor to query
810 * \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
811 *
812 * \since This function is available since SDL 2.0.14.
813 */
814 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
815
816 /**
817 * Get the data rate (number of events per second) of a game controller
818 * sensor.
819 *
820 * \param gamecontroller The controller to query
821 * \param type The type of sensor to query
822 * \return the data rate, or 0.0f if the data rate is not available.
823 *
824 * \since This function is available since SDL 2.0.16.
825 */
826 extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
827
828 /**
829 * Get the current state of a game controller sensor.
830 *
831 * The number of values and interpretation of the data is sensor dependent.
832 * See SDL_sensor.h for the details for each type of sensor.
833 *
834 * \param gamecontroller The controller to query
835 * \param type The type of sensor to query
836 * \param data A pointer filled with the current sensor state
837 * \param num_values The number of values to write to data
838 * \return 0 or -1 if an error occurred.
839 *
840 * \since This function is available since SDL 2.0.14.
841 */
842 extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
843
844 /**
845 * Start a rumble effect on a game controller.
846 *
847 * Each call to this function cancels any previous rumble effect, and calling
848 * it with 0 intensity stops any rumbling.
849 *
850 * \param gamecontroller The controller to vibrate
851 * \param low_frequency_rumble The intensity of the low frequency (left)
852 * rumble motor, from 0 to 0xFFFF
853 * \param high_frequency_rumble The intensity of the high frequency (right)
854 * rumble motor, from 0 to 0xFFFF
855 * \param duration_ms The duration of the rumble effect, in milliseconds
856 * \returns 0, or -1 if rumble isn't supported on this controller
857 *
858 * \since This function is available since SDL 2.0.9.
859 *
860 * \sa SDL_GameControllerHasRumble
861 */
862 extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
863
864 /**
865 * Start a rumble effect in the game controller's triggers.
866 *
867 * Each call to this function cancels any previous trigger rumble effect, and
868 * calling it with 0 intensity stops any rumbling.
869 *
870 * Note that this is rumbling of the _triggers_ and not the game controller as
871 * a whole. This is currently only supported on Xbox One controllers. If you
872 * want the (more common) whole-controller rumble, use
873 * SDL_GameControllerRumble() instead.
874 *
875 * \param gamecontroller The controller to vibrate
876 * \param left_rumble The intensity of the left trigger rumble motor, from 0
877 * to 0xFFFF
878 * \param right_rumble The intensity of the right trigger rumble motor, from 0
879 * to 0xFFFF
880 * \param duration_ms The duration of the rumble effect, in milliseconds
881 * \returns 0, or -1 if trigger rumble isn't supported on this controller
882 *
883 * \since This function is available since SDL 2.0.14.
884 *
885 * \sa SDL_GameControllerHasRumbleTriggers
886 */
887 extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
888
889 /**
890 * Query whether a game controller has an LED.
891 *
892 * \param gamecontroller The controller to query
893 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
894 * modifiable LED
895 *
896 * \since This function is available since SDL 2.0.14.
897 */
898 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
899
900 /**
901 * Query whether a game controller has rumble support.
902 *
903 * \param gamecontroller The controller to query
904 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
905 * support
906 *
907 * \since This function is available since SDL 2.0.18.
908 *
909 * \sa SDL_GameControllerRumble
910 */
911 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
912
913 /**
914 * Query whether a game controller has rumble support on triggers.
915 *
916 * \param gamecontroller The controller to query
917 * \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
918 * rumble support
919 *
920 * \since This function is available since SDL 2.0.18.
921 *
922 * \sa SDL_GameControllerRumbleTriggers
923 */
924 extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
925
926 /**
927 * Update a game controller's LED color.
928 *
929 * \param gamecontroller The controller to update
930 * \param red The intensity of the red LED
931 * \param green The intensity of the green LED
932 * \param blue The intensity of the blue LED
933 * \returns 0, or -1 if this controller does not have a modifiable LED
934 *
935 * \since This function is available since SDL 2.0.14.
936 */
937 extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
938
939 /**
940 * Send a controller specific effect packet
941 *
942 * \param gamecontroller The controller to affect
943 * \param data The data to send to the controller
944 * \param size The size of the data to send to the controller
945 * \returns 0, or -1 if this controller or driver doesn't support effect
946 * packets
947 *
948 * \since This function is available since SDL 2.0.16.
949 */
950 extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
951
952 /**
953 * Close a game controller previously opened with SDL_GameControllerOpen().
954 *
955 * \param gamecontroller a game controller identifier previously returned by
956 * SDL_GameControllerOpen()
957 *
958 * \since This function is available since SDL 2.0.0.
959 *
960 * \sa SDL_GameControllerOpen
961 */
962 extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
963
964 /**
965 * Return the sfSymbolsName for a given button on a game controller on Apple
966 * platforms.
967 *
968 * \param gamecontroller the controller to query
969 * \param button a button on the game controller
970 * \returns the sfSymbolsName or NULL if the name can't be found
971 *
972 * \since This function is available since SDL 2.0.18.
973 *
974 * \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
975 */
976 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
977
978 /**
979 * Return the sfSymbolsName for a given axis on a game controller on Apple
980 * platforms.
981 *
982 * \param gamecontroller the controller to query
983 * \param axis an axis on the game controller
984 * \returns the sfSymbolsName or NULL if the name can't be found
985 *
986 * \since This function is available since SDL 2.0.18.
987 *
988 * \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
989 */
990 extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
991
992
993 /* Ends C function definitions when using C++ */
994 #ifdef __cplusplus
995 }
996 #endif
997 #include <SDL2/close_code.h>
998
999 #endif /* SDL_gamecontroller_h_ */
1000
1001 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_gesture.h
23 *
24 * Include file for SDL gesture event handling.
25 */
26
27 #ifndef SDL_gesture_h_
28 #define SDL_gesture_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/SDL_touch.h>
35
36
37 #include <SDL2/begin_code.h>
38 /* Set up for C function definitions, even when using C++ */
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 typedef Sint64 SDL_GestureID;
44
45 /* Function prototypes */
46
47 /**
48 * Begin recording a gesture on a specified touch device or all touch devices.
49 *
50 * If the parameter `touchId` is -1 (i.e., all devices), this function will
51 * always return 1, regardless of whether there actually are any devices.
52 *
53 * \param touchId the touch device id, or -1 for all touch devices
54 * \returns 1 on success or 0 if the specified device could not be found.
55 *
56 * \since This function is available since SDL 2.0.0.
57 *
58 * \sa SDL_GetTouchDevice
59 */
60 extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
61
62
63 /**
64 * Save all currently loaded Dollar Gesture templates.
65 *
66 * \param dst a SDL_RWops to save to
67 * \returns the number of saved templates on success or 0 on failure; call
68 * SDL_GetError() for more information.
69 *
70 * \since This function is available since SDL 2.0.0.
71 *
72 * \sa SDL_LoadDollarTemplates
73 * \sa SDL_SaveDollarTemplate
74 */
75 extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
76
77 /**
78 * Save a currently loaded Dollar Gesture template.
79 *
80 * \param gestureId a gesture id
81 * \param dst a SDL_RWops to save to
82 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
83 * information.
84 *
85 * \since This function is available since SDL 2.0.0.
86 *
87 * \sa SDL_LoadDollarTemplates
88 * \sa SDL_SaveAllDollarTemplates
89 */
90 extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
91
92
93 /**
94 * Load Dollar Gesture templates from a file.
95 *
96 * \param touchId a touch id
97 * \param src a SDL_RWops to load from
98 * \returns the number of loaded templates on success or a negative error code
99 * (or 0) on failure; call SDL_GetError() for more information.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_SaveAllDollarTemplates
104 * \sa SDL_SaveDollarTemplate
105 */
106 extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
107
108 /* Ends C function definitions when using C++ */
109 #ifdef __cplusplus
110 }
111 #endif
112 #include <SDL2/close_code.h>
113
114 #endif /* SDL_gesture_h_ */
115
116 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_haptic.h
23 *
24 * \brief The SDL haptic subsystem allows you to control haptic (force feedback)
25 * devices.
26 *
27 * The basic usage is as follows:
28 * - Initialize the subsystem (::SDL_INIT_HAPTIC).
29 * - Open a haptic device.
30 * - SDL_HapticOpen() to open from index.
31 * - SDL_HapticOpenFromJoystick() to open from an existing joystick.
32 * - Create an effect (::SDL_HapticEffect).
33 * - Upload the effect with SDL_HapticNewEffect().
34 * - Run the effect with SDL_HapticRunEffect().
35 * - (optional) Free the effect with SDL_HapticDestroyEffect().
36 * - Close the haptic device with SDL_HapticClose().
37 *
38 * \par Simple rumble example:
39 * \code
40 * SDL_Haptic *haptic;
41 *
42 * // Open the device
43 * haptic = SDL_HapticOpen( 0 );
44 * if (haptic == NULL)
45 * return -1;
46 *
47 * // Initialize simple rumble
48 * if (SDL_HapticRumbleInit( haptic ) != 0)
49 * return -1;
50 *
51 * // Play effect at 50% strength for 2 seconds
52 * if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
53 * return -1;
54 * SDL_Delay( 2000 );
55 *
56 * // Clean up
57 * SDL_HapticClose( haptic );
58 * \endcode
59 *
60 * \par Complete example:
61 * \code
62 * int test_haptic( SDL_Joystick * joystick ) {
63 * SDL_Haptic *haptic;
64 * SDL_HapticEffect effect;
65 * int effect_id;
66 *
67 * // Open the device
68 * haptic = SDL_HapticOpenFromJoystick( joystick );
69 * if (haptic == NULL) return -1; // Most likely joystick isn't haptic
70 *
71 * // See if it can do sine waves
72 * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
73 * SDL_HapticClose(haptic); // No sine effect
74 * return -1;
75 * }
76 *
77 * // Create the effect
78 * SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
79 * effect.type = SDL_HAPTIC_SINE;
80 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
81 * effect.periodic.direction.dir[0] = 18000; // Force comes from south
82 * effect.periodic.period = 1000; // 1000 ms
83 * effect.periodic.magnitude = 20000; // 20000/32767 strength
84 * effect.periodic.length = 5000; // 5 seconds long
85 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
86 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away
87 *
88 * // Upload the effect
89 * effect_id = SDL_HapticNewEffect( haptic, &effect );
90 *
91 * // Test the effect
92 * SDL_HapticRunEffect( haptic, effect_id, 1 );
93 * SDL_Delay( 5000); // Wait for the effect to finish
94 *
95 * // We destroy the effect, although closing the device also does this
96 * SDL_HapticDestroyEffect( haptic, effect_id );
97 *
98 * // Close the device
99 * SDL_HapticClose(haptic);
100 *
101 * return 0; // Success
102 * }
103 * \endcode
104 */
105
106 #ifndef SDL_haptic_h_
107 #define SDL_haptic_h_
108
109 #include <SDL2/SDL_stdinc.h>
110 #include <SDL2/SDL_error.h>
111 #include <SDL2/SDL_joystick.h>
112
113 #include <SDL2/begin_code.h>
114 /* Set up for C function definitions, even when using C++ */
115 #ifdef __cplusplus
116 extern "C" {
117 #endif /* __cplusplus */
118
119 /* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
120 *
121 * At the moment the magnitude variables are mixed between signed/unsigned, and
122 * it is also not made clear that ALL of those variables expect a max of 0x7FFF.
123 *
124 * Some platforms may have higher precision than that (Linux FF, Windows XInput)
125 * so we should fix the inconsistency in favor of higher possible precision,
126 * adjusting for platforms that use different scales.
127 * -flibit
128 */
129
130 /**
131 * \typedef SDL_Haptic
132 *
133 * \brief The haptic structure used to identify an SDL haptic.
134 *
135 * \sa SDL_HapticOpen
136 * \sa SDL_HapticOpenFromJoystick
137 * \sa SDL_HapticClose
138 */
139 struct _SDL_Haptic;
140 typedef struct _SDL_Haptic SDL_Haptic;
141
142
143 /**
144 * \name Haptic features
145 *
146 * Different haptic features a device can have.
147 */
148 /* @{ */
149
150 /**
151 * \name Haptic effects
152 */
153 /* @{ */
154
155 /**
156 * \brief Constant effect supported.
157 *
158 * Constant haptic effect.
159 *
160 * \sa SDL_HapticCondition
161 */
162 #define SDL_HAPTIC_CONSTANT (1u<<0)
163
164 /**
165 * \brief Sine wave effect supported.
166 *
167 * Periodic haptic effect that simulates sine waves.
168 *
169 * \sa SDL_HapticPeriodic
170 */
171 #define SDL_HAPTIC_SINE (1u<<1)
172
173 /**
174 * \brief Left/Right effect supported.
175 *
176 * Haptic effect for direct control over high/low frequency motors.
177 *
178 * \sa SDL_HapticLeftRight
179 * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
180 * we ran out of bits, and this is important for XInput devices.
181 */
182 #define SDL_HAPTIC_LEFTRIGHT (1u<<2)
183
184 /* !!! FIXME: put this back when we have more bits in 2.1 */
185 /* #define SDL_HAPTIC_SQUARE (1<<2) */
186
187 /**
188 * \brief Triangle wave effect supported.
189 *
190 * Periodic haptic effect that simulates triangular waves.
191 *
192 * \sa SDL_HapticPeriodic
193 */
194 #define SDL_HAPTIC_TRIANGLE (1u<<3)
195
196 /**
197 * \brief Sawtoothup wave effect supported.
198 *
199 * Periodic haptic effect that simulates saw tooth up waves.
200 *
201 * \sa SDL_HapticPeriodic
202 */
203 #define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
204
205 /**
206 * \brief Sawtoothdown wave effect supported.
207 *
208 * Periodic haptic effect that simulates saw tooth down waves.
209 *
210 * \sa SDL_HapticPeriodic
211 */
212 #define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
213
214 /**
215 * \brief Ramp effect supported.
216 *
217 * Ramp haptic effect.
218 *
219 * \sa SDL_HapticRamp
220 */
221 #define SDL_HAPTIC_RAMP (1u<<6)
222
223 /**
224 * \brief Spring effect supported - uses axes position.
225 *
226 * Condition haptic effect that simulates a spring. Effect is based on the
227 * axes position.
228 *
229 * \sa SDL_HapticCondition
230 */
231 #define SDL_HAPTIC_SPRING (1u<<7)
232
233 /**
234 * \brief Damper effect supported - uses axes velocity.
235 *
236 * Condition haptic effect that simulates dampening. Effect is based on the
237 * axes velocity.
238 *
239 * \sa SDL_HapticCondition
240 */
241 #define SDL_HAPTIC_DAMPER (1u<<8)
242
243 /**
244 * \brief Inertia effect supported - uses axes acceleration.
245 *
246 * Condition haptic effect that simulates inertia. Effect is based on the axes
247 * acceleration.
248 *
249 * \sa SDL_HapticCondition
250 */
251 #define SDL_HAPTIC_INERTIA (1u<<9)
252
253 /**
254 * \brief Friction effect supported - uses axes movement.
255 *
256 * Condition haptic effect that simulates friction. Effect is based on the
257 * axes movement.
258 *
259 * \sa SDL_HapticCondition
260 */
261 #define SDL_HAPTIC_FRICTION (1u<<10)
262
263 /**
264 * \brief Custom effect is supported.
265 *
266 * User defined custom haptic effect.
267 */
268 #define SDL_HAPTIC_CUSTOM (1u<<11)
269
270 /* @} *//* Haptic effects */
271
272 /* These last few are features the device has, not effects */
273
274 /**
275 * \brief Device can set global gain.
276 *
277 * Device supports setting the global gain.
278 *
279 * \sa SDL_HapticSetGain
280 */
281 #define SDL_HAPTIC_GAIN (1u<<12)
282
283 /**
284 * \brief Device can set autocenter.
285 *
286 * Device supports setting autocenter.
287 *
288 * \sa SDL_HapticSetAutocenter
289 */
290 #define SDL_HAPTIC_AUTOCENTER (1u<<13)
291
292 /**
293 * \brief Device can be queried for effect status.
294 *
295 * Device supports querying effect status.
296 *
297 * \sa SDL_HapticGetEffectStatus
298 */
299 #define SDL_HAPTIC_STATUS (1u<<14)
300
301 /**
302 * \brief Device can be paused.
303 *
304 * Devices supports being paused.
305 *
306 * \sa SDL_HapticPause
307 * \sa SDL_HapticUnpause
308 */
309 #define SDL_HAPTIC_PAUSE (1u<<15)
310
311
312 /**
313 * \name Direction encodings
314 */
315 /* @{ */
316
317 /**
318 * \brief Uses polar coordinates for the direction.
319 *
320 * \sa SDL_HapticDirection
321 */
322 #define SDL_HAPTIC_POLAR 0
323
324 /**
325 * \brief Uses cartesian coordinates for the direction.
326 *
327 * \sa SDL_HapticDirection
328 */
329 #define SDL_HAPTIC_CARTESIAN 1
330
331 /**
332 * \brief Uses spherical coordinates for the direction.
333 *
334 * \sa SDL_HapticDirection
335 */
336 #define SDL_HAPTIC_SPHERICAL 2
337
338 /**
339 * \brief Use this value to play an effect on the steering wheel axis. This
340 * provides better compatibility across platforms and devices as SDL will guess
341 * the correct axis.
342 * \sa SDL_HapticDirection
343 */
344 #define SDL_HAPTIC_STEERING_AXIS 3
345
346 /* @} *//* Direction encodings */
347
348 /* @} *//* Haptic features */
349
350 /*
351 * Misc defines.
352 */
353
354 /**
355 * \brief Used to play a device an infinite number of times.
356 *
357 * \sa SDL_HapticRunEffect
358 */
359 #define SDL_HAPTIC_INFINITY 4294967295U
360
361
362 /**
363 * \brief Structure that represents a haptic direction.
364 *
365 * This is the direction where the force comes from,
366 * instead of the direction in which the force is exerted.
367 *
368 * Directions can be specified by:
369 * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
370 * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
371 * - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
372 *
373 * Cardinal directions of the haptic device are relative to the positioning
374 * of the device. North is considered to be away from the user.
375 *
376 * The following diagram represents the cardinal directions:
377 * \verbatim
378 .--.
379 |__| .-------.
380 |=.| |.-----.|
381 |--| || ||
382 | | |'-----'|
383 |__|~')_____('
384 [ COMPUTER ]
385
386
387 North (0,-1)
388 ^
389 |
390 |
391 (-1,0) West <----[ HAPTIC ]----> East (1,0)
392 |
393 |
394 v
395 South (0,1)
396
397
398 [ USER ]
399 \|||/
400 (o o)
401 ---ooO-(_)-Ooo---
402 \endverbatim
403 *
404 * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
405 * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses
406 * the first \c dir parameter. The cardinal directions would be:
407 * - North: 0 (0 degrees)
408 * - East: 9000 (90 degrees)
409 * - South: 18000 (180 degrees)
410 * - West: 27000 (270 degrees)
411 *
412 * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
413 * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
414 * the first three \c dir parameters. The cardinal directions would be:
415 * - North: 0,-1, 0
416 * - East: 1, 0, 0
417 * - South: 0, 1, 0
418 * - West: -1, 0, 0
419 *
420 * The Z axis represents the height of the effect if supported, otherwise
421 * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
422 * can use any multiple you want, only the direction matters.
423 *
424 * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
425 * The first two \c dir parameters are used. The \c dir parameters are as
426 * follows (all values are in hundredths of degrees):
427 * - Degrees from (1, 0) rotated towards (0, 1).
428 * - Degrees towards (0, 0, 1) (device needs at least 3 axes).
429 *
430 *
431 * Example of force coming from the south with all encodings (force coming
432 * from the south means the user will have to pull the stick to counteract):
433 * \code
434 * SDL_HapticDirection direction;
435 *
436 * // Cartesian directions
437 * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
438 * direction.dir[0] = 0; // X position
439 * direction.dir[1] = 1; // Y position
440 * // Assuming the device has 2 axes, we don't need to specify third parameter.
441 *
442 * // Polar directions
443 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
444 * direction.dir[0] = 18000; // Polar only uses first parameter
445 *
446 * // Spherical coordinates
447 * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
448 * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
449 * \endcode
450 *
451 * \sa SDL_HAPTIC_POLAR
452 * \sa SDL_HAPTIC_CARTESIAN
453 * \sa SDL_HAPTIC_SPHERICAL
454 * \sa SDL_HAPTIC_STEERING_AXIS
455 * \sa SDL_HapticEffect
456 * \sa SDL_HapticNumAxes
457 */
458 typedef struct SDL_HapticDirection
459 {
460 Uint8 type; /**< The type of encoding. */
461 Sint32 dir[3]; /**< The encoded direction. */
462 } SDL_HapticDirection;
463
464
465 /**
466 * \brief A structure containing a template for a Constant effect.
467 *
468 * This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
469 *
470 * A constant effect applies a constant force in the specified direction
471 * to the joystick.
472 *
473 * \sa SDL_HAPTIC_CONSTANT
474 * \sa SDL_HapticEffect
475 */
476 typedef struct SDL_HapticConstant
477 {
478 /* Header */
479 Uint16 type; /**< ::SDL_HAPTIC_CONSTANT */
480 SDL_HapticDirection direction; /**< Direction of the effect. */
481
482 /* Replay */
483 Uint32 length; /**< Duration of the effect. */
484 Uint16 delay; /**< Delay before starting the effect. */
485
486 /* Trigger */
487 Uint16 button; /**< Button that triggers the effect. */
488 Uint16 interval; /**< How soon it can be triggered again after button. */
489
490 /* Constant */
491 Sint16 level; /**< Strength of the constant effect. */
492
493 /* Envelope */
494 Uint16 attack_length; /**< Duration of the attack. */
495 Uint16 attack_level; /**< Level at the start of the attack. */
496 Uint16 fade_length; /**< Duration of the fade. */
497 Uint16 fade_level; /**< Level at the end of the fade. */
498 } SDL_HapticConstant;
499
500 /**
501 * \brief A structure containing a template for a Periodic effect.
502 *
503 * The struct handles the following effects:
504 * - ::SDL_HAPTIC_SINE
505 * - ::SDL_HAPTIC_LEFTRIGHT
506 * - ::SDL_HAPTIC_TRIANGLE
507 * - ::SDL_HAPTIC_SAWTOOTHUP
508 * - ::SDL_HAPTIC_SAWTOOTHDOWN
509 *
510 * A periodic effect consists in a wave-shaped effect that repeats itself
511 * over time. The type determines the shape of the wave and the parameters
512 * determine the dimensions of the wave.
513 *
514 * Phase is given by hundredth of a degree meaning that giving the phase a value
515 * of 9000 will displace it 25% of its period. Here are sample values:
516 * - 0: No phase displacement.
517 * - 9000: Displaced 25% of its period.
518 * - 18000: Displaced 50% of its period.
519 * - 27000: Displaced 75% of its period.
520 * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
521 *
522 * Examples:
523 * \verbatim
524 SDL_HAPTIC_SINE
525 __ __ __ __
526 / \ / \ / \ /
527 / \__/ \__/ \__/
528
529 SDL_HAPTIC_SQUARE
530 __ __ __ __ __
531 | | | | | | | | | |
532 | |__| |__| |__| |__| |
533
534 SDL_HAPTIC_TRIANGLE
535 /\ /\ /\ /\ /\
536 / \ / \ / \ / \ /
537 / \/ \/ \/ \/
538
539 SDL_HAPTIC_SAWTOOTHUP
540 /| /| /| /| /| /| /|
541 / | / | / | / | / | / | / |
542 / |/ |/ |/ |/ |/ |/ |
543
544 SDL_HAPTIC_SAWTOOTHDOWN
545 \ |\ |\ |\ |\ |\ |\ |
546 \ | \ | \ | \ | \ | \ | \ |
547 \| \| \| \| \| \| \|
548 \endverbatim
549 *
550 * \sa SDL_HAPTIC_SINE
551 * \sa SDL_HAPTIC_LEFTRIGHT
552 * \sa SDL_HAPTIC_TRIANGLE
553 * \sa SDL_HAPTIC_SAWTOOTHUP
554 * \sa SDL_HAPTIC_SAWTOOTHDOWN
555 * \sa SDL_HapticEffect
556 */
557 typedef struct SDL_HapticPeriodic
558 {
559 /* Header */
560 Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
561 ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
562 ::SDL_HAPTIC_SAWTOOTHDOWN */
563 SDL_HapticDirection direction; /**< Direction of the effect. */
564
565 /* Replay */
566 Uint32 length; /**< Duration of the effect. */
567 Uint16 delay; /**< Delay before starting the effect. */
568
569 /* Trigger */
570 Uint16 button; /**< Button that triggers the effect. */
571 Uint16 interval; /**< How soon it can be triggered again after button. */
572
573 /* Periodic */
574 Uint16 period; /**< Period of the wave. */
575 Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
576 Sint16 offset; /**< Mean value of the wave. */
577 Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
578
579 /* Envelope */
580 Uint16 attack_length; /**< Duration of the attack. */
581 Uint16 attack_level; /**< Level at the start of the attack. */
582 Uint16 fade_length; /**< Duration of the fade. */
583 Uint16 fade_level; /**< Level at the end of the fade. */
584 } SDL_HapticPeriodic;
585
586 /**
587 * \brief A structure containing a template for a Condition effect.
588 *
589 * The struct handles the following effects:
590 * - ::SDL_HAPTIC_SPRING: Effect based on axes position.
591 * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
592 * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
593 * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
594 *
595 * Direction is handled by condition internals instead of a direction member.
596 * The condition effect specific members have three parameters. The first
597 * refers to the X axis, the second refers to the Y axis and the third
598 * refers to the Z axis. The right terms refer to the positive side of the
599 * axis and the left terms refer to the negative side of the axis. Please
600 * refer to the ::SDL_HapticDirection diagram for which side is positive and
601 * which is negative.
602 *
603 * \sa SDL_HapticDirection
604 * \sa SDL_HAPTIC_SPRING
605 * \sa SDL_HAPTIC_DAMPER
606 * \sa SDL_HAPTIC_INERTIA
607 * \sa SDL_HAPTIC_FRICTION
608 * \sa SDL_HapticEffect
609 */
610 typedef struct SDL_HapticCondition
611 {
612 /* Header */
613 Uint16 type; /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
614 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
615 SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */
616
617 /* Replay */
618 Uint32 length; /**< Duration of the effect. */
619 Uint16 delay; /**< Delay before starting the effect. */
620
621 /* Trigger */
622 Uint16 button; /**< Button that triggers the effect. */
623 Uint16 interval; /**< How soon it can be triggered again after button. */
624
625 /* Condition */
626 Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
627 Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
628 Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
629 Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
630 Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
631 Sint16 center[3]; /**< Position of the dead zone. */
632 } SDL_HapticCondition;
633
634 /**
635 * \brief A structure containing a template for a Ramp effect.
636 *
637 * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
638 *
639 * The ramp effect starts at start strength and ends at end strength.
640 * It augments in linear fashion. If you use attack and fade with a ramp
641 * the effects get added to the ramp effect making the effect become
642 * quadratic instead of linear.
643 *
644 * \sa SDL_HAPTIC_RAMP
645 * \sa SDL_HapticEffect
646 */
647 typedef struct SDL_HapticRamp
648 {
649 /* Header */
650 Uint16 type; /**< ::SDL_HAPTIC_RAMP */
651 SDL_HapticDirection direction; /**< Direction of the effect. */
652
653 /* Replay */
654 Uint32 length; /**< Duration of the effect. */
655 Uint16 delay; /**< Delay before starting the effect. */
656
657 /* Trigger */
658 Uint16 button; /**< Button that triggers the effect. */
659 Uint16 interval; /**< How soon it can be triggered again after button. */
660
661 /* Ramp */
662 Sint16 start; /**< Beginning strength level. */
663 Sint16 end; /**< Ending strength level. */
664
665 /* Envelope */
666 Uint16 attack_length; /**< Duration of the attack. */
667 Uint16 attack_level; /**< Level at the start of the attack. */
668 Uint16 fade_length; /**< Duration of the fade. */
669 Uint16 fade_level; /**< Level at the end of the fade. */
670 } SDL_HapticRamp;
671
672 /**
673 * \brief A structure containing a template for a Left/Right effect.
674 *
675 * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
676 *
677 * The Left/Right effect is used to explicitly control the large and small
678 * motors, commonly found in modern game controllers. The small (right) motor
679 * is high frequency, and the large (left) motor is low frequency.
680 *
681 * \sa SDL_HAPTIC_LEFTRIGHT
682 * \sa SDL_HapticEffect
683 */
684 typedef struct SDL_HapticLeftRight
685 {
686 /* Header */
687 Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
688
689 /* Replay */
690 Uint32 length; /**< Duration of the effect in milliseconds. */
691
692 /* Rumble */
693 Uint16 large_magnitude; /**< Control of the large controller motor. */
694 Uint16 small_magnitude; /**< Control of the small controller motor. */
695 } SDL_HapticLeftRight;
696
697 /**
698 * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
699 *
700 * This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
701 *
702 * A custom force feedback effect is much like a periodic effect, where the
703 * application can define its exact shape. You will have to allocate the
704 * data yourself. Data should consist of channels * samples Uint16 samples.
705 *
706 * If channels is one, the effect is rotated using the defined direction.
707 * Otherwise it uses the samples in data for the different axes.
708 *
709 * \sa SDL_HAPTIC_CUSTOM
710 * \sa SDL_HapticEffect
711 */
712 typedef struct SDL_HapticCustom
713 {
714 /* Header */
715 Uint16 type; /**< ::SDL_HAPTIC_CUSTOM */
716 SDL_HapticDirection direction; /**< Direction of the effect. */
717
718 /* Replay */
719 Uint32 length; /**< Duration of the effect. */
720 Uint16 delay; /**< Delay before starting the effect. */
721
722 /* Trigger */
723 Uint16 button; /**< Button that triggers the effect. */
724 Uint16 interval; /**< How soon it can be triggered again after button. */
725
726 /* Custom */
727 Uint8 channels; /**< Axes to use, minimum of one. */
728 Uint16 period; /**< Sample periods. */
729 Uint16 samples; /**< Amount of samples. */
730 Uint16 *data; /**< Should contain channels*samples items. */
731
732 /* Envelope */
733 Uint16 attack_length; /**< Duration of the attack. */
734 Uint16 attack_level; /**< Level at the start of the attack. */
735 Uint16 fade_length; /**< Duration of the fade. */
736 Uint16 fade_level; /**< Level at the end of the fade. */
737 } SDL_HapticCustom;
738
739 /**
740 * \brief The generic template for any haptic effect.
741 *
742 * All values max at 32767 (0x7FFF). Signed values also can be negative.
743 * Time values unless specified otherwise are in milliseconds.
744 *
745 * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
746 * value. Neither delay, interval, attack_length nor fade_length support
747 * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.
748 *
749 * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
750 * ::SDL_HAPTIC_INFINITY.
751 *
752 * Button triggers may not be supported on all devices, it is advised to not
753 * use them if possible. Buttons start at index 1 instead of index 0 like
754 * the joystick.
755 *
756 * If both attack_length and fade_level are 0, the envelope is not used,
757 * otherwise both values are used.
758 *
759 * Common parts:
760 * \code
761 * // Replay - All effects have this
762 * Uint32 length; // Duration of effect (ms).
763 * Uint16 delay; // Delay before starting effect.
764 *
765 * // Trigger - All effects have this
766 * Uint16 button; // Button that triggers effect.
767 * Uint16 interval; // How soon before effect can be triggered again.
768 *
769 * // Envelope - All effects except condition effects have this
770 * Uint16 attack_length; // Duration of the attack (ms).
771 * Uint16 attack_level; // Level at the start of the attack.
772 * Uint16 fade_length; // Duration of the fade out (ms).
773 * Uint16 fade_level; // Level at the end of the fade.
774 * \endcode
775 *
776 *
777 * Here we have an example of a constant effect evolution in time:
778 * \verbatim
779 Strength
780 ^
781 |
782 | effect level --> _________________
783 | / \
784 | / \
785 | / \
786 | / \
787 | attack_level --> | \
788 | | | <--- fade_level
789 |
790 +--------------------------------------------------> Time
791 [--] [---]
792 attack_length fade_length
793
794 [------------------][-----------------------]
795 delay length
796 \endverbatim
797 *
798 * Note either the attack_level or the fade_level may be above the actual
799 * effect level.
800 *
801 * \sa SDL_HapticConstant
802 * \sa SDL_HapticPeriodic
803 * \sa SDL_HapticCondition
804 * \sa SDL_HapticRamp
805 * \sa SDL_HapticLeftRight
806 * \sa SDL_HapticCustom
807 */
808 typedef union SDL_HapticEffect
809 {
810 /* Common for all force feedback effects */
811 Uint16 type; /**< Effect type. */
812 SDL_HapticConstant constant; /**< Constant effect. */
813 SDL_HapticPeriodic periodic; /**< Periodic effect. */
814 SDL_HapticCondition condition; /**< Condition effect. */
815 SDL_HapticRamp ramp; /**< Ramp effect. */
816 SDL_HapticLeftRight leftright; /**< Left/Right effect. */
817 SDL_HapticCustom custom; /**< Custom effect. */
818 } SDL_HapticEffect;
819
820
821 /* Function prototypes */
822
823 /**
824 * Count the number of haptic devices attached to the system.
825 *
826 * \returns the number of haptic devices detected on the system or a negative
827 * error code on failure; call SDL_GetError() for more information.
828 *
829 * \since This function is available since SDL 2.0.0.
830 *
831 * \sa SDL_HapticName
832 */
833 extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
834
835 /**
836 * Get the implementation dependent name of a haptic device.
837 *
838 * This can be called before any joysticks are opened. If no name can be
839 * found, this function returns NULL.
840 *
841 * \param device_index index of the device to query.
842 * \returns the name of the device or NULL on failure; call SDL_GetError() for
843 * more information.
844 *
845 * \since This function is available since SDL 2.0.0.
846 *
847 * \sa SDL_NumHaptics
848 */
849 extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
850
851 /**
852 * Open a haptic device for use.
853 *
854 * The index passed as an argument refers to the N'th haptic device on this
855 * system.
856 *
857 * When opening a haptic device, its gain will be set to maximum and
858 * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
859 * and SDL_HapticSetAutocenter().
860 *
861 * \param device_index index of the device to open
862 * \returns the device identifier or NULL on failure; call SDL_GetError() for
863 * more information.
864 *
865 * \since This function is available since SDL 2.0.0.
866 *
867 * \sa SDL_HapticClose
868 * \sa SDL_HapticIndex
869 * \sa SDL_HapticOpenFromJoystick
870 * \sa SDL_HapticOpenFromMouse
871 * \sa SDL_HapticPause
872 * \sa SDL_HapticSetAutocenter
873 * \sa SDL_HapticSetGain
874 * \sa SDL_HapticStopAll
875 */
876 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
877
878 /**
879 * Check if the haptic device at the designated index has been opened.
880 *
881 * \param device_index the index of the device to query
882 * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
883 * SDL_GetError() for more information.
884 *
885 * \since This function is available since SDL 2.0.0.
886 *
887 * \sa SDL_HapticIndex
888 * \sa SDL_HapticOpen
889 */
890 extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
891
892 /**
893 * Get the index of a haptic device.
894 *
895 * \param haptic the SDL_Haptic device to query
896 * \returns the index of the specified haptic device or a negative error code
897 * on failure; call SDL_GetError() for more information.
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_HapticOpen
902 * \sa SDL_HapticOpened
903 */
904 extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
905
906 /**
907 * Query whether or not the current mouse has haptic capabilities.
908 *
909 * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_HapticOpenFromMouse
914 */
915 extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
916
917 /**
918 * Try to open a haptic device from the current mouse.
919 *
920 * \returns the haptic device identifier or NULL on failure; call
921 * SDL_GetError() for more information.
922 *
923 * \since This function is available since SDL 2.0.0.
924 *
925 * \sa SDL_HapticOpen
926 * \sa SDL_MouseIsHaptic
927 */
928 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
929
930 /**
931 * Query if a joystick has haptic features.
932 *
933 * \param joystick the SDL_Joystick to test for haptic capabilities
934 * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
935 * negative error code on failure; call SDL_GetError() for more
936 * information.
937 *
938 * \since This function is available since SDL 2.0.0.
939 *
940 * \sa SDL_HapticOpenFromJoystick
941 */
942 extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
943
944 /**
945 * Open a haptic device for use from a joystick device.
946 *
947 * You must still close the haptic device separately. It will not be closed
948 * with the joystick.
949 *
950 * When opened from a joystick you should first close the haptic device before
951 * closing the joystick device. If not, on some implementations the haptic
952 * device will also get unallocated and you'll be unable to use force feedback
953 * on that device.
954 *
955 * \param joystick the SDL_Joystick to create a haptic device from
956 * \returns a valid haptic device identifier on success or NULL on failure;
957 * call SDL_GetError() for more information.
958 *
959 * \since This function is available since SDL 2.0.0.
960 *
961 * \sa SDL_HapticClose
962 * \sa SDL_HapticOpen
963 * \sa SDL_JoystickIsHaptic
964 */
965 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
966 joystick);
967
968 /**
969 * Close a haptic device previously opened with SDL_HapticOpen().
970 *
971 * \param haptic the SDL_Haptic device to close
972 *
973 * \since This function is available since SDL 2.0.0.
974 *
975 * \sa SDL_HapticOpen
976 */
977 extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
978
979 /**
980 * Get the number of effects a haptic device can store.
981 *
982 * On some platforms this isn't fully supported, and therefore is an
983 * approximation. Always check to see if your created effect was actually
984 * created and do not rely solely on SDL_HapticNumEffects().
985 *
986 * \param haptic the SDL_Haptic device to query
987 * \returns the number of effects the haptic device can store or a negative
988 * error code on failure; call SDL_GetError() for more information.
989 *
990 * \since This function is available since SDL 2.0.0.
991 *
992 * \sa SDL_HapticNumEffectsPlaying
993 * \sa SDL_HapticQuery
994 */
995 extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
996
997 /**
998 * Get the number of effects a haptic device can play at the same time.
999 *
1000 * This is not supported on all platforms, but will always return a value.
1001 *
1002 * \param haptic the SDL_Haptic device to query maximum playing effects
1003 * \returns the number of effects the haptic device can play at the same time
1004 * or a negative error code on failure; call SDL_GetError() for more
1005 * information.
1006 *
1007 * \since This function is available since SDL 2.0.0.
1008 *
1009 * \sa SDL_HapticNumEffects
1010 * \sa SDL_HapticQuery
1011 */
1012 extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
1013
1014 /**
1015 * Get the haptic device's supported features in bitwise manner.
1016 *
1017 * \param haptic the SDL_Haptic device to query
1018 * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1019 * on failure; call SDL_GetError() for more information.
1020 *
1021 * \since This function is available since SDL 2.0.0.
1022 *
1023 * \sa SDL_HapticEffectSupported
1024 * \sa SDL_HapticNumEffects
1025 */
1026 extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
1027
1028
1029 /**
1030 * Get the number of haptic axes the device has.
1031 *
1032 * The number of haptic axes might be useful if working with the
1033 * SDL_HapticDirection effect.
1034 *
1035 * \param haptic the SDL_Haptic device to query
1036 * \returns the number of axes on success or a negative error code on failure;
1037 * call SDL_GetError() for more information.
1038 *
1039 * \since This function is available since SDL 2.0.0.
1040 */
1041 extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
1042
1043 /**
1044 * Check to see if an effect is supported by a haptic device.
1045 *
1046 * \param haptic the SDL_Haptic device to query
1047 * \param effect the desired effect to query
1048 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1049 * negative error code on failure; call SDL_GetError() for more
1050 * information.
1051 *
1052 * \since This function is available since SDL 2.0.0.
1053 *
1054 * \sa SDL_HapticNewEffect
1055 * \sa SDL_HapticQuery
1056 */
1057 extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
1058 SDL_HapticEffect *
1059 effect);
1060
1061 /**
1062 * Create a new haptic effect on a specified device.
1063 *
1064 * \param haptic an SDL_Haptic device to create the effect on
1065 * \param effect an SDL_HapticEffect structure containing the properties of
1066 * the effect to create
1067 * \returns the ID of the effect on success or a negative error code on
1068 * failure; call SDL_GetError() for more information.
1069 *
1070 * \since This function is available since SDL 2.0.0.
1071 *
1072 * \sa SDL_HapticDestroyEffect
1073 * \sa SDL_HapticRunEffect
1074 * \sa SDL_HapticUpdateEffect
1075 */
1076 extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
1077 SDL_HapticEffect * effect);
1078
1079 /**
1080 * Update the properties of an effect.
1081 *
1082 * Can be used dynamically, although behavior when dynamically changing
1083 * direction may be strange. Specifically the effect may re-upload itself and
1084 * start playing from the start. You also cannot change the type either when
1085 * running SDL_HapticUpdateEffect().
1086 *
1087 * \param haptic the SDL_Haptic device that has the effect
1088 * \param effect the identifier of the effect to update
1089 * \param data an SDL_HapticEffect structure containing the new effect
1090 * properties to use
1091 * \returns 0 on success or a negative error code on failure; call
1092 * SDL_GetError() for more information.
1093 *
1094 * \since This function is available since SDL 2.0.0.
1095 *
1096 * \sa SDL_HapticDestroyEffect
1097 * \sa SDL_HapticNewEffect
1098 * \sa SDL_HapticRunEffect
1099 */
1100 extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
1101 int effect,
1102 SDL_HapticEffect * data);
1103
1104 /**
1105 * Run the haptic effect on its associated haptic device.
1106 *
1107 * To repeat the effect over and over indefinitely, set `iterations` to
1108 * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1109 * one instance of the effect last indefinitely (so the effect does not fade),
1110 * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1111 * instead.
1112 *
1113 * \param haptic the SDL_Haptic device to run the effect on
1114 * \param effect the ID of the haptic effect to run
1115 * \param iterations the number of iterations to run the effect; use
1116 * `SDL_HAPTIC_INFINITY` to repeat forever
1117 * \returns 0 on success or a negative error code on failure; call
1118 * SDL_GetError() for more information.
1119 *
1120 * \since This function is available since SDL 2.0.0.
1121 *
1122 * \sa SDL_HapticDestroyEffect
1123 * \sa SDL_HapticGetEffectStatus
1124 * \sa SDL_HapticStopEffect
1125 */
1126 extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
1127 int effect,
1128 Uint32 iterations);
1129
1130 /**
1131 * Stop the haptic effect on its associated haptic device.
1132 *
1133 * *
1134 *
1135 * \param haptic the SDL_Haptic device to stop the effect on
1136 * \param effect the ID of the haptic effect to stop
1137 * \returns 0 on success or a negative error code on failure; call
1138 * SDL_GetError() for more information.
1139 *
1140 * \since This function is available since SDL 2.0.0.
1141 *
1142 * \sa SDL_HapticDestroyEffect
1143 * \sa SDL_HapticRunEffect
1144 */
1145 extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
1146 int effect);
1147
1148 /**
1149 * Destroy a haptic effect on the device.
1150 *
1151 * This will stop the effect if it's running. Effects are automatically
1152 * destroyed when the device is closed.
1153 *
1154 * \param haptic the SDL_Haptic device to destroy the effect on
1155 * \param effect the ID of the haptic effect to destroy
1156 *
1157 * \since This function is available since SDL 2.0.0.
1158 *
1159 * \sa SDL_HapticNewEffect
1160 */
1161 extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
1162 int effect);
1163
1164 /**
1165 * Get the status of the current effect on the specified haptic device.
1166 *
1167 * Device must support the SDL_HAPTIC_STATUS feature.
1168 *
1169 * \param haptic the SDL_Haptic device to query for the effect status on
1170 * \param effect the ID of the haptic effect to query its status
1171 * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
1172 * code on failure; call SDL_GetError() for more information.
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_HapticRunEffect
1177 * \sa SDL_HapticStopEffect
1178 */
1179 extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
1180 int effect);
1181
1182 /**
1183 * Set the global gain of the specified haptic device.
1184 *
1185 * Device must support the SDL_HAPTIC_GAIN feature.
1186 *
1187 * The user may specify the maximum gain by setting the environment variable
1188 * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1189 * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1190 * maximum.
1191 *
1192 * \param haptic the SDL_Haptic device to set the gain on
1193 * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
1194 * \returns 0 on success or a negative error code on failure; call
1195 * SDL_GetError() for more information.
1196 *
1197 * \since This function is available since SDL 2.0.0.
1198 *
1199 * \sa SDL_HapticQuery
1200 */
1201 extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
1202
1203 /**
1204 * Set the global autocenter of the device.
1205 *
1206 * Autocenter should be between 0 and 100. Setting it to 0 will disable
1207 * autocentering.
1208 *
1209 * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1210 *
1211 * \param haptic the SDL_Haptic device to set autocentering on
1212 * \param autocenter value to set autocenter to (0-100)
1213 * \returns 0 on success or a negative error code on failure; call
1214 * SDL_GetError() for more information.
1215 *
1216 * \since This function is available since SDL 2.0.0.
1217 *
1218 * \sa SDL_HapticQuery
1219 */
1220 extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
1221 int autocenter);
1222
1223 /**
1224 * Pause a haptic device.
1225 *
1226 * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
1227 * SDL_HapticUnpause() to resume playback.
1228 *
1229 * Do not modify the effects nor add new ones while the device is paused. That
1230 * can cause all sorts of weird errors.
1231 *
1232 * \param haptic the SDL_Haptic device to pause
1233 * \returns 0 on success or a negative error code on failure; call
1234 * SDL_GetError() for more information.
1235 *
1236 * \since This function is available since SDL 2.0.0.
1237 *
1238 * \sa SDL_HapticUnpause
1239 */
1240 extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
1241
1242 /**
1243 * Unpause a haptic device.
1244 *
1245 * Call to unpause after SDL_HapticPause().
1246 *
1247 * \param haptic the SDL_Haptic device to unpause
1248 * \returns 0 on success or a negative error code on failure; call
1249 * SDL_GetError() for more information.
1250 *
1251 * \since This function is available since SDL 2.0.0.
1252 *
1253 * \sa SDL_HapticPause
1254 */
1255 extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
1256
1257 /**
1258 * Stop all the currently playing effects on a haptic device.
1259 *
1260 * \param haptic the SDL_Haptic device to stop
1261 * \returns 0 on success or a negative error code on failure; call
1262 * SDL_GetError() for more information.
1263 *
1264 * \since This function is available since SDL 2.0.0.
1265 */
1266 extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
1267
1268 /**
1269 * Check whether rumble is supported on a haptic device.
1270 *
1271 * \param haptic haptic device to check for rumble support
1272 * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1273 * negative error code on failure; call SDL_GetError() for more
1274 * information.
1275 *
1276 * \since This function is available since SDL 2.0.0.
1277 *
1278 * \sa SDL_HapticRumbleInit
1279 * \sa SDL_HapticRumblePlay
1280 * \sa SDL_HapticRumbleStop
1281 */
1282 extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
1283
1284 /**
1285 * Initialize a haptic device for simple rumble playback.
1286 *
1287 * \param haptic the haptic device to initialize for simple rumble playback
1288 * \returns 0 on success or a negative error code on failure; call
1289 * SDL_GetError() for more information.
1290 *
1291 * \since This function is available since SDL 2.0.0.
1292 *
1293 * \sa SDL_HapticOpen
1294 * \sa SDL_HapticRumblePlay
1295 * \sa SDL_HapticRumbleStop
1296 * \sa SDL_HapticRumbleSupported
1297 */
1298 extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
1299
1300 /**
1301 * Run a simple rumble effect on a haptic device.
1302 *
1303 * \param haptic the haptic device to play the rumble effect on
1304 * \param strength strength of the rumble to play as a 0-1 float value
1305 * \param length length of the rumble to play in milliseconds
1306 * \returns 0 on success or a negative error code on failure; call
1307 * SDL_GetError() for more information.
1308 *
1309 * \since This function is available since SDL 2.0.0.
1310 *
1311 * \sa SDL_HapticRumbleInit
1312 * \sa SDL_HapticRumbleStop
1313 * \sa SDL_HapticRumbleSupported
1314 */
1315 extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
1316
1317 /**
1318 * Stop the simple rumble on a haptic device.
1319 *
1320 * \param haptic the haptic device to stop the rumble effect on
1321 * \returns 0 on success or a negative error code on failure; call
1322 * SDL_GetError() for more information.
1323 *
1324 * \since This function is available since SDL 2.0.0.
1325 *
1326 * \sa SDL_HapticRumbleInit
1327 * \sa SDL_HapticRumblePlay
1328 * \sa SDL_HapticRumbleSupported
1329 */
1330 extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
1331
1332 /* Ends C function definitions when using C++ */
1333 #ifdef __cplusplus
1334 }
1335 #endif
1336 #include <SDL2/close_code.h>
1337
1338 #endif /* SDL_haptic_h_ */
1339
1340 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hidapi.h
23 *
24 * Header file for SDL HIDAPI functions.
25 *
26 * This is an adaptation of the original HIDAPI interface by Alan Ott,
27 * and includes source code licensed under the following BSD license:
28 *
29 Copyright (c) 2010, Alan Ott, Signal 11 Software
30 All rights reserved.
31
32 Redistribution and use in source and binary forms, with or without
33 modification, are permitted provided that the following conditions are met:
34
35 * Redistributions of source code must retain the above copyright notice,
36 this list of conditions and the following disclaimer.
37 * Redistributions in binary form must reproduce the above copyright
38 notice, this list of conditions and the following disclaimer in the
39 documentation and/or other materials provided with the distribution.
40 * Neither the name of Signal 11 Software nor the names of its
41 contributors may be used to endorse or promote products derived from
42 this software without specific prior written permission.
43
44 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
45 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
48 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
49 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
50 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
51 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54 POSSIBILITY OF SUCH DAMAGE.
55 *
56 * If you would like a version of SDL without this code, you can build SDL
57 * with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
58 * on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
59 */
60
61 #ifndef SDL_hidapi_h_
62 #define SDL_hidapi_h_
63
64 #include <SDL2/SDL_stdinc.h>
65
66 #include <SDL2/begin_code.h>
67 /* Set up for C function definitions, even when using C++ */
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71
72 /**
73 * \brief A handle representing an open HID device
74 */
75 struct SDL_hid_device_;
76 typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
77
78 /** hidapi info structure */
79 /**
80 * \brief Information about a connected HID device
81 */
82 typedef struct SDL_hid_device_info
83 {
84 /** Platform-specific device path */
85 char *path;
86 /** Device Vendor ID */
87 unsigned short vendor_id;
88 /** Device Product ID */
89 unsigned short product_id;
90 /** Serial Number */
91 wchar_t *serial_number;
92 /** Device Release Number in binary-coded decimal,
93 also known as Device Version Number */
94 unsigned short release_number;
95 /** Manufacturer String */
96 wchar_t *manufacturer_string;
97 /** Product string */
98 wchar_t *product_string;
99 /** Usage Page for this Device/Interface
100 (Windows/Mac only). */
101 unsigned short usage_page;
102 /** Usage for this Device/Interface
103 (Windows/Mac only).*/
104 unsigned short usage;
105 /** The USB interface which this logical device
106 represents.
107
108 * Valid on both Linux implementations in all cases.
109 * Valid on the Windows implementation only if the device
110 contains more than one interface. */
111 int interface_number;
112
113 /** Additional information about the USB interface.
114 Valid on libusb and Android implementations. */
115 int interface_class;
116 int interface_subclass;
117 int interface_protocol;
118
119 /** Pointer to the next device */
120 struct SDL_hid_device_info *next;
121 } SDL_hid_device_info;
122
123
124 /**
125 * Initialize the HIDAPI library.
126 *
127 * This function initializes the HIDAPI library. Calling it is not strictly
128 * necessary, as it will be called automatically by SDL_hid_enumerate() and
129 * any of the SDL_hid_open_*() functions if it is needed. This function should
130 * be called at the beginning of execution however, if there is a chance of
131 * HIDAPI handles being opened by different threads simultaneously.
132 *
133 * Each call to this function should have a matching call to SDL_hid_exit()
134 *
135 * \returns 0 on success and -1 on error.
136 *
137 * \since This function is available since SDL 2.0.18.
138 *
139 * \sa SDL_hid_exit
140 */
141 extern DECLSPEC int SDLCALL SDL_hid_init(void);
142
143 /**
144 * Finalize the HIDAPI library.
145 *
146 * This function frees all of the static data associated with HIDAPI. It
147 * should be called at the end of execution to avoid memory leaks.
148 *
149 * \returns 0 on success and -1 on error.
150 *
151 * \since This function is available since SDL 2.0.18.
152 *
153 * \sa SDL_hid_init
154 */
155 extern DECLSPEC int SDLCALL SDL_hid_exit(void);
156
157 /**
158 * Check to see if devices may have been added or removed.
159 *
160 * Enumerating the HID devices is an expensive operation, so you can call this
161 * to see if there have been any system device changes since the last call to
162 * this function. A change in the counter returned doesn't necessarily mean
163 * that anything has changed, but you can call SDL_hid_enumerate() to get an
164 * updated device list.
165 *
166 * Calling this function for the first time may cause a thread or other system
167 * resource to be allocated to track device change notifications.
168 *
169 * \returns a change counter that is incremented with each potential device
170 * change, or 0 if device change detection isn't available.
171 *
172 * \since This function is available since SDL 2.0.18.
173 *
174 * \sa SDL_hid_enumerate
175 */
176 extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
177
178 /**
179 * Enumerate the HID Devices.
180 *
181 * This function returns a linked list of all the HID devices attached to the
182 * system which match vendor_id and product_id. If `vendor_id` is set to 0
183 * then any vendor matches. If `product_id` is set to 0 then any product
184 * matches. If `vendor_id` and `product_id` are both set to 0, then all HID
185 * devices will be returned.
186 *
187 * \param vendor_id The Vendor ID (VID) of the types of device to open.
188 * \param product_id The Product ID (PID) of the types of device to open.
189 * \returns a pointer to a linked list of type SDL_hid_device_info, containing
190 * information about the HID devices attached to the system, or NULL
191 * in the case of failure. Free this linked list by calling
192 * SDL_hid_free_enumeration().
193 *
194 * \since This function is available since SDL 2.0.18.
195 *
196 * \sa SDL_hid_device_change_count
197 */
198 extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
199
200 /**
201 * Free an enumeration Linked List
202 *
203 * This function frees a linked list created by SDL_hid_enumerate().
204 *
205 * \param devs Pointer to a list of struct_device returned from
206 * SDL_hid_enumerate().
207 *
208 * \since This function is available since SDL 2.0.18.
209 */
210 extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
211
212 /**
213 * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
214 * a serial number.
215 *
216 * If `serial_number` is NULL, the first device with the specified VID and PID
217 * is opened.
218 *
219 * \param vendor_id The Vendor ID (VID) of the device to open.
220 * \param product_id The Product ID (PID) of the device to open.
221 * \param serial_number The Serial Number of the device to open (Optionally
222 * NULL).
223 * \returns a pointer to a SDL_hid_device object on success or NULL on
224 * failure.
225 *
226 * \since This function is available since SDL 2.0.18.
227 */
228 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
229
230 /**
231 * Open a HID device by its path name.
232 *
233 * The path name be determined by calling SDL_hid_enumerate(), or a
234 * platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
235 *
236 * \param path The path name of the device to open
237 * \returns a pointer to a SDL_hid_device object on success or NULL on
238 * failure.
239 *
240 * \since This function is available since SDL 2.0.18.
241 */
242 extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
243
244 /**
245 * Write an Output report to a HID device.
246 *
247 * The first byte of `data` must contain the Report ID. For devices which only
248 * support a single report, this must be set to 0x0. The remaining bytes
249 * contain the report data. Since the Report ID is mandatory, calls to
250 * SDL_hid_write() will always contain one more byte than the report contains.
251 * For example, if a hid report is 16 bytes long, 17 bytes must be passed to
252 * SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
253 * followed by the report data (16 bytes). In this example, the length passed
254 * in would be 17.
255 *
256 * SDL_hid_write() will send the data on the first OUT endpoint, if one
257 * exists. If it does not, it will send the data through the Control Endpoint
258 * (Endpoint 0).
259 *
260 * \param dev A device handle returned from SDL_hid_open().
261 * \param data The data to send, including the report number as the first
262 * byte.
263 * \param length The length in bytes of the data to send.
264 * \returns the actual number of bytes written and -1 on error.
265 *
266 * \since This function is available since SDL 2.0.18.
267 */
268 extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
269
270 /**
271 * Read an Input report from a HID device with timeout.
272 *
273 * Input reports are returned to the host through the INTERRUPT IN endpoint.
274 * The first byte will contain the Report number if the device uses numbered
275 * reports.
276 *
277 * \param dev A device handle returned from SDL_hid_open().
278 * \param data A buffer to put the read data into.
279 * \param length The number of bytes to read. For devices with multiple
280 * reports, make sure to read an extra byte for the report
281 * number.
282 * \param milliseconds timeout in milliseconds or -1 for blocking wait.
283 * \returns the actual number of bytes read and -1 on error. If no packet was
284 * available to be read within the timeout period, this function
285 * returns 0.
286 *
287 * \since This function is available since SDL 2.0.18.
288 */
289 extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
290
291 /**
292 * Read an Input report from a HID device.
293 *
294 * Input reports are returned to the host through the INTERRUPT IN endpoint.
295 * The first byte will contain the Report number if the device uses numbered
296 * reports.
297 *
298 * \param dev A device handle returned from SDL_hid_open().
299 * \param data A buffer to put the read data into.
300 * \param length The number of bytes to read. For devices with multiple
301 * reports, make sure to read an extra byte for the report
302 * number.
303 * \returns the actual number of bytes read and -1 on error. If no packet was
304 * available to be read and the handle is in non-blocking mode, this
305 * function returns 0.
306 *
307 * \since This function is available since SDL 2.0.18.
308 */
309 extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
310
311 /**
312 * Set the device handle to be non-blocking.
313 *
314 * In non-blocking mode calls to SDL_hid_read() will return immediately with a
315 * value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
316 * will wait (block) until there is data to read before returning.
317 *
318 * Nonblocking can be turned on and off at any time.
319 *
320 * \param dev A device handle returned from SDL_hid_open().
321 * \param nonblock enable or not the nonblocking reads - 1 to enable
322 * nonblocking - 0 to disable nonblocking.
323 * \returns 0 on success and -1 on error.
324 *
325 * \since This function is available since SDL 2.0.18.
326 */
327 extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
328
329 /**
330 * Send a Feature report to the device.
331 *
332 * Feature reports are sent over the Control endpoint as a Set_Report
333 * transfer. The first byte of `data` must contain the Report ID. For devices
334 * which only support a single report, this must be set to 0x0. The remaining
335 * bytes contain the report data. Since the Report ID is mandatory, calls to
336 * SDL_hid_send_feature_report() will always contain one more byte than the
337 * report contains. For example, if a hid report is 16 bytes long, 17 bytes
338 * must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
339 * devices which do not use numbered reports), followed by the report data (16
340 * bytes). In this example, the length passed in would be 17.
341 *
342 * \param dev A device handle returned from SDL_hid_open().
343 * \param data The data to send, including the report number as the first
344 * byte.
345 * \param length The length in bytes of the data to send, including the report
346 * number.
347 * \returns the actual number of bytes written and -1 on error.
348 *
349 * \since This function is available since SDL 2.0.18.
350 */
351 extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
352
353 /**
354 * Get a feature report from a HID device.
355 *
356 * Set the first byte of `data` to the Report ID of the report to be read.
357 * Make sure to allow space for this extra byte in `data`. Upon return, the
358 * first byte will still contain the Report ID, and the report data will start
359 * in data[1].
360 *
361 * \param dev A device handle returned from SDL_hid_open().
362 * \param data A buffer to put the read data into, including the Report ID.
363 * Set the first byte of `data` to the Report ID of the report to
364 * be read, or set it to zero if your device does not use numbered
365 * reports.
366 * \param length The number of bytes to read, including an extra byte for the
367 * report ID. The buffer can be longer than the actual report.
368 * \returns the number of bytes read plus one for the report ID (which is
369 * still in the first byte), or -1 on error.
370 *
371 * \since This function is available since SDL 2.0.18.
372 */
373 extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
374
375 /**
376 * Close a HID device.
377 *
378 * \param dev A device handle returned from SDL_hid_open().
379 *
380 * \since This function is available since SDL 2.0.18.
381 */
382 extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
383
384 /**
385 * Get The Manufacturer String from a HID device.
386 *
387 * \param dev A device handle returned from SDL_hid_open().
388 * \param string A wide string buffer to put the data into.
389 * \param maxlen The length of the buffer in multiples of wchar_t.
390 * \returns 0 on success and -1 on error.
391 *
392 * \since This function is available since SDL 2.0.18.
393 */
394 extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
395
396 /**
397 * Get The Product String from a HID device.
398 *
399 * \param dev A device handle returned from SDL_hid_open().
400 * \param string A wide string buffer to put the data into.
401 * \param maxlen The length of the buffer in multiples of wchar_t.
402 * \returns 0 on success and -1 on error.
403 *
404 * \since This function is available since SDL 2.0.18.
405 */
406 extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
407
408 /**
409 * Get The Serial Number String from a HID device.
410 *
411 * \param dev A device handle returned from SDL_hid_open().
412 * \param string A wide string buffer to put the data into.
413 * \param maxlen The length of the buffer in multiples of wchar_t.
414 * \returns 0 on success and -1 on error.
415 *
416 * \since This function is available since SDL 2.0.18.
417 */
418 extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
419
420 /**
421 * Get a string from a HID device, based on its string index.
422 *
423 * \param dev A device handle returned from SDL_hid_open().
424 * \param string_index The index of the string to get.
425 * \param string A wide string buffer to put the data into.
426 * \param maxlen The length of the buffer in multiples of wchar_t.
427 * \returns 0 on success and -1 on error.
428 *
429 * \since This function is available since SDL 2.0.18.
430 */
431 extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
432
433 /**
434 * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
435 *
436 * \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
437 *
438 * \since This function is available since SDL 2.0.18.
439 */
440 extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
441
442 /* Ends C function definitions when using C++ */
443 #ifdef __cplusplus
444 }
445 #endif
446 #include <SDL2/close_code.h>
447
448 #endif /* SDL_hidapi_h_ */
449
450 /* vi: set sts=4 ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_hints.h
23 *
24 * Official documentation for SDL configuration variables
25 *
26 * This file contains functions to set and get configuration hints,
27 * as well as listing each of them alphabetically.
28 *
29 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
30 * the environment variable that can be used to override the default.
31 *
32 * In general these hints are just that - they may or may not be
33 * supported or applicable on any given platform, but they provide
34 * a way for an application or user to give the library a hint as
35 * to how they would like the library to work.
36 */
37
38 #ifndef SDL_hints_h_
39 #define SDL_hints_h_
40
41 #include <SDL2/SDL_stdinc.h>
42
43 #include <SDL2/begin_code.h>
44 /* Set up for C function definitions, even when using C++ */
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48
49 /**
50 * \brief A variable controlling whether the Android / iOS built-in
51 * accelerometer should be listed as a joystick device.
52 *
53 * This variable can be set to the following values:
54 * "0" - The accelerometer is not listed as a joystick
55 * "1" - The accelerometer is available as a 3 axis joystick (the default).
56 */
57 #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
58
59 /**
60 * \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
61 *
62 * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
63 * and your window is full-screen. This prevents the user from getting stuck in
64 * your application if you've enabled keyboard grab.
65 *
66 * The variable can be set to the following values:
67 * "0" - SDL will not handle Alt+Tab. Your application is responsible
68 for handling Alt+Tab while the keyboard is grabbed.
69 * "1" - SDL will minimize your window when Alt+Tab is pressed (default)
70 */
71 #define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
72
73 /**
74 * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
75 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
76 *
77 * This variable can be set to the following values:
78 * "0" - don't allow topmost
79 * "1" - allow topmost
80 */
81 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
82
83 /**
84 * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
85 *
86 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
87 *
88 * If both hints were set then SDL_RWFromFile() will look into expansion files
89 * after a given relative path was not found in the internal storage and assets.
90 *
91 * By default this hint is not set and the APK expansion files are not searched.
92 */
93 #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
94
95 /**
96 * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
97 *
98 * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
99 *
100 * If both hints were set then SDL_RWFromFile() will look into expansion files
101 * after a given relative path was not found in the internal storage and assets.
102 *
103 * By default this hint is not set and the APK expansion files are not searched.
104 */
105 #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
106
107 /**
108 * \brief A variable to control whether the event loop will block itself when the app is paused.
109 *
110 * The variable can be set to the following values:
111 * "0" - Non blocking.
112 * "1" - Blocking. (default)
113 *
114 * The value should be set before SDL is initialized.
115 */
116 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
117
118 /**
119 * \brief A variable to control whether SDL will pause audio in background
120 * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
121 *
122 * The variable can be set to the following values:
123 * "0" - Non paused.
124 * "1" - Paused. (default)
125 *
126 * The value should be set before SDL is initialized.
127 */
128 #define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
129
130 /**
131 * \brief A variable to control whether we trap the Android back button to handle it manually.
132 * This is necessary for the right mouse button to work on some Android devices, or
133 * to be able to trap the back button for use in your code reliably. If set to true,
134 * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
135 * SDL_SCANCODE_AC_BACK.
136 *
137 * The variable can be set to the following values:
138 * "0" - Back button will be handled as usual for system. (default)
139 * "1" - Back button will be trapped, allowing you to handle the key press
140 * manually. (This will also let right mouse click work on systems
141 * where the right mouse button functions as back.)
142 *
143 * The value of this hint is used at runtime, so it can be changed at any time.
144 */
145 #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
146
147 /**
148 * \brief Specify an application name.
149 *
150 * This hint lets you specify the application name sent to the OS when
151 * required. For example, this will often appear in volume control applets for
152 * audio streams, and in lists of applications which are inhibiting the
153 * screensaver. You should use a string that describes your program ("My Game
154 * 2: The Revenge")
155 *
156 * Setting this to "" or leaving it unset will have SDL use a reasonable
157 * default: probably the application's name or "SDL Application" if SDL
158 * doesn't have any better information.
159 *
160 * Note that, for audio streams, this can be overridden with
161 * SDL_HINT_AUDIO_DEVICE_APP_NAME.
162 *
163 * On targets where this is not supported, this hint does nothing.
164 */
165 #define SDL_HINT_APP_NAME "SDL_APP_NAME"
166
167 /**
168 * \brief A variable controlling whether controllers used with the Apple TV
169 * generate UI events.
170 *
171 * When UI events are generated by controller input, the app will be
172 * backgrounded when the Apple TV remote's menu button is pressed, and when the
173 * pause or B buttons on gamepads are pressed.
174 *
175 * More information about properly making use of controllers for the Apple TV
176 * can be found here:
177 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
178 *
179 * This variable can be set to the following values:
180 * "0" - Controller input does not generate UI events (the default).
181 * "1" - Controller input generates UI events.
182 */
183 #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
184
185 /**
186 * \brief A variable controlling whether the Apple TV remote's joystick axes
187 * will automatically match the rotation of the remote.
188 *
189 * This variable can be set to the following values:
190 * "0" - Remote orientation does not affect joystick axes (the default).
191 * "1" - Joystick axes are based on the orientation of the remote.
192 */
193 #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
194
195 /**
196 * \brief A variable controlling the audio category on iOS and Mac OS X
197 *
198 * This variable can be set to the following values:
199 *
200 * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
201 * "playback" - Use the AVAudioSessionCategoryPlayback category
202 *
203 * For more information, see Apple's documentation:
204 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
205 */
206 #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
207
208 /**
209 * \brief Specify an application name for an audio device.
210 *
211 * Some audio backends (such as PulseAudio) allow you to describe your audio
212 * stream. Among other things, this description might show up in a system
213 * control panel that lets the user adjust the volume on specific audio
214 * streams instead of using one giant master volume slider.
215 *
216 * This hints lets you transmit that information to the OS. The contents of
217 * this hint are used while opening an audio device. You should use a string
218 * that describes your program ("My Game 2: The Revenge")
219 *
220 * Setting this to "" or leaving it unset will have SDL use a reasonable
221 * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
222 * set. Otherwise, it'll probably the application's name or "SDL Application"
223 * if SDL doesn't have any better information.
224 *
225 * On targets where this is not supported, this hint does nothing.
226 */
227 #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
228
229 /**
230 * \brief Specify an application name for an audio device.
231 *
232 * Some audio backends (such as PulseAudio) allow you to describe your audio
233 * stream. Among other things, this description might show up in a system
234 * control panel that lets the user adjust the volume on specific audio
235 * streams instead of using one giant master volume slider.
236 *
237 * This hints lets you transmit that information to the OS. The contents of
238 * this hint are used while opening an audio device. You should use a string
239 * that describes your what your program is playing ("audio stream" is
240 * probably sufficient in many cases, but this could be useful for something
241 * like "team chat" if you have a headset playing VoIP audio separately).
242 *
243 * Setting this to "" or leaving it unset will have SDL use a reasonable
244 * default: "audio stream" or something similar.
245 *
246 * On targets where this is not supported, this hint does nothing.
247 */
248 #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
249
250 /**
251 * \brief Specify an application role for an audio device.
252 *
253 * Some audio backends (such as Pipewire) allow you to describe the role of
254 * your audio stream. Among other things, this description might show up in
255 * a system control panel or software for displaying and manipulating media
256 * playback/capture graphs.
257 *
258 * This hints lets you transmit that information to the OS. The contents of
259 * this hint are used while opening an audio device. You should use a string
260 * that describes your what your program is playing (Game, Music, Movie,
261 * etc...).
262 *
263 * Setting this to "" or leaving it unset will have SDL use a reasonable
264 * default: "Game" or something similar.
265 *
266 * On targets where this is not supported, this hint does nothing.
267 */
268 #define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
269
270 /**
271 * \brief A variable controlling speed/quality tradeoff of audio resampling.
272 *
273 * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
274 * to handle audio resampling. There are different resampling modes available
275 * that produce different levels of quality, using more CPU.
276 *
277 * If this hint isn't specified to a valid setting, or libsamplerate isn't
278 * available, SDL will use the default, internal resampling algorithm.
279 *
280 * Note that this is currently only applicable to resampling audio that is
281 * being written to a device for playback or audio being read from a device
282 * for capture. SDL_AudioCVT always uses the default resampler (although this
283 * might change for SDL 2.1).
284 *
285 * This hint is currently only checked at audio subsystem initialization.
286 *
287 * This variable can be set to the following values:
288 *
289 * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
290 * "1" or "fast" - Use fast, slightly higher quality resampling, if available
291 * "2" or "medium" - Use medium quality resampling, if available
292 * "3" or "best" - Use high quality resampling, if available
293 */
294 #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
295
296 /**
297 * \brief A variable controlling whether SDL updates joystick state when getting input events
298 *
299 * This variable can be set to the following values:
300 *
301 * "0" - You'll call SDL_JoystickUpdate() manually
302 * "1" - SDL will automatically call SDL_JoystickUpdate() (default)
303 *
304 * This hint can be toggled on and off at runtime.
305 */
306 #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
307
308 /**
309 * \brief A variable controlling whether SDL updates sensor state when getting input events
310 *
311 * This variable can be set to the following values:
312 *
313 * "0" - You'll call SDL_SensorUpdate() manually
314 * "1" - SDL will automatically call SDL_SensorUpdate() (default)
315 *
316 * This hint can be toggled on and off at runtime.
317 */
318 #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
319
320 /**
321 * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
322 *
323 * The bitmap header version 4 is required for proper alpha channel support and
324 * SDL will use it when required. Should this not be desired, this hint can
325 * force the use of the 40 byte header version which is supported everywhere.
326 *
327 * The variable can be set to the following values:
328 * "0" - Surfaces with a colorkey or an alpha channel are saved to a
329 * 32-bit BMP file with an alpha mask. SDL will use the bitmap
330 * header version 4 and set the alpha mask accordingly.
331 * "1" - Surfaces with a colorkey or an alpha channel are saved to a
332 * 32-bit BMP file without an alpha mask. The alpha channel data
333 * will be in the file, but applications are going to ignore it.
334 *
335 * The default value is "0".
336 */
337 #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
338
339 /**
340 * \brief Override for SDL_GetDisplayUsableBounds()
341 *
342 * If set, this hint will override the expected results for
343 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
344 * to do this, but this allows an embedded system to request that some of the
345 * screen be reserved for other uses when paired with a well-behaved
346 * application.
347 *
348 * The contents of this hint must be 4 comma-separated integers, the first
349 * is the bounds x, then y, width and height, in that order.
350 */
351 #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
352
353 /**
354 * \brief Disable giving back control to the browser automatically
355 * when running with asyncify
356 *
357 * With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
358 * such as refreshing the screen or polling events.
359 *
360 * This hint only applies to the emscripten platform
361 *
362 * The variable can be set to the following values:
363 * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
364 * "1" - Enable emscripten_sleep calls (the default)
365 */
366 #define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
367
368 /**
369 * \brief override the binding element for keyboard inputs for Emscripten builds
370 *
371 * This hint only applies to the emscripten platform
372 *
373 * The variable can be one of
374 * "#window" - The javascript window object (this is the default)
375 * "#document" - The javascript document object
376 * "#screen" - the javascript window.screen object
377 * "#canvas" - the WebGL canvas element
378 * any other string without a leading # sign applies to the element on the page with that ID.
379 */
380 #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
381
382 /**
383 * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
384 *
385 * The variable can be set to the following values:
386 * "0" - Do not scan for Steam Controllers
387 * "1" - Scan for Steam Controllers (the default)
388 *
389 * The default value is "1". This hint must be set before initializing the joystick subsystem.
390 */
391 #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
392
393 /**
394 * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
395 *
396 * This variable can be set to the following values:
397 *
398 * "0" - Don't log any events (default)
399 * "1" - Log all events except mouse and finger motion, which are pretty spammy.
400 * "2" - Log all events.
401 *
402 * This is generally meant to be used to debug SDL itself, but can be useful
403 * for application developers that need better visibility into what is going
404 * on in the event queue. Logged events are sent through SDL_Log(), which
405 * means by default they appear on stdout on most platforms or maybe
406 * OutputDebugString() on Windows, and can be funneled by the app with
407 * SDL_LogSetOutputFunction(), etc.
408 *
409 * This hint can be toggled on and off at runtime, if you only need to log
410 * events for a small subset of program execution.
411 */
412 #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
413
414 /**
415 * \brief A variable controlling whether raising the window should be done more forcefully
416 *
417 * This variable can be set to the following values:
418 * "0" - No forcing (the default)
419 * "1" - Extra level of forcing
420 *
421 * At present, this is only an issue under MS Windows, which makes it nearly impossible to
422 * programmatically move a window to the foreground, for "security" reasons. See
423 * http://stackoverflow.com/a/34414846 for a discussion.
424 */
425 #define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
426
427 /**
428 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
429 *
430 * SDL can try to accelerate the SDL screen surface by using streaming
431 * textures with a 3D rendering engine. This variable controls whether and
432 * how this is done.
433 *
434 * This variable can be set to the following values:
435 * "0" - Disable 3D acceleration
436 * "1" - Enable 3D acceleration, using the default renderer.
437 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
438 *
439 * By default SDL tries to make a best guess for each platform whether
440 * to use acceleration or not.
441 */
442 #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
443
444 /**
445 * \brief A variable that lets you manually hint extra gamecontroller db entries.
446 *
447 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
448 *
449 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
450 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
451 */
452 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
453
454 /**
455 * \brief A variable that lets you provide a file with extra gamecontroller db entries.
456 *
457 * The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
458 *
459 * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
460 * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
461 */
462 #define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
463
464 /**
465 * \brief A variable that overrides the automatic controller type detection
466 *
467 * The variable should be comma separated entries, in the form: VID/PID=type
468 *
469 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
470 *
471 * The type should be one of:
472 * Xbox360
473 * XboxOne
474 * PS3
475 * PS4
476 * PS5
477 * SwitchPro
478 *
479 * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
480 */
481 #define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
482
483 /**
484 * \brief A variable containing a list of devices to skip when scanning for game controllers.
485 *
486 * The format of the string is a comma separated list of USB VID/PID pairs
487 * in hexadecimal form, e.g.
488 *
489 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
490 *
491 * The variable can also take the form of @file, in which case the named
492 * file will be loaded and interpreted as the value of the variable.
493 */
494 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
495
496 /**
497 * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
498 *
499 * The format of the string is a comma separated list of USB VID/PID pairs
500 * in hexadecimal form, e.g.
501 *
502 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
503 *
504 * The variable can also take the form of @file, in which case the named
505 * file will be loaded and interpreted as the value of the variable.
506 */
507 #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
508
509 /**
510 * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
511 *
512 * For example, on Nintendo Switch controllers, normally you'd get:
513 *
514 * (Y)
515 * (X) (B)
516 * (A)
517 *
518 * but if this hint is set, you'll get:
519 *
520 * (X)
521 * (Y) (A)
522 * (B)
523 *
524 * The variable can be set to the following values:
525 * "0" - Report the face buttons by position, as though they were on an Xbox controller.
526 * "1" - Report the face buttons by label instead of position
527 *
528 * The default value is "1". This hint may be set at any time.
529 */
530 #define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
531
532 /**
533 * \brief A variable controlling whether grabbing input grabs the keyboard
534 *
535 * This variable can be set to the following values:
536 * "0" - Grab will affect only the mouse
537 * "1" - Grab will affect mouse and keyboard
538 *
539 * By default SDL will not grab the keyboard so system shortcuts still work.
540 */
541 #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
542
543 /**
544 * \brief A variable controlling whether the idle timer is disabled on iOS.
545 *
546 * When an iOS app does not receive touches for some time, the screen is
547 * dimmed automatically. For games where the accelerometer is the only input
548 * this is problematic. This functionality can be disabled by setting this
549 * hint.
550 *
551 * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
552 * accomplish the same thing on iOS. They should be preferred over this hint.
553 *
554 * This variable can be set to the following values:
555 * "0" - Enable idle timer
556 * "1" - Disable idle timer
557 */
558 #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
559
560 /**
561 * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
562 *
563 * The variable can be set to the following values:
564 * "0" - SDL_TEXTEDITING events are sent, and it is the application's
565 * responsibility to render the text from these events and
566 * differentiate it somehow from committed text. (default)
567 * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
568 * and text that is being composed will be rendered in its own UI.
569 */
570 #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
571
572 /**
573 * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
574 *
575 * The variable can be set to the following values:
576 * "0" - Native UI components are not display. (default)
577 * "1" - Native UI components are displayed.
578 */
579 #define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
580
581 /**
582 * \brief A variable to control if extended IME text support is enabled.
583 * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
584 * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
585 *
586 * The variable can be set to the following values:
587 * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
588 * "1" - Modern behavior.
589 */
590 #define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
591
592 /**
593 * \brief A variable controlling whether the home indicator bar on iPhone X
594 * should be hidden.
595 *
596 * This variable can be set to the following values:
597 * "0" - The indicator bar is not hidden (default for windowed applications)
598 * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
599 * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
600 */
601 #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
602
603 /**
604 * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
605 *
606 * The variable can be set to the following values:
607 * "0" - Disable joystick & gamecontroller input events when the
608 * application is in the background.
609 * "1" - Enable joystick & gamecontroller input events when the
610 * application is in the background.
611 *
612 * The default value is "0". This hint may be set at any time.
613 */
614 #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
615
616 /**
617 * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
618 *
619 * This variable can be set to the following values:
620 * "0" - HIDAPI drivers are not used
621 * "1" - HIDAPI drivers are used (the default)
622 *
623 * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
624 */
625 #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
626
627 /**
628 * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
629 *
630 * This variable can be set to the following values:
631 * "0" - HIDAPI driver is not used
632 * "1" - HIDAPI driver is used
633 *
634 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
635 */
636 #define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
637
638 /**
639 * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
640 * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
641 * this is useful for applications that need full compatibility for things like ADSR envelopes.
642 * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
643 * Rumble is both at any arbitrary value,
644 * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
645 *
646 * This variable can be set to the following values:
647 * "0" - Normal rumble behavior is behavior is used (default)
648 * "1" - Proper GameCube controller rumble behavior is used
649 *
650 */
651 #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
652
653 /**
654 * \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
655 *
656 * This variable can be set to the following values:
657 * "0" - basic Joy-Con support with no analog input (the default)
658 * "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
659 *
660 * This does not combine Joy-Cons into a single controller. That's up to the user.
661 */
662 #define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
663
664 /**
665 * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
666 *
667 * This variable can be set to the following values:
668 * "0" - HIDAPI driver is not used
669 * "1" - HIDAPI driver is used
670 *
671 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
672 */
673 #define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
674
675 /**
676 * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
677 *
678 * This variable can be set to the following values:
679 * "0" - HIDAPI driver is not used
680 * "1" - HIDAPI driver is used
681 *
682 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
683 */
684 #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
685
686 /**
687 * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
688 *
689 * This variable can be set to the following values:
690 * "0" - extended reports are not enabled (the default)
691 * "1" - extended reports
692 *
693 * Extended input reports allow rumble on Bluetooth PS4 controllers, but
694 * break DirectInput handling for applications that don't use SDL.
695 *
696 * Once extended reports are enabled, they can not be disabled without
697 * power cycling the controller.
698 *
699 * For compatibility with applications written for versions of SDL prior
700 * to the introduction of PS5 controller support, this value will also
701 * control the state of extended reports on PS5 controllers when the
702 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
703 */
704 #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
705
706 /**
707 * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
708 *
709 * This variable can be set to the following values:
710 * "0" - HIDAPI driver is not used
711 * "1" - HIDAPI driver is used
712 *
713 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
714 */
715 #define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
716
717 /**
718 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
719 *
720 * This variable can be set to the following values:
721 * "0" - player LEDs are not enabled
722 * "1" - player LEDs are enabled (the default)
723 */
724 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
725
726 /**
727 * \brief A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
728 *
729 * This variable can be set to the following values:
730 * "0" - extended reports are not enabled (the default)
731 * "1" - extended reports
732 *
733 * Extended input reports allow rumble on Bluetooth PS5 controllers, but
734 * break DirectInput handling for applications that don't use SDL.
735 *
736 * Once extended reports are enabled, they can not be disabled without
737 * power cycling the controller.
738 *
739 * For compatibility with applications written for versions of SDL prior
740 * to the introduction of PS5 controller support, this value defaults to
741 * the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
742 */
743 #define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
744
745 /**
746 * \brief A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
747 *
748 * This variable can be set to the following values:
749 * "0" - HIDAPI driver is not used
750 * "1" - HIDAPI driver is used
751 *
752 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
753 */
754 #define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
755
756 /**
757 * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
758 *
759 * This variable can be set to the following values:
760 * "0" - HIDAPI driver is not used
761 * "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
762 * and may prompt the user for permission on iOS and Android.
763 *
764 * The default is "0"
765 */
766 #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
767
768 /**
769 * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
770 *
771 * This variable can be set to the following values:
772 * "0" - HIDAPI driver is not used
773 * "1" - HIDAPI driver is used
774 *
775 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
776 */
777 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
778
779 /**
780 * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
781 *
782 * This variable can be set to the following values:
783 * "0" - home button LED is turned off
784 * "1" - home button LED is turned on
785 *
786 * By default the Home button LED state is not changed.
787 */
788 #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
789
790 /**
791 * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
792 *
793 * This variable can be set to the following values:
794 * "0" - HIDAPI driver is not used
795 * "1" - HIDAPI driver is used
796 *
797 * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
798 */
799 #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
800
801 /**
802 * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
803 *
804 * This variable can be set to the following values:
805 * "0" - RAWINPUT drivers are not used
806 * "1" - RAWINPUT drivers are used (the default)
807 */
808 #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
809
810 /**
811 * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
812 *
813 * This variable can be set to the following values:
814 * "0" - RAWINPUT driver will only use data from raw input APIs
815 * "1" - RAWINPUT driver will also pull data from XInput, providing
816 * better trigger axes, guide button presses, and rumble support
817 * for Xbox controllers
818 *
819 * The default is "1". This hint applies to any joysticks opened after setting the hint.
820 */
821 #define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
822
823 /**
824 * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
825 *
826 * This variable can be set to the following values:
827 * "0" - ROG Chakram mice do not show up as joysticks (the default)
828 * "1" - ROG Chakram mice show up as joysticks
829 */
830 #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
831
832 /**
833 * \brief A variable controlling whether a separate thread should be used
834 * for handling joystick detection and raw input messages on Windows
835 *
836 * This variable can be set to the following values:
837 * "0" - A separate thread is not used (the default)
838 * "1" - A separate thread is used for handling raw input messages
839 *
840 */
841 #define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
842
843 /**
844 * \brief Determines whether SDL enforces that DRM master is required in order
845 * to initialize the KMSDRM video backend.
846 *
847 * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
848 * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
849 * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
850 * is still able to process input and query attributes of attached displays,
851 * but it cannot change display state or draw to the screen directly.
852 *
853 * In some cases, it can be useful to have the KMSDRM backend even if it cannot
854 * be used for rendering. An app may want to use SDL for input processing while
855 * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
856 * using its own code to render to DRM overlays that SDL doesn't support.
857 *
858 * This hint must be set before initializing the video subsystem.
859 *
860 * This variable can be set to the following values:
861 * "0" - SDL will allow usage of the KMSDRM backend without DRM master
862 * "1" - SDL Will require DRM master to use the KMSDRM backend (default)
863 */
864 #define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
865
866 /**
867 * \brief A comma separated list of devices to open as joysticks
868 *
869 * This variable is currently only used by the Linux joystick driver.
870 */
871 #define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
872
873 /**
874 * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
875 *
876 * This variable can be set to the following values:
877 * "0" - Use /dev/input/event*
878 * "1" - Use /dev/input/js*
879 *
880 * By default the /dev/input/event* interfaces are used
881 */
882 #define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
883
884 /**
885 * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
886 *
887 * This variable can be set to the following values:
888 * "0" - Return unfiltered joystick axis values (the default)
889 * "1" - Return axis values with deadzones taken into account
890 */
891 #define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
892
893 /**
894 * \brief When set don't force the SDL app to become a foreground process
895 *
896 * This hint only applies to Mac OS X.
897 *
898 */
899 #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
900
901 /**
902 * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
903 *
904 * If present, holding ctrl while left clicking will generate a right click
905 * event when on Mac.
906 */
907 #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
908
909 /**
910 * \brief A variable setting the double click radius, in pixels.
911 */
912 #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
913
914 /**
915 * \brief A variable setting the double click time, in milliseconds.
916 */
917 #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
918
919 /**
920 * \brief Allow mouse click events when clicking to focus an SDL window
921 *
922 * This variable can be set to the following values:
923 * "0" - Ignore mouse clicks that activate a window
924 * "1" - Generate events for mouse clicks that activate a window
925 *
926 * By default SDL will ignore mouse clicks that activate a window
927 */
928 #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
929
930 /**
931 * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
932 */
933 #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
934
935 /**
936 * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
937 *
938 * This variable can be set to the following values:
939 * "0" - Relative mouse mode constrains the mouse to the window
940 * "1" - Relative mouse mode constrains the mouse to the center of the window
941 *
942 * Constraining to the center of the window works better for FPS games and when the
943 * application is running over RDP. Constraining to the whole window works better
944 * for 2D games and increases the chance that the mouse will be in the correct
945 * position when using high DPI mice.
946 *
947 * By default SDL will constrain the mouse to the center of the window
948 */
949 #define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
950
951 /**
952 * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
953 *
954 * This variable can be set to the following values:
955 * "0" - Relative mouse mode uses raw input
956 * "1" - Relative mouse mode uses mouse warping
957 *
958 * By default SDL will use raw input for relative mouse mode
959 */
960 #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
961
962 /**
963 * \brief A variable controlling whether relative mouse motion is affected by renderer scaling
964 *
965 * This variable can be set to the following values:
966 * "0" - Relative motion is unaffected by DPI or renderer's logical size
967 * "1" - Relative motion is scaled according to DPI scaling and logical size
968 *
969 * By default relative mouse deltas are affected by DPI and renderer scaling
970 */
971 #define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
972
973 /**
974 * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
975 */
976 #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
977
978 /**
979 * \brief A variable controlling whether mouse events should generate synthetic touch events
980 *
981 * This variable can be set to the following values:
982 * "0" - Mouse events will not generate touch events (default for desktop platforms)
983 * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
984 */
985 #define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
986
987 /**
988 * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
989 *
990 * This variable can be set to the following values:
991 * "0" - The mouse is not captured while mouse buttons are pressed
992 * "1" - The mouse is captured while mouse buttons are pressed
993 *
994 * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
995 * outside the window, the application continues to receive mouse events until the button is
996 * released.
997 */
998 #define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
999
1000 /**
1001 * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
1002 *
1003 * This hint only applies to Unix-like platforms, and should set before
1004 * any calls to SDL_Init()
1005 *
1006 * The variable can be set to the following values:
1007 * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
1008 * catches a signal, convert it into an SDL_QUIT event.
1009 * "1" - SDL will not install a signal handler at all.
1010 */
1011 #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
1012
1013 /**
1014 * \brief A variable controlling what driver to use for OpenGL ES contexts.
1015 *
1016 * On some platforms, currently Windows and X11, OpenGL drivers may support
1017 * creating contexts with an OpenGL ES profile. By default SDL uses these
1018 * profiles, when available, otherwise it attempts to load an OpenGL ES
1019 * library, e.g. that provided by the ANGLE project. This variable controls
1020 * whether SDL follows this default behaviour or will always load an
1021 * OpenGL ES library.
1022 *
1023 * Circumstances where this is useful include
1024 * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
1025 * or emulator, e.g. those from ARM, Imagination or Qualcomm.
1026 * - Resolving OpenGL ES function addresses at link time by linking with
1027 * the OpenGL ES library instead of querying them at run time with
1028 * SDL_GL_GetProcAddress().
1029 *
1030 * Caution: for an application to work with the default behaviour across
1031 * different OpenGL drivers it must query the OpenGL ES function
1032 * addresses at run time using SDL_GL_GetProcAddress().
1033 *
1034 * This variable is ignored on most platforms because OpenGL ES is native
1035 * or not supported.
1036 *
1037 * This variable can be set to the following values:
1038 * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
1039 * "1" - Load OpenGL ES library using the default library names.
1040 *
1041 */
1042 #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
1043
1044 /**
1045 * \brief A variable controlling which orientations are allowed on iOS/Android.
1046 *
1047 * In some circumstances it is necessary to be able to explicitly control
1048 * which UI orientations are allowed.
1049 *
1050 * This variable is a space delimited list of the following values:
1051 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
1052 */
1053 #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
1054
1055 /**
1056 * \brief A variable controlling the use of a sentinel event when polling the event queue
1057 *
1058 * This variable can be set to the following values:
1059 * "0" - Disable poll sentinels
1060 * "1" - Enable poll sentinels
1061 *
1062 * When polling for events, SDL_PumpEvents is used to gather new events from devices.
1063 * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
1064 * become stuck until the new events stop.
1065 * This is most noticable when moving a high frequency mouse.
1066 *
1067 * By default, poll sentinels are enabled.
1068 */
1069 #define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
1070
1071 /**
1072 * \brief Override for SDL_GetPreferredLocales()
1073 *
1074 * If set, this will be favored over anything the OS might report for the
1075 * user's preferred locales. Changing this hint at runtime will not generate
1076 * a SDL_LOCALECHANGED event (but if you can change the hint, you can push
1077 * your own event, if you want).
1078 *
1079 * The format of this hint is a comma-separated list of language and locale,
1080 * combined with an underscore, as is a common format: "en_GB". Locale is
1081 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
1082 */
1083 #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
1084
1085 /**
1086 * \brief A variable describing the content orientation on QtWayland-based platforms.
1087 *
1088 * On QtWayland platforms, windows are rotated client-side to allow for custom
1089 * transitions. In order to correctly position overlays (e.g. volume bar) and
1090 * gestures (e.g. events view, close/minimize gestures), the system needs to
1091 * know in which orientation the application is currently drawing its contents.
1092 *
1093 * This does not cause the window to be rotated or resized, the application
1094 * needs to take care of drawing the content in the right orientation (the
1095 * framebuffer is always in portrait mode).
1096 *
1097 * This variable can be one of the following values:
1098 * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
1099 */
1100 #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1101
1102 /**
1103 * \brief Flags to set on QtWayland windows to integrate with the native window manager.
1104 *
1105 * On QtWayland platforms, this hint controls the flags to set on the windows.
1106 * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
1107 *
1108 * This variable is a space-separated list of the following values (empty = no flags):
1109 * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
1110 */
1111 #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
1112
1113 /**
1114 * \brief A variable controlling whether the 2D render API is compatible or efficient.
1115 *
1116 * This variable can be set to the following values:
1117 *
1118 * "0" - Don't use batching to make rendering more efficient.
1119 * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
1120 *
1121 * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
1122 * it batches up draw requests and sends them all to the GPU only when forced
1123 * to (during SDL_RenderPresent, when changing render targets, by updating a
1124 * texture that the batch needs, etc). This is significantly more efficient,
1125 * but it can cause problems for apps that expect to render on top of the
1126 * render API's output. As such, SDL will disable batching if a specific
1127 * render backend is requested (since this might indicate that the app is
1128 * planning to use the underlying graphics API directly). This hint can
1129 * be used to explicitly request batching in this instance. It is a contract
1130 * that you will either never use the underlying graphics API directly, or
1131 * if you do, you will call SDL_RenderFlush() before you do so any current
1132 * batch goes to the GPU before your work begins. Not following this contract
1133 * will result in undefined behavior.
1134 */
1135 #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
1136
1137 /**
1138 * \brief A variable controlling how the 2D render API renders lines
1139 *
1140 * This variable can be set to the following values:
1141 * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
1142 * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
1143 * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
1144 * "3" - Use the driver geometry API (correct, draws thicker diagonal lines)
1145 *
1146 * This variable should be set when the renderer is created.
1147 */
1148 #define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
1149
1150 /**
1151 * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
1152 *
1153 * This variable does not have any effect on the Direct3D 9 based renderer.
1154 *
1155 * This variable can be set to the following values:
1156 * "0" - Disable Debug Layer use
1157 * "1" - Enable Debug Layer use
1158 *
1159 * By default, SDL does not use Direct3D Debug Layer.
1160 */
1161 #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
1162
1163 /**
1164 * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
1165 *
1166 * This variable can be set to the following values:
1167 * "0" - Thread-safety is not enabled (faster)
1168 * "1" - Thread-safety is enabled
1169 *
1170 * By default the Direct3D device is created with thread-safety disabled.
1171 */
1172 #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
1173
1174 /**
1175 * \brief A variable specifying which render driver to use.
1176 *
1177 * If the application doesn't pick a specific renderer to use, this variable
1178 * specifies the name of the preferred renderer. If the preferred renderer
1179 * can't be initialized, the normal default renderer is used.
1180 *
1181 * This variable is case insensitive and can be set to the following values:
1182 * "direct3d"
1183 * "opengl"
1184 * "opengles2"
1185 * "opengles"
1186 * "metal"
1187 * "software"
1188 *
1189 * The default varies by platform, but it's the first one in the list that
1190 * is available on the current platform.
1191 */
1192 #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
1193
1194 /**
1195 * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
1196 *
1197 * This variable can be set to the following values:
1198 * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
1199 * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
1200 *
1201 * By default letterbox is used
1202 */
1203 #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
1204
1205 /**
1206 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
1207 *
1208 * This variable can be set to the following values:
1209 * "0" - Disable shaders
1210 * "1" - Enable shaders
1211 *
1212 * By default shaders are used if OpenGL supports them.
1213 */
1214 #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
1215
1216 /**
1217 * \brief A variable controlling the scaling quality
1218 *
1219 * This variable can be set to the following values:
1220 * "0" or "nearest" - Nearest pixel sampling
1221 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
1222 * "2" or "best" - Currently this is the same as "linear"
1223 *
1224 * By default nearest pixel sampling is used
1225 */
1226 #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
1227
1228 /**
1229 * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
1230 *
1231 * This variable can be set to the following values:
1232 * "0" - Disable vsync
1233 * "1" - Enable vsync
1234 *
1235 * By default SDL does not sync screen surface updates with vertical refresh.
1236 */
1237 #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1238
1239 /**
1240 * \brief A variable to control whether the return key on the soft keyboard
1241 * should hide the soft keyboard on Android and iOS.
1242 *
1243 * The variable can be set to the following values:
1244 * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
1245 * "1" - The return key will hide the keyboard.
1246 *
1247 * The value of this hint is used at runtime, so it can be changed at any time.
1248 */
1249 #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
1250
1251 /**
1252 * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
1253 *
1254 * Also known as Z-order. The variable can take a negative or positive value.
1255 * The default is 10000.
1256 */
1257 #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
1258
1259 /**
1260 * \brief Specify an "activity name" for screensaver inhibition.
1261 *
1262 * Some platforms, notably Linux desktops, list the applications which are
1263 * inhibiting the screensaver or other power-saving features.
1264 *
1265 * This hint lets you specify the "activity name" sent to the OS when
1266 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
1267 * disabled). The contents of this hint are used when the screensaver is
1268 * disabled. You should use a string that describes what your program is doing
1269 * (and, therefore, why the screensaver is disabled). For example, "Playing a
1270 * game" or "Watching a video".
1271 *
1272 * Setting this to "" or leaving it unset will have SDL use a reasonable
1273 * default: "Playing a game" or something similar.
1274 *
1275 * On targets where this is not supported, this hint does nothing.
1276 */
1277 #define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
1278
1279 /**
1280 * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
1281 *
1282 * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
1283 * that require special handling by the application. This hint exists to let SDL know that
1284 * the app is prepared to handle said restrictions.
1285 *
1286 * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
1287 * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
1288 * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
1289 * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
1290 * * Refer to the man pages for more information.
1291 *
1292 * This variable can be set to the following values:
1293 * "0" - default platform specific behaviour
1294 * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
1295 */
1296 #define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
1297
1298 /**
1299 * \brief A string specifying additional information to use with SDL_SetThreadPriority.
1300 *
1301 * By default SDL_SetThreadPriority will make appropriate system changes in order to
1302 * apply a thread priority. For example on systems using pthreads the scheduler policy
1303 * is changed automatically to a policy that works well with a given priority.
1304 * Code which has specific requirements can override SDL's default behavior with this hint.
1305 *
1306 * pthread hint values are "current", "other", "fifo" and "rr".
1307 * Currently no other platform hint values are defined but may be in the future.
1308 *
1309 * \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
1310 * configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
1311 * after calling SDL_SetThreadPriority().
1312 */
1313 #define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
1314
1315 /**
1316 * \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
1317 *
1318 * Use this hint in case you need to set SDL's threads stack size to other than the default.
1319 * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
1320 * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
1321 * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
1322 *
1323 * Instead of this hint, in 2.0.9 and later, you can use
1324 * SDL_CreateThreadWithStackSize(). This hint only works with the classic
1325 * SDL_CreateThread().
1326 */
1327 #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
1328
1329 /**
1330 * \brief A variable that controls the timer resolution, in milliseconds.
1331 *
1332 * The higher resolution the timer, the more frequently the CPU services
1333 * timer interrupts, and the more precise delays are, but this takes up
1334 * power and CPU time. This hint is only used on Windows.
1335 *
1336 * See this blog post for more information:
1337 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
1338 *
1339 * If this variable is set to "0", the system timer resolution is not set.
1340 *
1341 * The default value is "1". This hint may be set at any time.
1342 */
1343 #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
1344
1345 /**
1346 * \brief A variable controlling whether touch events should generate synthetic mouse events
1347 *
1348 * This variable can be set to the following values:
1349 * "0" - Touch events will not generate mouse events
1350 * "1" - Touch events will generate mouse events
1351 *
1352 * By default SDL will generate mouse events for touch events
1353 */
1354 #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
1355
1356 /**
1357 * \brief A variable controlling which touchpad should generate synthetic mouse events
1358 *
1359 * This variable can be set to the following values:
1360 * "0" - Only front touchpad should generate mouse events. Default
1361 * "1" - Only back touchpad should generate mouse events.
1362 * "2" - Both touchpads should generate mouse events.
1363 *
1364 * By default SDL will generate mouse events for all touch devices
1365 */
1366 #define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
1367
1368 /**
1369 * \brief A variable controlling whether the Android / tvOS remotes
1370 * should be listed as joystick devices, instead of sending keyboard events.
1371 *
1372 * This variable can be set to the following values:
1373 * "0" - Remotes send enter/escape/arrow key events
1374 * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
1375 */
1376 #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
1377
1378 /**
1379 * \brief A variable controlling whether the screensaver is enabled.
1380 *
1381 * This variable can be set to the following values:
1382 * "0" - Disable screensaver
1383 * "1" - Enable screensaver
1384 *
1385 * By default SDL will disable the screensaver.
1386 */
1387 #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
1388
1389 /**
1390 * \brief Tell the video driver that we only want a double buffer.
1391 *
1392 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1393 * wastes no CPU time on waiting for vsync after issuing a flip, but
1394 * introduces a frame of latency. On the other hand, using a double buffer
1395 * scheme instead is recommended for cases where low latency is an important
1396 * factor because we save a whole frame of latency.
1397 * We do so by waiting for vsync immediately after issuing a flip, usually just
1398 * after eglSwapBuffers call in the backend's *_SwapWindow function.
1399 *
1400 * Since it's driver-specific, it's only supported where possible and
1401 * implemented. Currently supported the following drivers:
1402 *
1403 * - KMSDRM (kmsdrm)
1404 * - Raspberry Pi (raspberrypi)
1405 */
1406 #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
1407
1408 /**
1409 * \brief A variable controlling whether the EGL window is allowed to be
1410 * composited as transparent, rather than opaque.
1411 *
1412 * Most window systems will always render windows opaque, even if the surface
1413 * format has an alpha channel. This is not always true, however, so by default
1414 * SDL will try to enforce opaque composition. To override this behavior, you
1415 * can set this hint to "1".
1416 */
1417 #define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
1418
1419 /**
1420 * \brief A variable controlling whether the graphics context is externally managed.
1421 *
1422 * This variable can be set to the following values:
1423 * "0" - SDL will manage graphics contexts that are attached to windows.
1424 * "1" - Disable graphics context management on windows.
1425 *
1426 * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
1427 * context will be automatically saved and restored when pausing the application. Additionally, some
1428 * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
1429 * behavior, which is desireable when the application manages the graphics context, such as
1430 * an externally managed OpenGL context or attaching a Vulkan surface to the window.
1431 */
1432 #define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
1433
1434 /**
1435 * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
1436 */
1437 #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
1438
1439 /**
1440 * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
1441 *
1442 * This hint only applies to Mac OS X.
1443 *
1444 * The variable can be set to the following values:
1445 * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
1446 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
1447 * button on their titlebars).
1448 * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
1449 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
1450 * button on their titlebars).
1451 *
1452 * The default value is "1". Spaces are disabled regardless of this hint if
1453 * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
1454 * any windows are created.
1455 */
1456 #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
1457
1458 /**
1459 * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
1460 * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
1461 * seeing if "true" causes more problems than it solves in modern times.
1462 *
1463 */
1464 #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
1465
1466 /**
1467 * \brief A variable controlling whether the libdecor Wayland backend is allowed to be used.
1468 *
1469 * This variable can be set to the following values:
1470 * "0" - libdecor use is disabled.
1471 * "1" - libdecor use is enabled (default).
1472 *
1473 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1474 */
1475 #define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
1476
1477 /**
1478 * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
1479 *
1480 * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
1481 * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
1482 *
1483 * This variable can be set to the following values:
1484 * "0" - libdecor is enabled only if server-side decorations are unavailable.
1485 * "1" - libdecor is always enabled if available.
1486 *
1487 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1488 */
1489 #define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
1490
1491 /**
1492 * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1493 *
1494 * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
1495 * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1496 * created SDL_Window:
1497 *
1498 * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
1499 * needed for example when sharing an OpenGL context across multiple windows.
1500 *
1501 * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
1502 * OpenGL rendering.
1503 *
1504 * This variable can be set to the following values:
1505 * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
1506 * share a pixel format with.
1507 */
1508 #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
1509
1510 /**
1511 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
1512 *
1513 * This variable can be set to the following values:
1514 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1515 * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
1516 *
1517 * By default SDL will not make the foreign window compatible with OpenGL.
1518 */
1519 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
1520
1521 /**
1522 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
1523 *
1524 * This variable can be set to the following values:
1525 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1526 * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
1527 *
1528 * By default SDL will not make the foreign window compatible with Vulkan.
1529 */
1530 #define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
1531
1532 /**
1533 * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
1534 *
1535 * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
1536 * can use two different sets of binaries, those compiled by the user from source
1537 * or those provided by the Chrome browser. In the later case, these binaries require
1538 * that SDL loads a DLL providing the shader compiler.
1539 *
1540 * This variable can be set to the following values:
1541 * "d3dcompiler_46.dll" - default, best for Vista or later.
1542 * "d3dcompiler_43.dll" - for XP support.
1543 * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
1544 *
1545 */
1546 #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
1547
1548 /**
1549 * \brief A variable controlling whether X11 should use GLX or EGL by default
1550 *
1551 * This variable can be set to the following values:
1552 * "0" - Use GLX
1553 * "1" - Use EGL
1554 *
1555 * By default SDL will use GLX when both are present.
1556 */
1557 #define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
1558
1559 /**
1560 * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
1561 *
1562 * This variable can be set to the following values:
1563 * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
1564 * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
1565 *
1566 * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
1567 *
1568 */
1569 #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
1570
1571 /**
1572 * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
1573 *
1574 * This variable can be set to the following values:
1575 * "0" - Disable _NET_WM_PING
1576 * "1" - Enable _NET_WM_PING
1577 *
1578 * By default SDL will use _NET_WM_PING, but for applications that know they
1579 * will not always be able to respond to ping requests in a timely manner they can
1580 * turn it off to avoid the window manager thinking the app is hung.
1581 * The hint is checked in CreateWindow.
1582 */
1583 #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
1584
1585 /**
1586 * \brief A variable forcing the visual ID chosen for new X11 windows
1587 *
1588 */
1589 #define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
1590
1591 /**
1592 * \brief A variable controlling whether the X11 Xinerama extension should be used.
1593 *
1594 * This variable can be set to the following values:
1595 * "0" - Disable Xinerama
1596 * "1" - Enable Xinerama
1597 *
1598 * By default SDL will use Xinerama if it is available.
1599 */
1600 #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
1601
1602 /**
1603 * \brief A variable controlling whether the X11 XRandR extension should be used.
1604 *
1605 * This variable can be set to the following values:
1606 * "0" - Disable XRandR
1607 * "1" - Enable XRandR
1608 *
1609 * By default SDL will not use XRandR because of window manager issues.
1610 */
1611 #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
1612
1613 /**
1614 * \brief A variable controlling whether the X11 VidMode extension should be used.
1615 *
1616 * This variable can be set to the following values:
1617 * "0" - Disable XVidMode
1618 * "1" - Enable XVidMode
1619 *
1620 * By default SDL will use XVidMode if it is available.
1621 */
1622 #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
1623
1624 /**
1625 * \brief Controls how the fact chunk affects the loading of a WAVE file.
1626 *
1627 * The fact chunk stores information about the number of samples of a WAVE
1628 * file. The Standards Update from Microsoft notes that this value can be used
1629 * to 'determine the length of the data in seconds'. This is especially useful
1630 * for compressed formats (for which this is a mandatory chunk) if they produce
1631 * multiple sample frames per block and truncating the block is not allowed.
1632 * The fact chunk can exactly specify how many sample frames there should be
1633 * in this case.
1634 *
1635 * Unfortunately, most application seem to ignore the fact chunk and so SDL
1636 * ignores it by default as well.
1637 *
1638 * This variable can be set to the following values:
1639 *
1640 * "truncate" - Use the number of samples to truncate the wave data if
1641 * the fact chunk is present and valid
1642 * "strict" - Like "truncate", but raise an error if the fact chunk
1643 * is invalid, not present for non-PCM formats, or if the
1644 * data chunk doesn't have that many samples
1645 * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
1646 * samples is zero
1647 * "ignore" - Ignore fact chunk entirely (default)
1648 */
1649 #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
1650
1651 /**
1652 * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
1653 *
1654 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
1655 * file) is not always reliable. In case the size is wrong, it's possible to
1656 * just ignore it and step through the chunks until a fixed limit is reached.
1657 *
1658 * Note that files that have trailing data unrelated to the WAVE file or
1659 * corrupt files may slow down the loading process without a reliable boundary.
1660 * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
1661 * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
1662 *
1663 * This variable can be set to the following values:
1664 *
1665 * "force" - Always use the RIFF chunk size as a boundary for the chunk search
1666 * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
1667 * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
1668 * "maximum" - Search for chunks until the end of file (not recommended)
1669 */
1670 #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
1671
1672 /**
1673 * \brief Controls how a truncated WAVE file is handled.
1674 *
1675 * A WAVE file is considered truncated if any of the chunks are incomplete or
1676 * the data chunk size is not a multiple of the block size. By default, SDL
1677 * decodes until the first incomplete block, as most applications seem to do.
1678 *
1679 * This variable can be set to the following values:
1680 *
1681 * "verystrict" - Raise an error if the file is truncated
1682 * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
1683 * "dropframe" - Decode until the first incomplete sample frame
1684 * "dropblock" - Decode until the first incomplete block (default)
1685 */
1686 #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
1687
1688 /**
1689 * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
1690 * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
1691 * thread's name, but it tends to cause problems with other debuggers,
1692 * and the .NET runtime. Note that SDL 2.0.6 and later will still use
1693 * the (safer) SetThreadDescription API, introduced in the Windows 10
1694 * Creators Update, if available.
1695 *
1696 * The variable can be set to the following values:
1697 * "0" - SDL will raise the 0x406D1388 Exception to name threads.
1698 * This is the default behavior of SDL <= 2.0.4.
1699 * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
1700 * This is necessary with .NET languages or debuggers that aren't Visual Studio.
1701 */
1702 #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
1703
1704 /**
1705 * \brief A variable controlling whether the windows message loop is processed by SDL
1706 *
1707 * This variable can be set to the following values:
1708 * "0" - The window message loop is not run
1709 * "1" - The window message loop is processed in SDL_PumpEvents()
1710 *
1711 * By default SDL will process the windows message loop
1712 */
1713 #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
1714
1715 /**
1716 * \brief Force SDL to use Critical Sections for mutexes on Windows.
1717 * On Windows 7 and newer, Slim Reader/Writer Locks are available.
1718 * They offer better performance, allocate no kernel ressources and
1719 * use less memory. SDL will fall back to Critical Sections on older
1720 * OS versions or if forced to by this hint.
1721 *
1722 * This variable can be set to the following values:
1723 * "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
1724 * "1" - Force the use of Critical Sections in all cases.
1725 *
1726 */
1727 #define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
1728
1729 /**
1730 * \brief Force SDL to use Kernel Semaphores on Windows.
1731 * Kernel Semaphores are inter-process and require a context
1732 * switch on every interaction. On Windows 8 and newer, the
1733 * WaitOnAddress API is available. Using that and atomics to
1734 * implement semaphores increases performance.
1735 * SDL will fall back to Kernel Objects on older OS versions
1736 * or if forced to by this hint.
1737 *
1738 * This variable can be set to the following values:
1739 * "0" - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
1740 * "1" - Force the use of Kernel Objects in all cases.
1741 *
1742 */
1743 #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
1744
1745 /**
1746 * \brief A variable to specify custom icon resource id from RC file on Windows platform
1747 */
1748 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
1749 #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
1750
1751 /**
1752 * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
1753 *
1754 * The variable can be set to the following values:
1755 * "0" - SDL will generate a window-close event when it sees Alt+F4.
1756 * "1" - SDL will only do normal key handling for Alt+F4.
1757 */
1758 #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
1759
1760 /**
1761 * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
1762 * Direct3D 9Ex contains changes to state management that can eliminate device
1763 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
1764 * some changes to your application to cope with the new behavior, so this
1765 * is disabled by default.
1766 *
1767 * This hint must be set before initializing the video subsystem.
1768 *
1769 * For more information on Direct3D 9Ex, see:
1770 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
1771 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
1772 *
1773 * This variable can be set to the following values:
1774 * "0" - Use the original Direct3D 9 API (default)
1775 * "1" - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
1776 *
1777 */
1778 #define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
1779
1780 /**
1781 * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
1782 *
1783 * This variable can be set to the following values:
1784 * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
1785 * "1" - The window frame is interactive when the cursor is hidden
1786 *
1787 * By default SDL will allow interaction with the window frame when the cursor is hidden
1788 */
1789 #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
1790
1791 /**
1792 * \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
1793 *
1794 * This variable can be set to the following values:
1795 * "0" - The window is activated when the SDL_ShowWindow function is called
1796 * "1" - The window is not activated when the SDL_ShowWindow function is called
1797 *
1798 * By default SDL will activate the window when the SDL_ShowWindow function is called
1799 */
1800 #define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
1801
1802 /** \brief Allows back-button-press events on Windows Phone to be marked as handled
1803 *
1804 * Windows Phone devices typically feature a Back button. When pressed,
1805 * the OS will emit back-button-press events, which apps are expected to
1806 * handle in an appropriate manner. If apps do not explicitly mark these
1807 * events as 'Handled', then the OS will invoke its default behavior for
1808 * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
1809 * terminate the app (and attempt to switch to the previous app, or to the
1810 * device's home screen).
1811 *
1812 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
1813 * to mark back-button-press events as Handled, if and when one is sent to
1814 * the app.
1815 *
1816 * Internally, Windows Phone sends back button events as parameters to
1817 * special back-button-press callback functions. Apps that need to respond
1818 * to back-button-press events are expected to register one or more
1819 * callback functions for such, shortly after being launched (during the
1820 * app's initialization phase). After the back button is pressed, the OS
1821 * will invoke these callbacks. If the app's callback(s) do not explicitly
1822 * mark the event as handled by the time they return, or if the app never
1823 * registers one of these callback, the OS will consider the event
1824 * un-handled, and it will apply its default back button behavior (terminate
1825 * the app).
1826 *
1827 * SDL registers its own back-button-press callback with the Windows Phone
1828 * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
1829 * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
1830 * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
1831 * If the hint's value is set to "1", the back button event's Handled
1832 * property will get set to 'true'. If the hint's value is set to something
1833 * else, or if it is unset, SDL will leave the event's Handled property
1834 * alone. (By default, the OS sets this property to 'false', to note.)
1835 *
1836 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
1837 * back button is pressed, or can set it in direct-response to a back button
1838 * being pressed.
1839 *
1840 * In order to get notified when a back button is pressed, SDL apps should
1841 * register a callback function with SDL_AddEventWatch(), and have it listen
1842 * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
1843 * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
1844 * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
1845 * set by such a callback, will be applied to the OS' current
1846 * back-button-press event.
1847 *
1848 * More details on back button behavior in Windows Phone apps can be found
1849 * at the following page, on Microsoft's developer site:
1850 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
1851 */
1852 #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
1853
1854 /** \brief Label text for a WinRT app's privacy policy link
1855 *
1856 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
1857 * Microsoft mandates that this policy be available via the Windows Settings charm.
1858 * SDL provides code to add a link there, with its label text being set via the
1859 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1860 *
1861 * Please note that a privacy policy's contents are not set via this hint. A separate
1862 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
1863 * policy.
1864 *
1865 * The contents of this hint should be encoded as a UTF8 string.
1866 *
1867 * The default value is "Privacy Policy". This hint should only be set during app
1868 * initialization, preferably before any calls to SDL_Init().
1869 *
1870 * For additional information on linking to a privacy policy, see the documentation for
1871 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
1872 */
1873 #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
1874
1875 /**
1876 * \brief A URL to a WinRT app's privacy policy
1877 *
1878 * All network-enabled WinRT apps must make a privacy policy available to its
1879 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
1880 * be available in the Windows Settings charm, as accessed from within the app.
1881 * SDL provides code to add a URL-based link there, which can point to the app's
1882 * privacy policy.
1883 *
1884 * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
1885 * before calling any SDL_Init() functions. The contents of the hint should
1886 * be a valid URL. For example, "http://www.example.com".
1887 *
1888 * The default value is "", which will prevent SDL from adding a privacy policy
1889 * link to the Settings charm. This hint should only be set during app init.
1890 *
1891 * The label text of an app's "Privacy Policy" link may be customized via another
1892 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
1893 *
1894 * Please note that on Windows Phone, Microsoft does not provide standard UI
1895 * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
1896 * will not get used on that platform. Network-enabled phone apps should display
1897 * their privacy policy through some other, in-app means.
1898 */
1899 #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
1900
1901 /**
1902 * \brief Mark X11 windows as override-redirect.
1903 *
1904 * If set, this _might_ increase framerate at the expense of the desktop
1905 * not working as expected. Override-redirect windows aren't noticed by the
1906 * window manager at all.
1907 *
1908 * You should probably only use this for fullscreen windows, and you probably
1909 * shouldn't even use it for that. But it's here if you want to try!
1910 */
1911 #define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
1912
1913 /**
1914 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
1915 *
1916 * The variable can be set to the following values:
1917 * "0" - Disable XInput detection (only uses direct input)
1918 * "1" - Enable XInput detection (the default)
1919 */
1920 #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
1921
1922 /**
1923 * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
1924 *
1925 * This hint is for backwards compatibility only and will be removed in SDL 2.1
1926 *
1927 * The default value is "0". This hint must be set before SDL_Init()
1928 */
1929 #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
1930
1931 /**
1932 * \brief A variable that causes SDL to not ignore audio "monitors"
1933 *
1934 * This is currently only used for PulseAudio and ignored elsewhere.
1935 *
1936 * By default, SDL ignores audio devices that aren't associated with physical
1937 * hardware. Changing this hint to "1" will expose anything SDL sees that
1938 * appears to be an audio source or sink. This will add "devices" to the list
1939 * that the user probably doesn't want or need, but it can be useful in
1940 * scenarios where you want to hook up SDL to some sort of virtual device,
1941 * etc.
1942 *
1943 * The default value is "0". This hint must be set before SDL_Init().
1944 *
1945 * This hint is available since SDL 2.0.16. Before then, virtual devices are
1946 * always ignored.
1947 */
1948 #define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
1949
1950 /**
1951 * \brief A variable that forces X11 windows to create as a custom type.
1952 *
1953 * This is currently only used for X11 and ignored elsewhere.
1954 *
1955 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
1956 * to report to the window manager the type of window it wants to create.
1957 * This might be set to various things if SDL_WINDOW_TOOLTIP or
1958 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
1959 * haven't set a specific type, this hint can be used to specify a custom
1960 * type. For example, a dock window might set this to
1961 * "_NET_WM_WINDOW_TYPE_DOCK".
1962 *
1963 * If not set or set to "", this hint is ignored. This hint must be set
1964 * before the SDL_CreateWindow() call that it is intended to affect.
1965 *
1966 * This hint is available since SDL 2.0.22.
1967 */
1968 #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
1969
1970 /**
1971 * \brief A variable that decides whether to send SDL_QUIT when closing the final window.
1972 *
1973 * By default, SDL sends an SDL_QUIT event when there is only one window
1974 * and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
1975 * apps would also take the loss of this window as a signal to terminate the
1976 * program.
1977 *
1978 * However, it's not unreasonable in some cases to have the program continue
1979 * to live on, perhaps to create new windows later.
1980 *
1981 * Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
1982 * when the final window is requesting to close. Note that in this case,
1983 * there are still other legitimate reasons one might get an SDL_QUIT
1984 * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
1985 * on Unix, etc.
1986 *
1987 * The default value is "1". This hint can be changed at any time.
1988 *
1989 * This hint is available since SDL 2.0.22. Before then, you always get
1990 * an SDL_QUIT event when closing the final window.
1991 */
1992 #define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
1993
1994
1995 /**
1996 * \brief A variable that decides what video backend to use.
1997 *
1998 * By default, SDL will try all available video backends in a reasonable
1999 * order until it finds one that can work, but this hint allows the app
2000 * or user to force a specific target, such as "x11" if, say, you are
2001 * on Wayland but want to try talking to the X server instead.
2002 *
2003 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2004 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2005 * it was upgraded to a full SDL hint, so you can set the environment
2006 * variable as usual or programatically set the hint with SDL_SetHint,
2007 * which won't propagate to child processes.
2008 *
2009 * The default value is unset, in which case SDL will try to figure out
2010 * the best video backend on your behalf. This hint needs to be set
2011 * before SDL_Init() is called to be useful.
2012 *
2013 * This hint is available since SDL 2.0.22. Before then, you could set
2014 * the environment variable to get the same effect.
2015 */
2016 #define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
2017
2018 /**
2019 * \brief A variable that decides what audio backend to use.
2020 *
2021 * By default, SDL will try all available audio backends in a reasonable
2022 * order until it finds one that can work, but this hint allows the app
2023 * or user to force a specific target, such as "alsa" if, say, you are
2024 * on PulseAudio but want to try talking to the lower level instead.
2025 *
2026 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2027 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2028 * it was upgraded to a full SDL hint, so you can set the environment
2029 * variable as usual or programatically set the hint with SDL_SetHint,
2030 * which won't propagate to child processes.
2031 *
2032 * The default value is unset, in which case SDL will try to figure out
2033 * the best audio backend on your behalf. This hint needs to be set
2034 * before SDL_Init() is called to be useful.
2035 *
2036 * This hint is available since SDL 2.0.22. Before then, you could set
2037 * the environment variable to get the same effect.
2038 */
2039 #define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
2040
2041
2042 /**
2043 * \brief An enumeration of hint priorities
2044 */
2045 typedef enum
2046 {
2047 SDL_HINT_DEFAULT,
2048 SDL_HINT_NORMAL,
2049 SDL_HINT_OVERRIDE
2050 } SDL_HintPriority;
2051
2052
2053 /**
2054 * Set a hint with a specific priority.
2055 *
2056 * The priority controls the behavior when setting a hint that already has a
2057 * value. Hints will replace existing hints of their priority and lower.
2058 * Environment variables are considered to have override priority.
2059 *
2060 * \param name the hint to set
2061 * \param value the value of the hint variable
2062 * \param priority the SDL_HintPriority level for the hint
2063 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2064 *
2065 * \since This function is available since SDL 2.0.0.
2066 *
2067 * \sa SDL_GetHint
2068 * \sa SDL_SetHint
2069 */
2070 extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
2071 const char *value,
2072 SDL_HintPriority priority);
2073
2074 /**
2075 * Set a hint with normal priority.
2076 *
2077 * Hints will not be set if there is an existing override hint or environment
2078 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
2079 * set the hint with override priority instead.
2080 *
2081 * \param name the hint to set
2082 * \param value the value of the hint variable
2083 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2084 *
2085 * \since This function is available since SDL 2.0.0.
2086 *
2087 * \sa SDL_GetHint
2088 * \sa SDL_SetHintWithPriority
2089 */
2090 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
2091 const char *value);
2092
2093 /**
2094 * Get the value of a hint.
2095 *
2096 * \param name the hint to query
2097 * \returns the string value of a hint or NULL if the hint isn't set.
2098 *
2099 * \since This function is available since SDL 2.0.0.
2100 *
2101 * \sa SDL_SetHint
2102 * \sa SDL_SetHintWithPriority
2103 */
2104 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
2105
2106 /**
2107 * Get the boolean value of a hint variable.
2108 *
2109 * \param name the name of the hint to get the boolean value from
2110 * \param default_value the value to return if the hint does not exist
2111 * \returns the boolean value of a hint or the provided default value if the
2112 * hint does not exist.
2113 *
2114 * \since This function is available since SDL 2.0.5.
2115 *
2116 * \sa SDL_GetHint
2117 * \sa SDL_SetHint
2118 */
2119 extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
2120
2121 /**
2122 * Type definition of the hint callback function.
2123 *
2124 * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
2125 * \param name what was passed as `name` to SDL_AddHintCallback()
2126 * \param oldValue the previous hint value
2127 * \param newValue the new value hint is to be set to
2128 */
2129 typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
2130
2131 /**
2132 * Add a function to watch a particular hint.
2133 *
2134 * \param name the hint to watch
2135 * \param callback An SDL_HintCallback function that will be called when the
2136 * hint value changes
2137 * \param userdata a pointer to pass to the callback function
2138 *
2139 * \since This function is available since SDL 2.0.0.
2140 *
2141 * \sa SDL_DelHintCallback
2142 */
2143 extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
2144 SDL_HintCallback callback,
2145 void *userdata);
2146
2147 /**
2148 * Remove a function watching a particular hint.
2149 *
2150 * \param name the hint being watched
2151 * \param callback An SDL_HintCallback function that will be called when the
2152 * hint value changes
2153 * \param userdata a pointer being passed to the callback function
2154 *
2155 * \since This function is available since SDL 2.0.0.
2156 *
2157 * \sa SDL_AddHintCallback
2158 */
2159 extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
2160 SDL_HintCallback callback,
2161 void *userdata);
2162
2163 /**
2164 * Clear all hints.
2165 *
2166 * This function is automatically called during SDL_Quit().
2167 *
2168 * \since This function is available since SDL 2.0.0.
2169 */
2170 extern DECLSPEC void SDLCALL SDL_ClearHints(void);
2171
2172
2173 /* Ends C function definitions when using C++ */
2174 #ifdef __cplusplus
2175 }
2176 #endif
2177 #include <SDL2/close_code.h>
2178
2179 #endif /* SDL_hints_h_ */
2180
2181 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_joystick.h
23 *
24 * Include file for SDL joystick event handling
25 *
26 * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
27 * behind a device_index changing as joysticks are plugged and unplugged.
28 *
29 * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
30 * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
31 *
32 * The term "player_index" is the number assigned to a player on a specific
33 * controller. For XInput controllers this returns the XInput user index.
34 * Many joysticks will not be able to supply this information.
35 *
36 * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
37 * the device (a X360 wired controller for example). This identifier is platform dependent.
38 */
39
40 #ifndef SDL_joystick_h_
41 #define SDL_joystick_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * \file SDL_joystick.h
54 *
55 * In order to use these functions, SDL_Init() must have been called
56 * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
57 * for joysticks, and load appropriate drivers.
58 *
59 * If you would like to receive joystick updates while the application
60 * is in the background, you should set the following hint before calling
61 * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
62 */
63
64 /**
65 * The joystick structure used to identify an SDL joystick
66 */
67 struct _SDL_Joystick;
68 typedef struct _SDL_Joystick SDL_Joystick;
69
70 /* A structure that encodes the stable unique id for a joystick device */
71 typedef struct {
72 Uint8 data[16];
73 } SDL_JoystickGUID;
74
75 /**
76 * This is a unique ID for a joystick for the time it is connected to the system,
77 * and is never reused for the lifetime of the application. If the joystick is
78 * disconnected and reconnected, it will get a new ID.
79 *
80 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
81 */
82 typedef Sint32 SDL_JoystickID;
83
84 typedef enum
85 {
86 SDL_JOYSTICK_TYPE_UNKNOWN,
87 SDL_JOYSTICK_TYPE_GAMECONTROLLER,
88 SDL_JOYSTICK_TYPE_WHEEL,
89 SDL_JOYSTICK_TYPE_ARCADE_STICK,
90 SDL_JOYSTICK_TYPE_FLIGHT_STICK,
91 SDL_JOYSTICK_TYPE_DANCE_PAD,
92 SDL_JOYSTICK_TYPE_GUITAR,
93 SDL_JOYSTICK_TYPE_DRUM_KIT,
94 SDL_JOYSTICK_TYPE_ARCADE_PAD,
95 SDL_JOYSTICK_TYPE_THROTTLE
96 } SDL_JoystickType;
97
98 typedef enum
99 {
100 SDL_JOYSTICK_POWER_UNKNOWN = -1,
101 SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
102 SDL_JOYSTICK_POWER_LOW, /* <= 20% */
103 SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
104 SDL_JOYSTICK_POWER_FULL, /* <= 100% */
105 SDL_JOYSTICK_POWER_WIRED,
106 SDL_JOYSTICK_POWER_MAX
107 } SDL_JoystickPowerLevel;
108
109 /* Set max recognized G-force from accelerometer
110 See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
111 */
112 #define SDL_IPHONE_MAX_GFORCE 5.0
113
114
115 /* Function prototypes */
116
117 /**
118 * Locking for multi-threaded access to the joystick API
119 *
120 * If you are using the joystick API or handling events from multiple threads
121 * you should use these locking functions to protect access to the joysticks.
122 *
123 * In particular, you are guaranteed that the joystick list won't change, so
124 * the API functions that take a joystick index will be valid, and joystick
125 * and game controller events will not be delivered.
126 *
127 * \since This function is available since SDL 2.0.7.
128 */
129 extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
130
131
132 /**
133 * Unlocking for multi-threaded access to the joystick API
134 *
135 * If you are using the joystick API or handling events from multiple threads
136 * you should use these locking functions to protect access to the joysticks.
137 *
138 * In particular, you are guaranteed that the joystick list won't change, so
139 * the API functions that take a joystick index will be valid, and joystick
140 * and game controller events will not be delivered.
141 *
142 * \since This function is available since SDL 2.0.7.
143 */
144 extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
145
146 /**
147 * Count the number of joysticks attached to the system.
148 *
149 * \returns the number of attached joysticks on success or a negative error
150 * code on failure; call SDL_GetError() for more information.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_JoystickName
155 * \sa SDL_JoystickOpen
156 */
157 extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
158
159 /**
160 * Get the implementation dependent name of a joystick.
161 *
162 * This can be called before any joysticks are opened.
163 *
164 * \param device_index the index of the joystick to query (the N'th joystick
165 * on the system)
166 * \returns the name of the selected joystick. If no name can be found, this
167 * function returns NULL; call SDL_GetError() for more information.
168 *
169 * \since This function is available since SDL 2.0.0.
170 *
171 * \sa SDL_JoystickName
172 * \sa SDL_JoystickOpen
173 */
174 extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
175
176 /**
177 * Get the player index of a joystick, or -1 if it's not available This can be
178 * called before any joysticks are opened.
179 *
180 * \since This function is available since SDL 2.0.9.
181 */
182 extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
183
184 /**
185 * Get the implementation-dependent GUID for the joystick at a given device
186 * index.
187 *
188 * This function can be called before any joysticks are opened.
189 *
190 * \param device_index the index of the joystick to query (the N'th joystick
191 * on the system
192 * \returns the GUID of the selected joystick. If called on an invalid index,
193 * this function returns a zero GUID
194 *
195 * \since This function is available since SDL 2.0.0.
196 *
197 * \sa SDL_JoystickGetGUID
198 * \sa SDL_JoystickGetGUIDString
199 */
200 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
201
202 /**
203 * Get the USB vendor ID of a joystick, if available.
204 *
205 * This can be called before any joysticks are opened. If the vendor ID isn't
206 * available this function returns 0.
207 *
208 * \param device_index the index of the joystick to query (the N'th joystick
209 * on the system
210 * \returns the USB vendor ID of the selected joystick. If called on an
211 * invalid index, this function returns zero
212 *
213 * \since This function is available since SDL 2.0.6.
214 */
215 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
216
217 /**
218 * Get the USB product ID of a joystick, if available.
219 *
220 * This can be called before any joysticks are opened. If the product ID isn't
221 * available this function returns 0.
222 *
223 * \param device_index the index of the joystick to query (the N'th joystick
224 * on the system
225 * \returns the USB product ID of the selected joystick. If called on an
226 * invalid index, this function returns zero
227 *
228 * \since This function is available since SDL 2.0.6.
229 */
230 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
231
232 /**
233 * Get the product version of a joystick, if available.
234 *
235 * This can be called before any joysticks are opened. If the product version
236 * isn't available this function returns 0.
237 *
238 * \param device_index the index of the joystick to query (the N'th joystick
239 * on the system
240 * \returns the product version of the selected joystick. If called on an
241 * invalid index, this function returns zero
242 *
243 * \since This function is available since SDL 2.0.6.
244 */
245 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
246
247 /**
248 * Get the type of a joystick, if available.
249 *
250 * This can be called before any joysticks are opened.
251 *
252 * \param device_index the index of the joystick to query (the N'th joystick
253 * on the system
254 * \returns the SDL_JoystickType of the selected joystick. If called on an
255 * invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
256 *
257 * \since This function is available since SDL 2.0.6.
258 */
259 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
260
261 /**
262 * Get the instance ID of a joystick.
263 *
264 * This can be called before any joysticks are opened. If the index is out of
265 * range, this function will return -1.
266 *
267 * \param device_index the index of the joystick to query (the N'th joystick
268 * on the system
269 * \returns the instance id of the selected joystick. If called on an invalid
270 * index, this function returns zero
271 *
272 * \since This function is available since SDL 2.0.6.
273 */
274 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
275
276 /**
277 * Open a joystick for use.
278 *
279 * The `device_index` argument refers to the N'th joystick presently
280 * recognized by SDL on the system. It is **NOT** the same as the instance ID
281 * used to identify the joystick in future events. See
282 * SDL_JoystickInstanceID() for more details about instance IDs.
283 *
284 * The joystick subsystem must be initialized before a joystick can be opened
285 * for use.
286 *
287 * \param device_index the index of the joystick to query
288 * \returns a joystick identifier or NULL if an error occurred; call
289 * SDL_GetError() for more information.
290 *
291 * \since This function is available since SDL 2.0.0.
292 *
293 * \sa SDL_JoystickClose
294 * \sa SDL_JoystickInstanceID
295 */
296 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
297
298 /**
299 * Get the SDL_Joystick associated with an instance id.
300 *
301 * \param instance_id the instance id to get the SDL_Joystick for
302 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
303 * for more information.
304 *
305 * \since This function is available since SDL 2.0.4.
306 */
307 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
308
309 /**
310 * Get the SDL_Joystick associated with a player index.
311 *
312 * \param player_index the player index to get the SDL_Joystick for
313 * \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
314 * for more information.
315 *
316 * \since This function is available since SDL 2.0.12.
317 */
318 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
319
320 /**
321 * Attach a new virtual joystick.
322 *
323 * \returns the joystick's device index, or -1 if an error occurred.
324 *
325 * \since This function is available since SDL 2.0.14.
326 */
327 extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
328 int naxes,
329 int nbuttons,
330 int nhats);
331
332 /**
333 * Detach a virtual joystick.
334 *
335 * \param device_index a value previously returned from
336 * SDL_JoystickAttachVirtual()
337 * \returns 0 on success, or -1 if an error occurred.
338 *
339 * \since This function is available since SDL 2.0.14.
340 */
341 extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
342
343 /**
344 * Query whether or not the joystick at a given device index is virtual.
345 *
346 * \param device_index a joystick device index.
347 * \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
348 *
349 * \since This function is available since SDL 2.0.14.
350 */
351 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
352
353 /**
354 * Set values on an opened, virtual-joystick's axis.
355 *
356 * Please note that values set here will not be applied until the next call to
357 * SDL_JoystickUpdate, which can either be called directly, or can be called
358 * indirectly through various other SDL APIs, including, but not limited to
359 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
360 * SDL_WaitEvent.
361 *
362 * \param joystick the virtual joystick on which to set state.
363 * \param axis the specific axis on the virtual joystick to set.
364 * \param value the new value for the specified axis.
365 * \returns 0 on success, -1 on error.
366 *
367 * \since This function is available since SDL 2.0.14.
368 */
369 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
370
371 /**
372 * Set values on an opened, virtual-joystick's button.
373 *
374 * Please note that values set here will not be applied until the next call to
375 * SDL_JoystickUpdate, which can either be called directly, or can be called
376 * indirectly through various other SDL APIs, including, but not limited to
377 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
378 * SDL_WaitEvent.
379 *
380 * \param joystick the virtual joystick on which to set state.
381 * \param button the specific button on the virtual joystick to set.
382 * \param value the new value for the specified button.
383 * \returns 0 on success, -1 on error.
384 *
385 * \since This function is available since SDL 2.0.14.
386 */
387 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
388
389 /**
390 * Set values on an opened, virtual-joystick's hat.
391 *
392 * Please note that values set here will not be applied until the next call to
393 * SDL_JoystickUpdate, which can either be called directly, or can be called
394 * indirectly through various other SDL APIs, including, but not limited to
395 * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
396 * SDL_WaitEvent.
397 *
398 * \param joystick the virtual joystick on which to set state.
399 * \param hat the specific hat on the virtual joystick to set.
400 * \param value the new value for the specified hat.
401 * \returns 0 on success, -1 on error.
402 *
403 * \since This function is available since SDL 2.0.14.
404 */
405 extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
406
407 /**
408 * Get the implementation dependent name of a joystick.
409 *
410 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
411 * \returns the name of the selected joystick. If no name can be found, this
412 * function returns NULL; call SDL_GetError() for more information.
413 *
414 * \since This function is available since SDL 2.0.0.
415 *
416 * \sa SDL_JoystickNameForIndex
417 * \sa SDL_JoystickOpen
418 */
419 extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
420
421 /**
422 * Get the player index of an opened joystick.
423 *
424 * For XInput controllers this returns the XInput user index. Many joysticks
425 * will not be able to supply this information.
426 *
427 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
428 * \returns the player index, or -1 if it's not available.
429 *
430 * \since This function is available since SDL 2.0.9.
431 */
432 extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
433
434 /**
435 * Set the player index of an opened joystick.
436 *
437 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
438 * \param player_index the player index to set.
439 *
440 * \since This function is available since SDL 2.0.12.
441 */
442 extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
443
444 /**
445 * Get the implementation-dependent GUID for the joystick.
446 *
447 * This function requires an open joystick.
448 *
449 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
450 * \returns the GUID of the given joystick. If called on an invalid index,
451 * this function returns a zero GUID; call SDL_GetError() for more
452 * information.
453 *
454 * \since This function is available since SDL 2.0.0.
455 *
456 * \sa SDL_JoystickGetDeviceGUID
457 * \sa SDL_JoystickGetGUIDString
458 */
459 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
460
461 /**
462 * Get the USB vendor ID of an opened joystick, if available.
463 *
464 * If the vendor ID isn't available this function returns 0.
465 *
466 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
467 * \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
468 *
469 * \since This function is available since SDL 2.0.6.
470 */
471 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
472
473 /**
474 * Get the USB product ID of an opened joystick, if available.
475 *
476 * If the product ID isn't available this function returns 0.
477 *
478 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
479 * \returns the USB product ID of the selected joystick, or 0 if unavailable.
480 *
481 * \since This function is available since SDL 2.0.6.
482 */
483 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
484
485 /**
486 * Get the product version of an opened joystick, if available.
487 *
488 * If the product version isn't available this function returns 0.
489 *
490 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
491 * \returns the product version of the selected joystick, or 0 if unavailable.
492 *
493 * \since This function is available since SDL 2.0.6.
494 */
495 extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
496
497 /**
498 * Get the serial number of an opened joystick, if available.
499 *
500 * Returns the serial number of the joystick, or NULL if it is not available.
501 *
502 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
503 * \returns the serial number of the selected joystick, or NULL if
504 * unavailable.
505 *
506 * \since This function is available since SDL 2.0.14.
507 */
508 extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
509
510 /**
511 * Get the type of an opened joystick.
512 *
513 * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
514 * \returns the SDL_JoystickType of the selected joystick.
515 *
516 * \since This function is available since SDL 2.0.6.
517 */
518 extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
519
520 /**
521 * Get an ASCII string representation for a given SDL_JoystickGUID.
522 *
523 * You should supply at least 33 bytes for pszGUID.
524 *
525 * \param guid the SDL_JoystickGUID you wish to convert to string
526 * \param pszGUID buffer in which to write the ASCII string
527 * \param cbGUID the size of pszGUID
528 *
529 * \since This function is available since SDL 2.0.0.
530 *
531 * \sa SDL_JoystickGetDeviceGUID
532 * \sa SDL_JoystickGetGUID
533 * \sa SDL_JoystickGetGUIDFromString
534 */
535 extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
536
537 /**
538 * Convert a GUID string into a SDL_JoystickGUID structure.
539 *
540 * Performs no error checking. If this function is given a string containing
541 * an invalid GUID, the function will silently succeed, but the GUID generated
542 * will not be useful.
543 *
544 * \param pchGUID string containing an ASCII representation of a GUID
545 * \returns a SDL_JoystickGUID structure.
546 *
547 * \since This function is available since SDL 2.0.0.
548 *
549 * \sa SDL_JoystickGetGUIDString
550 */
551 extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
552
553 /**
554 * Get the status of a specified joystick.
555 *
556 * \param joystick the joystick to query
557 * \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
558 * call SDL_GetError() for more information.
559 *
560 * \since This function is available since SDL 2.0.0.
561 *
562 * \sa SDL_JoystickClose
563 * \sa SDL_JoystickOpen
564 */
565 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
566
567 /**
568 * Get the instance ID of an opened joystick.
569 *
570 * \param joystick an SDL_Joystick structure containing joystick information
571 * \returns the instance ID of the specified joystick on success or a negative
572 * error code on failure; call SDL_GetError() for more information.
573 *
574 * \since This function is available since SDL 2.0.0.
575 *
576 * \sa SDL_JoystickOpen
577 */
578 extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
579
580 /**
581 * Get the number of general axis controls on a joystick.
582 *
583 * Often, the directional pad on a game controller will either look like 4
584 * separate buttons or a POV hat, and not axes, but all of this is up to the
585 * device and platform.
586 *
587 * \param joystick an SDL_Joystick structure containing joystick information
588 * \returns the number of axis controls/number of axes on success or a
589 * negative error code on failure; call SDL_GetError() for more
590 * information.
591 *
592 * \since This function is available since SDL 2.0.0.
593 *
594 * \sa SDL_JoystickGetAxis
595 * \sa SDL_JoystickOpen
596 */
597 extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
598
599 /**
600 * Get the number of trackballs on a joystick.
601 *
602 * Joystick trackballs have only relative motion events associated with them
603 * and their state cannot be polled.
604 *
605 * Most joysticks do not have trackballs.
606 *
607 * \param joystick an SDL_Joystick structure containing joystick information
608 * \returns the number of trackballs on success or a negative error code on
609 * failure; call SDL_GetError() for more information.
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_JoystickGetBall
614 */
615 extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
616
617 /**
618 * Get the number of POV hats on a joystick.
619 *
620 * \param joystick an SDL_Joystick structure containing joystick information
621 * \returns the number of POV hats on success or a negative error code on
622 * failure; call SDL_GetError() for more information.
623 *
624 * \since This function is available since SDL 2.0.0.
625 *
626 * \sa SDL_JoystickGetHat
627 * \sa SDL_JoystickOpen
628 */
629 extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
630
631 /**
632 * Get the number of buttons on a joystick.
633 *
634 * \param joystick an SDL_Joystick structure containing joystick information
635 * \returns the number of buttons on success or a negative error code on
636 * failure; call SDL_GetError() for more information.
637 *
638 * \since This function is available since SDL 2.0.0.
639 *
640 * \sa SDL_JoystickGetButton
641 * \sa SDL_JoystickOpen
642 */
643 extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
644
645 /**
646 * Update the current state of the open joysticks.
647 *
648 * This is called automatically by the event loop if any joystick events are
649 * enabled.
650 *
651 * \since This function is available since SDL 2.0.0.
652 *
653 * \sa SDL_JoystickEventState
654 */
655 extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
656
657 /**
658 * Enable/disable joystick event polling.
659 *
660 * If joystick events are disabled, you must call SDL_JoystickUpdate()
661 * yourself and manually check the state of the joystick when you want
662 * joystick information.
663 *
664 * It is recommended that you leave joystick event handling enabled.
665 *
666 * **WARNING**: Calling this function may delete all events currently in SDL's
667 * event queue.
668 *
669 * \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
670 * \returns 1 if enabled, 0 if disabled, or a negative error code on failure;
671 * call SDL_GetError() for more information.
672 *
673 * If `state` is `SDL_QUERY` then the current state is returned,
674 * otherwise the new processing state is returned.
675 *
676 * \since This function is available since SDL 2.0.0.
677 *
678 * \sa SDL_GameControllerEventState
679 */
680 extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
681
682 #define SDL_JOYSTICK_AXIS_MAX 32767
683 #define SDL_JOYSTICK_AXIS_MIN -32768
684
685 /**
686 * Get the current state of an axis control on a joystick.
687 *
688 * SDL makes no promises about what part of the joystick any given axis refers
689 * to. Your game should have some sort of configuration UI to let users
690 * specify what each axis should be bound to. Alternately, SDL's higher-level
691 * Game Controller API makes a great effort to apply order to this lower-level
692 * interface, so you know that a specific axis is the "left thumb stick," etc.
693 *
694 * The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
695 * 32767) representing the current position of the axis. It may be necessary
696 * to impose certain tolerances on these values to account for jitter.
697 *
698 * \param joystick an SDL_Joystick structure containing joystick information
699 * \param axis the axis to query; the axis indices start at index 0
700 * \returns a 16-bit signed integer representing the current position of the
701 * axis or 0 on failure; call SDL_GetError() for more information.
702 *
703 * \since This function is available since SDL 2.0.0.
704 *
705 * \sa SDL_JoystickNumAxes
706 */
707 extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
708 int axis);
709
710 /**
711 * Get the initial state of an axis control on a joystick.
712 *
713 * The state is a value ranging from -32768 to 32767.
714 *
715 * The axis indices start at index 0.
716 *
717 * \param joystick an SDL_Joystick structure containing joystick information
718 * \param axis the axis to query; the axis indices start at index 0
719 * \param state Upon return, the initial value is supplied here.
720 * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
721 *
722 * \since This function is available since SDL 2.0.6.
723 */
724 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
725 int axis, Sint16 *state);
726
727 /**
728 * \name Hat positions
729 */
730 /* @{ */
731 #define SDL_HAT_CENTERED 0x00
732 #define SDL_HAT_UP 0x01
733 #define SDL_HAT_RIGHT 0x02
734 #define SDL_HAT_DOWN 0x04
735 #define SDL_HAT_LEFT 0x08
736 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
737 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
738 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
739 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
740 /* @} */
741
742 /**
743 * Get the current state of a POV hat on a joystick.
744 *
745 * The returned value will be one of the following positions:
746 *
747 * - `SDL_HAT_CENTERED`
748 * - `SDL_HAT_UP`
749 * - `SDL_HAT_RIGHT`
750 * - `SDL_HAT_DOWN`
751 * - `SDL_HAT_LEFT`
752 * - `SDL_HAT_RIGHTUP`
753 * - `SDL_HAT_RIGHTDOWN`
754 * - `SDL_HAT_LEFTUP`
755 * - `SDL_HAT_LEFTDOWN`
756 *
757 * \param joystick an SDL_Joystick structure containing joystick information
758 * \param hat the hat index to get the state from; indices start at index 0
759 * \returns the current hat position.
760 *
761 * \since This function is available since SDL 2.0.0.
762 *
763 * \sa SDL_JoystickNumHats
764 */
765 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
766 int hat);
767
768 /**
769 * Get the ball axis change since the last poll.
770 *
771 * Trackballs can only return relative motion since the last call to
772 * SDL_JoystickGetBall(), these motion deltas are placed into `dx` and `dy`.
773 *
774 * Most joysticks do not have trackballs.
775 *
776 * \param joystick the SDL_Joystick to query
777 * \param ball the ball index to query; ball indices start at index 0
778 * \param dx stores the difference in the x axis position since the last poll
779 * \param dy stores the difference in the y axis position since the last poll
780 * \returns 0 on success or a negative error code on failure; call
781 * SDL_GetError() for more information.
782 *
783 * \since This function is available since SDL 2.0.0.
784 *
785 * \sa SDL_JoystickNumBalls
786 */
787 extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
788 int ball, int *dx, int *dy);
789
790 /**
791 * Get the current state of a button on a joystick.
792 *
793 * \param joystick an SDL_Joystick structure containing joystick information
794 * \param button the button index to get the state from; indices start at
795 * index 0
796 * \returns 1 if the specified button is pressed, 0 otherwise.
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_JoystickNumButtons
801 */
802 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
803 int button);
804
805 /**
806 * Start a rumble effect.
807 *
808 * Each call to this function cancels any previous rumble effect, and calling
809 * it with 0 intensity stops any rumbling.
810 *
811 * \param joystick The joystick to vibrate
812 * \param low_frequency_rumble The intensity of the low frequency (left)
813 * rumble motor, from 0 to 0xFFFF
814 * \param high_frequency_rumble The intensity of the high frequency (right)
815 * rumble motor, from 0 to 0xFFFF
816 * \param duration_ms The duration of the rumble effect, in milliseconds
817 * \returns 0, or -1 if rumble isn't supported on this joystick
818 *
819 * \since This function is available since SDL 2.0.9.
820 *
821 * \sa SDL_JoystickHasRumble
822 */
823 extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
824
825 /**
826 * Start a rumble effect in the joystick's triggers
827 *
828 * Each call to this function cancels any previous trigger rumble effect, and
829 * calling it with 0 intensity stops any rumbling.
830 *
831 * Note that this is rumbling of the _triggers_ and not the game controller as
832 * a whole. This is currently only supported on Xbox One controllers. If you
833 * want the (more common) whole-controller rumble, use SDL_JoystickRumble()
834 * instead.
835 *
836 * \param joystick The joystick to vibrate
837 * \param left_rumble The intensity of the left trigger rumble motor, from 0
838 * to 0xFFFF
839 * \param right_rumble The intensity of the right trigger rumble motor, from 0
840 * to 0xFFFF
841 * \param duration_ms The duration of the rumble effect, in milliseconds
842 * \returns 0, or -1 if trigger rumble isn't supported on this joystick
843 *
844 * \since This function is available since SDL 2.0.14.
845 *
846 * \sa SDL_JoystickHasRumbleTriggers
847 */
848 extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
849
850 /**
851 * Query whether a joystick has an LED.
852 *
853 * An example of a joystick LED is the light on the back of a PlayStation 4's
854 * DualShock 4 controller.
855 *
856 * \param joystick The joystick to query
857 * \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
858 *
859 * \since This function is available since SDL 2.0.14.
860 */
861 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
862
863 /**
864 * Query whether a joystick has rumble support.
865 *
866 * \param joystick The joystick to query
867 * \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
868 *
869 * \since This function is available since SDL 2.0.18.
870 *
871 * \sa SDL_JoystickRumble
872 */
873 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
874
875 /**
876 * Query whether a joystick has rumble support on triggers.
877 *
878 * \param joystick The joystick to query
879 * \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
880 *
881 * \since This function is available since SDL 2.0.18.
882 *
883 * \sa SDL_JoystickRumbleTriggers
884 */
885 extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
886
887 /**
888 * Update a joystick's LED color.
889 *
890 * An example of a joystick LED is the light on the back of a PlayStation 4's
891 * DualShock 4 controller.
892 *
893 * \param joystick The joystick to update
894 * \param red The intensity of the red LED
895 * \param green The intensity of the green LED
896 * \param blue The intensity of the blue LED
897 * \returns 0 on success, -1 if this joystick does not have a modifiable LED
898 *
899 * \since This function is available since SDL 2.0.14.
900 */
901 extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
902
903 /**
904 * Send a joystick specific effect packet
905 *
906 * \param joystick The joystick to affect
907 * \param data The data to send to the joystick
908 * \param size The size of the data to send to the joystick
909 * \returns 0, or -1 if this joystick or driver doesn't support effect packets
910 *
911 * \since This function is available since SDL 2.0.16.
912 */
913 extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
914
915 /**
916 * Close a joystick previously opened with SDL_JoystickOpen().
917 *
918 * \param joystick The joystick device to close
919 *
920 * \since This function is available since SDL 2.0.0.
921 *
922 * \sa SDL_JoystickOpen
923 */
924 extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
925
926 /**
927 * Get the battery level of a joystick as SDL_JoystickPowerLevel.
928 *
929 * \param joystick the SDL_Joystick to query
930 * \returns the current battery level as SDL_JoystickPowerLevel on success or
931 * `SDL_JOYSTICK_POWER_UNKNOWN` if it is unknown
932 *
933 * \since This function is available since SDL 2.0.4.
934 */
935 extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
936
937 /* Ends C function definitions when using C++ */
938 #ifdef __cplusplus
939 }
940 #endif
941 #include <SDL2/close_code.h>
942
943 #endif /* SDL_joystick_h_ */
944
945 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keyboard.h
23 *
24 * Include file for SDL keyboard event handling
25 */
26
27 #ifndef SDL_keyboard_h_
28 #define SDL_keyboard_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_keycode.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The SDL keysym structure, used in key events.
43 *
44 * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
45 */
46 typedef struct SDL_Keysym
47 {
48 SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */
49 SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */
50 Uint16 mod; /**< current key modifiers */
51 Uint32 unused;
52 } SDL_Keysym;
53
54 /* Function prototypes */
55
56 /**
57 * Query the window which currently has keyboard focus.
58 *
59 * \returns the window with keyboard focus.
60 *
61 * \since This function is available since SDL 2.0.0.
62 */
63 extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
64
65 /**
66 * Get a snapshot of the current state of the keyboard.
67 *
68 * The pointer returned is a pointer to an internal SDL array. It will be
69 * valid for the whole lifetime of the application and should not be freed by
70 * the caller.
71 *
72 * A array element with a value of 1 means that the key is pressed and a value
73 * of 0 means that it is not. Indexes into this array are obtained by using
74 * SDL_Scancode values.
75 *
76 * Use SDL_PumpEvents() to update the state array.
77 *
78 * This function gives you the current state after all events have been
79 * processed, so if a key or button has been pressed and released before you
80 * process events, then the pressed state will never show up in the
81 * SDL_GetKeyboardState() calls.
82 *
83 * Note: This function doesn't take into account whether shift has been
84 * pressed or not.
85 *
86 * \param numkeys if non-NULL, receives the length of the returned array
87 * \returns a pointer to an array of key states.
88 *
89 * \since This function is available since SDL 2.0.0.
90 *
91 * \sa SDL_PumpEvents
92 */
93 extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
94
95 /**
96 * Get the current key modifier state for the keyboard.
97 *
98 * \returns an OR'd combination of the modifier keys for the keyboard. See
99 * SDL_Keymod for details.
100 *
101 * \since This function is available since SDL 2.0.0.
102 *
103 * \sa SDL_GetKeyboardState
104 * \sa SDL_SetModState
105 */
106 extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
107
108 /**
109 * Set the current key modifier state for the keyboard.
110 *
111 * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
112 * modifier key states on your application. Simply pass your desired modifier
113 * states into `modstate`. This value may be a bitwise, OR'd combination of
114 * SDL_Keymod values.
115 *
116 * This does not change the keyboard state, only the key modifier flags that
117 * SDL reports.
118 *
119 * \param modstate the desired SDL_Keymod for the keyboard
120 *
121 * \since This function is available since SDL 2.0.0.
122 *
123 * \sa SDL_GetModState
124 */
125 extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
126
127 /**
128 * Get the key code corresponding to the given scancode according to the
129 * current keyboard layout.
130 *
131 * See SDL_Keycode for details.
132 *
133 * \param scancode the desired SDL_Scancode to query
134 * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
135 *
136 * \since This function is available since SDL 2.0.0.
137 *
138 * \sa SDL_GetKeyName
139 * \sa SDL_GetScancodeFromKey
140 */
141 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
142
143 /**
144 * Get the scancode corresponding to the given key code according to the
145 * current keyboard layout.
146 *
147 * See SDL_Scancode for details.
148 *
149 * \param key the desired SDL_Keycode to query
150 * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
151 *
152 * \since This function is available since SDL 2.0.0.
153 *
154 * \sa SDL_GetKeyFromScancode
155 * \sa SDL_GetScancodeName
156 */
157 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
158
159 /**
160 * Get a human-readable name for a scancode.
161 *
162 * See SDL_Scancode for details.
163 *
164 * **Warning**: The returned name is by design not stable across platforms,
165 * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
166 * Windows" under Microsoft Windows, and some scancodes like
167 * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
168 * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
169 * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
170 * unsuitable for creating a stable cross-platform two-way mapping between
171 * strings and scancodes.
172 *
173 * \param scancode the desired SDL_Scancode to query
174 * \returns a pointer to the name for the scancode. If the scancode doesn't
175 * have a name this function returns an empty string ("").
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_GetScancodeFromKey
180 * \sa SDL_GetScancodeFromName
181 */
182 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
183
184 /**
185 * Get a scancode from a human-readable name.
186 *
187 * \param name the human-readable scancode name
188 * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
189 * recognized; call SDL_GetError() for more information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_GetKeyFromName
194 * \sa SDL_GetScancodeFromKey
195 * \sa SDL_GetScancodeName
196 */
197 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
198
199 /**
200 * Get a human-readable name for a key.
201 *
202 * See SDL_Scancode and SDL_Keycode for details.
203 *
204 * \param key the desired SDL_Keycode to query
205 * \returns a pointer to a UTF-8 string that stays valid at least until the
206 * next call to this function. If you need it around any longer, you
207 * must copy it. If the key doesn't have a name, this function
208 * returns an empty string ("").
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_GetKeyFromName
213 * \sa SDL_GetKeyFromScancode
214 * \sa SDL_GetScancodeFromKey
215 */
216 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
217
218 /**
219 * Get a key code from a human-readable name.
220 *
221 * \param name the human-readable key name
222 * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
223 * SDL_GetError() for more information.
224 *
225 * \since This function is available since SDL 2.0.0.
226 *
227 * \sa SDL_GetKeyFromScancode
228 * \sa SDL_GetKeyName
229 * \sa SDL_GetScancodeFromName
230 */
231 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
232
233 /**
234 * Start accepting Unicode text input events.
235 *
236 * This function will start accepting Unicode text input events in the focused
237 * SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
238 * SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
239 * pair with SDL_StopTextInput().
240 *
241 * On some platforms using this function activates the screen keyboard.
242 *
243 * \since This function is available since SDL 2.0.0.
244 *
245 * \sa SDL_SetTextInputRect
246 * \sa SDL_StopTextInput
247 */
248 extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
249
250 /**
251 * Check whether or not Unicode text input events are enabled.
252 *
253 * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
254 *
255 * \since This function is available since SDL 2.0.0.
256 *
257 * \sa SDL_StartTextInput
258 */
259 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
260
261 /**
262 * Stop receiving any text input events.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_StartTextInput
267 */
268 extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
269
270 /**
271 * Dismiss the composition window/IME without disabling the subsystem.
272 *
273 * \since This function is available since SDL 2.0.22.
274 *
275 * \sa SDL_StartTextInput
276 * \sa SDL_StopTextInput
277 */
278 extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
279
280 /**
281 * Returns if an IME Composite or Candidate window is currently shown.
282 *
283 * \since This function is available since SDL 2.0.22.
284 */
285 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
286
287 /**
288 * Set the rectangle used to type Unicode text inputs.
289 *
290 * Note: If you want use system native IME window, try to set hint
291 * **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
292 * any feedback.
293 *
294 * \param rect the SDL_Rect structure representing the rectangle to receive
295 * text (ignored if NULL)
296 *
297 * \since This function is available since SDL 2.0.0.
298 *
299 * \sa SDL_StartTextInput
300 */
301 extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
302
303 /**
304 * Check whether the platform has screen keyboard support.
305 *
306 * \returns SDL_TRUE if the platform has some screen keyboard support or
307 * SDL_FALSE if not.
308 *
309 * \since This function is available since SDL 2.0.0.
310 *
311 * \sa SDL_StartTextInput
312 * \sa SDL_IsScreenKeyboardShown
313 */
314 extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
315
316 /**
317 * Check whether the screen keyboard is shown for given window.
318 *
319 * \param window the window for which screen keyboard should be queried
320 * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
321 *
322 * \since This function is available since SDL 2.0.0.
323 *
324 * \sa SDL_HasScreenKeyboardSupport
325 */
326 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
327
328 /* Ends C function definitions when using C++ */
329 #ifdef __cplusplus
330 }
331 #endif
332 #include <SDL2/close_code.h>
333
334 #endif /* SDL_keyboard_h_ */
335
336 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_keycode.h
23 *
24 * Defines constants which identify keyboard keys and modifiers.
25 */
26
27 #ifndef SDL_keycode_h_
28 #define SDL_keycode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_scancode.h>
32
33 /**
34 * \brief The SDL virtual key representation.
35 *
36 * Values of this type are used to represent keyboard keys using the current
37 * layout of the keyboard. These values include Unicode values representing
38 * the unmodified character that would be generated by pressing the key, or
39 * an SDLK_* constant for those keys that do not generate characters.
40 *
41 * A special exception is the number keys at the top of the keyboard which
42 * always map to SDLK_0...SDLK_9, regardless of layout.
43 */
44 typedef Sint32 SDL_Keycode;
45
46 #define SDLK_SCANCODE_MASK (1<<30)
47 #define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
48
49 typedef enum
50 {
51 SDLK_UNKNOWN = 0,
52
53 SDLK_RETURN = '\r',
54 SDLK_ESCAPE = '\x1B',
55 SDLK_BACKSPACE = '\b',
56 SDLK_TAB = '\t',
57 SDLK_SPACE = ' ',
58 SDLK_EXCLAIM = '!',
59 SDLK_QUOTEDBL = '"',
60 SDLK_HASH = '#',
61 SDLK_PERCENT = '%',
62 SDLK_DOLLAR = '$',
63 SDLK_AMPERSAND = '&',
64 SDLK_QUOTE = '\'',
65 SDLK_LEFTPAREN = '(',
66 SDLK_RIGHTPAREN = ')',
67 SDLK_ASTERISK = '*',
68 SDLK_PLUS = '+',
69 SDLK_COMMA = ',',
70 SDLK_MINUS = '-',
71 SDLK_PERIOD = '.',
72 SDLK_SLASH = '/',
73 SDLK_0 = '0',
74 SDLK_1 = '1',
75 SDLK_2 = '2',
76 SDLK_3 = '3',
77 SDLK_4 = '4',
78 SDLK_5 = '5',
79 SDLK_6 = '6',
80 SDLK_7 = '7',
81 SDLK_8 = '8',
82 SDLK_9 = '9',
83 SDLK_COLON = ':',
84 SDLK_SEMICOLON = ';',
85 SDLK_LESS = '<',
86 SDLK_EQUALS = '=',
87 SDLK_GREATER = '>',
88 SDLK_QUESTION = '?',
89 SDLK_AT = '@',
90
91 /*
92 Skip uppercase letters
93 */
94
95 SDLK_LEFTBRACKET = '[',
96 SDLK_BACKSLASH = '\\',
97 SDLK_RIGHTBRACKET = ']',
98 SDLK_CARET = '^',
99 SDLK_UNDERSCORE = '_',
100 SDLK_BACKQUOTE = '`',
101 SDLK_a = 'a',
102 SDLK_b = 'b',
103 SDLK_c = 'c',
104 SDLK_d = 'd',
105 SDLK_e = 'e',
106 SDLK_f = 'f',
107 SDLK_g = 'g',
108 SDLK_h = 'h',
109 SDLK_i = 'i',
110 SDLK_j = 'j',
111 SDLK_k = 'k',
112 SDLK_l = 'l',
113 SDLK_m = 'm',
114 SDLK_n = 'n',
115 SDLK_o = 'o',
116 SDLK_p = 'p',
117 SDLK_q = 'q',
118 SDLK_r = 'r',
119 SDLK_s = 's',
120 SDLK_t = 't',
121 SDLK_u = 'u',
122 SDLK_v = 'v',
123 SDLK_w = 'w',
124 SDLK_x = 'x',
125 SDLK_y = 'y',
126 SDLK_z = 'z',
127
128 SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
129
130 SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
131 SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
132 SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
133 SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
134 SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
135 SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
136 SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
137 SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
138 SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
139 SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
140 SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
141 SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
142
143 SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
144 SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
145 SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
146 SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
147 SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
148 SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
149 SDLK_DELETE = '\x7F',
150 SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
151 SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
152 SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
153 SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
154 SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
155 SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
156
157 SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
158 SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
159 SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
160 SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
161 SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
162 SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
163 SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
164 SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
165 SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
166 SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
167 SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
168 SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
169 SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
170 SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
171 SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
172 SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
173 SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
174
175 SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
176 SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
177 SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
178 SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
179 SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
180 SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
181 SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
182 SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
183 SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
184 SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
185 SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
186 SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
187 SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
188 SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
189 SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
190 SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
191 SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
192 SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
193 SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
194 SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
195 SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
196 SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
197 SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
198 SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
199 SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
200 SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
201 SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
202 SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
203 SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
204 SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
205 SDLK_KP_EQUALSAS400 =
206 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
207
208 SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
209 SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
210 SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
211 SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
212 SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
213 SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
214 SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
215 SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
216 SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
217 SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
218 SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
219 SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
220
221 SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
222 SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
223 SDLK_THOUSANDSSEPARATOR =
224 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
225 SDLK_DECIMALSEPARATOR =
226 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
227 SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
228 SDLK_CURRENCYSUBUNIT =
229 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
230 SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
231 SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
232 SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
233 SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
234 SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
235 SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
236 SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
237 SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
238 SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
239 SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
240 SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
241 SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
242 SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
243 SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
244 SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
245 SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
246 SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
247 SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
248 SDLK_KP_DBLAMPERSAND =
249 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
250 SDLK_KP_VERTICALBAR =
251 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
252 SDLK_KP_DBLVERTICALBAR =
253 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
254 SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
255 SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
256 SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
257 SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
258 SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
259 SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
260 SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
261 SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
262 SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
263 SDLK_KP_MEMSUBTRACT =
264 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
265 SDLK_KP_MEMMULTIPLY =
266 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
267 SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
268 SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
269 SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
270 SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
271 SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
272 SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
273 SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
274 SDLK_KP_HEXADECIMAL =
275 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
276
277 SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
278 SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
279 SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
280 SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
281 SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
282 SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
283 SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
284 SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
285
286 SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
287
288 SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
289 SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
290 SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
291 SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
292 SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
293 SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
294 SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
295 SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
296 SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
297 SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
298 SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
299 SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
300 SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
301 SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
302 SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
303 SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
304 SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
305
306 SDLK_BRIGHTNESSDOWN =
307 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
308 SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
309 SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
310 SDLK_KBDILLUMTOGGLE =
311 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
312 SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
313 SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
314 SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
315 SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
316 SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
317 SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
318
319 SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
320 SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
321 } SDL_KeyCode;
322
323 /**
324 * \brief Enumeration of valid key mods (possibly OR'd together).
325 */
326 typedef enum
327 {
328 KMOD_NONE = 0x0000,
329 KMOD_LSHIFT = 0x0001,
330 KMOD_RSHIFT = 0x0002,
331 KMOD_LCTRL = 0x0040,
332 KMOD_RCTRL = 0x0080,
333 KMOD_LALT = 0x0100,
334 KMOD_RALT = 0x0200,
335 KMOD_LGUI = 0x0400,
336 KMOD_RGUI = 0x0800,
337 KMOD_NUM = 0x1000,
338 KMOD_CAPS = 0x2000,
339 KMOD_MODE = 0x4000,
340 KMOD_SCROLL = 0x8000,
341
342 KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
343 KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
344 KMOD_ALT = KMOD_LALT | KMOD_RALT,
345 KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
346
347 KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
348 } SDL_Keymod;
349
350 #endif /* SDL_keycode_h_ */
351
352 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_loadso.h
23 *
24 * System dependent library loading routines
25 *
26 * Some things to keep in mind:
27 * \li These functions only work on C function names. Other languages may
28 * have name mangling and intrinsic language support that varies from
29 * compiler to compiler.
30 * \li Make sure you declare your function pointers with the same calling
31 * convention as the actual library function. Your code will crash
32 * mysteriously if you do not do this.
33 * \li Avoid namespace collisions. If you load a symbol from the library,
34 * it is not defined whether or not it goes into the global symbol
35 * namespace for the application. If it does and it conflicts with
36 * symbols in your code or other shared libraries, you will not get
37 * the results you expect. :)
38 */
39
40 #ifndef SDL_loadso_h_
41 #define SDL_loadso_h_
42
43 #include <SDL2/SDL_stdinc.h>
44 #include <SDL2/SDL_error.h>
45
46 #include <SDL2/begin_code.h>
47 /* Set up for C function definitions, even when using C++ */
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 /**
53 * Dynamically load a shared object.
54 *
55 * \param sofile a system-dependent name of the object file
56 * \returns an opaque pointer to the object handle or NULL if there was an
57 * error; call SDL_GetError() for more information.
58 *
59 * \since This function is available since SDL 2.0.0.
60 *
61 * \sa SDL_LoadFunction
62 * \sa SDL_UnloadObject
63 */
64 extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
65
66 /**
67 * Look up the address of the named function in a shared object.
68 *
69 * This function pointer is no longer valid after calling SDL_UnloadObject().
70 *
71 * This function can only look up C function names. Other languages may have
72 * name mangling and intrinsic language support that varies from compiler to
73 * compiler.
74 *
75 * Make sure you declare your function pointers with the same calling
76 * convention as the actual library function. Your code will crash
77 * mysteriously if you do not do this.
78 *
79 * If the requested function doesn't exist, NULL is returned.
80 *
81 * \param handle a valid shared object handle returned by SDL_LoadObject()
82 * \param name the name of the function to look up
83 * \returns a pointer to the function or NULL if there was an error; call
84 * SDL_GetError() for more information.
85 *
86 * \since This function is available since SDL 2.0.0.
87 *
88 * \sa SDL_LoadObject
89 * \sa SDL_UnloadObject
90 */
91 extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
92 const char *name);
93
94 /**
95 * Unload a shared object from memory.
96 *
97 * \param handle a valid shared object handle returned by SDL_LoadObject()
98 *
99 * \since This function is available since SDL 2.0.0.
100 *
101 * \sa SDL_LoadFunction
102 * \sa SDL_LoadObject
103 */
104 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_loadso_h_ */
113
114 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_locale.h
23 *
24 * Include file for SDL locale services
25 */
26
27 #ifndef _SDL_locale_h
28 #define _SDL_locale_h
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 /* *INDENT-OFF* */
37 extern "C" {
38 /* *INDENT-ON* */
39 #endif
40
41
42 typedef struct SDL_Locale
43 {
44 const char *language; /**< A language name, like "en" for English. */
45 const char *country; /**< A country, like "US" for America. Can be NULL. */
46 } SDL_Locale;
47
48 /**
49 * Report the user's preferred locale.
50 *
51 * This returns an array of SDL_Locale structs, the final item zeroed out.
52 * When the caller is done with this array, it should call SDL_free() on the
53 * returned value; all the memory involved is allocated in a single block, so
54 * a single SDL_free() will suffice.
55 *
56 * Returned language strings are in the format xx, where 'xx' is an ISO-639
57 * language specifier (such as "en" for English, "de" for German, etc).
58 * Country strings are in the format YY, where "YY" is an ISO-3166 country
59 * code (such as "US" for the United States, "CA" for Canada, etc). Country
60 * might be NULL if there's no specific guidance on them (so you might get {
61 * "en", "US" } for American English, but { "en", NULL } means "English
62 * language, generically"). Language strings are never NULL, except to
63 * terminate the array.
64 *
65 * Please note that not all of these strings are 2 characters; some are three
66 * or more.
67 *
68 * The returned list of locales are in the order of the user's preference. For
69 * example, a German citizen that is fluent in US English and knows enough
70 * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
71 * "jp", NULL }. Someone from England might prefer British English (where
72 * "color" is spelled "colour", etc), but will settle for anything like it: {
73 * "en_GB", "en", NULL }.
74 *
75 * This function returns NULL on error, including when the platform does not
76 * supply this information at all.
77 *
78 * This might be a "slow" call that has to query the operating system. It's
79 * best to ask for this once and save the results. However, this list can
80 * change, usually because the user has changed a system preference outside of
81 * your program; SDL will send an SDL_LOCALECHANGED event in this case, if
82 * possible, and you can call this function again to get an updated copy of
83 * preferred locales.
84 *
85 * \return array of locales, terminated with a locale with a NULL language
86 * field. Will return NULL on error.
87 *
88 * \since This function is available since SDL 2.0.14.
89 */
90 extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
91
92 /* Ends C function definitions when using C++ */
93 #ifdef __cplusplus
94 /* *INDENT-OFF* */
95 }
96 /* *INDENT-ON* */
97 #endif
98 #include <SDL2/close_code.h>
99
100 #endif /* _SDL_locale_h */
101
102 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_log.h
23 *
24 * Simple log messages with categories and priorities.
25 *
26 * By default logs are quiet, but if you're debugging SDL you might want:
27 *
28 * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
29 *
30 * Here's where the messages go on different platforms:
31 * Windows: debug output stream
32 * Android: log output
33 * Others: standard error output (stderr)
34 */
35
36 #ifndef SDL_log_h_
37 #define SDL_log_h_
38
39 #include <SDL2/SDL_stdinc.h>
40
41 #include <SDL2/begin_code.h>
42 /* Set up for C function definitions, even when using C++ */
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 /**
49 * \brief The maximum size of a log message
50 *
51 * Messages longer than the maximum size will be truncated
52 */
53 #define SDL_MAX_LOG_MESSAGE 4096
54
55 /**
56 * \brief The predefined log categories
57 *
58 * By default the application category is enabled at the INFO level,
59 * the assert category is enabled at the WARN level, test is enabled
60 * at the VERBOSE level and all other categories are enabled at the
61 * CRITICAL level.
62 */
63 typedef enum
64 {
65 SDL_LOG_CATEGORY_APPLICATION,
66 SDL_LOG_CATEGORY_ERROR,
67 SDL_LOG_CATEGORY_ASSERT,
68 SDL_LOG_CATEGORY_SYSTEM,
69 SDL_LOG_CATEGORY_AUDIO,
70 SDL_LOG_CATEGORY_VIDEO,
71 SDL_LOG_CATEGORY_RENDER,
72 SDL_LOG_CATEGORY_INPUT,
73 SDL_LOG_CATEGORY_TEST,
74
75 /* Reserved for future SDL library use */
76 SDL_LOG_CATEGORY_RESERVED1,
77 SDL_LOG_CATEGORY_RESERVED2,
78 SDL_LOG_CATEGORY_RESERVED3,
79 SDL_LOG_CATEGORY_RESERVED4,
80 SDL_LOG_CATEGORY_RESERVED5,
81 SDL_LOG_CATEGORY_RESERVED6,
82 SDL_LOG_CATEGORY_RESERVED7,
83 SDL_LOG_CATEGORY_RESERVED8,
84 SDL_LOG_CATEGORY_RESERVED9,
85 SDL_LOG_CATEGORY_RESERVED10,
86
87 /* Beyond this point is reserved for application use, e.g.
88 enum {
89 MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
90 MYAPP_CATEGORY_AWESOME2,
91 MYAPP_CATEGORY_AWESOME3,
92 ...
93 };
94 */
95 SDL_LOG_CATEGORY_CUSTOM
96 } SDL_LogCategory;
97
98 /**
99 * \brief The predefined log priorities
100 */
101 typedef enum
102 {
103 SDL_LOG_PRIORITY_VERBOSE = 1,
104 SDL_LOG_PRIORITY_DEBUG,
105 SDL_LOG_PRIORITY_INFO,
106 SDL_LOG_PRIORITY_WARN,
107 SDL_LOG_PRIORITY_ERROR,
108 SDL_LOG_PRIORITY_CRITICAL,
109 SDL_NUM_LOG_PRIORITIES
110 } SDL_LogPriority;
111
112
113 /**
114 * Set the priority of all log categories.
115 *
116 * \param priority the SDL_LogPriority to assign
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_LogSetPriority
121 */
122 extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
123
124 /**
125 * Set the priority of a particular log category.
126 *
127 * \param category the category to assign a priority to
128 * \param priority the SDL_LogPriority to assign
129 *
130 * \since This function is available since SDL 2.0.0.
131 *
132 * \sa SDL_LogGetPriority
133 * \sa SDL_LogSetAllPriority
134 */
135 extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
136 SDL_LogPriority priority);
137
138 /**
139 * Get the priority of a particular log category.
140 *
141 * \param category the category to query
142 * \returns the SDL_LogPriority for the requested category
143 *
144 * \since This function is available since SDL 2.0.0.
145 *
146 * \sa SDL_LogSetPriority
147 */
148 extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
149
150 /**
151 * Reset all priorities to default.
152 *
153 * This is called by SDL_Quit().
154 *
155 * \since This function is available since SDL 2.0.0.
156 *
157 * \sa SDL_LogSetAllPriority
158 * \sa SDL_LogSetPriority
159 */
160 extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
161
162 /**
163 * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
164 *
165 * = * \param fmt a printf() style message format string
166 *
167 * \param ... additional parameters matching % tokens in the `fmt` string, if
168 * any
169 *
170 * \since This function is available since SDL 2.0.0.
171 *
172 * \sa SDL_LogCritical
173 * \sa SDL_LogDebug
174 * \sa SDL_LogError
175 * \sa SDL_LogInfo
176 * \sa SDL_LogMessage
177 * \sa SDL_LogMessageV
178 * \sa SDL_LogVerbose
179 * \sa SDL_LogWarn
180 */
181 extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
182
183 /**
184 * Log a message with SDL_LOG_PRIORITY_VERBOSE.
185 *
186 * \param category the category of the message
187 * \param fmt a printf() style message format string
188 * \param ... additional parameters matching % tokens in the **fmt** string,
189 * if any
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_Log
194 * \sa SDL_LogCritical
195 * \sa SDL_LogDebug
196 * \sa SDL_LogError
197 * \sa SDL_LogInfo
198 * \sa SDL_LogMessage
199 * \sa SDL_LogMessageV
200 * \sa SDL_LogWarn
201 */
202 extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
203
204 /**
205 * Log a message with SDL_LOG_PRIORITY_DEBUG.
206 *
207 * \param category the category of the message
208 * \param fmt a printf() style message format string
209 * \param ... additional parameters matching % tokens in the **fmt** string,
210 * if any
211 *
212 * \since This function is available since SDL 2.0.0.
213 *
214 * \sa SDL_Log
215 * \sa SDL_LogCritical
216 * \sa SDL_LogError
217 * \sa SDL_LogInfo
218 * \sa SDL_LogMessage
219 * \sa SDL_LogMessageV
220 * \sa SDL_LogVerbose
221 * \sa SDL_LogWarn
222 */
223 extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
224
225 /**
226 * Log a message with SDL_LOG_PRIORITY_INFO.
227 *
228 * \param category the category of the message
229 * \param fmt a printf() style message format string
230 * \param ... additional parameters matching % tokens in the **fmt** string,
231 * if any
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_Log
236 * \sa SDL_LogCritical
237 * \sa SDL_LogDebug
238 * \sa SDL_LogError
239 * \sa SDL_LogMessage
240 * \sa SDL_LogMessageV
241 * \sa SDL_LogVerbose
242 * \sa SDL_LogWarn
243 */
244 extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
245
246 /**
247 * Log a message with SDL_LOG_PRIORITY_WARN.
248 *
249 * \param category the category of the message
250 * \param fmt a printf() style message format string
251 * \param ... additional parameters matching % tokens in the **fmt** string,
252 * if any
253 *
254 * \since This function is available since SDL 2.0.0.
255 *
256 * \sa SDL_Log
257 * \sa SDL_LogCritical
258 * \sa SDL_LogDebug
259 * \sa SDL_LogError
260 * \sa SDL_LogInfo
261 * \sa SDL_LogMessage
262 * \sa SDL_LogMessageV
263 * \sa SDL_LogVerbose
264 */
265 extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
266
267 /**
268 * Log a message with SDL_LOG_PRIORITY_ERROR.
269 *
270 * \param category the category of the message
271 * \param fmt a printf() style message format string
272 * \param ... additional parameters matching % tokens in the **fmt** string,
273 * if any
274 *
275 * \since This function is available since SDL 2.0.0.
276 *
277 * \sa SDL_Log
278 * \sa SDL_LogCritical
279 * \sa SDL_LogDebug
280 * \sa SDL_LogInfo
281 * \sa SDL_LogMessage
282 * \sa SDL_LogMessageV
283 * \sa SDL_LogVerbose
284 * \sa SDL_LogWarn
285 */
286 extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
287
288 /**
289 * Log a message with SDL_LOG_PRIORITY_CRITICAL.
290 *
291 * \param category the category of the message
292 * \param fmt a printf() style message format string
293 * \param ... additional parameters matching % tokens in the **fmt** string,
294 * if any
295 *
296 * \since This function is available since SDL 2.0.0.
297 *
298 * \sa SDL_Log
299 * \sa SDL_LogDebug
300 * \sa SDL_LogError
301 * \sa SDL_LogInfo
302 * \sa SDL_LogMessage
303 * \sa SDL_LogMessageV
304 * \sa SDL_LogVerbose
305 * \sa SDL_LogWarn
306 */
307 extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
308
309 /**
310 * Log a message with the specified category and priority.
311 *
312 * \param category the category of the message
313 * \param priority the priority of the message
314 * \param fmt a printf() style message format string
315 * \param ... additional parameters matching % tokens in the **fmt** string,
316 * if any
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_Log
321 * \sa SDL_LogCritical
322 * \sa SDL_LogDebug
323 * \sa SDL_LogError
324 * \sa SDL_LogInfo
325 * \sa SDL_LogMessageV
326 * \sa SDL_LogVerbose
327 * \sa SDL_LogWarn
328 */
329 extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
330 SDL_LogPriority priority,
331 SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
332
333 /**
334 * Log a message with the specified category and priority.
335 *
336 * \param category the category of the message
337 * \param priority the priority of the message
338 * \param fmt a printf() style message format string
339 * \param ap a variable argument list
340 *
341 * \since This function is available since SDL 2.0.0.
342 *
343 * \sa SDL_Log
344 * \sa SDL_LogCritical
345 * \sa SDL_LogDebug
346 * \sa SDL_LogError
347 * \sa SDL_LogInfo
348 * \sa SDL_LogMessage
349 * \sa SDL_LogVerbose
350 * \sa SDL_LogWarn
351 */
352 extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
353 SDL_LogPriority priority,
354 const char *fmt, va_list ap);
355
356 /**
357 * The prototype for the log output callback function.
358 *
359 * This function is called by SDL when there is new text to be logged.
360 *
361 * \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
362 * \param category the category of the message
363 * \param priority the priority of the message
364 * \param message the message being output
365 */
366 typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
367
368 /**
369 * Get the current log output function.
370 *
371 * \param callback an SDL_LogOutputFunction filled in with the current log
372 * callback
373 * \param userdata a pointer filled in with the pointer that is passed to
374 * `callback`
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_LogSetOutputFunction
379 */
380 extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
381
382 /**
383 * Replace the default log output function with one of your own.
384 *
385 * \param callback an SDL_LogOutputFunction to call instead of the default
386 * \param userdata a pointer that is passed to `callback`
387 *
388 * \since This function is available since SDL 2.0.0.
389 *
390 * \sa SDL_LogGetOutputFunction
391 */
392 extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
393
394
395 /* Ends C function definitions when using C++ */
396 #ifdef __cplusplus
397 }
398 #endif
399 #include <SDL2/close_code.h>
400
401 #endif /* SDL_log_h_ */
402
403 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_main_h_
22 #define SDL_main_h_
23
24 #include <SDL2/SDL_stdinc.h>
25
26 /**
27 * \file SDL_main.h
28 *
29 * Redefine main() on some platforms so that it is called by SDL.
30 */
31
32 #ifndef SDL_MAIN_HANDLED
33 #if defined(__WIN32__)
34 /* On Windows SDL provides WinMain(), which parses the command line and passes
35 the arguments to your main function.
36
37 If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
38 */
39 #define SDL_MAIN_AVAILABLE
40
41 #elif defined(__WINRT__)
42 /* On WinRT, SDL provides a main function that initializes CoreApplication,
43 creating an instance of IFrameworkView in the process.
44
45 Please note that #include'ing SDL_main.h is not enough to get a main()
46 function working. In non-XAML apps, the file,
47 src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
48 into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
49 called, with a pointer to the Direct3D-hosted XAML control passed in.
50 */
51 #define SDL_MAIN_NEEDED
52
53 #elif defined(__IPHONEOS__)
54 /* On iOS SDL provides a main function that creates an application delegate
55 and starts the iOS application run loop.
56
57 If you link with SDL dynamically on iOS, the main function can't be in a
58 shared library, so you need to link with libSDLmain.a, which includes a
59 stub main function that calls into the shared library to start execution.
60
61 See src/video/uikit/SDL_uikitappdelegate.m for more details.
62 */
63 #define SDL_MAIN_NEEDED
64
65 #elif defined(__ANDROID__)
66 /* On Android SDL provides a Java class in SDLActivity.java that is the
67 main activity entry point.
68
69 See docs/README-android.md for more details on extending that class.
70 */
71 #define SDL_MAIN_NEEDED
72
73 /* We need to export SDL_main so it can be launched from Java */
74 #define SDLMAIN_DECLSPEC DECLSPEC
75
76 #elif defined(__NACL__)
77 /* On NACL we use ppapi_simple to set up the application helper code,
78 then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
79 starting the user main function.
80 All user code is run in a separate thread by ppapi_simple, thus
81 allowing for blocking io to take place via nacl_io
82 */
83 #define SDL_MAIN_NEEDED
84
85 #elif defined(__PSP__)
86 /* On PSP SDL provides a main function that sets the module info,
87 activates the GPU and starts the thread required to be able to exit
88 the software.
89
90 If you provide this yourself, you may define SDL_MAIN_HANDLED
91 */
92 #define SDL_MAIN_AVAILABLE
93
94 #endif
95 #endif /* SDL_MAIN_HANDLED */
96
97 #ifndef SDLMAIN_DECLSPEC
98 #define SDLMAIN_DECLSPEC
99 #endif
100
101 /**
102 * \file SDL_main.h
103 *
104 * The application's main() function must be called with C linkage,
105 * and should be declared like this:
106 * \code
107 * #ifdef __cplusplus
108 * extern "C"
109 * #endif
110 * int main(int argc, char *argv[])
111 * {
112 * }
113 * \endcode
114 */
115
116 #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
117 #define main SDL_main
118 #endif
119
120 #include <SDL2/begin_code.h>
121 #ifdef __cplusplus
122 extern "C" {
123 #endif
124
125 /**
126 * The prototype for the application's main() function
127 */
128 typedef int (*SDL_main_func)(int argc, char *argv[]);
129 extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
130
131
132 /**
133 * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
134 * point.
135 *
136 * This function is defined in SDL_main.h, along with the preprocessor rule to
137 * redefine main() as SDL_main(). Thus to ensure that your main() function
138 * will not be changed it is necessary to define SDL_MAIN_HANDLED before
139 * including SDL.h.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_Init
144 */
145 extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
146
147 #ifdef __WIN32__
148
149 /**
150 * Register a win32 window class for SDL's use.
151 *
152 * This can be called to set the application window class at startup. It is
153 * safe to call this multiple times, as long as every call is eventually
154 * paired with a call to SDL_UnregisterApp, but a second registration attempt
155 * while a previous registration is still active will be ignored, other than
156 * to increment a counter.
157 *
158 * Most applications do not need to, and should not, call this directly; SDL
159 * will call it when initializing the video subsystem.
160 *
161 * \param name the window class name, in UTF-8 encoding. If NULL, SDL
162 * currently uses "SDL_app" but this isn't guaranteed.
163 * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
164 * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
165 * what is specified here.
166 * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
167 * will use `GetModuleHandle(NULL)` instead.
168 * \returns 0 on success, -1 on error. SDL_GetError() may have details.
169 *
170 * \since This function is available since SDL 2.0.2.
171 */
172 extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
173
174 /**
175 * Deregister the win32 window class from an SDL_RegisterApp call.
176 *
177 * This can be called to undo the effects of SDL_RegisterApp.
178 *
179 * Most applications do not need to, and should not, call this directly; SDL
180 * will call it when deinitializing the video subsystem.
181 *
182 * It is safe to call this multiple times, as long as every call is eventually
183 * paired with a prior call to SDL_RegisterApp. The window class will only be
184 * deregistered when the registration counter in SDL_RegisterApp decrements to
185 * zero through calls to this function.
186 *
187 * \since This function is available since SDL 2.0.2.
188 */
189 extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
190
191 #endif /* __WIN32__ */
192
193
194 #ifdef __WINRT__
195
196 /**
197 * Initialize and launch an SDL/WinRT application.
198 *
199 * \param mainFunction the SDL app's C-style main(), an SDL_main_func
200 * \param reserved reserved for future use; should be NULL
201 * \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
202 * more information on the failure.
203 *
204 * \since This function is available since SDL 2.0.3.
205 */
206 extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
207
208 #endif /* __WINRT__ */
209
210 #if defined(__IPHONEOS__)
211
212 /**
213 * Initializes and launches an SDL application.
214 *
215 * \param argc The argc parameter from the application's main() function
216 * \param argv The argv parameter from the application's main() function
217 * \param mainFunction The SDL app's C-style main(), an SDL_main_func
218 * \return the return value from mainFunction
219 *
220 * \since This function is available since SDL 2.0.10.
221 */
222 extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
223
224 #endif /* __IPHONEOS__ */
225
226
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_main_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_messagebox_h_
22 #define SDL_messagebox_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_video.h> /* For SDL_Window */
26
27 #include <SDL2/begin_code.h>
28 /* Set up for C function definitions, even when using C++ */
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /**
34 * SDL_MessageBox flags. If supported will display warning icon, etc.
35 */
36 typedef enum
37 {
38 SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
39 SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
40 SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
41 SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
42 SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
43 } SDL_MessageBoxFlags;
44
45 /**
46 * Flags for SDL_MessageBoxButtonData.
47 */
48 typedef enum
49 {
50 SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */
51 SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */
52 } SDL_MessageBoxButtonFlags;
53
54 /**
55 * Individual button data.
56 */
57 typedef struct
58 {
59 Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */
60 int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */
61 const char * text; /**< The UTF-8 button text */
62 } SDL_MessageBoxButtonData;
63
64 /**
65 * RGB value used in a message box color scheme
66 */
67 typedef struct
68 {
69 Uint8 r, g, b;
70 } SDL_MessageBoxColor;
71
72 typedef enum
73 {
74 SDL_MESSAGEBOX_COLOR_BACKGROUND,
75 SDL_MESSAGEBOX_COLOR_TEXT,
76 SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
77 SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
78 SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
79 SDL_MESSAGEBOX_COLOR_MAX
80 } SDL_MessageBoxColorType;
81
82 /**
83 * A set of colors to use for message box dialogs
84 */
85 typedef struct
86 {
87 SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
88 } SDL_MessageBoxColorScheme;
89
90 /**
91 * MessageBox structure containing title, text, window, etc.
92 */
93 typedef struct
94 {
95 Uint32 flags; /**< ::SDL_MessageBoxFlags */
96 SDL_Window *window; /**< Parent window, can be NULL */
97 const char *title; /**< UTF-8 title */
98 const char *message; /**< UTF-8 message text */
99
100 int numbuttons;
101 const SDL_MessageBoxButtonData *buttons;
102
103 const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
104 } SDL_MessageBoxData;
105
106 /**
107 * Create a modal message box.
108 *
109 * If your needs aren't complex, it might be easier to use
110 * SDL_ShowSimpleMessageBox.
111 *
112 * This function should be called on the thread that created the parent
113 * window, or on the main thread if the messagebox has no parent. It will
114 * block execution of that thread until the user clicks a button or closes the
115 * messagebox.
116 *
117 * This function may be called at any time, even before SDL_Init(). This makes
118 * it useful for reporting errors like a failure to create a renderer or
119 * OpenGL context.
120 *
121 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
122 * formal toolkit like GTK+ or Qt.
123 *
124 * Note that if SDL_Init() would fail because there isn't any available video
125 * target, this function is likely to fail for the same reasons. If this is a
126 * concern, check the return value from this function and fall back to writing
127 * to stderr if you can.
128 *
129 * \param messageboxdata the SDL_MessageBoxData structure with title, text and
130 * other options
131 * \param buttonid the pointer to which user id of hit button should be copied
132 * \returns 0 on success or a negative error code on failure; call
133 * SDL_GetError() for more information.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_ShowSimpleMessageBox
138 */
139 extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
140
141 /**
142 * Display a simple modal message box.
143 *
144 * If your needs aren't complex, this function is preferred over
145 * SDL_ShowMessageBox.
146 *
147 * `flags` may be any of the following:
148 *
149 * - `SDL_MESSAGEBOX_ERROR`: error dialog
150 * - `SDL_MESSAGEBOX_WARNING`: warning dialog
151 * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
152 *
153 * This function should be called on the thread that created the parent
154 * window, or on the main thread if the messagebox has no parent. It will
155 * block execution of that thread until the user clicks a button or closes the
156 * messagebox.
157 *
158 * This function may be called at any time, even before SDL_Init(). This makes
159 * it useful for reporting errors like a failure to create a renderer or
160 * OpenGL context.
161 *
162 * On X11, SDL rolls its own dialog box with X11 primitives instead of a
163 * formal toolkit like GTK+ or Qt.
164 *
165 * Note that if SDL_Init() would fail because there isn't any available video
166 * target, this function is likely to fail for the same reasons. If this is a
167 * concern, check the return value from this function and fall back to writing
168 * to stderr if you can.
169 *
170 * \param flags an SDL_MessageBoxFlags value
171 * \param title UTF-8 title text
172 * \param message UTF-8 message text
173 * \param window the parent window, or NULL for no parent
174 * \returns 0 on success or a negative error code on failure; call
175 * SDL_GetError() for more information.
176 *
177 * \since This function is available since SDL 2.0.0.
178 *
179 * \sa SDL_ShowMessageBox
180 */
181 extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
182
183
184 /* Ends C function definitions when using C++ */
185 #ifdef __cplusplus
186 }
187 #endif
188 #include <SDL2/close_code.h>
189
190 #endif /* SDL_messagebox_h_ */
191
192 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_metal.h
23 *
24 * Header file for functions to creating Metal layers and views on SDL windows.
25 */
26
27 #ifndef SDL_metal_h_
28 #define SDL_metal_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
40 *
41 * \note This can be cast directly to an NSView or UIView.
42 */
43 typedef void *SDL_MetalView;
44
45 /**
46 * \name Metal support functions
47 */
48 /* @{ */
49
50 /**
51 * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
52 * window.
53 *
54 * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
55 * its own. It is up to user code to do that.
56 *
57 * The returned handle can be casted directly to a NSView or UIView. To access
58 * the backing CAMetalLayer, call SDL_Metal_GetLayer().
59 *
60 * \since This function is available since SDL 2.0.12.
61 *
62 * \sa SDL_Metal_DestroyView
63 * \sa SDL_Metal_GetLayer
64 */
65 extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
66
67 /**
68 * Destroy an existing SDL_MetalView object.
69 *
70 * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
71 * called after SDL_CreateWindow.
72 *
73 * \since This function is available since SDL 2.0.12.
74 *
75 * \sa SDL_Metal_CreateView
76 */
77 extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
78
79 /**
80 * Get a pointer to the backing CAMetalLayer for the given view.
81 *
82 * \since This function is available since SDL 2.0.14.
83 *
84 * \sa SDL_MetalCreateView
85 */
86 extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
87
88 /**
89 * Get the size of a window's underlying drawable in pixels (for use with
90 * setting viewport, scissor & etc).
91 *
92 * \param window SDL_Window from which the drawable size should be queried
93 * \param w Pointer to variable for storing the width in pixels, may be NULL
94 * \param h Pointer to variable for storing the height in pixels, may be NULL
95 *
96 * \since This function is available since SDL 2.0.14.
97 *
98 * \sa SDL_GetWindowSize
99 * \sa SDL_CreateWindow
100 */
101 extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
102 int *h);
103
104 /* @} *//* Metal support functions */
105
106 /* Ends C function definitions when using C++ */
107 #ifdef __cplusplus
108 }
109 #endif
110 #include <SDL2/close_code.h>
111
112 #endif /* SDL_metal_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_misc.h
23 *
24 * \brief Include file for SDL API functions that don't fit elsewhere.
25 */
26
27 #ifndef SDL_misc_h_
28 #define SDL_misc_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Open a URL/URI in the browser or other appropriate external application.
41 *
42 * Open a URL in a separate, system-provided application. How this works will
43 * vary wildly depending on the platform. This will likely launch what makes
44 * sense to handle a specific URL's protocol (a web browser for `http://`,
45 * etc), but it might also be able to launch file managers for directories and
46 * other things.
47 *
48 * What happens when you open a URL varies wildly as well: your game window
49 * may lose focus (and may or may not lose focus if your game was fullscreen
50 * or grabbing input at the time). On mobile devices, your app will likely
51 * move to the background or your process might be paused. Any given platform
52 * may or may not handle a given URL.
53 *
54 * If this is unimplemented (or simply unavailable) for a platform, this will
55 * fail with an error. A successful result does not mean the URL loaded, just
56 * that we launched _something_ to handle it (or at least believe we did).
57 *
58 * All this to say: this function can be useful, but you should definitely
59 * test it on every platform you target.
60 *
61 * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for
62 * local files, if supported.
63 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
64 * information.
65 *
66 * \since This function is available since SDL 2.0.14.
67 */
68 extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
69
70 /* Ends C function definitions when using C++ */
71 #ifdef __cplusplus
72 }
73 #endif
74 #include <SDL2/close_code.h>
75
76 #endif /* SDL_misc_h_ */
77
78 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_mouse.h
23 *
24 * Include file for SDL mouse event handling.
25 */
26
27 #ifndef SDL_mouse_h_
28 #define SDL_mouse_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
41
42 /**
43 * \brief Cursor types for SDL_CreateSystemCursor().
44 */
45 typedef enum
46 {
47 SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */
48 SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */
49 SDL_SYSTEM_CURSOR_WAIT, /**< Wait */
50 SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
51 SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
52 SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */
53 SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */
54 SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */
55 SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */
56 SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */
57 SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */
58 SDL_SYSTEM_CURSOR_HAND, /**< Hand */
59 SDL_NUM_SYSTEM_CURSORS
60 } SDL_SystemCursor;
61
62 /**
63 * \brief Scroll direction types for the Scroll event
64 */
65 typedef enum
66 {
67 SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
68 SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
69 } SDL_MouseWheelDirection;
70
71 /* Function prototypes */
72
73 /**
74 * Get the window which currently has mouse focus.
75 *
76 * \returns the window with mouse focus.
77 *
78 * \since This function is available since SDL 2.0.0.
79 */
80 extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
81
82 /**
83 * Retrieve the current state of the mouse.
84 *
85 * The current button state is returned as a button bitmask, which can be
86 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
87 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
88 * mouse cursor position relative to the focus window. You can pass NULL for
89 * either `x` or `y`.
90 *
91 * \param x the x coordinate of the mouse cursor position relative to the
92 * focus window
93 * \param y the y coordinate of the mouse cursor position relative to the
94 * focus window
95 * \returns a 32-bit button bitmask of the current button state.
96 *
97 * \since This function is available since SDL 2.0.0.
98 *
99 * \sa SDL_GetGlobalMouseState
100 * \sa SDL_GetRelativeMouseState
101 * \sa SDL_PumpEvents
102 */
103 extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
104
105 /**
106 * Get the current state of the mouse in relation to the desktop.
107 *
108 * This works similarly to SDL_GetMouseState(), but the coordinates will be
109 * reported relative to the top-left of the desktop. This can be useful if you
110 * need to track the mouse outside of a specific window and SDL_CaptureMouse()
111 * doesn't fit your needs. For example, it could be useful if you need to
112 * track the mouse while dragging a window, where coordinates relative to a
113 * window might not be in sync at all times.
114 *
115 * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
116 * from the last pump of the event queue. This function, however, queries the
117 * OS for the current mouse position, and as such, might be a slightly less
118 * efficient function. Unless you know what you're doing and have a good
119 * reason to use this function, you probably want SDL_GetMouseState() instead.
120 *
121 * \param x filled in with the current X coord relative to the desktop; can be
122 * NULL
123 * \param y filled in with the current Y coord relative to the desktop; can be
124 * NULL
125 * \returns the current button state as a bitmask which can be tested using
126 * the SDL_BUTTON(X) macros.
127 *
128 * \since This function is available since SDL 2.0.4.
129 *
130 * \sa SDL_CaptureMouse
131 */
132 extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
133
134 /**
135 * Retrieve the relative state of the mouse.
136 *
137 * The current button state is returned as a button bitmask, which can be
138 * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
139 * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
140 * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
141 * event initialization. You can pass NULL for either `x` or `y`.
142 *
143 * \param x a pointer filled with the last recorded x coordinate of the mouse
144 * \param y a pointer filled with the last recorded y coordinate of the mouse
145 * \returns a 32-bit button bitmask of the relative button state.
146 *
147 * \since This function is available since SDL 2.0.0.
148 *
149 * \sa SDL_GetMouseState
150 */
151 extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
152
153 /**
154 * Move the mouse cursor to the given position within the window.
155 *
156 * This function generates a mouse motion event.
157 *
158 * Note that this function will appear to succeed, but not actually move the
159 * mouse when used over Microsoft Remote Desktop.
160 *
161 * \param window the window to move the mouse into, or NULL for the current
162 * mouse focus
163 * \param x the x coordinate within the window
164 * \param y the y coordinate within the window
165 *
166 * \since This function is available since SDL 2.0.0.
167 *
168 * \sa SDL_WarpMouseGlobal
169 */
170 extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
171 int x, int y);
172
173 /**
174 * Move the mouse to the given position in global screen space.
175 *
176 * This function generates a mouse motion event.
177 *
178 * A failure of this function usually means that it is unsupported by a
179 * platform.
180 *
181 * Note that this function will appear to succeed, but not actually move the
182 * mouse when used over Microsoft Remote Desktop.
183 *
184 * \param x the x coordinate
185 * \param y the y coordinate
186 * \returns 0 on success or a negative error code on failure; call
187 * SDL_GetError() for more information.
188 *
189 * \since This function is available since SDL 2.0.4.
190 *
191 * \sa SDL_WarpMouseInWindow
192 */
193 extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
194
195 /**
196 * Set relative mouse mode.
197 *
198 * While the mouse is in relative mode, the cursor is hidden, and the driver
199 * will try to report continuous motion in the current window. Only relative
200 * motion events will be delivered, the mouse position will not change.
201 *
202 * Note that this function will not be able to provide continuous relative
203 * motion when used over Microsoft Remote Desktop, instead motion is limited
204 * to the bounds of the screen.
205 *
206 * This function will flush any pending mouse motion.
207 *
208 * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
209 * \returns 0 on success or a negative error code on failure; call
210 * SDL_GetError() for more information.
211 *
212 * If relative mode is not supported, this returns -1.
213 *
214 * \since This function is available since SDL 2.0.0.
215 *
216 * \sa SDL_GetRelativeMouseMode
217 */
218 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
219
220 /**
221 * Capture the mouse and to track input outside an SDL window.
222 *
223 * Capturing enables your app to obtain mouse events globally, instead of just
224 * within your window. Not all video targets support this function. When
225 * capturing is enabled, the current window will get all mouse events, but
226 * unlike relative mode, no change is made to the cursor and it is not
227 * restrained to your window.
228 *
229 * This function may also deny mouse input to other windows--both those in
230 * your application and others on the system--so you should use this function
231 * sparingly, and in small bursts. For example, you might want to track the
232 * mouse while the user is dragging something, until the user releases a mouse
233 * button. It is not recommended that you capture the mouse for long periods
234 * of time, such as the entire time your app is running. For that, you should
235 * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowGrab(), depending
236 * on your goals.
237 *
238 * While captured, mouse events still report coordinates relative to the
239 * current (foreground) window, but those coordinates may be outside the
240 * bounds of the window (including negative values). Capturing is only allowed
241 * for the foreground window. If the window loses focus while capturing, the
242 * capture will be disabled automatically.
243 *
244 * While capturing is enabled, the current window will have the
245 * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
246 *
247 * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
248 * \returns 0 on success or -1 if not supported; call SDL_GetError() for more
249 * information.
250 *
251 * \since This function is available since SDL 2.0.4.
252 *
253 * \sa SDL_GetGlobalMouseState
254 */
255 extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
256
257 /**
258 * Query whether relative mouse mode is enabled.
259 *
260 * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
261 *
262 * \since This function is available since SDL 2.0.0.
263 *
264 * \sa SDL_SetRelativeMouseMode
265 */
266 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
267
268 /**
269 * Create a cursor using the specified bitmap data and mask (in MSB format).
270 *
271 * `mask` has to be in MSB (Most Significant Bit) format.
272 *
273 * The cursor width (`w`) must be a multiple of 8 bits.
274 *
275 * The cursor is created in black and white according to the following:
276 *
277 * - data=0, mask=1: white
278 * - data=1, mask=1: black
279 * - data=0, mask=0: transparent
280 * - data=1, mask=0: inverted color if possible, black if not.
281 *
282 * Cursors created with this function must be freed with SDL_FreeCursor().
283 *
284 * If you want to have a color cursor, or create your cursor from an
285 * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
286 * hide the cursor and draw your own as part of your game's rendering, but it
287 * will be bound to the framerate.
288 *
289 * Also, since SDL 2.0.0, SDL_CreateSystemCursor() is available, which
290 * provides twelve readily available system cursors to pick from.
291 *
292 * \param data the color value for each pixel of the cursor
293 * \param mask the mask value for each pixel of the cursor
294 * \param w the width of the cursor
295 * \param h the height of the cursor
296 * \param hot_x the X-axis location of the upper left corner of the cursor
297 * relative to the actual mouse position
298 * \param hot_y the Y-axis location of the upper left corner of the cursor
299 * relative to the actual mouse position
300 * \returns a new cursor with the specified parameters on success or NULL on
301 * failure; call SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_FreeCursor
306 * \sa SDL_SetCursor
307 * \sa SDL_ShowCursor
308 */
309 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
310 const Uint8 * mask,
311 int w, int h, int hot_x,
312 int hot_y);
313
314 /**
315 * Create a color cursor.
316 *
317 * \param surface an SDL_Surface structure representing the cursor image
318 * \param hot_x the x position of the cursor hot spot
319 * \param hot_y the y position of the cursor hot spot
320 * \returns the new cursor on success or NULL on failure; call SDL_GetError()
321 * for more information.
322 *
323 * \since This function is available since SDL 2.0.0.
324 *
325 * \sa SDL_CreateCursor
326 * \sa SDL_FreeCursor
327 */
328 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
329 int hot_x,
330 int hot_y);
331
332 /**
333 * Create a system cursor.
334 *
335 * \param id an SDL_SystemCursor enum value
336 * \returns a cursor on success or NULL on failure; call SDL_GetError() for
337 * more information.
338 *
339 * \since This function is available since SDL 2.0.0.
340 *
341 * \sa SDL_FreeCursor
342 */
343 extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
344
345 /**
346 * Set the active cursor.
347 *
348 * This function sets the currently active cursor to the specified one. If the
349 * cursor is currently visible, the change will be immediately represented on
350 * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
351 * this is desired for any reason.
352 *
353 * \param cursor a cursor to make active
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateCursor
358 * \sa SDL_GetCursor
359 * \sa SDL_ShowCursor
360 */
361 extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
362
363 /**
364 * Get the active cursor.
365 *
366 * This function returns a pointer to the current cursor which is owned by the
367 * library. It is not necessary to free the cursor with SDL_FreeCursor().
368 *
369 * \returns the active cursor or NULL if there is no mouse.
370 *
371 * \since This function is available since SDL 2.0.0.
372 *
373 * \sa SDL_SetCursor
374 */
375 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
376
377 /**
378 * Get the default cursor.
379 *
380 * \returns the default cursor on success or NULL on failure.
381 *
382 * \since This function is available since SDL 2.0.0.
383 *
384 * \sa SDL_CreateSystemCursor
385 */
386 extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
387
388 /**
389 * Free a previously-created cursor.
390 *
391 * Use this function to free cursor resources created with SDL_CreateCursor(),
392 * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
393 *
394 * \param cursor the cursor to free
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_CreateColorCursor
399 * \sa SDL_CreateCursor
400 * \sa SDL_CreateSystemCursor
401 */
402 extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
403
404 /**
405 * Toggle whether or not the cursor is shown.
406 *
407 * The cursor starts off displayed but can be turned off. Passing `SDL_ENABLE`
408 * displays the cursor and passing `SDL_DISABLE` hides it.
409 *
410 * The current state of the mouse cursor can be queried by passing
411 * `SDL_QUERY`; either `SDL_DISABLE` or `SDL_ENABLE` will be returned.
412 *
413 * \param toggle `SDL_ENABLE` to show the cursor, `SDL_DISABLE` to hide it,
414 * `SDL_QUERY` to query the current state without changing it.
415 * \returns `SDL_ENABLE` if the cursor is shown, or `SDL_DISABLE` if the
416 * cursor is hidden, or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CreateCursor
422 * \sa SDL_SetCursor
423 */
424 extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
425
426 /**
427 * Used as a mask when testing buttons in buttonstate.
428 *
429 * - Button 1: Left mouse button
430 * - Button 2: Middle mouse button
431 * - Button 3: Right mouse button
432 */
433 #define SDL_BUTTON(X) (1 << ((X)-1))
434 #define SDL_BUTTON_LEFT 1
435 #define SDL_BUTTON_MIDDLE 2
436 #define SDL_BUTTON_RIGHT 3
437 #define SDL_BUTTON_X1 4
438 #define SDL_BUTTON_X2 5
439 #define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)
440 #define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)
441 #define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)
442 #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
443 #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
444
445 /* Ends C function definitions when using C++ */
446 #ifdef __cplusplus
447 }
448 #endif
449 #include <SDL2/close_code.h>
450
451 #endif /* SDL_mouse_h_ */
452
453 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_mutex_h_
22 #define SDL_mutex_h_
23
24 /**
25 * \file SDL_mutex.h
26 *
27 * Functions to provide thread synchronization primitives.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Synchronization functions which can time out return this value
41 * if they time out.
42 */
43 #define SDL_MUTEX_TIMEDOUT 1
44
45 /**
46 * This is the timeout value which corresponds to never time out.
47 */
48 #define SDL_MUTEX_MAXWAIT (~(Uint32)0)
49
50
51 /**
52 * \name Mutex functions
53 */
54 /* @{ */
55
56 /* The SDL mutex structure, defined in SDL_sysmutex.c */
57 struct SDL_mutex;
58 typedef struct SDL_mutex SDL_mutex;
59
60 /**
61 * Create a new mutex.
62 *
63 * All newly-created mutexes begin in the _unlocked_ state.
64 *
65 * Calls to SDL_LockMutex() will not return while the mutex is locked by
66 * another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
67 *
68 * SDL mutexes are reentrant.
69 *
70 * \returns the initialized and unlocked mutex or NULL on failure; call
71 * SDL_GetError() for more information.
72 *
73 * \since This function is available since SDL 2.0.0.
74 *
75 * \sa SDL_DestroyMutex
76 * \sa SDL_LockMutex
77 * \sa SDL_TryLockMutex
78 * \sa SDL_UnlockMutex
79 */
80 extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
81
82 /**
83 * Lock the mutex.
84 *
85 * This will block until the mutex is available, which is to say it is in the
86 * unlocked state and the OS has chosen the caller as the next thread to lock
87 * it. Of all threads waiting to lock the mutex, only one may do so at a time.
88 *
89 * It is legal for the owning thread to lock an already-locked mutex. It must
90 * unlock it the same number of times before it is actually made available for
91 * other threads in the system (this is known as a "recursive mutex").
92 *
93 * \param mutex the mutex to lock
94 * \return 0, or -1 on error.
95 *
96 * \since This function is available since SDL 2.0.0.
97 */
98 extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
99 #define SDL_mutexP(m) SDL_LockMutex(m)
100
101 /**
102 * Try to lock a mutex without blocking.
103 *
104 * This works just like SDL_LockMutex(), but if the mutex is not available,
105 * this function returns `SDL_MUTEX_TIMEOUT` immediately.
106 *
107 * This technique is useful if you need exclusive access to a resource but
108 * don't want to wait for it, and will return to it to try again later.
109 *
110 * \param mutex the mutex to try to lock
111 * \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
112 * more information.
113 *
114 * \since This function is available since SDL 2.0.0.
115 *
116 * \sa SDL_CreateMutex
117 * \sa SDL_DestroyMutex
118 * \sa SDL_LockMutex
119 * \sa SDL_UnlockMutex
120 */
121 extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
122
123 /**
124 * Unlock the mutex.
125 *
126 * It is legal for the owning thread to lock an already-locked mutex. It must
127 * unlock it the same number of times before it is actually made available for
128 * other threads in the system (this is known as a "recursive mutex").
129 *
130 * It is an error to unlock a mutex that has not been locked by the current
131 * thread, and doing so results in undefined behavior.
132 *
133 * It is also an error to unlock a mutex that isn't locked at all.
134 *
135 * \param mutex the mutex to unlock.
136 * \returns 0, or -1 on error.
137 *
138 * \since This function is available since SDL 2.0.0.
139 */
140 extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
141 #define SDL_mutexV(m) SDL_UnlockMutex(m)
142
143 /**
144 * Destroy a mutex created with SDL_CreateMutex().
145 *
146 * This function must be called on any mutex that is no longer needed. Failure
147 * to destroy a mutex will result in a system memory or resource leak. While
148 * it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
149 * to destroy a locked mutex, and may result in undefined behavior depending
150 * on the platform.
151 *
152 * \param mutex the mutex to destroy
153 *
154 * \since This function is available since SDL 2.0.0.
155 *
156 * \sa SDL_CreateMutex
157 * \sa SDL_LockMutex
158 * \sa SDL_TryLockMutex
159 * \sa SDL_UnlockMutex
160 */
161 extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
162
163 /* @} *//* Mutex functions */
164
165
166 /**
167 * \name Semaphore functions
168 */
169 /* @{ */
170
171 /* The SDL semaphore structure, defined in SDL_syssem.c */
172 struct SDL_semaphore;
173 typedef struct SDL_semaphore SDL_sem;
174
175 /**
176 * Create a semaphore.
177 *
178 * This function creates a new semaphore and initializes it with the value
179 * `initial_value`. Each wait operation on the semaphore will atomically
180 * decrement the semaphore value and potentially block if the semaphore value
181 * is 0. Each post operation will atomically increment the semaphore value and
182 * wake waiting threads and allow them to retry the wait operation.
183 *
184 * \param initial_value the starting value of the semaphore
185 * \returns a new semaphore or NULL on failure; call SDL_GetError() for more
186 * information.
187 *
188 * \since This function is available since SDL 2.0.0.
189 *
190 * \sa SDL_DestroySemaphore
191 * \sa SDL_SemPost
192 * \sa SDL_SemTryWait
193 * \sa SDL_SemValue
194 * \sa SDL_SemWait
195 * \sa SDL_SemWaitTimeout
196 */
197 extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
198
199 /**
200 * Destroy a semaphore.
201 *
202 * It is not safe to destroy a semaphore if there are threads currently
203 * waiting on it.
204 *
205 * \param sem the semaphore to destroy
206 *
207 * \since This function is available since SDL 2.0.0.
208 *
209 * \sa SDL_CreateSemaphore
210 * \sa SDL_SemPost
211 * \sa SDL_SemTryWait
212 * \sa SDL_SemValue
213 * \sa SDL_SemWait
214 * \sa SDL_SemWaitTimeout
215 */
216 extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
217
218 /**
219 * Wait until a semaphore has a positive value and then decrements it.
220 *
221 * This function suspends the calling thread until either the semaphore
222 * pointed to by `sem` has a positive value or the call is interrupted by a
223 * signal or error. If the call is successful it will atomically decrement the
224 * semaphore value.
225 *
226 * This function is the equivalent of calling SDL_SemWaitTimeout() with a time
227 * length of `SDL_MUTEX_MAXWAIT`.
228 *
229 * \param sem the semaphore wait on
230 * \returns 0 on success or a negative error code on failure; call
231 * SDL_GetError() for more information.
232 *
233 * \since This function is available since SDL 2.0.0.
234 *
235 * \sa SDL_CreateSemaphore
236 * \sa SDL_DestroySemaphore
237 * \sa SDL_SemPost
238 * \sa SDL_SemTryWait
239 * \sa SDL_SemValue
240 * \sa SDL_SemWait
241 * \sa SDL_SemWaitTimeout
242 */
243 extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
244
245 /**
246 * See if a semaphore has a positive value and decrement it if it does.
247 *
248 * This function checks to see if the semaphore pointed to by `sem` has a
249 * positive value and atomically decrements the semaphore value if it does. If
250 * the semaphore doesn't have a positive value, the function immediately
251 * returns SDL_MUTEX_TIMEDOUT.
252 *
253 * \param sem the semaphore to wait on
254 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
255 * block, or a negative error code on failure; call SDL_GetError()
256 * for more information.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_CreateSemaphore
261 * \sa SDL_DestroySemaphore
262 * \sa SDL_SemPost
263 * \sa SDL_SemValue
264 * \sa SDL_SemWait
265 * \sa SDL_SemWaitTimeout
266 */
267 extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
268
269 /**
270 * Wait until a semaphore has a positive value and then decrements it.
271 *
272 * This function suspends the calling thread until either the semaphore
273 * pointed to by `sem` has a positive value, the call is interrupted by a
274 * signal or error, or the specified time has elapsed. If the call is
275 * successful it will atomically decrement the semaphore value.
276 *
277 * \param sem the semaphore to wait on
278 * \param ms the length of the timeout, in milliseconds
279 * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
280 * succeed in the allotted time, or a negative error code on failure;
281 * call SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateSemaphore
286 * \sa SDL_DestroySemaphore
287 * \sa SDL_SemPost
288 * \sa SDL_SemTryWait
289 * \sa SDL_SemValue
290 * \sa SDL_SemWait
291 */
292 extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
293
294 /**
295 * Atomically increment a semaphore's value and wake waiting threads.
296 *
297 * \param sem the semaphore to increment
298 * \returns 0 on success or a negative error code on failure; call
299 * SDL_GetError() for more information.
300 *
301 * \since This function is available since SDL 2.0.0.
302 *
303 * \sa SDL_CreateSemaphore
304 * \sa SDL_DestroySemaphore
305 * \sa SDL_SemTryWait
306 * \sa SDL_SemValue
307 * \sa SDL_SemWait
308 * \sa SDL_SemWaitTimeout
309 */
310 extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
311
312 /**
313 * Get the current value of a semaphore.
314 *
315 * \param sem the semaphore to query
316 * \returns the current value of the semaphore.
317 *
318 * \since This function is available since SDL 2.0.0.
319 *
320 * \sa SDL_CreateSemaphore
321 */
322 extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
323
324 /* @} *//* Semaphore functions */
325
326
327 /**
328 * \name Condition variable functions
329 */
330 /* @{ */
331
332 /* The SDL condition variable structure, defined in SDL_syscond.c */
333 struct SDL_cond;
334 typedef struct SDL_cond SDL_cond;
335
336 /**
337 * Create a condition variable.
338 *
339 * \returns a new condition variable or NULL on failure; call SDL_GetError()
340 * for more information.
341 *
342 * \since This function is available since SDL 2.0.0.
343 *
344 * \sa SDL_CondBroadcast
345 * \sa SDL_CondSignal
346 * \sa SDL_CondWait
347 * \sa SDL_CondWaitTimeout
348 * \sa SDL_DestroyCond
349 */
350 extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
351
352 /**
353 * Destroy a condition variable.
354 *
355 * \param cond the condition variable to destroy
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_CondBroadcast
360 * \sa SDL_CondSignal
361 * \sa SDL_CondWait
362 * \sa SDL_CondWaitTimeout
363 * \sa SDL_CreateCond
364 */
365 extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
366
367 /**
368 * Restart one of the threads that are waiting on the condition variable.
369 *
370 * \param cond the condition variable to signal
371 * \returns 0 on success or a negative error code on failure; call
372 * SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_CondBroadcast
377 * \sa SDL_CondWait
378 * \sa SDL_CondWaitTimeout
379 * \sa SDL_CreateCond
380 * \sa SDL_DestroyCond
381 */
382 extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
383
384 /**
385 * Restart all threads that are waiting on the condition variable.
386 *
387 * \param cond the condition variable to signal
388 * \returns 0 on success or a negative error code on failure; call
389 * SDL_GetError() for more information.
390 *
391 * \since This function is available since SDL 2.0.0.
392 *
393 * \sa SDL_CondSignal
394 * \sa SDL_CondWait
395 * \sa SDL_CondWaitTimeout
396 * \sa SDL_CreateCond
397 * \sa SDL_DestroyCond
398 */
399 extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
400
401 /**
402 * Wait until a condition variable is signaled.
403 *
404 * This function unlocks the specified `mutex` and waits for another thread to
405 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
406 * `cond`. Once the condition variable is signaled, the mutex is re-locked and
407 * the function returns.
408 *
409 * The mutex must be locked before calling this function.
410 *
411 * This function is the equivalent of calling SDL_CondWaitTimeout() with a
412 * time length of `SDL_MUTEX_MAXWAIT`.
413 *
414 * \param cond the condition variable to wait on
415 * \param mutex the mutex used to coordinate thread access
416 * \returns 0 when it is signaled or a negative error code on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_CondBroadcast
422 * \sa SDL_CondSignal
423 * \sa SDL_CondWaitTimeout
424 * \sa SDL_CreateCond
425 * \sa SDL_DestroyCond
426 */
427 extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
428
429 /**
430 * Wait until a condition variable is signaled or a certain time has passed.
431 *
432 * This function unlocks the specified `mutex` and waits for another thread to
433 * call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
434 * `cond`, or for the specified time to elapse. Once the condition variable is
435 * signaled or the time elapsed, the mutex is re-locked and the function
436 * returns.
437 *
438 * The mutex must be locked before calling this function.
439 *
440 * \param cond the condition variable to wait on
441 * \param mutex the mutex used to coordinate thread access
442 * \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
443 * to wait indefinitely
444 * \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
445 * the condition is not signaled in the allotted time, or a negative
446 * error code on failure; call SDL_GetError() for more information.
447 *
448 * \since This function is available since SDL 2.0.0.
449 *
450 * \sa SDL_CondBroadcast
451 * \sa SDL_CondSignal
452 * \sa SDL_CondWait
453 * \sa SDL_CreateCond
454 * \sa SDL_DestroyCond
455 */
456 extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
457 SDL_mutex * mutex, Uint32 ms);
458
459 /* @} *//* Condition variable functions */
460
461
462 /* Ends C function definitions when using C++ */
463 #ifdef __cplusplus
464 }
465 #endif
466 #include <SDL2/close_code.h>
467
468 #endif /* SDL_mutex_h_ */
469
470 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDLname_h_
22 #define SDLname_h_
23
24 #if defined(__STDC__) || defined(__cplusplus)
25 #define NeedFunctionPrototypes 1
26 #endif
27
28 #define SDL_NAME(X) SDL_##X
29
30 #endif /* SDLname_h_ */
31
32 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengl.h
23 *
24 * This is a simple file to encapsulate the OpenGL API headers.
25 */
26
27 /**
28 * \def NO_SDL_GLEXT
29 *
30 * Define this if you have your own version of glext.h and want to disable the
31 * version included in SDL_opengl.h.
32 */
33
34 #ifndef SDL_opengl_h_
35 #define SDL_opengl_h_
36
37 #include <SDL2/SDL_config.h>
38
39 #ifndef __IPHONEOS__ /* No OpenGL on iOS. */
40
41 /*
42 * Mesa 3-D graphics library
43 *
44 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
45 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
46 *
47 * Permission is hereby granted, free of charge, to any person obtaining a
48 * copy of this software and associated documentation files (the "Software"),
49 * to deal in the Software without restriction, including without limitation
50 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
51 * and/or sell copies of the Software, and to permit persons to whom the
52 * Software is furnished to do so, subject to the following conditions:
53 *
54 * The above copyright notice and this permission notice shall be included
55 * in all copies or substantial portions of the Software.
56 *
57 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
60 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
61 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
62 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
63 * OTHER DEALINGS IN THE SOFTWARE.
64 */
65
66
67 #ifndef __gl_h_
68 #define __gl_h_
69
70 #if defined(USE_MGL_NAMESPACE)
71 #include <SDL2/gl_mangle.h>
72 #endif
73
74
75 /**********************************************************************
76 * Begin system-specific stuff.
77 */
78
79 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
80 #define __WIN32__
81 #endif
82
83 #if defined(__WIN32__) && !defined(__CYGWIN__)
84 # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
85 # define GLAPI __declspec(dllexport)
86 # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
87 # define GLAPI __declspec(dllimport)
88 # else /* for use with static link lib build of Win32 edition only */
89 # define GLAPI extern
90 # endif /* _STATIC_MESA support */
91 # if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
92 # define GLAPIENTRY
93 # else
94 # define GLAPIENTRY __stdcall
95 # endif
96 #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
97 # define GLAPI extern
98 # define GLAPIENTRY __stdcall
99 #elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */
100 # define GLAPI extern
101 # define GLAPIENTRY _System
102 # define APIENTRY _System
103 # if defined(__GNUC__) && !defined(_System)
104 # define _System
105 # endif
106 #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
107 # define GLAPI __attribute__((visibility("default")))
108 # define GLAPIENTRY
109 #endif /* WIN32 && !CYGWIN */
110
111 /*
112 * WINDOWS: Include windows.h here to define APIENTRY.
113 * It is also useful when applications include this file by
114 * including only glut.h, since glut.h depends on windows.h.
115 * Applications needing to include windows.h with parms other
116 * than "WIN32_LEAN_AND_MEAN" may include windows.h before
117 * glut.h or gl.h.
118 */
119 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
120 #ifndef WIN32_LEAN_AND_MEAN
121 #define WIN32_LEAN_AND_MEAN 1
122 #endif
123 #ifndef NOMINMAX /* don't define min() and max(). */
124 #define NOMINMAX
125 #endif
126 #include <windows.h>
127 #endif
128
129 #ifndef GLAPI
130 #define GLAPI extern
131 #endif
132
133 #ifndef GLAPIENTRY
134 #define GLAPIENTRY
135 #endif
136
137 #ifndef APIENTRY
138 #define APIENTRY GLAPIENTRY
139 #endif
140
141 /* "P" suffix to be used for a pointer to a function */
142 #ifndef APIENTRYP
143 #define APIENTRYP APIENTRY *
144 #endif
145
146 #ifndef GLAPIENTRYP
147 #define GLAPIENTRYP GLAPIENTRY *
148 #endif
149
150 #if defined(PRAGMA_EXPORT_SUPPORTED)
151 #pragma export on
152 #endif
153
154 /*
155 * End system-specific stuff.
156 **********************************************************************/
157
158
159
160 #ifdef __cplusplus
161 extern "C" {
162 #endif
163
164
165
166 #define GL_VERSION_1_1 1
167 #define GL_VERSION_1_2 1
168 #define GL_VERSION_1_3 1
169 #define GL_ARB_imaging 1
170
171
172 /*
173 * Datatypes
174 */
175 typedef unsigned int GLenum;
176 typedef unsigned char GLboolean;
177 typedef unsigned int GLbitfield;
178 typedef void GLvoid;
179 typedef signed char GLbyte; /* 1-byte signed */
180 typedef short GLshort; /* 2-byte signed */
181 typedef int GLint; /* 4-byte signed */
182 typedef unsigned char GLubyte; /* 1-byte unsigned */
183 typedef unsigned short GLushort; /* 2-byte unsigned */
184 typedef unsigned int GLuint; /* 4-byte unsigned */
185 typedef int GLsizei; /* 4-byte signed */
186 typedef float GLfloat; /* single precision float */
187 typedef float GLclampf; /* single precision float in [0,1] */
188 typedef double GLdouble; /* double precision float */
189 typedef double GLclampd; /* double precision float in [0,1] */
190
191
192
193 /*
194 * Constants
195 */
196
197 /* Boolean values */
198 #define GL_FALSE 0
199 #define GL_TRUE 1
200
201 /* Data types */
202 #define GL_BYTE 0x1400
203 #define GL_UNSIGNED_BYTE 0x1401
204 #define GL_SHORT 0x1402
205 #define GL_UNSIGNED_SHORT 0x1403
206 #define GL_INT 0x1404
207 #define GL_UNSIGNED_INT 0x1405
208 #define GL_FLOAT 0x1406
209 #define GL_2_BYTES 0x1407
210 #define GL_3_BYTES 0x1408
211 #define GL_4_BYTES 0x1409
212 #define GL_DOUBLE 0x140A
213
214 /* Primitives */
215 #define GL_POINTS 0x0000
216 #define GL_LINES 0x0001
217 #define GL_LINE_LOOP 0x0002
218 #define GL_LINE_STRIP 0x0003
219 #define GL_TRIANGLES 0x0004
220 #define GL_TRIANGLE_STRIP 0x0005
221 #define GL_TRIANGLE_FAN 0x0006
222 #define GL_QUADS 0x0007
223 #define GL_QUAD_STRIP 0x0008
224 #define GL_POLYGON 0x0009
225
226 /* Vertex Arrays */
227 #define GL_VERTEX_ARRAY 0x8074
228 #define GL_NORMAL_ARRAY 0x8075
229 #define GL_COLOR_ARRAY 0x8076
230 #define GL_INDEX_ARRAY 0x8077
231 #define GL_TEXTURE_COORD_ARRAY 0x8078
232 #define GL_EDGE_FLAG_ARRAY 0x8079
233 #define GL_VERTEX_ARRAY_SIZE 0x807A
234 #define GL_VERTEX_ARRAY_TYPE 0x807B
235 #define GL_VERTEX_ARRAY_STRIDE 0x807C
236 #define GL_NORMAL_ARRAY_TYPE 0x807E
237 #define GL_NORMAL_ARRAY_STRIDE 0x807F
238 #define GL_COLOR_ARRAY_SIZE 0x8081
239 #define GL_COLOR_ARRAY_TYPE 0x8082
240 #define GL_COLOR_ARRAY_STRIDE 0x8083
241 #define GL_INDEX_ARRAY_TYPE 0x8085
242 #define GL_INDEX_ARRAY_STRIDE 0x8086
243 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
244 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
245 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
246 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
247 #define GL_VERTEX_ARRAY_POINTER 0x808E
248 #define GL_NORMAL_ARRAY_POINTER 0x808F
249 #define GL_COLOR_ARRAY_POINTER 0x8090
250 #define GL_INDEX_ARRAY_POINTER 0x8091
251 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
252 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
253 #define GL_V2F 0x2A20
254 #define GL_V3F 0x2A21
255 #define GL_C4UB_V2F 0x2A22
256 #define GL_C4UB_V3F 0x2A23
257 #define GL_C3F_V3F 0x2A24
258 #define GL_N3F_V3F 0x2A25
259 #define GL_C4F_N3F_V3F 0x2A26
260 #define GL_T2F_V3F 0x2A27
261 #define GL_T4F_V4F 0x2A28
262 #define GL_T2F_C4UB_V3F 0x2A29
263 #define GL_T2F_C3F_V3F 0x2A2A
264 #define GL_T2F_N3F_V3F 0x2A2B
265 #define GL_T2F_C4F_N3F_V3F 0x2A2C
266 #define GL_T4F_C4F_N3F_V4F 0x2A2D
267
268 /* Matrix Mode */
269 #define GL_MATRIX_MODE 0x0BA0
270 #define GL_MODELVIEW 0x1700
271 #define GL_PROJECTION 0x1701
272 #define GL_TEXTURE 0x1702
273
274 /* Points */
275 #define GL_POINT_SMOOTH 0x0B10
276 #define GL_POINT_SIZE 0x0B11
277 #define GL_POINT_SIZE_GRANULARITY 0x0B13
278 #define GL_POINT_SIZE_RANGE 0x0B12
279
280 /* Lines */
281 #define GL_LINE_SMOOTH 0x0B20
282 #define GL_LINE_STIPPLE 0x0B24
283 #define GL_LINE_STIPPLE_PATTERN 0x0B25
284 #define GL_LINE_STIPPLE_REPEAT 0x0B26
285 #define GL_LINE_WIDTH 0x0B21
286 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
287 #define GL_LINE_WIDTH_RANGE 0x0B22
288
289 /* Polygons */
290 #define GL_POINT 0x1B00
291 #define GL_LINE 0x1B01
292 #define GL_FILL 0x1B02
293 #define GL_CW 0x0900
294 #define GL_CCW 0x0901
295 #define GL_FRONT 0x0404
296 #define GL_BACK 0x0405
297 #define GL_POLYGON_MODE 0x0B40
298 #define GL_POLYGON_SMOOTH 0x0B41
299 #define GL_POLYGON_STIPPLE 0x0B42
300 #define GL_EDGE_FLAG 0x0B43
301 #define GL_CULL_FACE 0x0B44
302 #define GL_CULL_FACE_MODE 0x0B45
303 #define GL_FRONT_FACE 0x0B46
304 #define GL_POLYGON_OFFSET_FACTOR 0x8038
305 #define GL_POLYGON_OFFSET_UNITS 0x2A00
306 #define GL_POLYGON_OFFSET_POINT 0x2A01
307 #define GL_POLYGON_OFFSET_LINE 0x2A02
308 #define GL_POLYGON_OFFSET_FILL 0x8037
309
310 /* Display Lists */
311 #define GL_COMPILE 0x1300
312 #define GL_COMPILE_AND_EXECUTE 0x1301
313 #define GL_LIST_BASE 0x0B32
314 #define GL_LIST_INDEX 0x0B33
315 #define GL_LIST_MODE 0x0B30
316
317 /* Depth buffer */
318 #define GL_NEVER 0x0200
319 #define GL_LESS 0x0201
320 #define GL_EQUAL 0x0202
321 #define GL_LEQUAL 0x0203
322 #define GL_GREATER 0x0204
323 #define GL_NOTEQUAL 0x0205
324 #define GL_GEQUAL 0x0206
325 #define GL_ALWAYS 0x0207
326 #define GL_DEPTH_TEST 0x0B71
327 #define GL_DEPTH_BITS 0x0D56
328 #define GL_DEPTH_CLEAR_VALUE 0x0B73
329 #define GL_DEPTH_FUNC 0x0B74
330 #define GL_DEPTH_RANGE 0x0B70
331 #define GL_DEPTH_WRITEMASK 0x0B72
332 #define GL_DEPTH_COMPONENT 0x1902
333
334 /* Lighting */
335 #define GL_LIGHTING 0x0B50
336 #define GL_LIGHT0 0x4000
337 #define GL_LIGHT1 0x4001
338 #define GL_LIGHT2 0x4002
339 #define GL_LIGHT3 0x4003
340 #define GL_LIGHT4 0x4004
341 #define GL_LIGHT5 0x4005
342 #define GL_LIGHT6 0x4006
343 #define GL_LIGHT7 0x4007
344 #define GL_SPOT_EXPONENT 0x1205
345 #define GL_SPOT_CUTOFF 0x1206
346 #define GL_CONSTANT_ATTENUATION 0x1207
347 #define GL_LINEAR_ATTENUATION 0x1208
348 #define GL_QUADRATIC_ATTENUATION 0x1209
349 #define GL_AMBIENT 0x1200
350 #define GL_DIFFUSE 0x1201
351 #define GL_SPECULAR 0x1202
352 #define GL_SHININESS 0x1601
353 #define GL_EMISSION 0x1600
354 #define GL_POSITION 0x1203
355 #define GL_SPOT_DIRECTION 0x1204
356 #define GL_AMBIENT_AND_DIFFUSE 0x1602
357 #define GL_COLOR_INDEXES 0x1603
358 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
359 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
360 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
361 #define GL_FRONT_AND_BACK 0x0408
362 #define GL_SHADE_MODEL 0x0B54
363 #define GL_FLAT 0x1D00
364 #define GL_SMOOTH 0x1D01
365 #define GL_COLOR_MATERIAL 0x0B57
366 #define GL_COLOR_MATERIAL_FACE 0x0B55
367 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
368 #define GL_NORMALIZE 0x0BA1
369
370 /* User clipping planes */
371 #define GL_CLIP_PLANE0 0x3000
372 #define GL_CLIP_PLANE1 0x3001
373 #define GL_CLIP_PLANE2 0x3002
374 #define GL_CLIP_PLANE3 0x3003
375 #define GL_CLIP_PLANE4 0x3004
376 #define GL_CLIP_PLANE5 0x3005
377
378 /* Accumulation buffer */
379 #define GL_ACCUM_RED_BITS 0x0D58
380 #define GL_ACCUM_GREEN_BITS 0x0D59
381 #define GL_ACCUM_BLUE_BITS 0x0D5A
382 #define GL_ACCUM_ALPHA_BITS 0x0D5B
383 #define GL_ACCUM_CLEAR_VALUE 0x0B80
384 #define GL_ACCUM 0x0100
385 #define GL_ADD 0x0104
386 #define GL_LOAD 0x0101
387 #define GL_MULT 0x0103
388 #define GL_RETURN 0x0102
389
390 /* Alpha testing */
391 #define GL_ALPHA_TEST 0x0BC0
392 #define GL_ALPHA_TEST_REF 0x0BC2
393 #define GL_ALPHA_TEST_FUNC 0x0BC1
394
395 /* Blending */
396 #define GL_BLEND 0x0BE2
397 #define GL_BLEND_SRC 0x0BE1
398 #define GL_BLEND_DST 0x0BE0
399 #define GL_ZERO 0
400 #define GL_ONE 1
401 #define GL_SRC_COLOR 0x0300
402 #define GL_ONE_MINUS_SRC_COLOR 0x0301
403 #define GL_SRC_ALPHA 0x0302
404 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
405 #define GL_DST_ALPHA 0x0304
406 #define GL_ONE_MINUS_DST_ALPHA 0x0305
407 #define GL_DST_COLOR 0x0306
408 #define GL_ONE_MINUS_DST_COLOR 0x0307
409 #define GL_SRC_ALPHA_SATURATE 0x0308
410
411 /* Render Mode */
412 #define GL_FEEDBACK 0x1C01
413 #define GL_RENDER 0x1C00
414 #define GL_SELECT 0x1C02
415
416 /* Feedback */
417 #define GL_2D 0x0600
418 #define GL_3D 0x0601
419 #define GL_3D_COLOR 0x0602
420 #define GL_3D_COLOR_TEXTURE 0x0603
421 #define GL_4D_COLOR_TEXTURE 0x0604
422 #define GL_POINT_TOKEN 0x0701
423 #define GL_LINE_TOKEN 0x0702
424 #define GL_LINE_RESET_TOKEN 0x0707
425 #define GL_POLYGON_TOKEN 0x0703
426 #define GL_BITMAP_TOKEN 0x0704
427 #define GL_DRAW_PIXEL_TOKEN 0x0705
428 #define GL_COPY_PIXEL_TOKEN 0x0706
429 #define GL_PASS_THROUGH_TOKEN 0x0700
430 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
431 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
432 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
433
434 /* Selection */
435 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
436 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
437
438 /* Fog */
439 #define GL_FOG 0x0B60
440 #define GL_FOG_MODE 0x0B65
441 #define GL_FOG_DENSITY 0x0B62
442 #define GL_FOG_COLOR 0x0B66
443 #define GL_FOG_INDEX 0x0B61
444 #define GL_FOG_START 0x0B63
445 #define GL_FOG_END 0x0B64
446 #define GL_LINEAR 0x2601
447 #define GL_EXP 0x0800
448 #define GL_EXP2 0x0801
449
450 /* Logic Ops */
451 #define GL_LOGIC_OP 0x0BF1
452 #define GL_INDEX_LOGIC_OP 0x0BF1
453 #define GL_COLOR_LOGIC_OP 0x0BF2
454 #define GL_LOGIC_OP_MODE 0x0BF0
455 #define GL_CLEAR 0x1500
456 #define GL_SET 0x150F
457 #define GL_COPY 0x1503
458 #define GL_COPY_INVERTED 0x150C
459 #define GL_NOOP 0x1505
460 #define GL_INVERT 0x150A
461 #define GL_AND 0x1501
462 #define GL_NAND 0x150E
463 #define GL_OR 0x1507
464 #define GL_NOR 0x1508
465 #define GL_XOR 0x1506
466 #define GL_EQUIV 0x1509
467 #define GL_AND_REVERSE 0x1502
468 #define GL_AND_INVERTED 0x1504
469 #define GL_OR_REVERSE 0x150B
470 #define GL_OR_INVERTED 0x150D
471
472 /* Stencil */
473 #define GL_STENCIL_BITS 0x0D57
474 #define GL_STENCIL_TEST 0x0B90
475 #define GL_STENCIL_CLEAR_VALUE 0x0B91
476 #define GL_STENCIL_FUNC 0x0B92
477 #define GL_STENCIL_VALUE_MASK 0x0B93
478 #define GL_STENCIL_FAIL 0x0B94
479 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
480 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
481 #define GL_STENCIL_REF 0x0B97
482 #define GL_STENCIL_WRITEMASK 0x0B98
483 #define GL_STENCIL_INDEX 0x1901
484 #define GL_KEEP 0x1E00
485 #define GL_REPLACE 0x1E01
486 #define GL_INCR 0x1E02
487 #define GL_DECR 0x1E03
488
489 /* Buffers, Pixel Drawing/Reading */
490 #define GL_NONE 0
491 #define GL_LEFT 0x0406
492 #define GL_RIGHT 0x0407
493 /*GL_FRONT 0x0404 */
494 /*GL_BACK 0x0405 */
495 /*GL_FRONT_AND_BACK 0x0408 */
496 #define GL_FRONT_LEFT 0x0400
497 #define GL_FRONT_RIGHT 0x0401
498 #define GL_BACK_LEFT 0x0402
499 #define GL_BACK_RIGHT 0x0403
500 #define GL_AUX0 0x0409
501 #define GL_AUX1 0x040A
502 #define GL_AUX2 0x040B
503 #define GL_AUX3 0x040C
504 #define GL_COLOR_INDEX 0x1900
505 #define GL_RED 0x1903
506 #define GL_GREEN 0x1904
507 #define GL_BLUE 0x1905
508 #define GL_ALPHA 0x1906
509 #define GL_LUMINANCE 0x1909
510 #define GL_LUMINANCE_ALPHA 0x190A
511 #define GL_ALPHA_BITS 0x0D55
512 #define GL_RED_BITS 0x0D52
513 #define GL_GREEN_BITS 0x0D53
514 #define GL_BLUE_BITS 0x0D54
515 #define GL_INDEX_BITS 0x0D51
516 #define GL_SUBPIXEL_BITS 0x0D50
517 #define GL_AUX_BUFFERS 0x0C00
518 #define GL_READ_BUFFER 0x0C02
519 #define GL_DRAW_BUFFER 0x0C01
520 #define GL_DOUBLEBUFFER 0x0C32
521 #define GL_STEREO 0x0C33
522 #define GL_BITMAP 0x1A00
523 #define GL_COLOR 0x1800
524 #define GL_DEPTH 0x1801
525 #define GL_STENCIL 0x1802
526 #define GL_DITHER 0x0BD0
527 #define GL_RGB 0x1907
528 #define GL_RGBA 0x1908
529
530 /* Implementation limits */
531 #define GL_MAX_LIST_NESTING 0x0B31
532 #define GL_MAX_EVAL_ORDER 0x0D30
533 #define GL_MAX_LIGHTS 0x0D31
534 #define GL_MAX_CLIP_PLANES 0x0D32
535 #define GL_MAX_TEXTURE_SIZE 0x0D33
536 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
537 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
538 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
539 #define GL_MAX_NAME_STACK_DEPTH 0x0D37
540 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
541 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
542 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
543 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
544
545 /* Gets */
546 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
547 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
548 #define GL_COLOR_CLEAR_VALUE 0x0C22
549 #define GL_COLOR_WRITEMASK 0x0C23
550 #define GL_CURRENT_INDEX 0x0B01
551 #define GL_CURRENT_COLOR 0x0B00
552 #define GL_CURRENT_NORMAL 0x0B02
553 #define GL_CURRENT_RASTER_COLOR 0x0B04
554 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
555 #define GL_CURRENT_RASTER_INDEX 0x0B05
556 #define GL_CURRENT_RASTER_POSITION 0x0B07
557 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
558 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
559 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
560 #define GL_INDEX_CLEAR_VALUE 0x0C20
561 #define GL_INDEX_MODE 0x0C30
562 #define GL_INDEX_WRITEMASK 0x0C21
563 #define GL_MODELVIEW_MATRIX 0x0BA6
564 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
565 #define GL_NAME_STACK_DEPTH 0x0D70
566 #define GL_PROJECTION_MATRIX 0x0BA7
567 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
568 #define GL_RENDER_MODE 0x0C40
569 #define GL_RGBA_MODE 0x0C31
570 #define GL_TEXTURE_MATRIX 0x0BA8
571 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
572 #define GL_VIEWPORT 0x0BA2
573
574 /* Evaluators */
575 #define GL_AUTO_NORMAL 0x0D80
576 #define GL_MAP1_COLOR_4 0x0D90
577 #define GL_MAP1_INDEX 0x0D91
578 #define GL_MAP1_NORMAL 0x0D92
579 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
580 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
581 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
582 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
583 #define GL_MAP1_VERTEX_3 0x0D97
584 #define GL_MAP1_VERTEX_4 0x0D98
585 #define GL_MAP2_COLOR_4 0x0DB0
586 #define GL_MAP2_INDEX 0x0DB1
587 #define GL_MAP2_NORMAL 0x0DB2
588 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
589 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
590 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
591 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
592 #define GL_MAP2_VERTEX_3 0x0DB7
593 #define GL_MAP2_VERTEX_4 0x0DB8
594 #define GL_MAP1_GRID_DOMAIN 0x0DD0
595 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
596 #define GL_MAP2_GRID_DOMAIN 0x0DD2
597 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
598 #define GL_COEFF 0x0A00
599 #define GL_ORDER 0x0A01
600 #define GL_DOMAIN 0x0A02
601
602 /* Hints */
603 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
604 #define GL_POINT_SMOOTH_HINT 0x0C51
605 #define GL_LINE_SMOOTH_HINT 0x0C52
606 #define GL_POLYGON_SMOOTH_HINT 0x0C53
607 #define GL_FOG_HINT 0x0C54
608 #define GL_DONT_CARE 0x1100
609 #define GL_FASTEST 0x1101
610 #define GL_NICEST 0x1102
611
612 /* Scissor box */
613 #define GL_SCISSOR_BOX 0x0C10
614 #define GL_SCISSOR_TEST 0x0C11
615
616 /* Pixel Mode / Transfer */
617 #define GL_MAP_COLOR 0x0D10
618 #define GL_MAP_STENCIL 0x0D11
619 #define GL_INDEX_SHIFT 0x0D12
620 #define GL_INDEX_OFFSET 0x0D13
621 #define GL_RED_SCALE 0x0D14
622 #define GL_RED_BIAS 0x0D15
623 #define GL_GREEN_SCALE 0x0D18
624 #define GL_GREEN_BIAS 0x0D19
625 #define GL_BLUE_SCALE 0x0D1A
626 #define GL_BLUE_BIAS 0x0D1B
627 #define GL_ALPHA_SCALE 0x0D1C
628 #define GL_ALPHA_BIAS 0x0D1D
629 #define GL_DEPTH_SCALE 0x0D1E
630 #define GL_DEPTH_BIAS 0x0D1F
631 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
632 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
633 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
634 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
635 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
636 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
637 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
638 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
639 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
640 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
641 #define GL_PIXEL_MAP_S_TO_S 0x0C71
642 #define GL_PIXEL_MAP_I_TO_I 0x0C70
643 #define GL_PIXEL_MAP_I_TO_R 0x0C72
644 #define GL_PIXEL_MAP_I_TO_G 0x0C73
645 #define GL_PIXEL_MAP_I_TO_B 0x0C74
646 #define GL_PIXEL_MAP_I_TO_A 0x0C75
647 #define GL_PIXEL_MAP_R_TO_R 0x0C76
648 #define GL_PIXEL_MAP_G_TO_G 0x0C77
649 #define GL_PIXEL_MAP_B_TO_B 0x0C78
650 #define GL_PIXEL_MAP_A_TO_A 0x0C79
651 #define GL_PACK_ALIGNMENT 0x0D05
652 #define GL_PACK_LSB_FIRST 0x0D01
653 #define GL_PACK_ROW_LENGTH 0x0D02
654 #define GL_PACK_SKIP_PIXELS 0x0D04
655 #define GL_PACK_SKIP_ROWS 0x0D03
656 #define GL_PACK_SWAP_BYTES 0x0D00
657 #define GL_UNPACK_ALIGNMENT 0x0CF5
658 #define GL_UNPACK_LSB_FIRST 0x0CF1
659 #define GL_UNPACK_ROW_LENGTH 0x0CF2
660 #define GL_UNPACK_SKIP_PIXELS 0x0CF4
661 #define GL_UNPACK_SKIP_ROWS 0x0CF3
662 #define GL_UNPACK_SWAP_BYTES 0x0CF0
663 #define GL_ZOOM_X 0x0D16
664 #define GL_ZOOM_Y 0x0D17
665
666 /* Texture mapping */
667 #define GL_TEXTURE_ENV 0x2300
668 #define GL_TEXTURE_ENV_MODE 0x2200
669 #define GL_TEXTURE_1D 0x0DE0
670 #define GL_TEXTURE_2D 0x0DE1
671 #define GL_TEXTURE_WRAP_S 0x2802
672 #define GL_TEXTURE_WRAP_T 0x2803
673 #define GL_TEXTURE_MAG_FILTER 0x2800
674 #define GL_TEXTURE_MIN_FILTER 0x2801
675 #define GL_TEXTURE_ENV_COLOR 0x2201
676 #define GL_TEXTURE_GEN_S 0x0C60
677 #define GL_TEXTURE_GEN_T 0x0C61
678 #define GL_TEXTURE_GEN_R 0x0C62
679 #define GL_TEXTURE_GEN_Q 0x0C63
680 #define GL_TEXTURE_GEN_MODE 0x2500
681 #define GL_TEXTURE_BORDER_COLOR 0x1004
682 #define GL_TEXTURE_WIDTH 0x1000
683 #define GL_TEXTURE_HEIGHT 0x1001
684 #define GL_TEXTURE_BORDER 0x1005
685 #define GL_TEXTURE_COMPONENTS 0x1003
686 #define GL_TEXTURE_RED_SIZE 0x805C
687 #define GL_TEXTURE_GREEN_SIZE 0x805D
688 #define GL_TEXTURE_BLUE_SIZE 0x805E
689 #define GL_TEXTURE_ALPHA_SIZE 0x805F
690 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
691 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
692 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
693 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
694 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
695 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
696 #define GL_OBJECT_LINEAR 0x2401
697 #define GL_OBJECT_PLANE 0x2501
698 #define GL_EYE_LINEAR 0x2400
699 #define GL_EYE_PLANE 0x2502
700 #define GL_SPHERE_MAP 0x2402
701 #define GL_DECAL 0x2101
702 #define GL_MODULATE 0x2100
703 #define GL_NEAREST 0x2600
704 #define GL_REPEAT 0x2901
705 #define GL_CLAMP 0x2900
706 #define GL_S 0x2000
707 #define GL_T 0x2001
708 #define GL_R 0x2002
709 #define GL_Q 0x2003
710
711 /* Utility */
712 #define GL_VENDOR 0x1F00
713 #define GL_RENDERER 0x1F01
714 #define GL_VERSION 0x1F02
715 #define GL_EXTENSIONS 0x1F03
716
717 /* Errors */
718 #define GL_NO_ERROR 0
719 #define GL_INVALID_ENUM 0x0500
720 #define GL_INVALID_VALUE 0x0501
721 #define GL_INVALID_OPERATION 0x0502
722 #define GL_STACK_OVERFLOW 0x0503
723 #define GL_STACK_UNDERFLOW 0x0504
724 #define GL_OUT_OF_MEMORY 0x0505
725
726 /* glPush/PopAttrib bits */
727 #define GL_CURRENT_BIT 0x00000001
728 #define GL_POINT_BIT 0x00000002
729 #define GL_LINE_BIT 0x00000004
730 #define GL_POLYGON_BIT 0x00000008
731 #define GL_POLYGON_STIPPLE_BIT 0x00000010
732 #define GL_PIXEL_MODE_BIT 0x00000020
733 #define GL_LIGHTING_BIT 0x00000040
734 #define GL_FOG_BIT 0x00000080
735 #define GL_DEPTH_BUFFER_BIT 0x00000100
736 #define GL_ACCUM_BUFFER_BIT 0x00000200
737 #define GL_STENCIL_BUFFER_BIT 0x00000400
738 #define GL_VIEWPORT_BIT 0x00000800
739 #define GL_TRANSFORM_BIT 0x00001000
740 #define GL_ENABLE_BIT 0x00002000
741 #define GL_COLOR_BUFFER_BIT 0x00004000
742 #define GL_HINT_BIT 0x00008000
743 #define GL_EVAL_BIT 0x00010000
744 #define GL_LIST_BIT 0x00020000
745 #define GL_TEXTURE_BIT 0x00040000
746 #define GL_SCISSOR_BIT 0x00080000
747 #define GL_ALL_ATTRIB_BITS 0x000FFFFF
748
749
750 /* OpenGL 1.1 */
751 #define GL_PROXY_TEXTURE_1D 0x8063
752 #define GL_PROXY_TEXTURE_2D 0x8064
753 #define GL_TEXTURE_PRIORITY 0x8066
754 #define GL_TEXTURE_RESIDENT 0x8067
755 #define GL_TEXTURE_BINDING_1D 0x8068
756 #define GL_TEXTURE_BINDING_2D 0x8069
757 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
758 #define GL_ALPHA4 0x803B
759 #define GL_ALPHA8 0x803C
760 #define GL_ALPHA12 0x803D
761 #define GL_ALPHA16 0x803E
762 #define GL_LUMINANCE4 0x803F
763 #define GL_LUMINANCE8 0x8040
764 #define GL_LUMINANCE12 0x8041
765 #define GL_LUMINANCE16 0x8042
766 #define GL_LUMINANCE4_ALPHA4 0x8043
767 #define GL_LUMINANCE6_ALPHA2 0x8044
768 #define GL_LUMINANCE8_ALPHA8 0x8045
769 #define GL_LUMINANCE12_ALPHA4 0x8046
770 #define GL_LUMINANCE12_ALPHA12 0x8047
771 #define GL_LUMINANCE16_ALPHA16 0x8048
772 #define GL_INTENSITY 0x8049
773 #define GL_INTENSITY4 0x804A
774 #define GL_INTENSITY8 0x804B
775 #define GL_INTENSITY12 0x804C
776 #define GL_INTENSITY16 0x804D
777 #define GL_R3_G3_B2 0x2A10
778 #define GL_RGB4 0x804F
779 #define GL_RGB5 0x8050
780 #define GL_RGB8 0x8051
781 #define GL_RGB10 0x8052
782 #define GL_RGB12 0x8053
783 #define GL_RGB16 0x8054
784 #define GL_RGBA2 0x8055
785 #define GL_RGBA4 0x8056
786 #define GL_RGB5_A1 0x8057
787 #define GL_RGBA8 0x8058
788 #define GL_RGB10_A2 0x8059
789 #define GL_RGBA12 0x805A
790 #define GL_RGBA16 0x805B
791 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
792 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
793 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
794 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
795
796
797
798 /*
799 * Miscellaneous
800 */
801
802 GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
803
804 GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
805
806 GLAPI void GLAPIENTRY glClear( GLbitfield mask );
807
808 GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
809
810 GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
811
812 GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
813
814 GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
815
816 GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
817
818 GLAPI void GLAPIENTRY glCullFace( GLenum mode );
819
820 GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
821
822 GLAPI void GLAPIENTRY glPointSize( GLfloat size );
823
824 GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
825
826 GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
827
828 GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
829
830 GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
831
832 GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
833
834 GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
835
836 GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
837
838 GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
839
840 GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
841
842 GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
843
844 GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
845
846 GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
847
848 GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
849
850 GLAPI void GLAPIENTRY glEnable( GLenum cap );
851
852 GLAPI void GLAPIENTRY glDisable( GLenum cap );
853
854 GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
855
856
857 GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
858
859 GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
860
861
862 GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
863
864 GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
865
866 GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
867
868 GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
869
870
871 GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
872
873 GLAPI void GLAPIENTRY glPopAttrib( void );
874
875
876 GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
877
878 GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
879
880
881 GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
882
883 GLAPI GLenum GLAPIENTRY glGetError( void );
884
885 GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
886
887 GLAPI void GLAPIENTRY glFinish( void );
888
889 GLAPI void GLAPIENTRY glFlush( void );
890
891 GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
892
893
894 /*
895 * Depth Buffer
896 */
897
898 GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
899
900 GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
901
902 GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
903
904 GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
905
906
907 /*
908 * Accumulation Buffer
909 */
910
911 GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
912
913 GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
914
915
916 /*
917 * Transformation
918 */
919
920 GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
921
922 GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
923 GLdouble bottom, GLdouble top,
924 GLdouble near_val, GLdouble far_val );
925
926 GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
927 GLdouble bottom, GLdouble top,
928 GLdouble near_val, GLdouble far_val );
929
930 GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
931 GLsizei width, GLsizei height );
932
933 GLAPI void GLAPIENTRY glPushMatrix( void );
934
935 GLAPI void GLAPIENTRY glPopMatrix( void );
936
937 GLAPI void GLAPIENTRY glLoadIdentity( void );
938
939 GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
940 GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
941
942 GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
943 GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
944
945 GLAPI void GLAPIENTRY glRotated( GLdouble angle,
946 GLdouble x, GLdouble y, GLdouble z );
947 GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
948 GLfloat x, GLfloat y, GLfloat z );
949
950 GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
951 GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
952
953 GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
954 GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
955
956
957 /*
958 * Display Lists
959 */
960
961 GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
962
963 GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
964
965 GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
966
967 GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
968
969 GLAPI void GLAPIENTRY glEndList( void );
970
971 GLAPI void GLAPIENTRY glCallList( GLuint list );
972
973 GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
974 const GLvoid *lists );
975
976 GLAPI void GLAPIENTRY glListBase( GLuint base );
977
978
979 /*
980 * Drawing Functions
981 */
982
983 GLAPI void GLAPIENTRY glBegin( GLenum mode );
984
985 GLAPI void GLAPIENTRY glEnd( void );
986
987
988 GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
989 GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
990 GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
991 GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
992
993 GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
994 GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
995 GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
996 GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
997
998 GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
999 GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1000 GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
1001 GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
1002
1003 GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
1004 GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
1005 GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
1006 GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
1007
1008 GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
1009 GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
1010 GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
1011 GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
1012
1013 GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
1014 GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
1015 GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
1016 GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
1017
1018
1019 GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
1020 GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
1021 GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
1022 GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
1023 GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
1024
1025 GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
1026 GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
1027 GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
1028 GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
1029 GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
1030
1031
1032 GLAPI void GLAPIENTRY glIndexd( GLdouble c );
1033 GLAPI void GLAPIENTRY glIndexf( GLfloat c );
1034 GLAPI void GLAPIENTRY glIndexi( GLint c );
1035 GLAPI void GLAPIENTRY glIndexs( GLshort c );
1036 GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
1037
1038 GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
1039 GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
1040 GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
1041 GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
1042 GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
1043
1044 GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
1045 GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
1046 GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
1047 GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
1048 GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
1049 GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
1050 GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
1051 GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
1052
1053 GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
1054 GLbyte blue, GLbyte alpha );
1055 GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
1056 GLdouble blue, GLdouble alpha );
1057 GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
1058 GLfloat blue, GLfloat alpha );
1059 GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
1060 GLint blue, GLint alpha );
1061 GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
1062 GLshort blue, GLshort alpha );
1063 GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
1064 GLubyte blue, GLubyte alpha );
1065 GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
1066 GLuint blue, GLuint alpha );
1067 GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
1068 GLushort blue, GLushort alpha );
1069
1070
1071 GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
1072 GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
1073 GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
1074 GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
1075 GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
1076 GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
1077 GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
1078 GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
1079
1080 GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
1081 GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
1082 GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
1083 GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
1084 GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
1085 GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
1086 GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
1087 GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
1088
1089
1090 GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
1091 GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
1092 GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
1093 GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
1094
1095 GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
1096 GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
1097 GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
1098 GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
1099
1100 GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
1101 GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
1102 GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
1103 GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
1104
1105 GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1106 GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1107 GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
1108 GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
1109
1110 GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
1111 GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
1112 GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
1113 GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
1114
1115 GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
1116 GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
1117 GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
1118 GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
1119
1120 GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
1121 GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
1122 GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
1123 GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
1124
1125 GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
1126 GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
1127 GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
1128 GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
1129
1130
1131 GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
1132 GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
1133 GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
1134 GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
1135
1136 GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
1137 GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
1138 GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
1139 GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
1140
1141 GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1142 GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1143 GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
1144 GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
1145
1146 GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
1147 GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
1148 GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
1149 GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
1150
1151 GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
1152 GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
1153 GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
1154 GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
1155
1156 GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
1157 GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
1158 GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
1159 GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
1160
1161
1162 GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1163 GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1164 GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
1165 GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1166
1167
1168 GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
1169 GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
1170 GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
1171 GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
1172
1173
1174 /*
1175 * Vertex Arrays (1.1)
1176 */
1177
1178 GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
1179 GLsizei stride, const GLvoid *ptr );
1180
1181 GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
1182 const GLvoid *ptr );
1183
1184 GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
1185 GLsizei stride, const GLvoid *ptr );
1186
1187 GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
1188 const GLvoid *ptr );
1189
1190 GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
1191 GLsizei stride, const GLvoid *ptr );
1192
1193 GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
1194
1195 GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
1196
1197 GLAPI void GLAPIENTRY glArrayElement( GLint i );
1198
1199 GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
1200
1201 GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
1202 GLenum type, const GLvoid *indices );
1203
1204 GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
1205 const GLvoid *pointer );
1206
1207 /*
1208 * Lighting
1209 */
1210
1211 GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
1212
1213 GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
1214 GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
1215 GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
1216 const GLfloat *params );
1217 GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
1218 const GLint *params );
1219
1220 GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
1221 GLfloat *params );
1222 GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
1223 GLint *params );
1224
1225 GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
1226 GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
1227 GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
1228 GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
1229
1230 GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
1231 GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
1232 GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
1233 GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
1234
1235 GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
1236 GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
1237
1238 GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
1239
1240
1241 /*
1242 * Raster functions
1243 */
1244
1245 GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
1246
1247 GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
1248 GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
1249
1250 GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
1251 GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
1252
1253 GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
1254 const GLfloat *values );
1255 GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
1256 const GLuint *values );
1257 GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
1258 const GLushort *values );
1259
1260 GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
1261 GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
1262 GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
1263
1264 GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
1265 GLfloat xorig, GLfloat yorig,
1266 GLfloat xmove, GLfloat ymove,
1267 const GLubyte *bitmap );
1268
1269 GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
1270 GLsizei width, GLsizei height,
1271 GLenum format, GLenum type,
1272 GLvoid *pixels );
1273
1274 GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
1275 GLenum format, GLenum type,
1276 const GLvoid *pixels );
1277
1278 GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
1279 GLsizei width, GLsizei height,
1280 GLenum type );
1281
1282 /*
1283 * Stenciling
1284 */
1285
1286 GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
1287
1288 GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
1289
1290 GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
1291
1292 GLAPI void GLAPIENTRY glClearStencil( GLint s );
1293
1294
1295
1296 /*
1297 * Texture mapping
1298 */
1299
1300 GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
1301 GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
1302 GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
1303
1304 GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
1305 GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
1306 GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
1307
1308 GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
1309 GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
1310 GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
1311
1312
1313 GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
1314 GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
1315
1316 GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
1317 GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
1318
1319 GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
1320 GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
1321
1322
1323 GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
1324 GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
1325
1326 GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
1327 const GLfloat *params );
1328 GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
1329 const GLint *params );
1330
1331 GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
1332 GLenum pname, GLfloat *params);
1333 GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
1334 GLenum pname, GLint *params );
1335
1336 GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
1337 GLenum pname, GLfloat *params );
1338 GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
1339 GLenum pname, GLint *params );
1340
1341
1342 GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
1343 GLint internalFormat,
1344 GLsizei width, GLint border,
1345 GLenum format, GLenum type,
1346 const GLvoid *pixels );
1347
1348 GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
1349 GLint internalFormat,
1350 GLsizei width, GLsizei height,
1351 GLint border, GLenum format, GLenum type,
1352 const GLvoid *pixels );
1353
1354 GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
1355 GLenum format, GLenum type,
1356 GLvoid *pixels );
1357
1358
1359 /* 1.1 functions */
1360
1361 GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
1362
1363 GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
1364
1365 GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
1366
1367 GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
1368 const GLuint *textures,
1369 const GLclampf *priorities );
1370
1371 GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
1372 const GLuint *textures,
1373 GLboolean *residences );
1374
1375 GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
1376
1377
1378 GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
1379 GLint xoffset,
1380 GLsizei width, GLenum format,
1381 GLenum type, const GLvoid *pixels );
1382
1383
1384 GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
1385 GLint xoffset, GLint yoffset,
1386 GLsizei width, GLsizei height,
1387 GLenum format, GLenum type,
1388 const GLvoid *pixels );
1389
1390
1391 GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
1392 GLenum internalformat,
1393 GLint x, GLint y,
1394 GLsizei width, GLint border );
1395
1396
1397 GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
1398 GLenum internalformat,
1399 GLint x, GLint y,
1400 GLsizei width, GLsizei height,
1401 GLint border );
1402
1403
1404 GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
1405 GLint xoffset, GLint x, GLint y,
1406 GLsizei width );
1407
1408
1409 GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
1410 GLint xoffset, GLint yoffset,
1411 GLint x, GLint y,
1412 GLsizei width, GLsizei height );
1413
1414
1415 /*
1416 * Evaluators
1417 */
1418
1419 GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
1420 GLint stride,
1421 GLint order, const GLdouble *points );
1422 GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
1423 GLint stride,
1424 GLint order, const GLfloat *points );
1425
1426 GLAPI void GLAPIENTRY glMap2d( GLenum target,
1427 GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
1428 GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
1429 const GLdouble *points );
1430 GLAPI void GLAPIENTRY glMap2f( GLenum target,
1431 GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
1432 GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
1433 const GLfloat *points );
1434
1435 GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
1436 GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
1437 GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
1438
1439 GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
1440 GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
1441
1442 GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
1443 GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
1444
1445 GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
1446 GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
1447
1448 GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
1449 GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
1450
1451 GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
1452 GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
1453
1454 GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
1455 GLint vn, GLdouble v1, GLdouble v2 );
1456 GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
1457 GLint vn, GLfloat v1, GLfloat v2 );
1458
1459 GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
1460
1461 GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
1462
1463 GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
1464
1465 GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1466
1467
1468 /*
1469 * Fog
1470 */
1471
1472 GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
1473
1474 GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
1475
1476 GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
1477
1478 GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
1479
1480
1481 /*
1482 * Selection and Feedback
1483 */
1484
1485 GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
1486
1487 GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
1488
1489 GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
1490
1491 GLAPI void GLAPIENTRY glInitNames( void );
1492
1493 GLAPI void GLAPIENTRY glLoadName( GLuint name );
1494
1495 GLAPI void GLAPIENTRY glPushName( GLuint name );
1496
1497 GLAPI void GLAPIENTRY glPopName( void );
1498
1499
1500
1501 /*
1502 * OpenGL 1.2
1503 */
1504
1505 #define GL_RESCALE_NORMAL 0x803A
1506 #define GL_CLAMP_TO_EDGE 0x812F
1507 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
1508 #define GL_MAX_ELEMENTS_INDICES 0x80E9
1509 #define GL_BGR 0x80E0
1510 #define GL_BGRA 0x80E1
1511 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
1512 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
1513 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
1514 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
1515 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
1516 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
1517 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
1518 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
1519 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
1520 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
1521 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
1522 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
1523 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
1524 #define GL_SINGLE_COLOR 0x81F9
1525 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
1526 #define GL_TEXTURE_MIN_LOD 0x813A
1527 #define GL_TEXTURE_MAX_LOD 0x813B
1528 #define GL_TEXTURE_BASE_LEVEL 0x813C
1529 #define GL_TEXTURE_MAX_LEVEL 0x813D
1530 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
1531 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
1532 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
1533 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
1534 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1535 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1536 #define GL_PACK_SKIP_IMAGES 0x806B
1537 #define GL_PACK_IMAGE_HEIGHT 0x806C
1538 #define GL_UNPACK_SKIP_IMAGES 0x806D
1539 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
1540 #define GL_TEXTURE_3D 0x806F
1541 #define GL_PROXY_TEXTURE_3D 0x8070
1542 #define GL_TEXTURE_DEPTH 0x8071
1543 #define GL_TEXTURE_WRAP_R 0x8072
1544 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
1545 #define GL_TEXTURE_BINDING_3D 0x806A
1546
1547 GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
1548 GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
1549
1550 GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
1551 GLint internalFormat,
1552 GLsizei width, GLsizei height,
1553 GLsizei depth, GLint border,
1554 GLenum format, GLenum type,
1555 const GLvoid *pixels );
1556
1557 GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
1558 GLint xoffset, GLint yoffset,
1559 GLint zoffset, GLsizei width,
1560 GLsizei height, GLsizei depth,
1561 GLenum format,
1562 GLenum type, const GLvoid *pixels);
1563
1564 GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
1565 GLint xoffset, GLint yoffset,
1566 GLint zoffset, GLint x,
1567 GLint y, GLsizei width,
1568 GLsizei height );
1569
1570 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
1571 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
1572 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
1573 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1574
1575
1576 /*
1577 * GL_ARB_imaging
1578 */
1579
1580 #define GL_CONSTANT_COLOR 0x8001
1581 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1582 #define GL_CONSTANT_ALPHA 0x8003
1583 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1584 #define GL_COLOR_TABLE 0x80D0
1585 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
1586 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
1587 #define GL_PROXY_COLOR_TABLE 0x80D3
1588 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
1589 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
1590 #define GL_COLOR_TABLE_SCALE 0x80D6
1591 #define GL_COLOR_TABLE_BIAS 0x80D7
1592 #define GL_COLOR_TABLE_FORMAT 0x80D8
1593 #define GL_COLOR_TABLE_WIDTH 0x80D9
1594 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
1595 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
1596 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
1597 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
1598 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
1599 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
1600 #define GL_CONVOLUTION_1D 0x8010
1601 #define GL_CONVOLUTION_2D 0x8011
1602 #define GL_SEPARABLE_2D 0x8012
1603 #define GL_CONVOLUTION_BORDER_MODE 0x8013
1604 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
1605 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
1606 #define GL_REDUCE 0x8016
1607 #define GL_CONVOLUTION_FORMAT 0x8017
1608 #define GL_CONVOLUTION_WIDTH 0x8018
1609 #define GL_CONVOLUTION_HEIGHT 0x8019
1610 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
1611 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
1612 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
1613 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
1614 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
1615 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
1616 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
1617 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
1618 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
1619 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
1620 #define GL_CONSTANT_BORDER 0x8151
1621 #define GL_REPLICATE_BORDER 0x8153
1622 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
1623 #define GL_COLOR_MATRIX 0x80B1
1624 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
1625 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
1626 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
1627 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
1628 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
1629 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
1630 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
1631 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
1632 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
1633 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
1634 #define GL_HISTOGRAM 0x8024
1635 #define GL_PROXY_HISTOGRAM 0x8025
1636 #define GL_HISTOGRAM_WIDTH 0x8026
1637 #define GL_HISTOGRAM_FORMAT 0x8027
1638 #define GL_HISTOGRAM_RED_SIZE 0x8028
1639 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
1640 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
1641 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
1642 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
1643 #define GL_HISTOGRAM_SINK 0x802D
1644 #define GL_MINMAX 0x802E
1645 #define GL_MINMAX_FORMAT 0x802F
1646 #define GL_MINMAX_SINK 0x8030
1647 #define GL_TABLE_TOO_LARGE 0x8031
1648 #define GL_BLEND_EQUATION 0x8009
1649 #define GL_MIN 0x8007
1650 #define GL_MAX 0x8008
1651 #define GL_FUNC_ADD 0x8006
1652 #define GL_FUNC_SUBTRACT 0x800A
1653 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1654 #define GL_BLEND_COLOR 0x8005
1655
1656
1657 GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
1658 GLsizei width, GLenum format,
1659 GLenum type, const GLvoid *table );
1660
1661 GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
1662 GLsizei start, GLsizei count,
1663 GLenum format, GLenum type,
1664 const GLvoid *data );
1665
1666 GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
1667 const GLint *params);
1668
1669 GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
1670 const GLfloat *params);
1671
1672 GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
1673 GLint x, GLint y, GLsizei width );
1674
1675 GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
1676 GLint x, GLint y, GLsizei width );
1677
1678 GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
1679 GLenum type, GLvoid *table );
1680
1681 GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
1682 GLfloat *params );
1683
1684 GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
1685 GLint *params );
1686
1687 GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
1688
1689 GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
1690 GLclampf blue, GLclampf alpha );
1691
1692 GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
1693 GLenum internalformat, GLboolean sink );
1694
1695 GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
1696
1697 GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
1698 GLenum format, GLenum type,
1699 GLvoid *values );
1700
1701 GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
1702 GLfloat *params );
1703
1704 GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
1705 GLint *params );
1706
1707 GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
1708 GLboolean sink );
1709
1710 GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
1711
1712 GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
1713 GLenum format, GLenum types,
1714 GLvoid *values );
1715
1716 GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
1717 GLfloat *params );
1718
1719 GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
1720 GLint *params );
1721
1722 GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
1723 GLenum internalformat, GLsizei width, GLenum format, GLenum type,
1724 const GLvoid *image );
1725
1726 GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
1727 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1728 GLenum type, const GLvoid *image );
1729
1730 GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
1731 GLfloat params );
1732
1733 GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
1734 const GLfloat *params );
1735
1736 GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
1737 GLint params );
1738
1739 GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
1740 const GLint *params );
1741
1742 GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
1743 GLenum internalformat, GLint x, GLint y, GLsizei width );
1744
1745 GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
1746 GLenum internalformat, GLint x, GLint y, GLsizei width,
1747 GLsizei height);
1748
1749 GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
1750 GLenum type, GLvoid *image );
1751
1752 GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
1753 GLfloat *params );
1754
1755 GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
1756 GLint *params );
1757
1758 GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
1759 GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
1760 GLenum type, const GLvoid *row, const GLvoid *column );
1761
1762 GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
1763 GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
1764
1765
1766
1767
1768 /*
1769 * OpenGL 1.3
1770 */
1771
1772 /* multitexture */
1773 #define GL_TEXTURE0 0x84C0
1774 #define GL_TEXTURE1 0x84C1
1775 #define GL_TEXTURE2 0x84C2
1776 #define GL_TEXTURE3 0x84C3
1777 #define GL_TEXTURE4 0x84C4
1778 #define GL_TEXTURE5 0x84C5
1779 #define GL_TEXTURE6 0x84C6
1780 #define GL_TEXTURE7 0x84C7
1781 #define GL_TEXTURE8 0x84C8
1782 #define GL_TEXTURE9 0x84C9
1783 #define GL_TEXTURE10 0x84CA
1784 #define GL_TEXTURE11 0x84CB
1785 #define GL_TEXTURE12 0x84CC
1786 #define GL_TEXTURE13 0x84CD
1787 #define GL_TEXTURE14 0x84CE
1788 #define GL_TEXTURE15 0x84CF
1789 #define GL_TEXTURE16 0x84D0
1790 #define GL_TEXTURE17 0x84D1
1791 #define GL_TEXTURE18 0x84D2
1792 #define GL_TEXTURE19 0x84D3
1793 #define GL_TEXTURE20 0x84D4
1794 #define GL_TEXTURE21 0x84D5
1795 #define GL_TEXTURE22 0x84D6
1796 #define GL_TEXTURE23 0x84D7
1797 #define GL_TEXTURE24 0x84D8
1798 #define GL_TEXTURE25 0x84D9
1799 #define GL_TEXTURE26 0x84DA
1800 #define GL_TEXTURE27 0x84DB
1801 #define GL_TEXTURE28 0x84DC
1802 #define GL_TEXTURE29 0x84DD
1803 #define GL_TEXTURE30 0x84DE
1804 #define GL_TEXTURE31 0x84DF
1805 #define GL_ACTIVE_TEXTURE 0x84E0
1806 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
1807 #define GL_MAX_TEXTURE_UNITS 0x84E2
1808 /* texture_cube_map */
1809 #define GL_NORMAL_MAP 0x8511
1810 #define GL_REFLECTION_MAP 0x8512
1811 #define GL_TEXTURE_CUBE_MAP 0x8513
1812 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
1813 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
1814 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
1815 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
1816 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
1817 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
1818 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
1819 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
1820 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1821 /* texture_compression */
1822 #define GL_COMPRESSED_ALPHA 0x84E9
1823 #define GL_COMPRESSED_LUMINANCE 0x84EA
1824 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
1825 #define GL_COMPRESSED_INTENSITY 0x84EC
1826 #define GL_COMPRESSED_RGB 0x84ED
1827 #define GL_COMPRESSED_RGBA 0x84EE
1828 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
1829 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
1830 #define GL_TEXTURE_COMPRESSED 0x86A1
1831 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1832 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1833 /* multisample */
1834 #define GL_MULTISAMPLE 0x809D
1835 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1836 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
1837 #define GL_SAMPLE_COVERAGE 0x80A0
1838 #define GL_SAMPLE_BUFFERS 0x80A8
1839 #define GL_SAMPLES 0x80A9
1840 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1841 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1842 #define GL_MULTISAMPLE_BIT 0x20000000
1843 /* transpose_matrix */
1844 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
1845 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
1846 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
1847 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
1848 /* texture_env_combine */
1849 #define GL_COMBINE 0x8570
1850 #define GL_COMBINE_RGB 0x8571
1851 #define GL_COMBINE_ALPHA 0x8572
1852 #define GL_SOURCE0_RGB 0x8580
1853 #define GL_SOURCE1_RGB 0x8581
1854 #define GL_SOURCE2_RGB 0x8582
1855 #define GL_SOURCE0_ALPHA 0x8588
1856 #define GL_SOURCE1_ALPHA 0x8589
1857 #define GL_SOURCE2_ALPHA 0x858A
1858 #define GL_OPERAND0_RGB 0x8590
1859 #define GL_OPERAND1_RGB 0x8591
1860 #define GL_OPERAND2_RGB 0x8592
1861 #define GL_OPERAND0_ALPHA 0x8598
1862 #define GL_OPERAND1_ALPHA 0x8599
1863 #define GL_OPERAND2_ALPHA 0x859A
1864 #define GL_RGB_SCALE 0x8573
1865 #define GL_ADD_SIGNED 0x8574
1866 #define GL_INTERPOLATE 0x8575
1867 #define GL_SUBTRACT 0x84E7
1868 #define GL_CONSTANT 0x8576
1869 #define GL_PRIMARY_COLOR 0x8577
1870 #define GL_PREVIOUS 0x8578
1871 /* texture_env_dot3 */
1872 #define GL_DOT3_RGB 0x86AE
1873 #define GL_DOT3_RGBA 0x86AF
1874 /* texture_border_clamp */
1875 #define GL_CLAMP_TO_BORDER 0x812D
1876
1877 GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
1878
1879 GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
1880
1881 GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
1882
1883 GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
1884
1885 GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
1886
1887 GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
1888
1889 GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
1890
1891 GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
1892
1893 GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
1894
1895 GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
1896
1897 GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
1898
1899 GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
1900
1901 GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
1902
1903 GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
1904
1905 GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
1906
1907 GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
1908
1909 GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
1910
1911 GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
1912
1913 GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
1914
1915 GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
1916
1917 GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
1918
1919 GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
1920
1921 GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
1922
1923 GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
1924
1925 GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
1926
1927 GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
1928
1929 GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
1930
1931 GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
1932
1933 GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
1934
1935 GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
1936
1937 GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
1938
1939 GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
1940
1941 GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
1942
1943 GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1944
1945 GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
1946
1947 GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1948
1949 GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
1950
1951 GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
1952
1953 GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
1954
1955 GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
1956
1957 GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
1958
1959
1960 GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
1961
1962 GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
1963
1964 GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
1965
1966 GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
1967
1968 GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
1969
1970
1971 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
1972 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
1973 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
1974 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
1975 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
1976 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
1977 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
1978 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
1979 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
1980
1981
1982
1983 /*
1984 * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
1985 */
1986 #ifndef GL_ARB_multitexture
1987 #define GL_ARB_multitexture 1
1988
1989 #define GL_TEXTURE0_ARB 0x84C0
1990 #define GL_TEXTURE1_ARB 0x84C1
1991 #define GL_TEXTURE2_ARB 0x84C2
1992 #define GL_TEXTURE3_ARB 0x84C3
1993 #define GL_TEXTURE4_ARB 0x84C4
1994 #define GL_TEXTURE5_ARB 0x84C5
1995 #define GL_TEXTURE6_ARB 0x84C6
1996 #define GL_TEXTURE7_ARB 0x84C7
1997 #define GL_TEXTURE8_ARB 0x84C8
1998 #define GL_TEXTURE9_ARB 0x84C9
1999 #define GL_TEXTURE10_ARB 0x84CA
2000 #define GL_TEXTURE11_ARB 0x84CB
2001 #define GL_TEXTURE12_ARB 0x84CC
2002 #define GL_TEXTURE13_ARB 0x84CD
2003 #define GL_TEXTURE14_ARB 0x84CE
2004 #define GL_TEXTURE15_ARB 0x84CF
2005 #define GL_TEXTURE16_ARB 0x84D0
2006 #define GL_TEXTURE17_ARB 0x84D1
2007 #define GL_TEXTURE18_ARB 0x84D2
2008 #define GL_TEXTURE19_ARB 0x84D3
2009 #define GL_TEXTURE20_ARB 0x84D4
2010 #define GL_TEXTURE21_ARB 0x84D5
2011 #define GL_TEXTURE22_ARB 0x84D6
2012 #define GL_TEXTURE23_ARB 0x84D7
2013 #define GL_TEXTURE24_ARB 0x84D8
2014 #define GL_TEXTURE25_ARB 0x84D9
2015 #define GL_TEXTURE26_ARB 0x84DA
2016 #define GL_TEXTURE27_ARB 0x84DB
2017 #define GL_TEXTURE28_ARB 0x84DC
2018 #define GL_TEXTURE29_ARB 0x84DD
2019 #define GL_TEXTURE30_ARB 0x84DE
2020 #define GL_TEXTURE31_ARB 0x84DF
2021 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
2022 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
2023 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
2024
2025 GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
2026 GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
2027 GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
2028 GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
2029 GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
2030 GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
2031 GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
2032 GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
2033 GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
2034 GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
2035 GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
2036 GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
2037 GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
2038 GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
2039 GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
2040 GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
2041 GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
2042 GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
2043 GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
2044 GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
2045 GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
2046 GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
2047 GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
2048 GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
2049 GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
2050 GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
2051 GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2052 GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
2053 GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2054 GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
2055 GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
2056 GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
2057 GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2058 GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
2059
2060 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
2061 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
2062 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
2063 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
2064 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
2065 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
2066 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
2067 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
2068 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
2069 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
2070 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
2071 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
2072 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
2073 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
2074 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
2075 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
2076 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
2077 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
2078 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
2079 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
2080 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
2081 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
2082 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
2083 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
2084 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
2085 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
2086 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
2087 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
2088 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
2089 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
2090 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
2091 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
2092 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
2093 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
2094
2095 #endif /* GL_ARB_multitexture */
2096
2097
2098
2099 /*
2100 * Define this token if you want "old-style" header file behaviour (extensions
2101 * defined in gl.h). Otherwise, extensions will be included from glext.h.
2102 */
2103 #if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
2104 #include <SDL2/SDL_opengl_glext.h>
2105 #endif /* GL_GLEXT_LEGACY */
2106
2107
2108
2109 /*
2110 * ???. GL_MESA_packed_depth_stencil
2111 * XXX obsolete
2112 */
2113 #ifndef GL_MESA_packed_depth_stencil
2114 #define GL_MESA_packed_depth_stencil 1
2115
2116 #define GL_DEPTH_STENCIL_MESA 0x8750
2117 #define GL_UNSIGNED_INT_24_8_MESA 0x8751
2118 #define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
2119 #define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
2120 #define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
2121
2122 #endif /* GL_MESA_packed_depth_stencil */
2123
2124
2125 #ifndef GL_ATI_blend_equation_separate
2126 #define GL_ATI_blend_equation_separate 1
2127
2128 #define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
2129
2130 GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
2131 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
2132
2133 #endif /* GL_ATI_blend_equation_separate */
2134
2135
2136 /* GL_OES_EGL_image */
2137 #ifndef GL_OES_EGL_image
2138 typedef void* GLeglImageOES;
2139 #endif
2140
2141 #ifndef GL_OES_EGL_image
2142 #define GL_OES_EGL_image 1
2143 #ifdef GL_GLEXT_PROTOTYPES
2144 GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
2145 GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
2146 #endif
2147 typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
2148 typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
2149 #endif
2150
2151
2152 /**
2153 ** NOTE!!!!! If you add new functions to this file, or update
2154 ** glext.h be sure to regenerate the gl_mangle.h file. See comments
2155 ** in that file for details.
2156 **/
2157
2158
2159
2160 /**********************************************************************
2161 * Begin system-specific stuff
2162 */
2163 #if defined(PRAGMA_EXPORT_SUPPORTED)
2164 #pragma export off
2165 #endif
2166
2167 /*
2168 * End system-specific stuff
2169 **********************************************************************/
2170
2171
2172 #ifdef __cplusplus
2173 }
2174 #endif
2175
2176 #endif /* __gl_h_ */
2177
2178 #endif /* !__IPHONEOS__ */
2179
2180 #endif /* SDL_opengl_h_ */
2181
2182 /* vi: set ts=4 sw=4 expandtab: */
0 #ifndef __glext_h_
1 #define __glext_h_ 1
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 /*
8 ** Copyright (c) 2013-2014 The Khronos Group Inc.
9 **
10 ** Permission is hereby granted, free of charge, to any person obtaining a
11 ** copy of this software and/or associated documentation files (the
12 ** "Materials"), to deal in the Materials without restriction, including
13 ** without limitation the rights to use, copy, modify, merge, publish,
14 ** distribute, sublicense, and/or sell copies of the Materials, and to
15 ** permit persons to whom the Materials are furnished to do so, subject to
16 ** the following conditions:
17 **
18 ** The above copyright notice and this permission notice shall be included
19 ** in all copies or substantial portions of the Materials.
20 **
21 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28 */
29 /*
30 ** This header is generated from the Khronos OpenGL / OpenGL ES XML
31 ** API Registry. The current version of the Registry, generator scripts
32 ** used to make the header, and the header can be found at
33 ** http://www.opengl.org/registry/
34 **
35 ** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $
36 */
37
38 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
39 #ifndef WIN32_LEAN_AND_MEAN
40 #define WIN32_LEAN_AND_MEAN 1
41 #endif
42 #ifndef NOMINMAX /* don't define min() and max(). */
43 #define NOMINMAX
44 #endif
45 #include <windows.h>
46 #endif
47
48 #ifndef APIENTRY
49 #define APIENTRY
50 #endif
51 #ifndef APIENTRYP
52 #define APIENTRYP APIENTRY *
53 #endif
54 #ifndef GLAPI
55 #define GLAPI extern
56 #endif
57
58 #define GL_GLEXT_VERSION 20140521
59
60 /* Generated C header for:
61 * API: gl
62 * Profile: compatibility
63 * Versions considered: .*
64 * Versions emitted: 1\.[2-9]|[234]\.[0-9]
65 * Default extensions included: gl
66 * Additional extensions included: _nomatch_^
67 * Extensions removed: _nomatch_^
68 */
69
70 #ifndef GL_VERSION_1_2
71 #define GL_VERSION_1_2 1
72 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
73 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
74 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
75 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
76 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
77 #define GL_TEXTURE_BINDING_3D 0x806A
78 #define GL_PACK_SKIP_IMAGES 0x806B
79 #define GL_PACK_IMAGE_HEIGHT 0x806C
80 #define GL_UNPACK_SKIP_IMAGES 0x806D
81 #define GL_UNPACK_IMAGE_HEIGHT 0x806E
82 #define GL_TEXTURE_3D 0x806F
83 #define GL_PROXY_TEXTURE_3D 0x8070
84 #define GL_TEXTURE_DEPTH 0x8071
85 #define GL_TEXTURE_WRAP_R 0x8072
86 #define GL_MAX_3D_TEXTURE_SIZE 0x8073
87 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
88 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
89 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
90 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
91 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
92 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
93 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
94 #define GL_BGR 0x80E0
95 #define GL_BGRA 0x80E1
96 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
97 #define GL_MAX_ELEMENTS_INDICES 0x80E9
98 #define GL_CLAMP_TO_EDGE 0x812F
99 #define GL_TEXTURE_MIN_LOD 0x813A
100 #define GL_TEXTURE_MAX_LOD 0x813B
101 #define GL_TEXTURE_BASE_LEVEL 0x813C
102 #define GL_TEXTURE_MAX_LEVEL 0x813D
103 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
104 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
105 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
106 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
107 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
108 #define GL_RESCALE_NORMAL 0x803A
109 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
110 #define GL_SINGLE_COLOR 0x81F9
111 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA
112 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
113 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
114 typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
115 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
116 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
117 #ifdef GL_GLEXT_PROTOTYPES
118 GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
119 GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
120 GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
121 GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
122 #endif
123 #endif /* GL_VERSION_1_2 */
124
125 #ifndef GL_VERSION_1_3
126 #define GL_VERSION_1_3 1
127 #define GL_TEXTURE0 0x84C0
128 #define GL_TEXTURE1 0x84C1
129 #define GL_TEXTURE2 0x84C2
130 #define GL_TEXTURE3 0x84C3
131 #define GL_TEXTURE4 0x84C4
132 #define GL_TEXTURE5 0x84C5
133 #define GL_TEXTURE6 0x84C6
134 #define GL_TEXTURE7 0x84C7
135 #define GL_TEXTURE8 0x84C8
136 #define GL_TEXTURE9 0x84C9
137 #define GL_TEXTURE10 0x84CA
138 #define GL_TEXTURE11 0x84CB
139 #define GL_TEXTURE12 0x84CC
140 #define GL_TEXTURE13 0x84CD
141 #define GL_TEXTURE14 0x84CE
142 #define GL_TEXTURE15 0x84CF
143 #define GL_TEXTURE16 0x84D0
144 #define GL_TEXTURE17 0x84D1
145 #define GL_TEXTURE18 0x84D2
146 #define GL_TEXTURE19 0x84D3
147 #define GL_TEXTURE20 0x84D4
148 #define GL_TEXTURE21 0x84D5
149 #define GL_TEXTURE22 0x84D6
150 #define GL_TEXTURE23 0x84D7
151 #define GL_TEXTURE24 0x84D8
152 #define GL_TEXTURE25 0x84D9
153 #define GL_TEXTURE26 0x84DA
154 #define GL_TEXTURE27 0x84DB
155 #define GL_TEXTURE28 0x84DC
156 #define GL_TEXTURE29 0x84DD
157 #define GL_TEXTURE30 0x84DE
158 #define GL_TEXTURE31 0x84DF
159 #define GL_ACTIVE_TEXTURE 0x84E0
160 #define GL_MULTISAMPLE 0x809D
161 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
162 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
163 #define GL_SAMPLE_COVERAGE 0x80A0
164 #define GL_SAMPLE_BUFFERS 0x80A8
165 #define GL_SAMPLES 0x80A9
166 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
167 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
168 #define GL_TEXTURE_CUBE_MAP 0x8513
169 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
170 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
171 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
172 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
173 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
174 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
175 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
176 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
177 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
178 #define GL_COMPRESSED_RGB 0x84ED
179 #define GL_COMPRESSED_RGBA 0x84EE
180 #define GL_TEXTURE_COMPRESSION_HINT 0x84EF
181 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
182 #define GL_TEXTURE_COMPRESSED 0x86A1
183 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
184 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
185 #define GL_CLAMP_TO_BORDER 0x812D
186 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
187 #define GL_MAX_TEXTURE_UNITS 0x84E2
188 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
189 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
190 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
191 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
192 #define GL_MULTISAMPLE_BIT 0x20000000
193 #define GL_NORMAL_MAP 0x8511
194 #define GL_REFLECTION_MAP 0x8512
195 #define GL_COMPRESSED_ALPHA 0x84E9
196 #define GL_COMPRESSED_LUMINANCE 0x84EA
197 #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
198 #define GL_COMPRESSED_INTENSITY 0x84EC
199 #define GL_COMBINE 0x8570
200 #define GL_COMBINE_RGB 0x8571
201 #define GL_COMBINE_ALPHA 0x8572
202 #define GL_SOURCE0_RGB 0x8580
203 #define GL_SOURCE1_RGB 0x8581
204 #define GL_SOURCE2_RGB 0x8582
205 #define GL_SOURCE0_ALPHA 0x8588
206 #define GL_SOURCE1_ALPHA 0x8589
207 #define GL_SOURCE2_ALPHA 0x858A
208 #define GL_OPERAND0_RGB 0x8590
209 #define GL_OPERAND1_RGB 0x8591
210 #define GL_OPERAND2_RGB 0x8592
211 #define GL_OPERAND0_ALPHA 0x8598
212 #define GL_OPERAND1_ALPHA 0x8599
213 #define GL_OPERAND2_ALPHA 0x859A
214 #define GL_RGB_SCALE 0x8573
215 #define GL_ADD_SIGNED 0x8574
216 #define GL_INTERPOLATE 0x8575
217 #define GL_SUBTRACT 0x84E7
218 #define GL_CONSTANT 0x8576
219 #define GL_PRIMARY_COLOR 0x8577
220 #define GL_PREVIOUS 0x8578
221 #define GL_DOT3_RGB 0x86AE
222 #define GL_DOT3_RGBA 0x86AF
223 typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
224 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
225 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
226 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
227 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
228 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
229 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
230 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
231 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
232 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
233 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
234 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
235 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
236 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
237 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
238 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
239 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
240 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
241 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
242 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
243 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
244 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
245 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
246 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
247 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
248 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
249 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
250 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
251 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
252 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
253 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
254 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
255 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
256 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
257 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
258 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
259 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
260 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
261 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
262 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
263 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
264 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
265 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
266 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
267 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
268 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
269 #ifdef GL_GLEXT_PROTOTYPES
270 GLAPI void APIENTRY glActiveTexture (GLenum texture);
271 GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
272 GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
273 GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
274 GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
275 GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
276 GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
277 GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
278 GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);
279 GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
280 GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
281 GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
282 GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
283 GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
284 GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
285 GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
286 GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
287 GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
288 GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
289 GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
290 GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
291 GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
292 GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
293 GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
294 GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
295 GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
296 GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
297 GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
298 GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
299 GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
300 GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
301 GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
302 GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
303 GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
304 GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
305 GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
306 GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
307 GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
308 GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
309 GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
310 GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
311 GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
312 GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
313 GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
314 GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
315 GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
316 #endif
317 #endif /* GL_VERSION_1_3 */
318
319 #ifndef GL_VERSION_1_4
320 #define GL_VERSION_1_4 1
321 #define GL_BLEND_DST_RGB 0x80C8
322 #define GL_BLEND_SRC_RGB 0x80C9
323 #define GL_BLEND_DST_ALPHA 0x80CA
324 #define GL_BLEND_SRC_ALPHA 0x80CB
325 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
326 #define GL_DEPTH_COMPONENT16 0x81A5
327 #define GL_DEPTH_COMPONENT24 0x81A6
328 #define GL_DEPTH_COMPONENT32 0x81A7
329 #define GL_MIRRORED_REPEAT 0x8370
330 #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
331 #define GL_TEXTURE_LOD_BIAS 0x8501
332 #define GL_INCR_WRAP 0x8507
333 #define GL_DECR_WRAP 0x8508
334 #define GL_TEXTURE_DEPTH_SIZE 0x884A
335 #define GL_TEXTURE_COMPARE_MODE 0x884C
336 #define GL_TEXTURE_COMPARE_FUNC 0x884D
337 #define GL_POINT_SIZE_MIN 0x8126
338 #define GL_POINT_SIZE_MAX 0x8127
339 #define GL_POINT_DISTANCE_ATTENUATION 0x8129
340 #define GL_GENERATE_MIPMAP 0x8191
341 #define GL_GENERATE_MIPMAP_HINT 0x8192
342 #define GL_FOG_COORDINATE_SOURCE 0x8450
343 #define GL_FOG_COORDINATE 0x8451
344 #define GL_FRAGMENT_DEPTH 0x8452
345 #define GL_CURRENT_FOG_COORDINATE 0x8453
346 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
347 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
348 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
349 #define GL_FOG_COORDINATE_ARRAY 0x8457
350 #define GL_COLOR_SUM 0x8458
351 #define GL_CURRENT_SECONDARY_COLOR 0x8459
352 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
353 #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
354 #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
355 #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
356 #define GL_SECONDARY_COLOR_ARRAY 0x845E
357 #define GL_TEXTURE_FILTER_CONTROL 0x8500
358 #define GL_DEPTH_TEXTURE_MODE 0x884B
359 #define GL_COMPARE_R_TO_TEXTURE 0x884E
360 #define GL_FUNC_ADD 0x8006
361 #define GL_FUNC_SUBTRACT 0x800A
362 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
363 #define GL_MIN 0x8007
364 #define GL_MAX 0x8008
365 #define GL_CONSTANT_COLOR 0x8001
366 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
367 #define GL_CONSTANT_ALPHA 0x8003
368 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
369 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
370 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
371 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
372 typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
373 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
374 typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
375 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
376 typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
377 typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
378 typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
379 typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
380 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
381 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
382 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
383 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
384 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
385 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
386 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
387 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
388 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
389 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
390 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
391 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
392 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
393 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
394 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
395 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
396 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
397 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
398 typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
399 typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
400 typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
401 typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
402 typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
403 typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
404 typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
405 typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
406 typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
407 typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
408 typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
409 typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
410 typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
411 typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
412 typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
413 typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
414 typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
415 typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
416 #ifdef GL_GLEXT_PROTOTYPES
417 GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
418 GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
419 GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);
420 GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
421 GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
422 GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
423 GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
424 GLAPI void APIENTRY glFogCoordf (GLfloat coord);
425 GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
426 GLAPI void APIENTRY glFogCoordd (GLdouble coord);
427 GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
428 GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);
429 GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
430 GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
431 GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
432 GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
433 GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
434 GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
435 GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
436 GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
437 GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
438 GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
439 GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
440 GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
441 GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
442 GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
443 GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
444 GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
445 GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
446 GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
447 GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
448 GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
449 GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
450 GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
451 GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
452 GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
453 GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
454 GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
455 GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
456 GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
457 GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
458 GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
459 GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
460 GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
461 GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
462 GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
463 GLAPI void APIENTRY glBlendEquation (GLenum mode);
464 #endif
465 #endif /* GL_VERSION_1_4 */
466
467 #ifndef GL_VERSION_1_5
468 #define GL_VERSION_1_5 1
469 #include <stddef.h>
470 #ifdef __MACOSX__
471 typedef long GLsizeiptr;
472 typedef long GLintptr;
473 #else
474 typedef ptrdiff_t GLsizeiptr;
475 typedef ptrdiff_t GLintptr;
476 #endif
477 #define GL_BUFFER_SIZE 0x8764
478 #define GL_BUFFER_USAGE 0x8765
479 #define GL_QUERY_COUNTER_BITS 0x8864
480 #define GL_CURRENT_QUERY 0x8865
481 #define GL_QUERY_RESULT 0x8866
482 #define GL_QUERY_RESULT_AVAILABLE 0x8867
483 #define GL_ARRAY_BUFFER 0x8892
484 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
485 #define GL_ARRAY_BUFFER_BINDING 0x8894
486 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
487 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
488 #define GL_READ_ONLY 0x88B8
489 #define GL_WRITE_ONLY 0x88B9
490 #define GL_READ_WRITE 0x88BA
491 #define GL_BUFFER_ACCESS 0x88BB
492 #define GL_BUFFER_MAPPED 0x88BC
493 #define GL_BUFFER_MAP_POINTER 0x88BD
494 #define GL_STREAM_DRAW 0x88E0
495 #define GL_STREAM_READ 0x88E1
496 #define GL_STREAM_COPY 0x88E2
497 #define GL_STATIC_DRAW 0x88E4
498 #define GL_STATIC_READ 0x88E5
499 #define GL_STATIC_COPY 0x88E6
500 #define GL_DYNAMIC_DRAW 0x88E8
501 #define GL_DYNAMIC_READ 0x88E9
502 #define GL_DYNAMIC_COPY 0x88EA
503 #define GL_SAMPLES_PASSED 0x8914
504 #define GL_SRC1_ALPHA 0x8589
505 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
506 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
507 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
508 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
509 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
510 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
511 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
512 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
513 #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
514 #define GL_FOG_COORD_SRC 0x8450
515 #define GL_FOG_COORD 0x8451
516 #define GL_CURRENT_FOG_COORD 0x8453
517 #define GL_FOG_COORD_ARRAY_TYPE 0x8454
518 #define GL_FOG_COORD_ARRAY_STRIDE 0x8455
519 #define GL_FOG_COORD_ARRAY_POINTER 0x8456
520 #define GL_FOG_COORD_ARRAY 0x8457
521 #define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
522 #define GL_SRC0_RGB 0x8580
523 #define GL_SRC1_RGB 0x8581
524 #define GL_SRC2_RGB 0x8582
525 #define GL_SRC0_ALPHA 0x8588
526 #define GL_SRC2_ALPHA 0x858A
527 typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
528 typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
529 typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
530 typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
531 typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
532 typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
533 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
534 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
535 typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
536 typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
537 typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
538 typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
539 typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
540 typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
541 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
542 typedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
543 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
544 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
545 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
546 #ifdef GL_GLEXT_PROTOTYPES
547 GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
548 GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
549 GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
550 GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
551 GLAPI void APIENTRY glEndQuery (GLenum target);
552 GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
553 GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
554 GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
555 GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
556 GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
557 GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
558 GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
559 GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
560 GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
561 GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);
562 GLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);
563 GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
564 GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
565 GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
566 #endif
567 #endif /* GL_VERSION_1_5 */
568
569 #ifndef GL_VERSION_2_0
570 #define GL_VERSION_2_0 1
571 typedef char GLchar;
572 #define GL_BLEND_EQUATION_RGB 0x8009
573 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
574 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
575 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
576 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
577 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
578 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
579 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
580 #define GL_STENCIL_BACK_FUNC 0x8800
581 #define GL_STENCIL_BACK_FAIL 0x8801
582 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
583 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
584 #define GL_MAX_DRAW_BUFFERS 0x8824
585 #define GL_DRAW_BUFFER0 0x8825
586 #define GL_DRAW_BUFFER1 0x8826
587 #define GL_DRAW_BUFFER2 0x8827
588 #define GL_DRAW_BUFFER3 0x8828
589 #define GL_DRAW_BUFFER4 0x8829
590 #define GL_DRAW_BUFFER5 0x882A
591 #define GL_DRAW_BUFFER6 0x882B
592 #define GL_DRAW_BUFFER7 0x882C
593 #define GL_DRAW_BUFFER8 0x882D
594 #define GL_DRAW_BUFFER9 0x882E
595 #define GL_DRAW_BUFFER10 0x882F
596 #define GL_DRAW_BUFFER11 0x8830
597 #define GL_DRAW_BUFFER12 0x8831
598 #define GL_DRAW_BUFFER13 0x8832
599 #define GL_DRAW_BUFFER14 0x8833
600 #define GL_DRAW_BUFFER15 0x8834
601 #define GL_BLEND_EQUATION_ALPHA 0x883D
602 #define GL_MAX_VERTEX_ATTRIBS 0x8869
603 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
604 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
605 #define GL_FRAGMENT_SHADER 0x8B30
606 #define GL_VERTEX_SHADER 0x8B31
607 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
608 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
609 #define GL_MAX_VARYING_FLOATS 0x8B4B
610 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
611 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
612 #define GL_SHADER_TYPE 0x8B4F
613 #define GL_FLOAT_VEC2 0x8B50
614 #define GL_FLOAT_VEC3 0x8B51
615 #define GL_FLOAT_VEC4 0x8B52
616 #define GL_INT_VEC2 0x8B53
617 #define GL_INT_VEC3 0x8B54
618 #define GL_INT_VEC4 0x8B55
619 #define GL_BOOL 0x8B56
620 #define GL_BOOL_VEC2 0x8B57
621 #define GL_BOOL_VEC3 0x8B58
622 #define GL_BOOL_VEC4 0x8B59
623 #define GL_FLOAT_MAT2 0x8B5A
624 #define GL_FLOAT_MAT3 0x8B5B
625 #define GL_FLOAT_MAT4 0x8B5C
626 #define GL_SAMPLER_1D 0x8B5D
627 #define GL_SAMPLER_2D 0x8B5E
628 #define GL_SAMPLER_3D 0x8B5F
629 #define GL_SAMPLER_CUBE 0x8B60
630 #define GL_SAMPLER_1D_SHADOW 0x8B61
631 #define GL_SAMPLER_2D_SHADOW 0x8B62
632 #define GL_DELETE_STATUS 0x8B80
633 #define GL_COMPILE_STATUS 0x8B81
634 #define GL_LINK_STATUS 0x8B82
635 #define GL_VALIDATE_STATUS 0x8B83
636 #define GL_INFO_LOG_LENGTH 0x8B84
637 #define GL_ATTACHED_SHADERS 0x8B85
638 #define GL_ACTIVE_UNIFORMS 0x8B86
639 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
640 #define GL_SHADER_SOURCE_LENGTH 0x8B88
641 #define GL_ACTIVE_ATTRIBUTES 0x8B89
642 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
643 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
644 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
645 #define GL_CURRENT_PROGRAM 0x8B8D
646 #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
647 #define GL_LOWER_LEFT 0x8CA1
648 #define GL_UPPER_LEFT 0x8CA2
649 #define GL_STENCIL_BACK_REF 0x8CA3
650 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
651 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
652 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
653 #define GL_POINT_SPRITE 0x8861
654 #define GL_COORD_REPLACE 0x8862
655 #define GL_MAX_TEXTURE_COORDS 0x8871
656 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
657 typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
658 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
659 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
660 typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
661 typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
662 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
663 typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
664 typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
665 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
666 typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
667 typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
668 typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
669 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
670 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
671 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
672 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
673 typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
674 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
675 typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
676 typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
677 typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
678 typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
679 typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
680 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
681 typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
682 typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
683 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
684 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
685 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
686 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
687 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
688 typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
689 typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
690 typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
691 typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
692 typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
693 typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
694 typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
695 typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
696 typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
697 typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
698 typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
699 typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
700 typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
701 typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
702 typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
703 typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
704 typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
705 typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
706 typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
707 typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
708 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
709 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
710 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
711 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
712 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
713 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
714 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
715 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
716 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
717 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
718 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
719 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
720 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
721 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
722 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
723 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
724 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
725 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
726 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
727 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
728 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
729 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
730 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
731 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
732 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
733 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
734 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
735 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
736 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
737 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
738 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
739 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
740 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
741 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
742 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
743 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
744 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
745 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
746 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
747 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
748 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
749 #ifdef GL_GLEXT_PROTOTYPES
750 GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
751 GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
752 GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
753 GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
754 GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
755 GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
756 GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
757 GLAPI void APIENTRY glCompileShader (GLuint shader);
758 GLAPI GLuint APIENTRY glCreateProgram (void);
759 GLAPI GLuint APIENTRY glCreateShader (GLenum type);
760 GLAPI void APIENTRY glDeleteProgram (GLuint program);
761 GLAPI void APIENTRY glDeleteShader (GLuint shader);
762 GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
763 GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
764 GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
765 GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
766 GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
767 GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
768 GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
769 GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
770 GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
771 GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
772 GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
773 GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
774 GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
775 GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
776 GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
777 GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
778 GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
779 GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
780 GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
781 GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
782 GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
783 GLAPI void APIENTRY glLinkProgram (GLuint program);
784 GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
785 GLAPI void APIENTRY glUseProgram (GLuint program);
786 GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
787 GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
788 GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
789 GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
790 GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
791 GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
792 GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
793 GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
794 GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
795 GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
796 GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
797 GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
798 GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
799 GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
800 GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
801 GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
802 GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
803 GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
804 GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
805 GLAPI void APIENTRY glValidateProgram (GLuint program);
806 GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
807 GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
808 GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
809 GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
810 GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
811 GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
812 GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
813 GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
814 GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
815 GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
816 GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
817 GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
818 GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
819 GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
820 GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
821 GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
822 GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
823 GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
824 GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
825 GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
826 GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
827 GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
828 GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
829 GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
830 GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
831 GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
832 GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
833 GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
834 GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
835 GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
836 GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
837 GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
838 GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
839 GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
840 GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
841 GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
842 GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
843 #endif
844 #endif /* GL_VERSION_2_0 */
845
846 #ifndef GL_VERSION_2_1
847 #define GL_VERSION_2_1 1
848 #define GL_PIXEL_PACK_BUFFER 0x88EB
849 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
850 #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
851 #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
852 #define GL_FLOAT_MAT2x3 0x8B65
853 #define GL_FLOAT_MAT2x4 0x8B66
854 #define GL_FLOAT_MAT3x2 0x8B67
855 #define GL_FLOAT_MAT3x4 0x8B68
856 #define GL_FLOAT_MAT4x2 0x8B69
857 #define GL_FLOAT_MAT4x3 0x8B6A
858 #define GL_SRGB 0x8C40
859 #define GL_SRGB8 0x8C41
860 #define GL_SRGB_ALPHA 0x8C42
861 #define GL_SRGB8_ALPHA8 0x8C43
862 #define GL_COMPRESSED_SRGB 0x8C48
863 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49
864 #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
865 #define GL_SLUMINANCE_ALPHA 0x8C44
866 #define GL_SLUMINANCE8_ALPHA8 0x8C45
867 #define GL_SLUMINANCE 0x8C46
868 #define GL_SLUMINANCE8 0x8C47
869 #define GL_COMPRESSED_SLUMINANCE 0x8C4A
870 #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
871 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
872 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
873 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
874 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
875 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
876 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
877 #ifdef GL_GLEXT_PROTOTYPES
878 GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
879 GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
880 GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
881 GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
882 GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
883 GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
884 #endif
885 #endif /* GL_VERSION_2_1 */
886
887 #ifndef GL_VERSION_3_0
888 #define GL_VERSION_3_0 1
889 typedef unsigned short GLhalf;
890 #define GL_COMPARE_REF_TO_TEXTURE 0x884E
891 #define GL_CLIP_DISTANCE0 0x3000
892 #define GL_CLIP_DISTANCE1 0x3001
893 #define GL_CLIP_DISTANCE2 0x3002
894 #define GL_CLIP_DISTANCE3 0x3003
895 #define GL_CLIP_DISTANCE4 0x3004
896 #define GL_CLIP_DISTANCE5 0x3005
897 #define GL_CLIP_DISTANCE6 0x3006
898 #define GL_CLIP_DISTANCE7 0x3007
899 #define GL_MAX_CLIP_DISTANCES 0x0D32
900 #define GL_MAJOR_VERSION 0x821B
901 #define GL_MINOR_VERSION 0x821C
902 #define GL_NUM_EXTENSIONS 0x821D
903 #define GL_CONTEXT_FLAGS 0x821E
904 #define GL_COMPRESSED_RED 0x8225
905 #define GL_COMPRESSED_RG 0x8226
906 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001
907 #define GL_RGBA32F 0x8814
908 #define GL_RGB32F 0x8815
909 #define GL_RGBA16F 0x881A
910 #define GL_RGB16F 0x881B
911 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
912 #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
913 #define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
914 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
915 #define GL_CLAMP_READ_COLOR 0x891C
916 #define GL_FIXED_ONLY 0x891D
917 #define GL_MAX_VARYING_COMPONENTS 0x8B4B
918 #define GL_TEXTURE_1D_ARRAY 0x8C18
919 #define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
920 #define GL_TEXTURE_2D_ARRAY 0x8C1A
921 #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
922 #define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
923 #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
924 #define GL_R11F_G11F_B10F 0x8C3A
925 #define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
926 #define GL_RGB9_E5 0x8C3D
927 #define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
928 #define GL_TEXTURE_SHARED_SIZE 0x8C3F
929 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
930 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
931 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
932 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
933 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
934 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
935 #define GL_PRIMITIVES_GENERATED 0x8C87
936 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
937 #define GL_RASTERIZER_DISCARD 0x8C89
938 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
939 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
940 #define GL_INTERLEAVED_ATTRIBS 0x8C8C
941 #define GL_SEPARATE_ATTRIBS 0x8C8D
942 #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
943 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
944 #define GL_RGBA32UI 0x8D70
945 #define GL_RGB32UI 0x8D71
946 #define GL_RGBA16UI 0x8D76
947 #define GL_RGB16UI 0x8D77
948 #define GL_RGBA8UI 0x8D7C
949 #define GL_RGB8UI 0x8D7D
950 #define GL_RGBA32I 0x8D82
951 #define GL_RGB32I 0x8D83
952 #define GL_RGBA16I 0x8D88
953 #define GL_RGB16I 0x8D89
954 #define GL_RGBA8I 0x8D8E
955 #define GL_RGB8I 0x8D8F
956 #define GL_RED_INTEGER 0x8D94
957 #define GL_GREEN_INTEGER 0x8D95
958 #define GL_BLUE_INTEGER 0x8D96
959 #define GL_RGB_INTEGER 0x8D98
960 #define GL_RGBA_INTEGER 0x8D99
961 #define GL_BGR_INTEGER 0x8D9A
962 #define GL_BGRA_INTEGER 0x8D9B
963 #define GL_SAMPLER_1D_ARRAY 0x8DC0
964 #define GL_SAMPLER_2D_ARRAY 0x8DC1
965 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
966 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
967 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5
968 #define GL_UNSIGNED_INT_VEC2 0x8DC6
969 #define GL_UNSIGNED_INT_VEC3 0x8DC7
970 #define GL_UNSIGNED_INT_VEC4 0x8DC8
971 #define GL_INT_SAMPLER_1D 0x8DC9
972 #define GL_INT_SAMPLER_2D 0x8DCA
973 #define GL_INT_SAMPLER_3D 0x8DCB
974 #define GL_INT_SAMPLER_CUBE 0x8DCC
975 #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
976 #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
977 #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
978 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
979 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
980 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
981 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
982 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
983 #define GL_QUERY_WAIT 0x8E13
984 #define GL_QUERY_NO_WAIT 0x8E14
985 #define GL_QUERY_BY_REGION_WAIT 0x8E15
986 #define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
987 #define GL_BUFFER_ACCESS_FLAGS 0x911F
988 #define GL_BUFFER_MAP_LENGTH 0x9120
989 #define GL_BUFFER_MAP_OFFSET 0x9121
990 #define GL_DEPTH_COMPONENT32F 0x8CAC
991 #define GL_DEPTH32F_STENCIL8 0x8CAD
992 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
993 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
994 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
995 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
996 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
997 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
998 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
999 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
1000 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
1001 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
1002 #define GL_FRAMEBUFFER_DEFAULT 0x8218
1003 #define GL_FRAMEBUFFER_UNDEFINED 0x8219
1004 #define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
1005 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1006 #define GL_DEPTH_STENCIL 0x84F9
1007 #define GL_UNSIGNED_INT_24_8 0x84FA
1008 #define GL_DEPTH24_STENCIL8 0x88F0
1009 #define GL_TEXTURE_STENCIL_SIZE 0x88F1
1010 #define GL_TEXTURE_RED_TYPE 0x8C10
1011 #define GL_TEXTURE_GREEN_TYPE 0x8C11
1012 #define GL_TEXTURE_BLUE_TYPE 0x8C12
1013 #define GL_TEXTURE_ALPHA_TYPE 0x8C13
1014 #define GL_TEXTURE_DEPTH_TYPE 0x8C16
1015 #define GL_UNSIGNED_NORMALIZED 0x8C17
1016 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1017 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
1018 #define GL_RENDERBUFFER_BINDING 0x8CA7
1019 #define GL_READ_FRAMEBUFFER 0x8CA8
1020 #define GL_DRAW_FRAMEBUFFER 0x8CA9
1021 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
1022 #define GL_RENDERBUFFER_SAMPLES 0x8CAB
1023 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1024 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1025 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1026 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1027 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
1028 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1029 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1030 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1031 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
1032 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
1033 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1034 #define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
1035 #define GL_COLOR_ATTACHMENT0 0x8CE0
1036 #define GL_COLOR_ATTACHMENT1 0x8CE1
1037 #define GL_COLOR_ATTACHMENT2 0x8CE2
1038 #define GL_COLOR_ATTACHMENT3 0x8CE3
1039 #define GL_COLOR_ATTACHMENT4 0x8CE4
1040 #define GL_COLOR_ATTACHMENT5 0x8CE5
1041 #define GL_COLOR_ATTACHMENT6 0x8CE6
1042 #define GL_COLOR_ATTACHMENT7 0x8CE7
1043 #define GL_COLOR_ATTACHMENT8 0x8CE8
1044 #define GL_COLOR_ATTACHMENT9 0x8CE9
1045 #define GL_COLOR_ATTACHMENT10 0x8CEA
1046 #define GL_COLOR_ATTACHMENT11 0x8CEB
1047 #define GL_COLOR_ATTACHMENT12 0x8CEC
1048 #define GL_COLOR_ATTACHMENT13 0x8CED
1049 #define GL_COLOR_ATTACHMENT14 0x8CEE
1050 #define GL_COLOR_ATTACHMENT15 0x8CEF
1051 #define GL_DEPTH_ATTACHMENT 0x8D00
1052 #define GL_STENCIL_ATTACHMENT 0x8D20
1053 #define GL_FRAMEBUFFER 0x8D40
1054 #define GL_RENDERBUFFER 0x8D41
1055 #define GL_RENDERBUFFER_WIDTH 0x8D42
1056 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1057 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1058 #define GL_STENCIL_INDEX1 0x8D46
1059 #define GL_STENCIL_INDEX4 0x8D47
1060 #define GL_STENCIL_INDEX8 0x8D48
1061 #define GL_STENCIL_INDEX16 0x8D49
1062 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1063 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1064 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1065 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1066 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1067 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1068 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
1069 #define GL_MAX_SAMPLES 0x8D57
1070 #define GL_INDEX 0x8222
1071 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
1072 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15
1073 #define GL_FRAMEBUFFER_SRGB 0x8DB9
1074 #define GL_HALF_FLOAT 0x140B
1075 #define GL_MAP_READ_BIT 0x0001
1076 #define GL_MAP_WRITE_BIT 0x0002
1077 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
1078 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
1079 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
1080 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
1081 #define GL_COMPRESSED_RED_RGTC1 0x8DBB
1082 #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
1083 #define GL_COMPRESSED_RG_RGTC2 0x8DBD
1084 #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
1085 #define GL_RG 0x8227
1086 #define GL_RG_INTEGER 0x8228
1087 #define GL_R8 0x8229
1088 #define GL_R16 0x822A
1089 #define GL_RG8 0x822B
1090 #define GL_RG16 0x822C
1091 #define GL_R16F 0x822D
1092 #define GL_R32F 0x822E
1093 #define GL_RG16F 0x822F
1094 #define GL_RG32F 0x8230
1095 #define GL_R8I 0x8231
1096 #define GL_R8UI 0x8232
1097 #define GL_R16I 0x8233
1098 #define GL_R16UI 0x8234
1099 #define GL_R32I 0x8235
1100 #define GL_R32UI 0x8236
1101 #define GL_RG8I 0x8237
1102 #define GL_RG8UI 0x8238
1103 #define GL_RG16I 0x8239
1104 #define GL_RG16UI 0x823A
1105 #define GL_RG32I 0x823B
1106 #define GL_RG32UI 0x823C
1107 #define GL_VERTEX_ARRAY_BINDING 0x85B5
1108 #define GL_CLAMP_VERTEX_COLOR 0x891A
1109 #define GL_CLAMP_FRAGMENT_COLOR 0x891B
1110 #define GL_ALPHA_INTEGER 0x8D97
1111 typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1112 typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
1113 typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
1114 typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
1115 typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
1116 typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
1117 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
1118 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
1119 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1120 typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
1121 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1122 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1123 typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
1124 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
1125 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
1126 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1127 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
1128 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
1129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
1130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
1131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
1132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
1133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
1134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
1135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
1136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
1138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
1139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
1140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
1141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
1142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
1143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
1144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
1145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
1146 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
1147 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
1148 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
1149 typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
1150 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
1151 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
1152 typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
1153 typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
1154 typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
1155 typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1156 typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1157 typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1158 typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1159 typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
1160 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
1161 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
1162 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
1163 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
1164 typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
1165 typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
1166 typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1167 typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1168 typedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
1169 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
1170 typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
1171 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
1172 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
1173 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1174 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
1175 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
1176 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
1177 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
1178 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
1179 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
1180 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1181 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1182 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1183 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1184 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1185 typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
1186 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1187 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1188 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1189 typedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1190 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1191 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
1192 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
1193 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
1194 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
1195 #ifdef GL_GLEXT_PROTOTYPES
1196 GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
1197 GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
1198 GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
1199 GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
1200 GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
1201 GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
1202 GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
1203 GLAPI void APIENTRY glEndTransformFeedback (void);
1204 GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
1205 GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
1206 GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
1207 GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
1208 GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
1209 GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
1210 GLAPI void APIENTRY glEndConditionalRender (void);
1211 GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1212 GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
1213 GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
1214 GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
1215 GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
1216 GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
1217 GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
1218 GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
1219 GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
1220 GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
1221 GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1222 GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
1223 GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
1224 GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
1225 GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
1226 GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
1227 GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
1228 GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
1229 GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
1230 GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
1231 GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
1232 GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
1233 GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
1234 GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
1235 GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
1236 GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
1237 GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
1238 GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
1239 GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
1240 GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1241 GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
1242 GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
1243 GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
1244 GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
1245 GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
1246 GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
1247 GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
1248 GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
1249 GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
1250 GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
1251 GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
1252 GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
1253 GLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);
1254 GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
1255 GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
1256 GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
1257 GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
1258 GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1259 GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
1260 GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
1261 GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
1262 GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
1263 GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
1264 GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
1265 GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1266 GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1267 GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1268 GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1269 GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
1270 GLAPI void APIENTRY glGenerateMipmap (GLenum target);
1271 GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1272 GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1273 GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
1274 GLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1275 GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
1276 GLAPI void APIENTRY glBindVertexArray (GLuint array);
1277 GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
1278 GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
1279 GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
1280 #endif
1281 #endif /* GL_VERSION_3_0 */
1282
1283 #ifndef GL_VERSION_3_1
1284 #define GL_VERSION_3_1 1
1285 #define GL_SAMPLER_2D_RECT 0x8B63
1286 #define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
1287 #define GL_SAMPLER_BUFFER 0x8DC2
1288 #define GL_INT_SAMPLER_2D_RECT 0x8DCD
1289 #define GL_INT_SAMPLER_BUFFER 0x8DD0
1290 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
1291 #define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
1292 #define GL_TEXTURE_BUFFER 0x8C2A
1293 #define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
1294 #define GL_TEXTURE_BINDING_BUFFER 0x8C2C
1295 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
1296 #define GL_TEXTURE_RECTANGLE 0x84F5
1297 #define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
1298 #define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
1299 #define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
1300 #define GL_R8_SNORM 0x8F94
1301 #define GL_RG8_SNORM 0x8F95
1302 #define GL_RGB8_SNORM 0x8F96
1303 #define GL_RGBA8_SNORM 0x8F97
1304 #define GL_R16_SNORM 0x8F98
1305 #define GL_RG16_SNORM 0x8F99
1306 #define GL_RGB16_SNORM 0x8F9A
1307 #define GL_RGBA16_SNORM 0x8F9B
1308 #define GL_SIGNED_NORMALIZED 0x8F9C
1309 #define GL_PRIMITIVE_RESTART 0x8F9D
1310 #define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
1311 #define GL_COPY_READ_BUFFER 0x8F36
1312 #define GL_COPY_WRITE_BUFFER 0x8F37
1313 #define GL_UNIFORM_BUFFER 0x8A11
1314 #define GL_UNIFORM_BUFFER_BINDING 0x8A28
1315 #define GL_UNIFORM_BUFFER_START 0x8A29
1316 #define GL_UNIFORM_BUFFER_SIZE 0x8A2A
1317 #define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
1318 #define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
1319 #define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
1320 #define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
1321 #define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
1322 #define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
1323 #define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
1324 #define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
1325 #define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
1326 #define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
1327 #define GL_UNIFORM_TYPE 0x8A37
1328 #define GL_UNIFORM_SIZE 0x8A38
1329 #define GL_UNIFORM_NAME_LENGTH 0x8A39
1330 #define GL_UNIFORM_BLOCK_INDEX 0x8A3A
1331 #define GL_UNIFORM_OFFSET 0x8A3B
1332 #define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
1333 #define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
1334 #define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
1335 #define GL_UNIFORM_BLOCK_BINDING 0x8A3F
1336 #define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
1337 #define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
1338 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
1339 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
1340 #define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
1341 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
1342 #define GL_INVALID_INDEX 0xFFFFFFFFu
1343 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1344 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1345 typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
1346 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
1347 typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1348 typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1349 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1350 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1351 typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
1352 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1353 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1354 typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1355 #ifdef GL_GLEXT_PROTOTYPES
1356 GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
1357 GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
1358 GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
1359 GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
1360 GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
1361 GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
1362 GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
1363 GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
1364 GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
1365 GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
1366 GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
1367 GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
1368 #endif
1369 #endif /* GL_VERSION_3_1 */
1370
1371 #ifndef GL_VERSION_3_2
1372 #define GL_VERSION_3_2 1
1373 typedef struct __GLsync *GLsync;
1374 #ifndef GLEXT_64_TYPES_DEFINED
1375 /* This code block is duplicated in glxext.h, so must be protected */
1376 #define GLEXT_64_TYPES_DEFINED
1377 /* Define int32_t, int64_t, and uint64_t types for UST/MSC */
1378 /* (as used in the GL_EXT_timer_query extension). */
1379 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1380 #include <inttypes.h>
1381 #elif defined(__sun__) || defined(__digital__)
1382 #include <inttypes.h>
1383 #if defined(__STDC__)
1384 #if defined(__arch64__) || defined(_LP64)
1385 typedef long int int64_t;
1386 typedef unsigned long int uint64_t;
1387 #else
1388 typedef long long int int64_t;
1389 typedef unsigned long long int uint64_t;
1390 #endif /* __arch64__ */
1391 #endif /* __STDC__ */
1392 #elif defined( __VMS ) || defined(__sgi)
1393 #include <inttypes.h>
1394 #elif defined(__SCO__) || defined(__USLC__)
1395 #include <stdint.h>
1396 #elif defined(__UNIXOS2__) || defined(__SOL64__)
1397 typedef long int int32_t;
1398 typedef long long int int64_t;
1399 typedef unsigned long long int uint64_t;
1400 #elif defined(_WIN32) && defined(__GNUC__)
1401 #include <stdint.h>
1402 #elif defined(_WIN32)
1403 typedef __int32 int32_t;
1404 typedef __int64 int64_t;
1405 typedef unsigned __int64 uint64_t;
1406 #else
1407 /* Fallback if nothing above works */
1408 #include <inttypes.h>
1409 #endif
1410 #endif
1411 typedef uint64_t GLuint64;
1412 typedef int64_t GLint64;
1413 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
1414 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
1415 #define GL_LINES_ADJACENCY 0x000A
1416 #define GL_LINE_STRIP_ADJACENCY 0x000B
1417 #define GL_TRIANGLES_ADJACENCY 0x000C
1418 #define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
1419 #define GL_PROGRAM_POINT_SIZE 0x8642
1420 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
1421 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
1422 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
1423 #define GL_GEOMETRY_SHADER 0x8DD9
1424 #define GL_GEOMETRY_VERTICES_OUT 0x8916
1425 #define GL_GEOMETRY_INPUT_TYPE 0x8917
1426 #define GL_GEOMETRY_OUTPUT_TYPE 0x8918
1427 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
1428 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
1429 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
1430 #define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
1431 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
1432 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
1433 #define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
1434 #define GL_CONTEXT_PROFILE_MASK 0x9126
1435 #define GL_DEPTH_CLAMP 0x864F
1436 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
1437 #define GL_FIRST_VERTEX_CONVENTION 0x8E4D
1438 #define GL_LAST_VERTEX_CONVENTION 0x8E4E
1439 #define GL_PROVOKING_VERTEX 0x8E4F
1440 #define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
1441 #define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
1442 #define GL_OBJECT_TYPE 0x9112
1443 #define GL_SYNC_CONDITION 0x9113
1444 #define GL_SYNC_STATUS 0x9114
1445 #define GL_SYNC_FLAGS 0x9115
1446 #define GL_SYNC_FENCE 0x9116
1447 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
1448 #define GL_UNSIGNALED 0x9118
1449 #define GL_SIGNALED 0x9119
1450 #define GL_ALREADY_SIGNALED 0x911A
1451 #define GL_TIMEOUT_EXPIRED 0x911B
1452 #define GL_CONDITION_SATISFIED 0x911C
1453 #define GL_WAIT_FAILED 0x911D
1454 #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
1455 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
1456 #define GL_SAMPLE_POSITION 0x8E50
1457 #define GL_SAMPLE_MASK 0x8E51
1458 #define GL_SAMPLE_MASK_VALUE 0x8E52
1459 #define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
1460 #define GL_TEXTURE_2D_MULTISAMPLE 0x9100
1461 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
1462 #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
1463 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
1464 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
1465 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
1466 #define GL_TEXTURE_SAMPLES 0x9106
1467 #define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
1468 #define GL_SAMPLER_2D_MULTISAMPLE 0x9108
1469 #define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
1470 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
1471 #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
1472 #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
1473 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
1474 #define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
1475 #define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
1476 #define GL_MAX_INTEGER_SAMPLES 0x9110
1477 typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1478 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1479 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1480 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1481 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
1482 typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
1483 typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
1484 typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
1485 typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1486 typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1487 typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
1488 typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1489 typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
1490 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
1491 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
1492 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1493 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1494 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
1495 typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
1496 #ifdef GL_GLEXT_PROTOTYPES
1497 GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1498 GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
1499 GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
1500 GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);
1501 GLAPI void APIENTRY glProvokingVertex (GLenum mode);
1502 GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
1503 GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
1504 GLAPI void APIENTRY glDeleteSync (GLsync sync);
1505 GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1506 GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
1507 GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
1508 GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1509 GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
1510 GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
1511 GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
1512 GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
1513 GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
1514 GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
1515 GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
1516 #endif
1517 #endif /* GL_VERSION_3_2 */
1518
1519 #ifndef GL_VERSION_3_3
1520 #define GL_VERSION_3_3 1
1521 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
1522 #define GL_SRC1_COLOR 0x88F9
1523 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA
1524 #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
1525 #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
1526 #define GL_ANY_SAMPLES_PASSED 0x8C2F
1527 #define GL_SAMPLER_BINDING 0x8919
1528 #define GL_RGB10_A2UI 0x906F
1529 #define GL_TEXTURE_SWIZZLE_R 0x8E42
1530 #define GL_TEXTURE_SWIZZLE_G 0x8E43
1531 #define GL_TEXTURE_SWIZZLE_B 0x8E44
1532 #define GL_TEXTURE_SWIZZLE_A 0x8E45
1533 #define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
1534 #define GL_TIME_ELAPSED 0x88BF
1535 #define GL_TIMESTAMP 0x8E28
1536 #define GL_INT_2_10_10_10_REV 0x8D9F
1537 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1538 typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
1539 typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
1540 typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
1541 typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
1542 typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
1543 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
1544 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1545 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
1546 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
1547 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
1548 typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
1549 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1550 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
1551 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
1552 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
1553 typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
1554 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
1555 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
1556 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
1557 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1558 typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1559 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1560 typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1561 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1562 typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1563 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1564 typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1565 typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
1566 typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
1567 typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
1568 typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
1569 typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
1570 typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
1571 typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
1572 typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
1573 typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
1574 typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
1575 typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
1576 typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
1577 typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
1578 typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
1579 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
1580 typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1581 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
1582 typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1583 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
1584 typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1585 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
1586 typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
1587 typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
1588 typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
1589 typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
1590 typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1591 typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
1592 typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
1593 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
1594 typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
1595 #ifdef GL_GLEXT_PROTOTYPES
1596 GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
1597 GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
1598 GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
1599 GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
1600 GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
1601 GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
1602 GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
1603 GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
1604 GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
1605 GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
1606 GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
1607 GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
1608 GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
1609 GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
1610 GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
1611 GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
1612 GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
1613 GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
1614 GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
1615 GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
1616 GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1617 GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1618 GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1619 GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1620 GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1621 GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1622 GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
1623 GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
1624 GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
1625 GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
1626 GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
1627 GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
1628 GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
1629 GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
1630 GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
1631 GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
1632 GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
1633 GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
1634 GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
1635 GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
1636 GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
1637 GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
1638 GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
1639 GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
1640 GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
1641 GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
1642 GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
1643 GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
1644 GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
1645 GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
1646 GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
1647 GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
1648 GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
1649 GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
1650 GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
1651 GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
1652 GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
1653 GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
1654 #endif
1655 #endif /* GL_VERSION_3_3 */
1656
1657 #ifndef GL_VERSION_4_0
1658 #define GL_VERSION_4_0 1
1659 #define GL_SAMPLE_SHADING 0x8C36
1660 #define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
1661 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
1662 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
1663 #define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
1664 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
1665 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
1666 #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
1667 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
1668 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
1669 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
1670 #define GL_DRAW_INDIRECT_BUFFER 0x8F3F
1671 #define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
1672 #define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
1673 #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
1674 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
1675 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
1676 #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
1677 #define GL_MAX_VERTEX_STREAMS 0x8E71
1678 #define GL_DOUBLE_VEC2 0x8FFC
1679 #define GL_DOUBLE_VEC3 0x8FFD
1680 #define GL_DOUBLE_VEC4 0x8FFE
1681 #define GL_DOUBLE_MAT2 0x8F46
1682 #define GL_DOUBLE_MAT3 0x8F47
1683 #define GL_DOUBLE_MAT4 0x8F48
1684 #define GL_DOUBLE_MAT2x3 0x8F49
1685 #define GL_DOUBLE_MAT2x4 0x8F4A
1686 #define GL_DOUBLE_MAT3x2 0x8F4B
1687 #define GL_DOUBLE_MAT3x4 0x8F4C
1688 #define GL_DOUBLE_MAT4x2 0x8F4D
1689 #define GL_DOUBLE_MAT4x3 0x8F4E
1690 #define GL_ACTIVE_SUBROUTINES 0x8DE5
1691 #define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
1692 #define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
1693 #define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
1694 #define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
1695 #define GL_MAX_SUBROUTINES 0x8DE7
1696 #define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
1697 #define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
1698 #define GL_COMPATIBLE_SUBROUTINES 0x8E4B
1699 #define GL_PATCHES 0x000E
1700 #define GL_PATCH_VERTICES 0x8E72
1701 #define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
1702 #define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
1703 #define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
1704 #define GL_TESS_GEN_MODE 0x8E76
1705 #define GL_TESS_GEN_SPACING 0x8E77
1706 #define GL_TESS_GEN_VERTEX_ORDER 0x8E78
1707 #define GL_TESS_GEN_POINT_MODE 0x8E79
1708 #define GL_ISOLINES 0x8E7A
1709 #define GL_FRACTIONAL_ODD 0x8E7B
1710 #define GL_FRACTIONAL_EVEN 0x8E7C
1711 #define GL_MAX_PATCH_VERTICES 0x8E7D
1712 #define GL_MAX_TESS_GEN_LEVEL 0x8E7E
1713 #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
1714 #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
1715 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
1716 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
1717 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
1718 #define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
1719 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
1720 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
1721 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
1722 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
1723 #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
1724 #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
1725 #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
1726 #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
1727 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
1728 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
1729 #define GL_TESS_EVALUATION_SHADER 0x8E87
1730 #define GL_TESS_CONTROL_SHADER 0x8E88
1731 #define GL_TRANSFORM_FEEDBACK 0x8E22
1732 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
1733 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
1734 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
1735 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
1736 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
1737 typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
1738 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1739 typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
1740 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1741 typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
1742 typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
1743 typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
1744 typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
1745 typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
1746 typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1747 typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1748 typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1749 typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1750 typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
1751 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1752 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1753 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1754 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1755 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1756 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1757 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1758 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1759 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1760 typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
1761 typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1762 typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
1763 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1764 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1765 typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1766 typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
1767 typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
1768 typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1769 typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
1770 typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
1771 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
1772 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
1773 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
1774 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
1775 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
1776 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
1777 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
1778 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
1779 typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
1780 typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
1781 typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
1782 #ifdef GL_GLEXT_PROTOTYPES
1783 GLAPI void APIENTRY glMinSampleShading (GLfloat value);
1784 GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
1785 GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
1786 GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
1787 GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1788 GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
1789 GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
1790 GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
1791 GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
1792 GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
1793 GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1794 GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
1795 GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
1796 GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
1797 GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
1798 GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1799 GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1800 GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1801 GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1802 GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1803 GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1804 GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1805 GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1806 GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1807 GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
1808 GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
1809 GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
1810 GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
1811 GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1812 GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
1813 GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
1814 GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
1815 GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
1816 GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
1817 GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
1818 GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
1819 GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
1820 GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
1821 GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
1822 GLAPI void APIENTRY glPauseTransformFeedback (void);
1823 GLAPI void APIENTRY glResumeTransformFeedback (void);
1824 GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
1825 GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
1826 GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
1827 GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
1828 GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
1829 #endif
1830 #endif /* GL_VERSION_4_0 */
1831
1832 #ifndef GL_VERSION_4_1
1833 #define GL_VERSION_4_1 1
1834 #define GL_FIXED 0x140C
1835 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1836 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1837 #define GL_LOW_FLOAT 0x8DF0
1838 #define GL_MEDIUM_FLOAT 0x8DF1
1839 #define GL_HIGH_FLOAT 0x8DF2
1840 #define GL_LOW_INT 0x8DF3
1841 #define GL_MEDIUM_INT 0x8DF4
1842 #define GL_HIGH_INT 0x8DF5
1843 #define GL_SHADER_COMPILER 0x8DFA
1844 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1845 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1846 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1847 #define GL_MAX_VARYING_VECTORS 0x8DFC
1848 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1849 #define GL_RGB565 0x8D62
1850 #define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
1851 #define GL_PROGRAM_BINARY_LENGTH 0x8741
1852 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
1853 #define GL_PROGRAM_BINARY_FORMATS 0x87FF
1854 #define GL_VERTEX_SHADER_BIT 0x00000001
1855 #define GL_FRAGMENT_SHADER_BIT 0x00000002
1856 #define GL_GEOMETRY_SHADER_BIT 0x00000004
1857 #define GL_TESS_CONTROL_SHADER_BIT 0x00000008
1858 #define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
1859 #define GL_ALL_SHADER_BITS 0xFFFFFFFF
1860 #define GL_PROGRAM_SEPARABLE 0x8258
1861 #define GL_ACTIVE_PROGRAM 0x8259
1862 #define GL_PROGRAM_PIPELINE_BINDING 0x825A
1863 #define GL_MAX_VIEWPORTS 0x825B
1864 #define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
1865 #define GL_VIEWPORT_BOUNDS_RANGE 0x825D
1866 #define GL_LAYER_PROVOKING_VERTEX 0x825E
1867 #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
1868 #define GL_UNDEFINED_VERTEX 0x8260
1869 typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
1870 typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1871 typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1872 typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
1873 typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
1874 typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1875 typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1876 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
1877 typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1878 typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
1879 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);
1880 typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
1881 typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
1882 typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
1883 typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
1884 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
1885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
1886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
1888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
1890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
1892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1893 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
1894 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1895 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1896 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1897 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1898 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1899 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
1900 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1901 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1902 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1903 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1904 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1905 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1906 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1907 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1908 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1909 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1910 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1911 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
1912 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1913 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
1914 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1915 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
1916 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
1917 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1918 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1919 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1920 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1921 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1922 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1923 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1924 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1925 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1926 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1927 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1928 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1929 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1930 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1931 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1932 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1933 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1934 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
1935 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
1936 typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1937 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
1938 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
1939 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
1940 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1941 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
1942 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
1943 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
1944 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
1945 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
1946 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
1947 typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
1948 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
1949 typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
1950 typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
1951 typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
1952 typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
1953 typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
1954 typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
1955 typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
1956 typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
1957 #ifdef GL_GLEXT_PROTOTYPES
1958 GLAPI void APIENTRY glReleaseShaderCompiler (void);
1959 GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
1960 GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
1961 GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
1962 GLAPI void APIENTRY glClearDepthf (GLfloat d);
1963 GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1964 GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
1965 GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
1966 GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
1967 GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
1968 GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
1969 GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
1970 GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
1971 GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
1972 GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
1973 GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
1974 GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
1975 GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1976 GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
1977 GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1978 GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
1979 GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1980 GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
1981 GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1982 GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
1983 GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1984 GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
1985 GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1986 GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
1987 GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1988 GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
1989 GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1990 GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
1991 GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
1992 GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
1993 GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1994 GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
1995 GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
1996 GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
1997 GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
1998 GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
1999 GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
2000 GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
2001 GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
2002 GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
2003 GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
2004 GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
2005 GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
2006 GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2007 GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2008 GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2009 GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2010 GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2011 GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2012 GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2013 GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2014 GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2015 GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2016 GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2017 GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
2018 GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2019 GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2020 GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2021 GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2022 GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2023 GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
2024 GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
2025 GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
2026 GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
2027 GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
2028 GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
2029 GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2030 GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
2031 GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
2032 GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
2033 GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
2034 GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
2035 GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
2036 GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
2037 GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
2038 GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
2039 GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
2040 GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
2041 GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
2042 GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
2043 GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
2044 GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
2045 GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
2046 #endif
2047 #endif /* GL_VERSION_4_1 */
2048
2049 #ifndef GL_VERSION_4_2
2050 #define GL_VERSION_4_2 1
2051 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
2052 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
2053 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
2054 #define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
2055 #define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
2056 #define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
2057 #define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
2058 #define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
2059 #define GL_NUM_SAMPLE_COUNTS 0x9380
2060 #define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
2061 #define GL_ATOMIC_COUNTER_BUFFER 0x92C0
2062 #define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
2063 #define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
2064 #define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
2065 #define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
2066 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
2067 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
2068 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
2069 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
2070 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
2071 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
2072 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
2073 #define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
2074 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
2075 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
2076 #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
2077 #define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
2078 #define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
2079 #define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
2080 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
2081 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
2082 #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
2083 #define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
2084 #define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
2085 #define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
2086 #define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
2087 #define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
2088 #define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
2089 #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
2090 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
2091 #define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
2092 #define GL_UNIFORM_BARRIER_BIT 0x00000004
2093 #define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
2094 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
2095 #define GL_COMMAND_BARRIER_BIT 0x00000040
2096 #define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
2097 #define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
2098 #define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
2099 #define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
2100 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
2101 #define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
2102 #define GL_ALL_BARRIER_BITS 0xFFFFFFFF
2103 #define GL_MAX_IMAGE_UNITS 0x8F38
2104 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
2105 #define GL_IMAGE_BINDING_NAME 0x8F3A
2106 #define GL_IMAGE_BINDING_LEVEL 0x8F3B
2107 #define GL_IMAGE_BINDING_LAYERED 0x8F3C
2108 #define GL_IMAGE_BINDING_LAYER 0x8F3D
2109 #define GL_IMAGE_BINDING_ACCESS 0x8F3E
2110 #define GL_IMAGE_1D 0x904C
2111 #define GL_IMAGE_2D 0x904D
2112 #define GL_IMAGE_3D 0x904E
2113 #define GL_IMAGE_2D_RECT 0x904F
2114 #define GL_IMAGE_CUBE 0x9050
2115 #define GL_IMAGE_BUFFER 0x9051
2116 #define GL_IMAGE_1D_ARRAY 0x9052
2117 #define GL_IMAGE_2D_ARRAY 0x9053
2118 #define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
2119 #define GL_IMAGE_2D_MULTISAMPLE 0x9055
2120 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
2121 #define GL_INT_IMAGE_1D 0x9057
2122 #define GL_INT_IMAGE_2D 0x9058
2123 #define GL_INT_IMAGE_3D 0x9059
2124 #define GL_INT_IMAGE_2D_RECT 0x905A
2125 #define GL_INT_IMAGE_CUBE 0x905B
2126 #define GL_INT_IMAGE_BUFFER 0x905C
2127 #define GL_INT_IMAGE_1D_ARRAY 0x905D
2128 #define GL_INT_IMAGE_2D_ARRAY 0x905E
2129 #define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
2130 #define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
2131 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
2132 #define GL_UNSIGNED_INT_IMAGE_1D 0x9062
2133 #define GL_UNSIGNED_INT_IMAGE_2D 0x9063
2134 #define GL_UNSIGNED_INT_IMAGE_3D 0x9064
2135 #define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
2136 #define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
2137 #define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
2138 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
2139 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
2140 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
2141 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
2142 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
2143 #define GL_MAX_IMAGE_SAMPLES 0x906D
2144 #define GL_IMAGE_BINDING_FORMAT 0x906E
2145 #define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
2146 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
2147 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
2148 #define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
2149 #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
2150 #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
2151 #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
2152 #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
2153 #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
2154 #define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
2155 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
2156 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
2157 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
2158 #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
2159 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2160 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2161 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2162 typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2163 typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2164 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2165 typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
2166 typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2167 typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2168 typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2169 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
2170 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2171 #ifdef GL_GLEXT_PROTOTYPES
2172 GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
2173 GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
2174 GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
2175 GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
2176 GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
2177 GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
2178 GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
2179 GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
2180 GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
2181 GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
2182 GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
2183 GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
2184 #endif
2185 #endif /* GL_VERSION_4_2 */
2186
2187 #ifndef GL_VERSION_4_3
2188 #define GL_VERSION_4_3 1
2189 typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2190 #define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
2191 #define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
2192 #define GL_COMPRESSED_RGB8_ETC2 0x9274
2193 #define GL_COMPRESSED_SRGB8_ETC2 0x9275
2194 #define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
2195 #define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
2196 #define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
2197 #define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
2198 #define GL_COMPRESSED_R11_EAC 0x9270
2199 #define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
2200 #define GL_COMPRESSED_RG11_EAC 0x9272
2201 #define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
2202 #define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
2203 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
2204 #define GL_MAX_ELEMENT_INDEX 0x8D6B
2205 #define GL_COMPUTE_SHADER 0x91B9
2206 #define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
2207 #define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
2208 #define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
2209 #define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
2210 #define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
2211 #define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
2212 #define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
2213 #define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
2214 #define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
2215 #define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
2216 #define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
2217 #define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
2218 #define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
2219 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
2220 #define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
2221 #define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
2222 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
2223 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
2224 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244
2225 #define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
2226 #define GL_DEBUG_SOURCE_API 0x8246
2227 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
2228 #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
2229 #define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
2230 #define GL_DEBUG_SOURCE_APPLICATION 0x824A
2231 #define GL_DEBUG_SOURCE_OTHER 0x824B
2232 #define GL_DEBUG_TYPE_ERROR 0x824C
2233 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
2234 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
2235 #define GL_DEBUG_TYPE_PORTABILITY 0x824F
2236 #define GL_DEBUG_TYPE_PERFORMANCE 0x8250
2237 #define GL_DEBUG_TYPE_OTHER 0x8251
2238 #define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
2239 #define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
2240 #define GL_DEBUG_LOGGED_MESSAGES 0x9145
2241 #define GL_DEBUG_SEVERITY_HIGH 0x9146
2242 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147
2243 #define GL_DEBUG_SEVERITY_LOW 0x9148
2244 #define GL_DEBUG_TYPE_MARKER 0x8268
2245 #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
2246 #define GL_DEBUG_TYPE_POP_GROUP 0x826A
2247 #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
2248 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
2249 #define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
2250 #define GL_BUFFER 0x82E0
2251 #define GL_SHADER 0x82E1
2252 #define GL_PROGRAM 0x82E2
2253 #define GL_QUERY 0x82E3
2254 #define GL_PROGRAM_PIPELINE 0x82E4
2255 #define GL_SAMPLER 0x82E6
2256 #define GL_MAX_LABEL_LENGTH 0x82E8
2257 #define GL_DEBUG_OUTPUT 0x92E0
2258 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
2259 #define GL_MAX_UNIFORM_LOCATIONS 0x826E
2260 #define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
2261 #define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
2262 #define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
2263 #define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
2264 #define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
2265 #define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
2266 #define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
2267 #define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
2268 #define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
2269 #define GL_INTERNALFORMAT_SUPPORTED 0x826F
2270 #define GL_INTERNALFORMAT_PREFERRED 0x8270
2271 #define GL_INTERNALFORMAT_RED_SIZE 0x8271
2272 #define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
2273 #define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
2274 #define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
2275 #define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
2276 #define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
2277 #define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
2278 #define GL_INTERNALFORMAT_RED_TYPE 0x8278
2279 #define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
2280 #define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
2281 #define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
2282 #define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
2283 #define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
2284 #define GL_MAX_WIDTH 0x827E
2285 #define GL_MAX_HEIGHT 0x827F
2286 #define GL_MAX_DEPTH 0x8280
2287 #define GL_MAX_LAYERS 0x8281
2288 #define GL_MAX_COMBINED_DIMENSIONS 0x8282
2289 #define GL_COLOR_COMPONENTS 0x8283
2290 #define GL_DEPTH_COMPONENTS 0x8284
2291 #define GL_STENCIL_COMPONENTS 0x8285
2292 #define GL_COLOR_RENDERABLE 0x8286
2293 #define GL_DEPTH_RENDERABLE 0x8287
2294 #define GL_STENCIL_RENDERABLE 0x8288
2295 #define GL_FRAMEBUFFER_RENDERABLE 0x8289
2296 #define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
2297 #define GL_FRAMEBUFFER_BLEND 0x828B
2298 #define GL_READ_PIXELS 0x828C
2299 #define GL_READ_PIXELS_FORMAT 0x828D
2300 #define GL_READ_PIXELS_TYPE 0x828E
2301 #define GL_TEXTURE_IMAGE_FORMAT 0x828F
2302 #define GL_TEXTURE_IMAGE_TYPE 0x8290
2303 #define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
2304 #define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
2305 #define GL_MIPMAP 0x8293
2306 #define GL_MANUAL_GENERATE_MIPMAP 0x8294
2307 #define GL_AUTO_GENERATE_MIPMAP 0x8295
2308 #define GL_COLOR_ENCODING 0x8296
2309 #define GL_SRGB_READ 0x8297
2310 #define GL_SRGB_WRITE 0x8298
2311 #define GL_FILTER 0x829A
2312 #define GL_VERTEX_TEXTURE 0x829B
2313 #define GL_TESS_CONTROL_TEXTURE 0x829C
2314 #define GL_TESS_EVALUATION_TEXTURE 0x829D
2315 #define GL_GEOMETRY_TEXTURE 0x829E
2316 #define GL_FRAGMENT_TEXTURE 0x829F
2317 #define GL_COMPUTE_TEXTURE 0x82A0
2318 #define GL_TEXTURE_SHADOW 0x82A1
2319 #define GL_TEXTURE_GATHER 0x82A2
2320 #define GL_TEXTURE_GATHER_SHADOW 0x82A3
2321 #define GL_SHADER_IMAGE_LOAD 0x82A4
2322 #define GL_SHADER_IMAGE_STORE 0x82A5
2323 #define GL_SHADER_IMAGE_ATOMIC 0x82A6
2324 #define GL_IMAGE_TEXEL_SIZE 0x82A7
2325 #define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
2326 #define GL_IMAGE_PIXEL_FORMAT 0x82A9
2327 #define GL_IMAGE_PIXEL_TYPE 0x82AA
2328 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
2329 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
2330 #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
2331 #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
2332 #define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
2333 #define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
2334 #define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
2335 #define GL_CLEAR_BUFFER 0x82B4
2336 #define GL_TEXTURE_VIEW 0x82B5
2337 #define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
2338 #define GL_FULL_SUPPORT 0x82B7
2339 #define GL_CAVEAT_SUPPORT 0x82B8
2340 #define GL_IMAGE_CLASS_4_X_32 0x82B9
2341 #define GL_IMAGE_CLASS_2_X_32 0x82BA
2342 #define GL_IMAGE_CLASS_1_X_32 0x82BB
2343 #define GL_IMAGE_CLASS_4_X_16 0x82BC
2344 #define GL_IMAGE_CLASS_2_X_16 0x82BD
2345 #define GL_IMAGE_CLASS_1_X_16 0x82BE
2346 #define GL_IMAGE_CLASS_4_X_8 0x82BF
2347 #define GL_IMAGE_CLASS_2_X_8 0x82C0
2348 #define GL_IMAGE_CLASS_1_X_8 0x82C1
2349 #define GL_IMAGE_CLASS_11_11_10 0x82C2
2350 #define GL_IMAGE_CLASS_10_10_10_2 0x82C3
2351 #define GL_VIEW_CLASS_128_BITS 0x82C4
2352 #define GL_VIEW_CLASS_96_BITS 0x82C5
2353 #define GL_VIEW_CLASS_64_BITS 0x82C6
2354 #define GL_VIEW_CLASS_48_BITS 0x82C7
2355 #define GL_VIEW_CLASS_32_BITS 0x82C8
2356 #define GL_VIEW_CLASS_24_BITS 0x82C9
2357 #define GL_VIEW_CLASS_16_BITS 0x82CA
2358 #define GL_VIEW_CLASS_8_BITS 0x82CB
2359 #define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
2360 #define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
2361 #define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
2362 #define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
2363 #define GL_VIEW_CLASS_RGTC1_RED 0x82D0
2364 #define GL_VIEW_CLASS_RGTC2_RG 0x82D1
2365 #define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
2366 #define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
2367 #define GL_UNIFORM 0x92E1
2368 #define GL_UNIFORM_BLOCK 0x92E2
2369 #define GL_PROGRAM_INPUT 0x92E3
2370 #define GL_PROGRAM_OUTPUT 0x92E4
2371 #define GL_BUFFER_VARIABLE 0x92E5
2372 #define GL_SHADER_STORAGE_BLOCK 0x92E6
2373 #define GL_VERTEX_SUBROUTINE 0x92E8
2374 #define GL_TESS_CONTROL_SUBROUTINE 0x92E9
2375 #define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
2376 #define GL_GEOMETRY_SUBROUTINE 0x92EB
2377 #define GL_FRAGMENT_SUBROUTINE 0x92EC
2378 #define GL_COMPUTE_SUBROUTINE 0x92ED
2379 #define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
2380 #define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
2381 #define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
2382 #define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
2383 #define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
2384 #define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
2385 #define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
2386 #define GL_ACTIVE_RESOURCES 0x92F5
2387 #define GL_MAX_NAME_LENGTH 0x92F6
2388 #define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
2389 #define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
2390 #define GL_NAME_LENGTH 0x92F9
2391 #define GL_TYPE 0x92FA
2392 #define GL_ARRAY_SIZE 0x92FB
2393 #define GL_OFFSET 0x92FC
2394 #define GL_BLOCK_INDEX 0x92FD
2395 #define GL_ARRAY_STRIDE 0x92FE
2396 #define GL_MATRIX_STRIDE 0x92FF
2397 #define GL_IS_ROW_MAJOR 0x9300
2398 #define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
2399 #define GL_BUFFER_BINDING 0x9302
2400 #define GL_BUFFER_DATA_SIZE 0x9303
2401 #define GL_NUM_ACTIVE_VARIABLES 0x9304
2402 #define GL_ACTIVE_VARIABLES 0x9305
2403 #define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
2404 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
2405 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
2406 #define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
2407 #define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
2408 #define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
2409 #define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
2410 #define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
2411 #define GL_LOCATION 0x930E
2412 #define GL_LOCATION_INDEX 0x930F
2413 #define GL_IS_PER_PATCH 0x92E7
2414 #define GL_SHADER_STORAGE_BUFFER 0x90D2
2415 #define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
2416 #define GL_SHADER_STORAGE_BUFFER_START 0x90D4
2417 #define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
2418 #define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
2419 #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
2420 #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
2421 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
2422 #define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
2423 #define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
2424 #define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
2425 #define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
2426 #define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
2427 #define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
2428 #define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000
2429 #define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
2430 #define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
2431 #define GL_TEXTURE_BUFFER_OFFSET 0x919D
2432 #define GL_TEXTURE_BUFFER_SIZE 0x919E
2433 #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
2434 #define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
2435 #define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
2436 #define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
2437 #define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
2438 #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
2439 #define GL_VERTEX_ATTRIB_BINDING 0x82D4
2440 #define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
2441 #define GL_VERTEX_BINDING_DIVISOR 0x82D6
2442 #define GL_VERTEX_BINDING_OFFSET 0x82D7
2443 #define GL_VERTEX_BINDING_STRIDE 0x82D8
2444 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
2445 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
2446 #define GL_VERTEX_BINDING_BUFFER 0x8F4F
2447 #define GL_DISPLAY_LIST 0x82E7
2448 typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2449 typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2450 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2451 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
2452 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2453 typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
2454 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
2455 typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2456 typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2457 typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
2458 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
2459 typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
2460 typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2461 typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2462 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2463 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2464 typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2465 typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2466 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2467 typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2468 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2469 typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
2470 typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2471 typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2472 typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2473 typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2474 typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2475 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2476 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2477 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2478 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2479 typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
2480 typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
2481 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2482 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2483 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
2484 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2485 typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2486 typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
2487 typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2488 typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2489 typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
2490 typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2491 #ifdef GL_GLEXT_PROTOTYPES
2492 GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
2493 GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
2494 GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
2495 GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
2496 GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
2497 GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
2498 GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
2499 GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
2500 GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
2501 GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
2502 GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
2503 GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
2504 GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
2505 GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
2506 GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
2507 GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
2508 GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
2509 GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
2510 GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
2511 GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
2512 GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
2513 GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
2514 GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
2515 GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
2516 GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
2517 GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
2518 GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
2519 GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
2520 GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
2521 GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2522 GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
2523 GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
2524 GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
2525 GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2526 GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2527 GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
2528 GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2529 GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
2530 GLAPI void APIENTRY glPopDebugGroup (void);
2531 GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
2532 GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
2533 GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
2534 GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
2535 #endif
2536 #endif /* GL_VERSION_4_3 */
2537
2538 #ifndef GL_VERSION_4_4
2539 #define GL_VERSION_4_4 1
2540 #define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
2541 #define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
2542 #define GL_TEXTURE_BUFFER_BINDING 0x8C2A
2543 #define GL_MAP_PERSISTENT_BIT 0x0040
2544 #define GL_MAP_COHERENT_BIT 0x0080
2545 #define GL_DYNAMIC_STORAGE_BIT 0x0100
2546 #define GL_CLIENT_STORAGE_BIT 0x0200
2547 #define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
2548 #define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
2549 #define GL_BUFFER_STORAGE_FLAGS 0x8220
2550 #define GL_CLEAR_TEXTURE 0x9365
2551 #define GL_LOCATION_COMPONENT 0x934A
2552 #define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
2553 #define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
2554 #define GL_QUERY_BUFFER 0x9192
2555 #define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
2556 #define GL_QUERY_BUFFER_BINDING 0x9193
2557 #define GL_QUERY_RESULT_NO_WAIT 0x9194
2558 #define GL_MIRROR_CLAMP_TO_EDGE 0x8743
2559 typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2560 typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2561 typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2562 typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2563 typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2564 typedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2565 typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);
2566 typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);
2567 typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2568 #ifdef GL_GLEXT_PROTOTYPES
2569 GLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
2570 GLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
2571 GLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
2572 GLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);
2573 GLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
2574 GLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);
2575 GLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);
2576 GLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);
2577 GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
2578 #endif
2579 #endif /* GL_VERSION_4_4 */
2580
2581 #ifndef GL_ARB_ES2_compatibility
2582 #define GL_ARB_ES2_compatibility 1
2583 #endif /* GL_ARB_ES2_compatibility */
2584
2585 #ifndef GL_ARB_ES3_compatibility
2586 #define GL_ARB_ES3_compatibility 1
2587 #endif /* GL_ARB_ES3_compatibility */
2588
2589 #ifndef GL_ARB_arrays_of_arrays
2590 #define GL_ARB_arrays_of_arrays 1
2591 #endif /* GL_ARB_arrays_of_arrays */
2592
2593 #ifndef GL_ARB_base_instance
2594 #define GL_ARB_base_instance 1
2595 #endif /* GL_ARB_base_instance */
2596
2597 #ifndef GL_ARB_bindless_texture
2598 #define GL_ARB_bindless_texture 1
2599 typedef uint64_t GLuint64EXT;
2600 #define GL_UNSIGNED_INT64_ARB 0x140F
2601 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
2602 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
2603 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2604 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2605 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2606 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
2607 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
2608 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
2609 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);
2610 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
2611 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2612 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
2613 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
2614 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
2615 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
2616 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
2617 #ifdef GL_GLEXT_PROTOTYPES
2618 GLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);
2619 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);
2620 GLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);
2621 GLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);
2622 GLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
2623 GLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);
2624 GLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);
2625 GLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);
2626 GLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);
2627 GLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);
2628 GLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
2629 GLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);
2630 GLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);
2631 GLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);
2632 GLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);
2633 GLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);
2634 #endif
2635 #endif /* GL_ARB_bindless_texture */
2636
2637 #ifndef GL_ARB_blend_func_extended
2638 #define GL_ARB_blend_func_extended 1
2639 #endif /* GL_ARB_blend_func_extended */
2640
2641 #ifndef GL_ARB_buffer_storage
2642 #define GL_ARB_buffer_storage 1
2643 #endif /* GL_ARB_buffer_storage */
2644
2645 #ifndef GL_ARB_cl_event
2646 #define GL_ARB_cl_event 1
2647 struct _cl_context;
2648 struct _cl_event;
2649 #define GL_SYNC_CL_EVENT_ARB 0x8240
2650 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
2651 typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2652 #ifdef GL_GLEXT_PROTOTYPES
2653 GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
2654 #endif
2655 #endif /* GL_ARB_cl_event */
2656
2657 #ifndef GL_ARB_clear_buffer_object
2658 #define GL_ARB_clear_buffer_object 1
2659 #endif /* GL_ARB_clear_buffer_object */
2660
2661 #ifndef GL_ARB_clear_texture
2662 #define GL_ARB_clear_texture 1
2663 #endif /* GL_ARB_clear_texture */
2664
2665 #ifndef GL_ARB_color_buffer_float
2666 #define GL_ARB_color_buffer_float 1
2667 #define GL_RGBA_FLOAT_MODE_ARB 0x8820
2668 #define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
2669 #define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
2670 #define GL_CLAMP_READ_COLOR_ARB 0x891C
2671 #define GL_FIXED_ONLY_ARB 0x891D
2672 typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
2673 #ifdef GL_GLEXT_PROTOTYPES
2674 GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
2675 #endif
2676 #endif /* GL_ARB_color_buffer_float */
2677
2678 #ifndef GL_ARB_compatibility
2679 #define GL_ARB_compatibility 1
2680 #endif /* GL_ARB_compatibility */
2681
2682 #ifndef GL_ARB_compressed_texture_pixel_storage
2683 #define GL_ARB_compressed_texture_pixel_storage 1
2684 #endif /* GL_ARB_compressed_texture_pixel_storage */
2685
2686 #ifndef GL_ARB_compute_shader
2687 #define GL_ARB_compute_shader 1
2688 #define GL_COMPUTE_SHADER_BIT 0x00000020
2689 #endif /* GL_ARB_compute_shader */
2690
2691 #ifndef GL_ARB_compute_variable_group_size
2692 #define GL_ARB_compute_variable_group_size 1
2693 #define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
2694 #define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
2695 #define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
2696 #define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
2697 typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2698 #ifdef GL_GLEXT_PROTOTYPES
2699 GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
2700 #endif
2701 #endif /* GL_ARB_compute_variable_group_size */
2702
2703 #ifndef GL_ARB_conservative_depth
2704 #define GL_ARB_conservative_depth 1
2705 #endif /* GL_ARB_conservative_depth */
2706
2707 #ifndef GL_ARB_copy_buffer
2708 #define GL_ARB_copy_buffer 1
2709 #define GL_COPY_READ_BUFFER_BINDING 0x8F36
2710 #define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
2711 #endif /* GL_ARB_copy_buffer */
2712
2713 #ifndef GL_ARB_copy_image
2714 #define GL_ARB_copy_image 1
2715 #endif /* GL_ARB_copy_image */
2716
2717 #ifndef GL_ARB_debug_output
2718 #define GL_ARB_debug_output 1
2719 typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
2720 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
2721 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
2722 #define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
2723 #define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
2724 #define GL_DEBUG_SOURCE_API_ARB 0x8246
2725 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
2726 #define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
2727 #define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
2728 #define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
2729 #define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
2730 #define GL_DEBUG_TYPE_ERROR_ARB 0x824C
2731 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
2732 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
2733 #define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
2734 #define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
2735 #define GL_DEBUG_TYPE_OTHER_ARB 0x8251
2736 #define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
2737 #define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
2738 #define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
2739 #define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
2740 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
2741 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
2742 typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2743 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2744 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
2745 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2746 #ifdef GL_GLEXT_PROTOTYPES
2747 GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
2748 GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
2749 GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);
2750 GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
2751 #endif
2752 #endif /* GL_ARB_debug_output */
2753
2754 #ifndef GL_ARB_depth_buffer_float
2755 #define GL_ARB_depth_buffer_float 1
2756 #endif /* GL_ARB_depth_buffer_float */
2757
2758 #ifndef GL_ARB_depth_clamp
2759 #define GL_ARB_depth_clamp 1
2760 #endif /* GL_ARB_depth_clamp */
2761
2762 #ifndef GL_ARB_depth_texture
2763 #define GL_ARB_depth_texture 1
2764 #define GL_DEPTH_COMPONENT16_ARB 0x81A5
2765 #define GL_DEPTH_COMPONENT24_ARB 0x81A6
2766 #define GL_DEPTH_COMPONENT32_ARB 0x81A7
2767 #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
2768 #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
2769 #endif /* GL_ARB_depth_texture */
2770
2771 #ifndef GL_ARB_draw_buffers
2772 #define GL_ARB_draw_buffers 1
2773 #define GL_MAX_DRAW_BUFFERS_ARB 0x8824
2774 #define GL_DRAW_BUFFER0_ARB 0x8825
2775 #define GL_DRAW_BUFFER1_ARB 0x8826
2776 #define GL_DRAW_BUFFER2_ARB 0x8827
2777 #define GL_DRAW_BUFFER3_ARB 0x8828
2778 #define GL_DRAW_BUFFER4_ARB 0x8829
2779 #define GL_DRAW_BUFFER5_ARB 0x882A
2780 #define GL_DRAW_BUFFER6_ARB 0x882B
2781 #define GL_DRAW_BUFFER7_ARB 0x882C
2782 #define GL_DRAW_BUFFER8_ARB 0x882D
2783 #define GL_DRAW_BUFFER9_ARB 0x882E
2784 #define GL_DRAW_BUFFER10_ARB 0x882F
2785 #define GL_DRAW_BUFFER11_ARB 0x8830
2786 #define GL_DRAW_BUFFER12_ARB 0x8831
2787 #define GL_DRAW_BUFFER13_ARB 0x8832
2788 #define GL_DRAW_BUFFER14_ARB 0x8833
2789 #define GL_DRAW_BUFFER15_ARB 0x8834
2790 typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
2791 #ifdef GL_GLEXT_PROTOTYPES
2792 GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
2793 #endif
2794 #endif /* GL_ARB_draw_buffers */
2795
2796 #ifndef GL_ARB_draw_buffers_blend
2797 #define GL_ARB_draw_buffers_blend 1
2798 typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
2799 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2800 typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
2801 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2802 #ifdef GL_GLEXT_PROTOTYPES
2803 GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
2804 GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
2805 GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
2806 GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
2807 #endif
2808 #endif /* GL_ARB_draw_buffers_blend */
2809
2810 #ifndef GL_ARB_draw_elements_base_vertex
2811 #define GL_ARB_draw_elements_base_vertex 1
2812 #endif /* GL_ARB_draw_elements_base_vertex */
2813
2814 #ifndef GL_ARB_draw_indirect
2815 #define GL_ARB_draw_indirect 1
2816 #endif /* GL_ARB_draw_indirect */
2817
2818 #ifndef GL_ARB_draw_instanced
2819 #define GL_ARB_draw_instanced 1
2820 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2821 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2822 #ifdef GL_GLEXT_PROTOTYPES
2823 GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
2824 GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
2825 #endif
2826 #endif /* GL_ARB_draw_instanced */
2827
2828 #ifndef GL_ARB_enhanced_layouts
2829 #define GL_ARB_enhanced_layouts 1
2830 #endif /* GL_ARB_enhanced_layouts */
2831
2832 #ifndef GL_ARB_explicit_attrib_location
2833 #define GL_ARB_explicit_attrib_location 1
2834 #endif /* GL_ARB_explicit_attrib_location */
2835
2836 #ifndef GL_ARB_explicit_uniform_location
2837 #define GL_ARB_explicit_uniform_location 1
2838 #endif /* GL_ARB_explicit_uniform_location */
2839
2840 #ifndef GL_ARB_fragment_coord_conventions
2841 #define GL_ARB_fragment_coord_conventions 1
2842 #endif /* GL_ARB_fragment_coord_conventions */
2843
2844 #ifndef GL_ARB_fragment_layer_viewport
2845 #define GL_ARB_fragment_layer_viewport 1
2846 #endif /* GL_ARB_fragment_layer_viewport */
2847
2848 #ifndef GL_ARB_fragment_program
2849 #define GL_ARB_fragment_program 1
2850 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
2851 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
2852 #define GL_PROGRAM_LENGTH_ARB 0x8627
2853 #define GL_PROGRAM_FORMAT_ARB 0x8876
2854 #define GL_PROGRAM_BINDING_ARB 0x8677
2855 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
2856 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
2857 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
2858 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
2859 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
2860 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
2861 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
2862 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
2863 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8
2864 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
2865 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
2866 #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
2867 #define GL_PROGRAM_ATTRIBS_ARB 0x88AC
2868 #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
2869 #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
2870 #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
2871 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
2872 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
2873 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
2874 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
2875 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
2876 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
2877 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
2878 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
2879 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
2880 #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
2881 #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
2882 #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
2883 #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
2884 #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
2885 #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
2886 #define GL_PROGRAM_STRING_ARB 0x8628
2887 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
2888 #define GL_CURRENT_MATRIX_ARB 0x8641
2889 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
2890 #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
2891 #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
2892 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
2893 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871
2894 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
2895 #define GL_PROGRAM_ERROR_STRING_ARB 0x8874
2896 #define GL_MATRIX0_ARB 0x88C0
2897 #define GL_MATRIX1_ARB 0x88C1
2898 #define GL_MATRIX2_ARB 0x88C2
2899 #define GL_MATRIX3_ARB 0x88C3
2900 #define GL_MATRIX4_ARB 0x88C4
2901 #define GL_MATRIX5_ARB 0x88C5
2902 #define GL_MATRIX6_ARB 0x88C6
2903 #define GL_MATRIX7_ARB 0x88C7
2904 #define GL_MATRIX8_ARB 0x88C8
2905 #define GL_MATRIX9_ARB 0x88C9
2906 #define GL_MATRIX10_ARB 0x88CA
2907 #define GL_MATRIX11_ARB 0x88CB
2908 #define GL_MATRIX12_ARB 0x88CC
2909 #define GL_MATRIX13_ARB 0x88CD
2910 #define GL_MATRIX14_ARB 0x88CE
2911 #define GL_MATRIX15_ARB 0x88CF
2912 #define GL_MATRIX16_ARB 0x88D0
2913 #define GL_MATRIX17_ARB 0x88D1
2914 #define GL_MATRIX18_ARB 0x88D2
2915 #define GL_MATRIX19_ARB 0x88D3
2916 #define GL_MATRIX20_ARB 0x88D4
2917 #define GL_MATRIX21_ARB 0x88D5
2918 #define GL_MATRIX22_ARB 0x88D6
2919 #define GL_MATRIX23_ARB 0x88D7
2920 #define GL_MATRIX24_ARB 0x88D8
2921 #define GL_MATRIX25_ARB 0x88D9
2922 #define GL_MATRIX26_ARB 0x88DA
2923 #define GL_MATRIX27_ARB 0x88DB
2924 #define GL_MATRIX28_ARB 0x88DC
2925 #define GL_MATRIX29_ARB 0x88DD
2926 #define GL_MATRIX30_ARB 0x88DE
2927 #define GL_MATRIX31_ARB 0x88DF
2928 typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
2929 typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
2930 typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
2931 typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
2932 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2933 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2934 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2935 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2936 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2937 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
2938 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2939 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
2940 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2941 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2942 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
2943 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
2944 typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
2945 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
2946 typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
2947 #ifdef GL_GLEXT_PROTOTYPES
2948 GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);
2949 GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
2950 GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
2951 GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
2952 GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2953 GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2954 GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2955 GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2956 GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
2957 GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
2958 GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
2959 GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
2960 GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2961 GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2962 GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
2963 GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
2964 GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
2965 GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);
2966 GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
2967 #endif
2968 #endif /* GL_ARB_fragment_program */
2969
2970 #ifndef GL_ARB_fragment_program_shadow
2971 #define GL_ARB_fragment_program_shadow 1
2972 #endif /* GL_ARB_fragment_program_shadow */
2973
2974 #ifndef GL_ARB_fragment_shader
2975 #define GL_ARB_fragment_shader 1
2976 #define GL_FRAGMENT_SHADER_ARB 0x8B30
2977 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
2978 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
2979 #endif /* GL_ARB_fragment_shader */
2980
2981 #ifndef GL_ARB_framebuffer_no_attachments
2982 #define GL_ARB_framebuffer_no_attachments 1
2983 #endif /* GL_ARB_framebuffer_no_attachments */
2984
2985 #ifndef GL_ARB_framebuffer_object
2986 #define GL_ARB_framebuffer_object 1
2987 #endif /* GL_ARB_framebuffer_object */
2988
2989 #ifndef GL_ARB_framebuffer_sRGB
2990 #define GL_ARB_framebuffer_sRGB 1
2991 #endif /* GL_ARB_framebuffer_sRGB */
2992
2993 #ifndef GL_KHR_context_flush_control
2994 #define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
2995 #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
2996 #endif /* GL_KHR_context_flush_control */
2997
2998 #ifndef GL_ARB_geometry_shader4
2999 #define GL_ARB_geometry_shader4 1
3000 #define GL_LINES_ADJACENCY_ARB 0x000A
3001 #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
3002 #define GL_TRIANGLES_ADJACENCY_ARB 0x000C
3003 #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
3004 #define GL_PROGRAM_POINT_SIZE_ARB 0x8642
3005 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
3006 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
3007 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
3008 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
3009 #define GL_GEOMETRY_SHADER_ARB 0x8DD9
3010 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
3011 #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
3012 #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
3013 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
3014 #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
3015 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
3016 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
3017 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
3018 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
3019 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
3020 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3021 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3022 #ifdef GL_GLEXT_PROTOTYPES
3023 GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
3024 GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
3025 GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
3026 GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
3027 #endif
3028 #endif /* GL_ARB_geometry_shader4 */
3029
3030 #ifndef GL_ARB_get_program_binary
3031 #define GL_ARB_get_program_binary 1
3032 #endif /* GL_ARB_get_program_binary */
3033
3034 #ifndef GL_ARB_gpu_shader5
3035 #define GL_ARB_gpu_shader5 1
3036 #endif /* GL_ARB_gpu_shader5 */
3037
3038 #ifndef GL_ARB_gpu_shader_fp64
3039 #define GL_ARB_gpu_shader_fp64 1
3040 #endif /* GL_ARB_gpu_shader_fp64 */
3041
3042 #ifndef GL_ARB_half_float_pixel
3043 #define GL_ARB_half_float_pixel 1
3044 typedef unsigned short GLhalfARB;
3045 #define GL_HALF_FLOAT_ARB 0x140B
3046 #endif /* GL_ARB_half_float_pixel */
3047
3048 #ifndef GL_ARB_half_float_vertex
3049 #define GL_ARB_half_float_vertex 1
3050 #endif /* GL_ARB_half_float_vertex */
3051
3052 #ifndef GL_ARB_imaging
3053 #define GL_ARB_imaging 1
3054 #define GL_BLEND_COLOR 0x8005
3055 #define GL_BLEND_EQUATION 0x8009
3056 #define GL_CONVOLUTION_1D 0x8010
3057 #define GL_CONVOLUTION_2D 0x8011
3058 #define GL_SEPARABLE_2D 0x8012
3059 #define GL_CONVOLUTION_BORDER_MODE 0x8013
3060 #define GL_CONVOLUTION_FILTER_SCALE 0x8014
3061 #define GL_CONVOLUTION_FILTER_BIAS 0x8015
3062 #define GL_REDUCE 0x8016
3063 #define GL_CONVOLUTION_FORMAT 0x8017
3064 #define GL_CONVOLUTION_WIDTH 0x8018
3065 #define GL_CONVOLUTION_HEIGHT 0x8019
3066 #define GL_MAX_CONVOLUTION_WIDTH 0x801A
3067 #define GL_MAX_CONVOLUTION_HEIGHT 0x801B
3068 #define GL_POST_CONVOLUTION_RED_SCALE 0x801C
3069 #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
3070 #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
3071 #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
3072 #define GL_POST_CONVOLUTION_RED_BIAS 0x8020
3073 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
3074 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
3075 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
3076 #define GL_HISTOGRAM 0x8024
3077 #define GL_PROXY_HISTOGRAM 0x8025
3078 #define GL_HISTOGRAM_WIDTH 0x8026
3079 #define GL_HISTOGRAM_FORMAT 0x8027
3080 #define GL_HISTOGRAM_RED_SIZE 0x8028
3081 #define GL_HISTOGRAM_GREEN_SIZE 0x8029
3082 #define GL_HISTOGRAM_BLUE_SIZE 0x802A
3083 #define GL_HISTOGRAM_ALPHA_SIZE 0x802B
3084 #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
3085 #define GL_HISTOGRAM_SINK 0x802D
3086 #define GL_MINMAX 0x802E
3087 #define GL_MINMAX_FORMAT 0x802F
3088 #define GL_MINMAX_SINK 0x8030
3089 #define GL_TABLE_TOO_LARGE 0x8031
3090 #define GL_COLOR_MATRIX 0x80B1
3091 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
3092 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
3093 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
3094 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
3095 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
3096 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
3097 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
3098 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
3099 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
3100 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
3101 #define GL_COLOR_TABLE 0x80D0
3102 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
3103 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
3104 #define GL_PROXY_COLOR_TABLE 0x80D3
3105 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
3106 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
3107 #define GL_COLOR_TABLE_SCALE 0x80D6
3108 #define GL_COLOR_TABLE_BIAS 0x80D7
3109 #define GL_COLOR_TABLE_FORMAT 0x80D8
3110 #define GL_COLOR_TABLE_WIDTH 0x80D9
3111 #define GL_COLOR_TABLE_RED_SIZE 0x80DA
3112 #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
3113 #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
3114 #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
3115 #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
3116 #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
3117 #define GL_CONSTANT_BORDER 0x8151
3118 #define GL_REPLICATE_BORDER 0x8153
3119 #define GL_CONVOLUTION_BORDER_COLOR 0x8154
3120 typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3121 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3122 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3123 typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3124 typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
3125 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3126 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3127 typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3128 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3129 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3130 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3131 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
3132 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
3133 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
3134 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
3135 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3136 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3137 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
3138 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3139 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3140 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3141 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3142 typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3143 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3144 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3145 typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3146 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
3147 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
3148 typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3149 typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
3150 typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
3151 typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
3152 #ifdef GL_GLEXT_PROTOTYPES
3153 GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
3154 GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3155 GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
3156 GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3157 GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);
3158 GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
3159 GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
3160 GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
3161 GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
3162 GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
3163 GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
3164 GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
3165 GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
3166 GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
3167 GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
3168 GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
3169 GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
3170 GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);
3171 GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
3172 GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
3173 GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
3174 GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
3175 GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3176 GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
3177 GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
3178 GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
3179 GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
3180 GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
3181 GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
3182 GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
3183 GLAPI void APIENTRY glResetHistogram (GLenum target);
3184 GLAPI void APIENTRY glResetMinmax (GLenum target);
3185 #endif
3186 #endif /* GL_ARB_imaging */
3187
3188 #ifndef GL_ARB_indirect_parameters
3189 #define GL_ARB_indirect_parameters 1
3190 #define GL_PARAMETER_BUFFER_ARB 0x80EE
3191 #define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
3192 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3193 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3194 #ifdef GL_GLEXT_PROTOTYPES
3195 GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3196 GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
3197 #endif
3198 #endif /* GL_ARB_indirect_parameters */
3199
3200 #ifndef GL_ARB_instanced_arrays
3201 #define GL_ARB_instanced_arrays 1
3202 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
3203 typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
3204 #ifdef GL_GLEXT_PROTOTYPES
3205 GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
3206 #endif
3207 #endif /* GL_ARB_instanced_arrays */
3208
3209 #ifndef GL_ARB_internalformat_query
3210 #define GL_ARB_internalformat_query 1
3211 #endif /* GL_ARB_internalformat_query */
3212
3213 #ifndef GL_ARB_internalformat_query2
3214 #define GL_ARB_internalformat_query2 1
3215 #define GL_SRGB_DECODE_ARB 0x8299
3216 #endif /* GL_ARB_internalformat_query2 */
3217
3218 #ifndef GL_ARB_invalidate_subdata
3219 #define GL_ARB_invalidate_subdata 1
3220 #endif /* GL_ARB_invalidate_subdata */
3221
3222 #ifndef GL_ARB_map_buffer_alignment
3223 #define GL_ARB_map_buffer_alignment 1
3224 #endif /* GL_ARB_map_buffer_alignment */
3225
3226 #ifndef GL_ARB_map_buffer_range
3227 #define GL_ARB_map_buffer_range 1
3228 #endif /* GL_ARB_map_buffer_range */
3229
3230 #ifndef GL_ARB_matrix_palette
3231 #define GL_ARB_matrix_palette 1
3232 #define GL_MATRIX_PALETTE_ARB 0x8840
3233 #define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
3234 #define GL_MAX_PALETTE_MATRICES_ARB 0x8842
3235 #define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
3236 #define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
3237 #define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
3238 #define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
3239 #define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
3240 #define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
3241 #define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
3242 typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
3243 typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
3244 typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
3245 typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
3246 typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
3247 #ifdef GL_GLEXT_PROTOTYPES
3248 GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
3249 GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
3250 GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
3251 GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
3252 GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
3253 #endif
3254 #endif /* GL_ARB_matrix_palette */
3255
3256 #ifndef GL_ARB_multi_bind
3257 #define GL_ARB_multi_bind 1
3258 #endif /* GL_ARB_multi_bind */
3259
3260 #ifndef GL_ARB_multi_draw_indirect
3261 #define GL_ARB_multi_draw_indirect 1
3262 #endif /* GL_ARB_multi_draw_indirect */
3263
3264 #ifndef GL_ARB_multisample
3265 #define GL_ARB_multisample 1
3266 #define GL_MULTISAMPLE_ARB 0x809D
3267 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
3268 #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
3269 #define GL_SAMPLE_COVERAGE_ARB 0x80A0
3270 #define GL_SAMPLE_BUFFERS_ARB 0x80A8
3271 #define GL_SAMPLES_ARB 0x80A9
3272 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
3273 #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
3274 #define GL_MULTISAMPLE_BIT_ARB 0x20000000
3275 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);
3276 #ifdef GL_GLEXT_PROTOTYPES
3277 GLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);
3278 #endif
3279 #endif /* GL_ARB_multisample */
3280
3281 #ifndef GL_ARB_multitexture
3282 #define GL_ARB_multitexture 1
3283 #define GL_TEXTURE0_ARB 0x84C0
3284 #define GL_TEXTURE1_ARB 0x84C1
3285 #define GL_TEXTURE2_ARB 0x84C2
3286 #define GL_TEXTURE3_ARB 0x84C3
3287 #define GL_TEXTURE4_ARB 0x84C4
3288 #define GL_TEXTURE5_ARB 0x84C5
3289 #define GL_TEXTURE6_ARB 0x84C6
3290 #define GL_TEXTURE7_ARB 0x84C7
3291 #define GL_TEXTURE8_ARB 0x84C8
3292 #define GL_TEXTURE9_ARB 0x84C9
3293 #define GL_TEXTURE10_ARB 0x84CA
3294 #define GL_TEXTURE11_ARB 0x84CB
3295 #define GL_TEXTURE12_ARB 0x84CC
3296 #define GL_TEXTURE13_ARB 0x84CD
3297 #define GL_TEXTURE14_ARB 0x84CE
3298 #define GL_TEXTURE15_ARB 0x84CF
3299 #define GL_TEXTURE16_ARB 0x84D0
3300 #define GL_TEXTURE17_ARB 0x84D1
3301 #define GL_TEXTURE18_ARB 0x84D2
3302 #define GL_TEXTURE19_ARB 0x84D3
3303 #define GL_TEXTURE20_ARB 0x84D4
3304 #define GL_TEXTURE21_ARB 0x84D5
3305 #define GL_TEXTURE22_ARB 0x84D6
3306 #define GL_TEXTURE23_ARB 0x84D7
3307 #define GL_TEXTURE24_ARB 0x84D8
3308 #define GL_TEXTURE25_ARB 0x84D9
3309 #define GL_TEXTURE26_ARB 0x84DA
3310 #define GL_TEXTURE27_ARB 0x84DB
3311 #define GL_TEXTURE28_ARB 0x84DC
3312 #define GL_TEXTURE29_ARB 0x84DD
3313 #define GL_TEXTURE30_ARB 0x84DE
3314 #define GL_TEXTURE31_ARB 0x84DF
3315 #define GL_ACTIVE_TEXTURE_ARB 0x84E0
3316 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
3317 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
3318 typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
3319 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
3320 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
3321 typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
3322 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
3323 typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
3324 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
3325 typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
3326 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
3327 typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
3328 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
3329 typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
3330 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
3331 typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
3332 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
3333 typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
3334 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
3335 typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
3336 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3337 typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
3338 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3339 typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
3340 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
3341 typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
3342 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
3343 typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
3344 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3345 typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
3346 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3347 typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
3348 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
3349 typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
3350 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3351 typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
3352 #ifdef GL_GLEXT_PROTOTYPES
3353 GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
3354 GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
3355 GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
3356 GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
3357 GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
3358 GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
3359 GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
3360 GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
3361 GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
3362 GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
3363 GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
3364 GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
3365 GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
3366 GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
3367 GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
3368 GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
3369 GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
3370 GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
3371 GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
3372 GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
3373 GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
3374 GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
3375 GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
3376 GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
3377 GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
3378 GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
3379 GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
3380 GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
3381 GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
3382 GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
3383 GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
3384 GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
3385 GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
3386 GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
3387 #endif
3388 #endif /* GL_ARB_multitexture */
3389
3390 #ifndef GL_ARB_occlusion_query
3391 #define GL_ARB_occlusion_query 1
3392 #define GL_QUERY_COUNTER_BITS_ARB 0x8864
3393 #define GL_CURRENT_QUERY_ARB 0x8865
3394 #define GL_QUERY_RESULT_ARB 0x8866
3395 #define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
3396 #define GL_SAMPLES_PASSED_ARB 0x8914
3397 typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
3398 typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
3399 typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
3400 typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
3401 typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
3402 typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
3403 typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
3404 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
3405 #ifdef GL_GLEXT_PROTOTYPES
3406 GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
3407 GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
3408 GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
3409 GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
3410 GLAPI void APIENTRY glEndQueryARB (GLenum target);
3411 GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
3412 GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
3413 GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
3414 #endif
3415 #endif /* GL_ARB_occlusion_query */
3416
3417 #ifndef GL_ARB_occlusion_query2
3418 #define GL_ARB_occlusion_query2 1
3419 #endif /* GL_ARB_occlusion_query2 */
3420
3421 #ifndef GL_ARB_pixel_buffer_object
3422 #define GL_ARB_pixel_buffer_object 1
3423 #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
3424 #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
3425 #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
3426 #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
3427 #endif /* GL_ARB_pixel_buffer_object */
3428
3429 #ifndef GL_ARB_point_parameters
3430 #define GL_ARB_point_parameters 1
3431 #define GL_POINT_SIZE_MIN_ARB 0x8126
3432 #define GL_POINT_SIZE_MAX_ARB 0x8127
3433 #define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
3434 #define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
3435 typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
3436 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
3437 #ifdef GL_GLEXT_PROTOTYPES
3438 GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
3439 GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
3440 #endif
3441 #endif /* GL_ARB_point_parameters */
3442
3443 #ifndef GL_ARB_point_sprite
3444 #define GL_ARB_point_sprite 1
3445 #define GL_POINT_SPRITE_ARB 0x8861
3446 #define GL_COORD_REPLACE_ARB 0x8862
3447 #endif /* GL_ARB_point_sprite */
3448
3449 #ifndef GL_ARB_program_interface_query
3450 #define GL_ARB_program_interface_query 1
3451 #endif /* GL_ARB_program_interface_query */
3452
3453 #ifndef GL_ARB_provoking_vertex
3454 #define GL_ARB_provoking_vertex 1
3455 #endif /* GL_ARB_provoking_vertex */
3456
3457 #ifndef GL_ARB_query_buffer_object
3458 #define GL_ARB_query_buffer_object 1
3459 #endif /* GL_ARB_query_buffer_object */
3460
3461 #ifndef GL_ARB_robust_buffer_access_behavior
3462 #define GL_ARB_robust_buffer_access_behavior 1
3463 #endif /* GL_ARB_robust_buffer_access_behavior */
3464
3465 #ifndef GL_ARB_robustness
3466 #define GL_ARB_robustness 1
3467 #define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
3468 #define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
3469 #define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
3470 #define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
3471 #define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
3472 #define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
3473 #define GL_NO_RESET_NOTIFICATION_ARB 0x8261
3474 typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
3475 typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3476 typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3477 typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);
3478 typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3479 typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3480 typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3481 typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3482 typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3483 typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3484 typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3485 typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
3486 typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
3487 typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
3488 typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
3489 typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3490 typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3491 typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3492 typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3493 typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3494 #ifdef GL_GLEXT_PROTOTYPES
3495 GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
3496 GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);
3497 GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
3498 GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);
3499 GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
3500 GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
3501 GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
3502 GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
3503 GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
3504 GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
3505 GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
3506 GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
3507 GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
3508 GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
3509 GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
3510 GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);
3511 GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);
3512 GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);
3513 GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3514 GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);
3515 #endif
3516 #endif /* GL_ARB_robustness */
3517
3518 #ifndef GL_ARB_robustness_isolation
3519 #define GL_ARB_robustness_isolation 1
3520 #endif /* GL_ARB_robustness_isolation */
3521
3522 #ifndef GL_ARB_sample_shading
3523 #define GL_ARB_sample_shading 1
3524 #define GL_SAMPLE_SHADING_ARB 0x8C36
3525 #define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
3526 typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
3527 #ifdef GL_GLEXT_PROTOTYPES
3528 GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
3529 #endif
3530 #endif /* GL_ARB_sample_shading */
3531
3532 #ifndef GL_ARB_sampler_objects
3533 #define GL_ARB_sampler_objects 1
3534 #endif /* GL_ARB_sampler_objects */
3535
3536 #ifndef GL_ARB_seamless_cube_map
3537 #define GL_ARB_seamless_cube_map 1
3538 #endif /* GL_ARB_seamless_cube_map */
3539
3540 #ifndef GL_ARB_seamless_cubemap_per_texture
3541 #define GL_ARB_seamless_cubemap_per_texture 1
3542 #endif /* GL_ARB_seamless_cubemap_per_texture */
3543
3544 #ifndef GL_ARB_separate_shader_objects
3545 #define GL_ARB_separate_shader_objects 1
3546 #endif /* GL_ARB_separate_shader_objects */
3547
3548 #ifndef GL_ARB_shader_atomic_counters
3549 #define GL_ARB_shader_atomic_counters 1
3550 #endif /* GL_ARB_shader_atomic_counters */
3551
3552 #ifndef GL_ARB_shader_bit_encoding
3553 #define GL_ARB_shader_bit_encoding 1
3554 #endif /* GL_ARB_shader_bit_encoding */
3555
3556 #ifndef GL_ARB_shader_draw_parameters
3557 #define GL_ARB_shader_draw_parameters 1
3558 #endif /* GL_ARB_shader_draw_parameters */
3559
3560 #ifndef GL_ARB_shader_group_vote
3561 #define GL_ARB_shader_group_vote 1
3562 #endif /* GL_ARB_shader_group_vote */
3563
3564 #ifndef GL_ARB_shader_image_load_store
3565 #define GL_ARB_shader_image_load_store 1
3566 #endif /* GL_ARB_shader_image_load_store */
3567
3568 #ifndef GL_ARB_shader_image_size
3569 #define GL_ARB_shader_image_size 1
3570 #endif /* GL_ARB_shader_image_size */
3571
3572 #ifndef GL_ARB_shader_objects
3573 #define GL_ARB_shader_objects 1
3574 #ifdef __APPLE__
3575 typedef void *GLhandleARB;
3576 #else
3577 typedef unsigned int GLhandleARB;
3578 #endif
3579 typedef char GLcharARB;
3580 #define GL_PROGRAM_OBJECT_ARB 0x8B40
3581 #define GL_SHADER_OBJECT_ARB 0x8B48
3582 #define GL_OBJECT_TYPE_ARB 0x8B4E
3583 #define GL_OBJECT_SUBTYPE_ARB 0x8B4F
3584 #define GL_FLOAT_VEC2_ARB 0x8B50
3585 #define GL_FLOAT_VEC3_ARB 0x8B51
3586 #define GL_FLOAT_VEC4_ARB 0x8B52
3587 #define GL_INT_VEC2_ARB 0x8B53
3588 #define GL_INT_VEC3_ARB 0x8B54
3589 #define GL_INT_VEC4_ARB 0x8B55
3590 #define GL_BOOL_ARB 0x8B56
3591 #define GL_BOOL_VEC2_ARB 0x8B57
3592 #define GL_BOOL_VEC3_ARB 0x8B58
3593 #define GL_BOOL_VEC4_ARB 0x8B59
3594 #define GL_FLOAT_MAT2_ARB 0x8B5A
3595 #define GL_FLOAT_MAT3_ARB 0x8B5B
3596 #define GL_FLOAT_MAT4_ARB 0x8B5C
3597 #define GL_SAMPLER_1D_ARB 0x8B5D
3598 #define GL_SAMPLER_2D_ARB 0x8B5E
3599 #define GL_SAMPLER_3D_ARB 0x8B5F
3600 #define GL_SAMPLER_CUBE_ARB 0x8B60
3601 #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
3602 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
3603 #define GL_SAMPLER_2D_RECT_ARB 0x8B63
3604 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
3605 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
3606 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
3607 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82
3608 #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
3609 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
3610 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
3611 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
3612 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
3613 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
3614 typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
3615 typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
3616 typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
3617 typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
3618 typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3619 typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
3620 typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
3621 typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
3622 typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
3623 typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
3624 typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
3625 typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
3626 typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
3627 typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3628 typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3629 typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
3630 typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
3631 typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
3632 typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3633 typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3634 typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3635 typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3636 typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
3637 typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3638 typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3639 typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3640 typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
3641 typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3642 typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3643 typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3644 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
3645 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
3646 typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3647 typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3648 typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
3649 typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3650 typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
3651 typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
3652 typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3653 #ifdef GL_GLEXT_PROTOTYPES
3654 GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
3655 GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
3656 GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
3657 GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
3658 GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
3659 GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
3660 GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
3661 GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
3662 GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
3663 GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
3664 GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
3665 GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
3666 GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
3667 GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
3668 GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
3669 GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
3670 GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
3671 GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
3672 GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
3673 GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
3674 GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
3675 GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
3676 GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
3677 GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
3678 GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
3679 GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
3680 GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
3681 GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3682 GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3683 GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
3684 GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
3685 GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
3686 GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
3687 GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
3688 GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
3689 GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
3690 GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
3691 GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
3692 GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
3693 #endif
3694 #endif /* GL_ARB_shader_objects */
3695
3696 #ifndef GL_ARB_shader_precision
3697 #define GL_ARB_shader_precision 1
3698 #endif /* GL_ARB_shader_precision */
3699
3700 #ifndef GL_ARB_shader_stencil_export
3701 #define GL_ARB_shader_stencil_export 1
3702 #endif /* GL_ARB_shader_stencil_export */
3703
3704 #ifndef GL_ARB_shader_storage_buffer_object
3705 #define GL_ARB_shader_storage_buffer_object 1
3706 #endif /* GL_ARB_shader_storage_buffer_object */
3707
3708 #ifndef GL_ARB_shader_subroutine
3709 #define GL_ARB_shader_subroutine 1
3710 #endif /* GL_ARB_shader_subroutine */
3711
3712 #ifndef GL_ARB_shader_texture_lod
3713 #define GL_ARB_shader_texture_lod 1
3714 #endif /* GL_ARB_shader_texture_lod */
3715
3716 #ifndef GL_ARB_shading_language_100
3717 #define GL_ARB_shading_language_100 1
3718 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
3719 #endif /* GL_ARB_shading_language_100 */
3720
3721 #ifndef GL_ARB_shading_language_420pack
3722 #define GL_ARB_shading_language_420pack 1
3723 #endif /* GL_ARB_shading_language_420pack */
3724
3725 #ifndef GL_ARB_shading_language_include
3726 #define GL_ARB_shading_language_include 1
3727 #define GL_SHADER_INCLUDE_ARB 0x8DAE
3728 #define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
3729 #define GL_NAMED_STRING_TYPE_ARB 0x8DEA
3730 typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3731 typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3732 typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3733 typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
3734 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3735 typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3736 #ifdef GL_GLEXT_PROTOTYPES
3737 GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
3738 GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
3739 GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);
3740 GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
3741 GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
3742 GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
3743 #endif
3744 #endif /* GL_ARB_shading_language_include */
3745
3746 #ifndef GL_ARB_shading_language_packing
3747 #define GL_ARB_shading_language_packing 1
3748 #endif /* GL_ARB_shading_language_packing */
3749
3750 #ifndef GL_ARB_shadow
3751 #define GL_ARB_shadow 1
3752 #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
3753 #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
3754 #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
3755 #endif /* GL_ARB_shadow */
3756
3757 #ifndef GL_ARB_shadow_ambient
3758 #define GL_ARB_shadow_ambient 1
3759 #define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
3760 #endif /* GL_ARB_shadow_ambient */
3761
3762 #ifndef GL_ARB_sparse_texture
3763 #define GL_ARB_sparse_texture 1
3764 #define GL_TEXTURE_SPARSE_ARB 0x91A6
3765 #define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
3766 #define GL_MIN_SPARSE_LEVEL_ARB 0x919B
3767 #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
3768 #define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
3769 #define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
3770 #define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
3771 #define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
3772 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
3773 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
3774 #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
3775 typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3776 #ifdef GL_GLEXT_PROTOTYPES
3777 GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
3778 #endif
3779 #endif /* GL_ARB_sparse_texture */
3780
3781 #ifndef GL_ARB_stencil_texturing
3782 #define GL_ARB_stencil_texturing 1
3783 #endif /* GL_ARB_stencil_texturing */
3784
3785 #ifndef GL_ARB_sync
3786 #define GL_ARB_sync 1
3787 #endif /* GL_ARB_sync */
3788
3789 #ifndef GL_ARB_tessellation_shader
3790 #define GL_ARB_tessellation_shader 1
3791 #endif /* GL_ARB_tessellation_shader */
3792
3793 #ifndef GL_ARB_texture_border_clamp
3794 #define GL_ARB_texture_border_clamp 1
3795 #define GL_CLAMP_TO_BORDER_ARB 0x812D
3796 #endif /* GL_ARB_texture_border_clamp */
3797
3798 #ifndef GL_ARB_texture_buffer_object
3799 #define GL_ARB_texture_buffer_object 1
3800 #define GL_TEXTURE_BUFFER_ARB 0x8C2A
3801 #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
3802 #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
3803 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
3804 #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
3805 typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
3806 #ifdef GL_GLEXT_PROTOTYPES
3807 GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
3808 #endif
3809 #endif /* GL_ARB_texture_buffer_object */
3810
3811 #ifndef GL_ARB_texture_buffer_object_rgb32
3812 #define GL_ARB_texture_buffer_object_rgb32 1
3813 #endif /* GL_ARB_texture_buffer_object_rgb32 */
3814
3815 #ifndef GL_ARB_texture_buffer_range
3816 #define GL_ARB_texture_buffer_range 1
3817 #endif /* GL_ARB_texture_buffer_range */
3818
3819 #ifndef GL_ARB_texture_compression
3820 #define GL_ARB_texture_compression 1
3821 #define GL_COMPRESSED_ALPHA_ARB 0x84E9
3822 #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
3823 #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
3824 #define GL_COMPRESSED_INTENSITY_ARB 0x84EC
3825 #define GL_COMPRESSED_RGB_ARB 0x84ED
3826 #define GL_COMPRESSED_RGBA_ARB 0x84EE
3827 #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
3828 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
3829 #define GL_TEXTURE_COMPRESSED_ARB 0x86A1
3830 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
3831 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
3832 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3833 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3834 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3835 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3836 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3837 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3838 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
3839 #ifdef GL_GLEXT_PROTOTYPES
3840 GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
3841 GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
3842 GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
3843 GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
3844 GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
3845 GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
3846 GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);
3847 #endif
3848 #endif /* GL_ARB_texture_compression */
3849
3850 #ifndef GL_ARB_texture_compression_bptc
3851 #define GL_ARB_texture_compression_bptc 1
3852 #define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
3853 #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
3854 #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
3855 #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
3856 #endif /* GL_ARB_texture_compression_bptc */
3857
3858 #ifndef GL_ARB_texture_compression_rgtc
3859 #define GL_ARB_texture_compression_rgtc 1
3860 #endif /* GL_ARB_texture_compression_rgtc */
3861
3862 #ifndef GL_ARB_texture_cube_map
3863 #define GL_ARB_texture_cube_map 1
3864 #define GL_NORMAL_MAP_ARB 0x8511
3865 #define GL_REFLECTION_MAP_ARB 0x8512
3866 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513
3867 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
3868 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
3869 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
3870 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
3871 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
3872 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
3873 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
3874 #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
3875 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
3876 #endif /* GL_ARB_texture_cube_map */
3877
3878 #ifndef GL_ARB_texture_cube_map_array
3879 #define GL_ARB_texture_cube_map_array 1
3880 #define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
3881 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
3882 #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
3883 #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
3884 #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
3885 #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
3886 #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
3887 #endif /* GL_ARB_texture_cube_map_array */
3888
3889 #ifndef GL_ARB_texture_env_add
3890 #define GL_ARB_texture_env_add 1
3891 #endif /* GL_ARB_texture_env_add */
3892
3893 #ifndef GL_ARB_texture_env_combine
3894 #define GL_ARB_texture_env_combine 1
3895 #define GL_COMBINE_ARB 0x8570
3896 #define GL_COMBINE_RGB_ARB 0x8571
3897 #define GL_COMBINE_ALPHA_ARB 0x8572
3898 #define GL_SOURCE0_RGB_ARB 0x8580
3899 #define GL_SOURCE1_RGB_ARB 0x8581
3900 #define GL_SOURCE2_RGB_ARB 0x8582
3901 #define GL_SOURCE0_ALPHA_ARB 0x8588
3902 #define GL_SOURCE1_ALPHA_ARB 0x8589
3903 #define GL_SOURCE2_ALPHA_ARB 0x858A
3904 #define GL_OPERAND0_RGB_ARB 0x8590
3905 #define GL_OPERAND1_RGB_ARB 0x8591
3906 #define GL_OPERAND2_RGB_ARB 0x8592
3907 #define GL_OPERAND0_ALPHA_ARB 0x8598
3908 #define GL_OPERAND1_ALPHA_ARB 0x8599
3909 #define GL_OPERAND2_ALPHA_ARB 0x859A
3910 #define GL_RGB_SCALE_ARB 0x8573
3911 #define GL_ADD_SIGNED_ARB 0x8574
3912 #define GL_INTERPOLATE_ARB 0x8575
3913 #define GL_SUBTRACT_ARB 0x84E7
3914 #define GL_CONSTANT_ARB 0x8576
3915 #define GL_PRIMARY_COLOR_ARB 0x8577
3916 #define GL_PREVIOUS_ARB 0x8578
3917 #endif /* GL_ARB_texture_env_combine */
3918
3919 #ifndef GL_ARB_texture_env_crossbar
3920 #define GL_ARB_texture_env_crossbar 1
3921 #endif /* GL_ARB_texture_env_crossbar */
3922
3923 #ifndef GL_ARB_texture_env_dot3
3924 #define GL_ARB_texture_env_dot3 1
3925 #define GL_DOT3_RGB_ARB 0x86AE
3926 #define GL_DOT3_RGBA_ARB 0x86AF
3927 #endif /* GL_ARB_texture_env_dot3 */
3928
3929 #ifndef GL_ARB_texture_float
3930 #define GL_ARB_texture_float 1
3931 #define GL_TEXTURE_RED_TYPE_ARB 0x8C10
3932 #define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
3933 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
3934 #define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
3935 #define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
3936 #define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
3937 #define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
3938 #define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
3939 #define GL_RGBA32F_ARB 0x8814
3940 #define GL_RGB32F_ARB 0x8815
3941 #define GL_ALPHA32F_ARB 0x8816
3942 #define GL_INTENSITY32F_ARB 0x8817
3943 #define GL_LUMINANCE32F_ARB 0x8818
3944 #define GL_LUMINANCE_ALPHA32F_ARB 0x8819
3945 #define GL_RGBA16F_ARB 0x881A
3946 #define GL_RGB16F_ARB 0x881B
3947 #define GL_ALPHA16F_ARB 0x881C
3948 #define GL_INTENSITY16F_ARB 0x881D
3949 #define GL_LUMINANCE16F_ARB 0x881E
3950 #define GL_LUMINANCE_ALPHA16F_ARB 0x881F
3951 #endif /* GL_ARB_texture_float */
3952
3953 #ifndef GL_ARB_texture_gather
3954 #define GL_ARB_texture_gather 1
3955 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
3956 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
3957 #define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
3958 #endif /* GL_ARB_texture_gather */
3959
3960 #ifndef GL_ARB_texture_mirror_clamp_to_edge
3961 #define GL_ARB_texture_mirror_clamp_to_edge 1
3962 #endif /* GL_ARB_texture_mirror_clamp_to_edge */
3963
3964 #ifndef GL_ARB_texture_mirrored_repeat
3965 #define GL_ARB_texture_mirrored_repeat 1
3966 #define GL_MIRRORED_REPEAT_ARB 0x8370
3967 #endif /* GL_ARB_texture_mirrored_repeat */
3968
3969 #ifndef GL_ARB_texture_multisample
3970 #define GL_ARB_texture_multisample 1
3971 #endif /* GL_ARB_texture_multisample */
3972
3973 #ifndef GL_ARB_texture_non_power_of_two
3974 #define GL_ARB_texture_non_power_of_two 1
3975 #endif /* GL_ARB_texture_non_power_of_two */
3976
3977 #ifndef GL_ARB_texture_query_levels
3978 #define GL_ARB_texture_query_levels 1
3979 #endif /* GL_ARB_texture_query_levels */
3980
3981 #ifndef GL_ARB_texture_query_lod
3982 #define GL_ARB_texture_query_lod 1
3983 #endif /* GL_ARB_texture_query_lod */
3984
3985 #ifndef GL_ARB_texture_rectangle
3986 #define GL_ARB_texture_rectangle 1
3987 #define GL_TEXTURE_RECTANGLE_ARB 0x84F5
3988 #define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
3989 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
3990 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
3991 #endif /* GL_ARB_texture_rectangle */
3992
3993 #ifndef GL_ARB_texture_rg
3994 #define GL_ARB_texture_rg 1
3995 #endif /* GL_ARB_texture_rg */
3996
3997 #ifndef GL_ARB_texture_rgb10_a2ui
3998 #define GL_ARB_texture_rgb10_a2ui 1
3999 #endif /* GL_ARB_texture_rgb10_a2ui */
4000
4001 #ifndef GL_ARB_texture_stencil8
4002 #define GL_ARB_texture_stencil8 1
4003 #endif /* GL_ARB_texture_stencil8 */
4004
4005 #ifndef GL_ARB_texture_storage
4006 #define GL_ARB_texture_storage 1
4007 #endif /* GL_ARB_texture_storage */
4008
4009 #ifndef GL_ARB_texture_storage_multisample
4010 #define GL_ARB_texture_storage_multisample 1
4011 #endif /* GL_ARB_texture_storage_multisample */
4012
4013 #ifndef GL_ARB_texture_swizzle
4014 #define GL_ARB_texture_swizzle 1
4015 #endif /* GL_ARB_texture_swizzle */
4016
4017 #ifndef GL_ARB_texture_view
4018 #define GL_ARB_texture_view 1
4019 #endif /* GL_ARB_texture_view */
4020
4021 #ifndef GL_ARB_timer_query
4022 #define GL_ARB_timer_query 1
4023 #endif /* GL_ARB_timer_query */
4024
4025 #ifndef GL_ARB_transform_feedback2
4026 #define GL_ARB_transform_feedback2 1
4027 #define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
4028 #define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
4029 #endif /* GL_ARB_transform_feedback2 */
4030
4031 #ifndef GL_ARB_transform_feedback3
4032 #define GL_ARB_transform_feedback3 1
4033 #endif /* GL_ARB_transform_feedback3 */
4034
4035 #ifndef GL_ARB_transform_feedback_instanced
4036 #define GL_ARB_transform_feedback_instanced 1
4037 #endif /* GL_ARB_transform_feedback_instanced */
4038
4039 #ifndef GL_ARB_transpose_matrix
4040 #define GL_ARB_transpose_matrix 1
4041 #define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
4042 #define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
4043 #define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
4044 #define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
4045 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4046 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4047 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
4048 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
4049 #ifdef GL_GLEXT_PROTOTYPES
4050 GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
4051 GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
4052 GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
4053 GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
4054 #endif
4055 #endif /* GL_ARB_transpose_matrix */
4056
4057 #ifndef GL_ARB_uniform_buffer_object
4058 #define GL_ARB_uniform_buffer_object 1
4059 #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
4060 #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
4061 #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
4062 #endif /* GL_ARB_uniform_buffer_object */
4063
4064 #ifndef GL_ARB_vertex_array_bgra
4065 #define GL_ARB_vertex_array_bgra 1
4066 #endif /* GL_ARB_vertex_array_bgra */
4067
4068 #ifndef GL_ARB_vertex_array_object
4069 #define GL_ARB_vertex_array_object 1
4070 #endif /* GL_ARB_vertex_array_object */
4071
4072 #ifndef GL_ARB_vertex_attrib_64bit
4073 #define GL_ARB_vertex_attrib_64bit 1
4074 #endif /* GL_ARB_vertex_attrib_64bit */
4075
4076 #ifndef GL_ARB_vertex_attrib_binding
4077 #define GL_ARB_vertex_attrib_binding 1
4078 #endif /* GL_ARB_vertex_attrib_binding */
4079
4080 #ifndef GL_ARB_vertex_blend
4081 #define GL_ARB_vertex_blend 1
4082 #define GL_MAX_VERTEX_UNITS_ARB 0x86A4
4083 #define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
4084 #define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
4085 #define GL_VERTEX_BLEND_ARB 0x86A7
4086 #define GL_CURRENT_WEIGHT_ARB 0x86A8
4087 #define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
4088 #define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
4089 #define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
4090 #define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
4091 #define GL_WEIGHT_ARRAY_ARB 0x86AD
4092 #define GL_MODELVIEW0_ARB 0x1700
4093 #define GL_MODELVIEW1_ARB 0x850A
4094 #define GL_MODELVIEW2_ARB 0x8722
4095 #define GL_MODELVIEW3_ARB 0x8723
4096 #define GL_MODELVIEW4_ARB 0x8724
4097 #define GL_MODELVIEW5_ARB 0x8725
4098 #define GL_MODELVIEW6_ARB 0x8726
4099 #define GL_MODELVIEW7_ARB 0x8727
4100 #define GL_MODELVIEW8_ARB 0x8728
4101 #define GL_MODELVIEW9_ARB 0x8729
4102 #define GL_MODELVIEW10_ARB 0x872A
4103 #define GL_MODELVIEW11_ARB 0x872B
4104 #define GL_MODELVIEW12_ARB 0x872C
4105 #define GL_MODELVIEW13_ARB 0x872D
4106 #define GL_MODELVIEW14_ARB 0x872E
4107 #define GL_MODELVIEW15_ARB 0x872F
4108 #define GL_MODELVIEW16_ARB 0x8730
4109 #define GL_MODELVIEW17_ARB 0x8731
4110 #define GL_MODELVIEW18_ARB 0x8732
4111 #define GL_MODELVIEW19_ARB 0x8733
4112 #define GL_MODELVIEW20_ARB 0x8734
4113 #define GL_MODELVIEW21_ARB 0x8735
4114 #define GL_MODELVIEW22_ARB 0x8736
4115 #define GL_MODELVIEW23_ARB 0x8737
4116 #define GL_MODELVIEW24_ARB 0x8738
4117 #define GL_MODELVIEW25_ARB 0x8739
4118 #define GL_MODELVIEW26_ARB 0x873A
4119 #define GL_MODELVIEW27_ARB 0x873B
4120 #define GL_MODELVIEW28_ARB 0x873C
4121 #define GL_MODELVIEW29_ARB 0x873D
4122 #define GL_MODELVIEW30_ARB 0x873E
4123 #define GL_MODELVIEW31_ARB 0x873F
4124 typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
4125 typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
4126 typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
4127 typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
4128 typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
4129 typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
4130 typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
4131 typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
4132 typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
4133 typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
4134 #ifdef GL_GLEXT_PROTOTYPES
4135 GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
4136 GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
4137 GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
4138 GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
4139 GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
4140 GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
4141 GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
4142 GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
4143 GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);
4144 GLAPI void APIENTRY glVertexBlendARB (GLint count);
4145 #endif
4146 #endif /* GL_ARB_vertex_blend */
4147
4148 #ifndef GL_ARB_vertex_buffer_object
4149 #define GL_ARB_vertex_buffer_object 1
4150 #ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */
4151 typedef long GLsizeiptrARB;
4152 typedef long GLintptrARB;
4153 #else
4154 typedef ptrdiff_t GLsizeiptrARB;
4155 typedef ptrdiff_t GLintptrARB;
4156 #endif
4157 #define GL_BUFFER_SIZE_ARB 0x8764
4158 #define GL_BUFFER_USAGE_ARB 0x8765
4159 #define GL_ARRAY_BUFFER_ARB 0x8892
4160 #define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
4161 #define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
4162 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
4163 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
4164 #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
4165 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
4166 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
4167 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
4168 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
4169 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
4170 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
4171 #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
4172 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
4173 #define GL_READ_ONLY_ARB 0x88B8
4174 #define GL_WRITE_ONLY_ARB 0x88B9
4175 #define GL_READ_WRITE_ARB 0x88BA
4176 #define GL_BUFFER_ACCESS_ARB 0x88BB
4177 #define GL_BUFFER_MAPPED_ARB 0x88BC
4178 #define GL_BUFFER_MAP_POINTER_ARB 0x88BD
4179 #define GL_STREAM_DRAW_ARB 0x88E0
4180 #define GL_STREAM_READ_ARB 0x88E1
4181 #define GL_STREAM_COPY_ARB 0x88E2
4182 #define GL_STATIC_DRAW_ARB 0x88E4
4183 #define GL_STATIC_READ_ARB 0x88E5
4184 #define GL_STATIC_COPY_ARB 0x88E6
4185 #define GL_DYNAMIC_DRAW_ARB 0x88E8
4186 #define GL_DYNAMIC_READ_ARB 0x88E9
4187 #define GL_DYNAMIC_COPY_ARB 0x88EA
4188 typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
4189 typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
4190 typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
4191 typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
4192 typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4193 typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4194 typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4195 typedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
4196 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
4197 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
4198 typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);
4199 #ifdef GL_GLEXT_PROTOTYPES
4200 GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
4201 GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
4202 GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
4203 GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
4204 GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
4205 GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
4206 GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
4207 GLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);
4208 GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
4209 GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
4210 GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);
4211 #endif
4212 #endif /* GL_ARB_vertex_buffer_object */
4213
4214 #ifndef GL_ARB_vertex_program
4215 #define GL_ARB_vertex_program 1
4216 #define GL_COLOR_SUM_ARB 0x8458
4217 #define GL_VERTEX_PROGRAM_ARB 0x8620
4218 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
4219 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
4220 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
4221 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
4222 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
4223 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
4224 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
4225 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
4226 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
4227 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
4228 #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
4229 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
4230 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
4231 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
4232 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
4233 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
4234 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
4235 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
4236 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
4237 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
4238 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
4239 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
4240 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
4241 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
4242 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
4243 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
4244 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4245 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
4246 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4247 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
4248 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
4249 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
4250 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
4251 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
4252 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
4253 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4254 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
4255 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
4256 typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
4257 typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
4258 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4259 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
4260 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4261 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
4262 typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
4263 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4264 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
4265 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
4266 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
4267 typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
4268 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4269 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4270 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
4271 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
4272 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
4273 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
4274 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);
4275 #ifdef GL_GLEXT_PROTOTYPES
4276 GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
4277 GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
4278 GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
4279 GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
4280 GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
4281 GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
4282 GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
4283 GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
4284 GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
4285 GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
4286 GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
4287 GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
4288 GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
4289 GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
4290 GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
4291 GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
4292 GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
4293 GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
4294 GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
4295 GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
4296 GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
4297 GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
4298 GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
4299 GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
4300 GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
4301 GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
4302 GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
4303 GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
4304 GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
4305 GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
4306 GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
4307 GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
4308 GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
4309 GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
4310 GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
4311 GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
4312 GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
4313 GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
4314 GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
4315 GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
4316 GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
4317 GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
4318 GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);
4319 #endif
4320 #endif /* GL_ARB_vertex_program */
4321
4322 #ifndef GL_ARB_vertex_shader
4323 #define GL_ARB_vertex_shader 1
4324 #define GL_VERTEX_SHADER_ARB 0x8B31
4325 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
4326 #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
4327 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
4328 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
4329 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
4330 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
4331 typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4332 typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4333 typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
4334 #ifdef GL_GLEXT_PROTOTYPES
4335 GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
4336 GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
4337 GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
4338 #endif
4339 #endif /* GL_ARB_vertex_shader */
4340
4341 #ifndef GL_ARB_vertex_type_10f_11f_11f_rev
4342 #define GL_ARB_vertex_type_10f_11f_11f_rev 1
4343 #endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
4344
4345 #ifndef GL_ARB_vertex_type_2_10_10_10_rev
4346 #define GL_ARB_vertex_type_2_10_10_10_rev 1
4347 #endif /* GL_ARB_vertex_type_2_10_10_10_rev */
4348
4349 #ifndef GL_ARB_viewport_array
4350 #define GL_ARB_viewport_array 1
4351 #endif /* GL_ARB_viewport_array */
4352
4353 #ifndef GL_ARB_window_pos
4354 #define GL_ARB_window_pos 1
4355 typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
4356 typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
4357 typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
4358 typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
4359 typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
4360 typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
4361 typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
4362 typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
4363 typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
4364 typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
4365 typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
4366 typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
4367 typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
4368 typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
4369 typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
4370 typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
4371 #ifdef GL_GLEXT_PROTOTYPES
4372 GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
4373 GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
4374 GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
4375 GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
4376 GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
4377 GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
4378 GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
4379 GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
4380 GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
4381 GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
4382 GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
4383 GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
4384 GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
4385 GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
4386 GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
4387 GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
4388 #endif
4389 #endif /* GL_ARB_window_pos */
4390
4391 #ifndef GL_KHR_debug
4392 #define GL_KHR_debug 1
4393 #endif /* GL_KHR_debug */
4394
4395 #ifndef GL_KHR_texture_compression_astc_hdr
4396 #define GL_KHR_texture_compression_astc_hdr 1
4397 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
4398 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
4399 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
4400 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
4401 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
4402 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
4403 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
4404 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
4405 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
4406 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
4407 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
4408 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
4409 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
4410 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
4411 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
4412 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
4413 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
4414 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
4415 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
4416 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
4417 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
4418 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
4419 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
4420 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
4421 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
4422 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
4423 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
4424 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
4425 #endif /* GL_KHR_texture_compression_astc_hdr */
4426
4427 #ifndef GL_KHR_texture_compression_astc_ldr
4428 #define GL_KHR_texture_compression_astc_ldr 1
4429 #endif /* GL_KHR_texture_compression_astc_ldr */
4430
4431 #ifndef GL_OES_byte_coordinates
4432 #define GL_OES_byte_coordinates 1
4433 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);
4434 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);
4435 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);
4436 typedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);
4437 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4438 typedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);
4439 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4440 typedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);
4441 typedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);
4442 typedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);
4443 typedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);
4444 typedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);
4445 typedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);
4446 typedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);
4447 typedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4448 typedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);
4449 typedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);
4450 typedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);
4451 typedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);
4452 typedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);
4453 typedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);
4454 typedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);
4455 #ifdef GL_GLEXT_PROTOTYPES
4456 GLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);
4457 GLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);
4458 GLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);
4459 GLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);
4460 GLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);
4461 GLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);
4462 GLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4463 GLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);
4464 GLAPI void APIENTRY glTexCoord1bOES (GLbyte s);
4465 GLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);
4466 GLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);
4467 GLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);
4468 GLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);
4469 GLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);
4470 GLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);
4471 GLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);
4472 GLAPI void APIENTRY glVertex2bOES (GLbyte x);
4473 GLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);
4474 GLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);
4475 GLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);
4476 GLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);
4477 GLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);
4478 #endif
4479 #endif /* GL_OES_byte_coordinates */
4480
4481 #ifndef GL_OES_compressed_paletted_texture
4482 #define GL_OES_compressed_paletted_texture 1
4483 #define GL_PALETTE4_RGB8_OES 0x8B90
4484 #define GL_PALETTE4_RGBA8_OES 0x8B91
4485 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
4486 #define GL_PALETTE4_RGBA4_OES 0x8B93
4487 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
4488 #define GL_PALETTE8_RGB8_OES 0x8B95
4489 #define GL_PALETTE8_RGBA8_OES 0x8B96
4490 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
4491 #define GL_PALETTE8_RGBA4_OES 0x8B98
4492 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
4493 #endif /* GL_OES_compressed_paletted_texture */
4494
4495 #ifndef GL_OES_fixed_point
4496 #define GL_OES_fixed_point 1
4497 typedef GLint GLfixed;
4498 #define GL_FIXED_OES 0x140C
4499 typedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);
4500 typedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4501 typedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);
4502 typedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
4503 typedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4504 typedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);
4505 typedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
4506 typedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);
4507 typedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4508 typedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);
4509 typedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
4510 typedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4511 typedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4512 typedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
4513 typedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);
4514 typedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
4515 typedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
4516 typedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
4517 typedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
4518 typedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4519 typedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);
4520 typedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
4521 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4522 typedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
4523 typedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4524 typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
4525 typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
4526 typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
4527 typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4528 typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);
4529 typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4530 typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4531 typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4532 typedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4533 typedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4534 typedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4535 typedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);
4536 typedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4537 typedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4538 typedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4539 typedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);
4540 typedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);
4541 typedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);
4542 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
4543 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
4544 typedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);
4545 typedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);
4546 typedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);
4547 typedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);
4548 typedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);
4549 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4550 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
4551 typedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);
4552 typedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);
4553 typedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
4554 typedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);
4555 typedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
4556 typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);
4557 typedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);
4558 typedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);
4559 typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4560 typedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4561 typedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4562 typedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);
4563 typedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4564 typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);
4565 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);
4566 typedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);
4567 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);
4568 typedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);
4569 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4570 typedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);
4571 typedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);
4572 typedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);
4573 typedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);
4574 typedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);
4575 typedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);
4576 typedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);
4577 typedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);
4578 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4579 typedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);
4580 typedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);
4581 typedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4582 typedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);
4583 typedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4584 typedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);
4585 typedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4586 typedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);
4587 typedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);
4588 typedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);
4589 typedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);
4590 typedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);
4591 typedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);
4592 typedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);
4593 typedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4594 typedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);
4595 typedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
4596 typedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
4597 typedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);
4598 typedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);
4599 typedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);
4600 typedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);
4601 typedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);
4602 typedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);
4603 #ifdef GL_GLEXT_PROTOTYPES
4604 GLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);
4605 GLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4606 GLAPI void APIENTRY glClearDepthxOES (GLfixed depth);
4607 GLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
4608 GLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4609 GLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);
4610 GLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);
4611 GLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);
4612 GLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4613 GLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);
4614 GLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
4615 GLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);
4616 GLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4617 GLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
4618 GLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);
4619 GLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
4620 GLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
4621 GLAPI void APIENTRY glLineWidthxOES (GLfixed width);
4622 GLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);
4623 GLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4624 GLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);
4625 GLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);
4626 GLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4627 GLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
4628 GLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
4629 GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
4630 GLAPI void APIENTRY glPointSizexOES (GLfixed size);
4631 GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
4632 GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
4633 GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);
4634 GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
4635 GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
4636 GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
4637 GLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
4638 GLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4639 GLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
4640 GLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);
4641 GLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);
4642 GLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4643 GLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
4644 GLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);
4645 GLAPI void APIENTRY glColor3xvOES (const GLfixed *components);
4646 GLAPI void APIENTRY glColor4xvOES (const GLfixed *components);
4647 GLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);
4648 GLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
4649 GLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);
4650 GLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);
4651 GLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);
4652 GLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);
4653 GLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);
4654 GLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4655 GLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
4656 GLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);
4657 GLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);
4658 GLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);
4659 GLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);
4660 GLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
4661 GLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);
4662 GLAPI void APIENTRY glIndexxOES (GLfixed component);
4663 GLAPI void APIENTRY glIndexxvOES (const GLfixed *component);
4664 GLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);
4665 GLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);
4666 GLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);
4667 GLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);
4668 GLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);
4669 GLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);
4670 GLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);
4671 GLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);
4672 GLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);
4673 GLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);
4674 GLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);
4675 GLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);
4676 GLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);
4677 GLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);
4678 GLAPI void APIENTRY glPassThroughxOES (GLfixed token);
4679 GLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);
4680 GLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);
4681 GLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);
4682 GLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);
4683 GLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);
4684 GLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);
4685 GLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);
4686 GLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);
4687 GLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);
4688 GLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);
4689 GLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);
4690 GLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);
4691 GLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);
4692 GLAPI void APIENTRY glTexCoord1xOES (GLfixed s);
4693 GLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);
4694 GLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);
4695 GLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);
4696 GLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);
4697 GLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);
4698 GLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);
4699 GLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);
4700 GLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
4701 GLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
4702 GLAPI void APIENTRY glVertex2xOES (GLfixed x);
4703 GLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);
4704 GLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);
4705 GLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);
4706 GLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);
4707 GLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);
4708 #endif
4709 #endif /* GL_OES_fixed_point */
4710
4711 #ifndef GL_OES_query_matrix
4712 #define GL_OES_query_matrix 1
4713 typedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);
4714 #ifdef GL_GLEXT_PROTOTYPES
4715 GLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);
4716 #endif
4717 #endif /* GL_OES_query_matrix */
4718
4719 #ifndef GL_OES_read_format
4720 #define GL_OES_read_format 1
4721 #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
4722 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
4723 #endif /* GL_OES_read_format */
4724
4725 #ifndef GL_OES_single_precision
4726 #define GL_OES_single_precision 1
4727 typedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
4728 typedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
4729 typedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
4730 typedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4731 typedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);
4732 typedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4733 #ifdef GL_GLEXT_PROTOTYPES
4734 GLAPI void APIENTRY glClearDepthfOES (GLclampf depth);
4735 GLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
4736 GLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);
4737 GLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4738 GLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);
4739 GLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
4740 #endif
4741 #endif /* GL_OES_single_precision */
4742
4743 #ifndef GL_3DFX_multisample
4744 #define GL_3DFX_multisample 1
4745 #define GL_MULTISAMPLE_3DFX 0x86B2
4746 #define GL_SAMPLE_BUFFERS_3DFX 0x86B3
4747 #define GL_SAMPLES_3DFX 0x86B4
4748 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000
4749 #endif /* GL_3DFX_multisample */
4750
4751 #ifndef GL_3DFX_tbuffer
4752 #define GL_3DFX_tbuffer 1
4753 typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
4754 #ifdef GL_GLEXT_PROTOTYPES
4755 GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
4756 #endif
4757 #endif /* GL_3DFX_tbuffer */
4758
4759 #ifndef GL_3DFX_texture_compression_FXT1
4760 #define GL_3DFX_texture_compression_FXT1 1
4761 #define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
4762 #define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
4763 #endif /* GL_3DFX_texture_compression_FXT1 */
4764
4765 #ifndef GL_AMD_blend_minmax_factor
4766 #define GL_AMD_blend_minmax_factor 1
4767 #define GL_FACTOR_MIN_AMD 0x901C
4768 #define GL_FACTOR_MAX_AMD 0x901D
4769 #endif /* GL_AMD_blend_minmax_factor */
4770
4771 #ifndef GL_AMD_conservative_depth
4772 #define GL_AMD_conservative_depth 1
4773 #endif /* GL_AMD_conservative_depth */
4774
4775 #ifndef GL_AMD_debug_output
4776 #define GL_AMD_debug_output 1
4777 typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
4778 #define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
4779 #define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
4780 #define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
4781 #define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
4782 #define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
4783 #define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
4784 #define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
4785 #define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
4786 #define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
4787 #define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
4788 #define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
4789 #define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
4790 #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
4791 #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
4792 typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4793 typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4794 typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
4795 typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4796 #ifdef GL_GLEXT_PROTOTYPES
4797 GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
4798 GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
4799 GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
4800 GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
4801 #endif
4802 #endif /* GL_AMD_debug_output */
4803
4804 #ifndef GL_AMD_depth_clamp_separate
4805 #define GL_AMD_depth_clamp_separate 1
4806 #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
4807 #define GL_DEPTH_CLAMP_FAR_AMD 0x901F
4808 #endif /* GL_AMD_depth_clamp_separate */
4809
4810 #ifndef GL_AMD_draw_buffers_blend
4811 #define GL_AMD_draw_buffers_blend 1
4812 typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
4813 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4814 typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
4815 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4816 #ifdef GL_GLEXT_PROTOTYPES
4817 GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
4818 GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
4819 GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
4820 GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
4821 #endif
4822 #endif /* GL_AMD_draw_buffers_blend */
4823
4824 #ifndef GL_AMD_gcn_shader
4825 #define GL_AMD_gcn_shader 1
4826 #endif /* GL_AMD_gcn_shader */
4827
4828 #ifndef GL_AMD_gpu_shader_int64
4829 #define GL_AMD_gpu_shader_int64 1
4830 typedef int64_t GLint64EXT;
4831 #define GL_INT64_NV 0x140E
4832 #define GL_UNSIGNED_INT64_NV 0x140F
4833 #define GL_INT8_NV 0x8FE0
4834 #define GL_INT8_VEC2_NV 0x8FE1
4835 #define GL_INT8_VEC3_NV 0x8FE2
4836 #define GL_INT8_VEC4_NV 0x8FE3
4837 #define GL_INT16_NV 0x8FE4
4838 #define GL_INT16_VEC2_NV 0x8FE5
4839 #define GL_INT16_VEC3_NV 0x8FE6
4840 #define GL_INT16_VEC4_NV 0x8FE7
4841 #define GL_INT64_VEC2_NV 0x8FE9
4842 #define GL_INT64_VEC3_NV 0x8FEA
4843 #define GL_INT64_VEC4_NV 0x8FEB
4844 #define GL_UNSIGNED_INT8_NV 0x8FEC
4845 #define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
4846 #define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
4847 #define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
4848 #define GL_UNSIGNED_INT16_NV 0x8FF0
4849 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
4850 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
4851 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
4852 #define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
4853 #define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
4854 #define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
4855 #define GL_FLOAT16_NV 0x8FF8
4856 #define GL_FLOAT16_VEC2_NV 0x8FF9
4857 #define GL_FLOAT16_VEC3_NV 0x8FFA
4858 #define GL_FLOAT16_VEC4_NV 0x8FFB
4859 typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
4860 typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
4861 typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4862 typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4863 typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4864 typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4865 typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4866 typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
4867 typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
4868 typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
4869 typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4870 typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4871 typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4872 typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4873 typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4874 typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
4875 typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
4876 typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
4877 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
4878 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4879 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4880 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4881 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4882 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4883 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4884 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4885 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
4886 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4887 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4888 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4889 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4890 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4891 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4892 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4893 #ifdef GL_GLEXT_PROTOTYPES
4894 GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
4895 GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
4896 GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4897 GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4898 GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4899 GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4900 GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4901 GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
4902 GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
4903 GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
4904 GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4905 GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4906 GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4907 GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4908 GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4909 GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
4910 GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
4911 GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
4912 GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
4913 GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
4914 GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
4915 GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
4916 GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4917 GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4918 GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4919 GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
4920 GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
4921 GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
4922 GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
4923 GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
4924 GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4925 GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4926 GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4927 GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
4928 #endif
4929 #endif /* GL_AMD_gpu_shader_int64 */
4930
4931 #ifndef GL_AMD_interleaved_elements
4932 #define GL_AMD_interleaved_elements 1
4933 #define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
4934 #define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
4935 typedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
4936 #ifdef GL_GLEXT_PROTOTYPES
4937 GLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);
4938 #endif
4939 #endif /* GL_AMD_interleaved_elements */
4940
4941 #ifndef GL_AMD_multi_draw_indirect
4942 #define GL_AMD_multi_draw_indirect 1
4943 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4944 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4945 #ifdef GL_GLEXT_PROTOTYPES
4946 GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
4947 GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
4948 #endif
4949 #endif /* GL_AMD_multi_draw_indirect */
4950
4951 #ifndef GL_AMD_name_gen_delete
4952 #define GL_AMD_name_gen_delete 1
4953 #define GL_DATA_BUFFER_AMD 0x9151
4954 #define GL_PERFORMANCE_MONITOR_AMD 0x9152
4955 #define GL_QUERY_OBJECT_AMD 0x9153
4956 #define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
4957 #define GL_SAMPLER_OBJECT_AMD 0x9155
4958 typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
4959 typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
4960 typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
4961 #ifdef GL_GLEXT_PROTOTYPES
4962 GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
4963 GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
4964 GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
4965 #endif
4966 #endif /* GL_AMD_name_gen_delete */
4967
4968 #ifndef GL_AMD_occlusion_query_event
4969 #define GL_AMD_occlusion_query_event 1
4970 #define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
4971 #define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
4972 #define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
4973 #define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
4974 #define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
4975 #define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
4976 typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
4977 #ifdef GL_GLEXT_PROTOTYPES
4978 GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);
4979 #endif
4980 #endif /* GL_AMD_occlusion_query_event */
4981
4982 #ifndef GL_AMD_performance_monitor
4983 #define GL_AMD_performance_monitor 1
4984 #define GL_COUNTER_TYPE_AMD 0x8BC0
4985 #define GL_COUNTER_RANGE_AMD 0x8BC1
4986 #define GL_UNSIGNED_INT64_AMD 0x8BC2
4987 #define GL_PERCENTAGE_AMD 0x8BC3
4988 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
4989 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
4990 #define GL_PERFMON_RESULT_AMD 0x8BC6
4991 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
4992 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
4993 typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
4994 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
4995 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
4996 typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4997 typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
4998 typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
4999 typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
5000 typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
5001 typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5002 #ifdef GL_GLEXT_PROTOTYPES
5003 GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
5004 GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
5005 GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
5006 GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
5007 GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
5008 GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
5009 GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
5010 GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
5011 GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
5012 GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
5013 GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
5014 #endif
5015 #endif /* GL_AMD_performance_monitor */
5016
5017 #ifndef GL_AMD_pinned_memory
5018 #define GL_AMD_pinned_memory 1
5019 #define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
5020 #endif /* GL_AMD_pinned_memory */
5021
5022 #ifndef GL_AMD_query_buffer_object
5023 #define GL_AMD_query_buffer_object 1
5024 #define GL_QUERY_BUFFER_AMD 0x9192
5025 #define GL_QUERY_BUFFER_BINDING_AMD 0x9193
5026 #define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
5027 #endif /* GL_AMD_query_buffer_object */
5028
5029 #ifndef GL_AMD_sample_positions
5030 #define GL_AMD_sample_positions 1
5031 #define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
5032 typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
5033 #ifdef GL_GLEXT_PROTOTYPES
5034 GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
5035 #endif
5036 #endif /* GL_AMD_sample_positions */
5037
5038 #ifndef GL_AMD_seamless_cubemap_per_texture
5039 #define GL_AMD_seamless_cubemap_per_texture 1
5040 #endif /* GL_AMD_seamless_cubemap_per_texture */
5041
5042 #ifndef GL_AMD_shader_atomic_counter_ops
5043 #define GL_AMD_shader_atomic_counter_ops 1
5044 #endif /* GL_AMD_shader_atomic_counter_ops */
5045
5046 #ifndef GL_AMD_shader_stencil_export
5047 #define GL_AMD_shader_stencil_export 1
5048 #endif /* GL_AMD_shader_stencil_export */
5049
5050 #ifndef GL_AMD_shader_trinary_minmax
5051 #define GL_AMD_shader_trinary_minmax 1
5052 #endif /* GL_AMD_shader_trinary_minmax */
5053
5054 #ifndef GL_AMD_sparse_texture
5055 #define GL_AMD_sparse_texture 1
5056 #define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
5057 #define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
5058 #define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
5059 #define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
5060 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
5061 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
5062 #define GL_MIN_SPARSE_LEVEL_AMD 0x919B
5063 #define GL_MIN_LOD_WARNING_AMD 0x919C
5064 #define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
5065 typedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5066 typedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5067 #ifdef GL_GLEXT_PROTOTYPES
5068 GLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5069 GLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
5070 #endif
5071 #endif /* GL_AMD_sparse_texture */
5072
5073 #ifndef GL_AMD_stencil_operation_extended
5074 #define GL_AMD_stencil_operation_extended 1
5075 #define GL_SET_AMD 0x874A
5076 #define GL_REPLACE_VALUE_AMD 0x874B
5077 #define GL_STENCIL_OP_VALUE_AMD 0x874C
5078 #define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
5079 typedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
5080 #ifdef GL_GLEXT_PROTOTYPES
5081 GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);
5082 #endif
5083 #endif /* GL_AMD_stencil_operation_extended */
5084
5085 #ifndef GL_AMD_texture_texture4
5086 #define GL_AMD_texture_texture4 1
5087 #endif /* GL_AMD_texture_texture4 */
5088
5089 #ifndef GL_AMD_transform_feedback3_lines_triangles
5090 #define GL_AMD_transform_feedback3_lines_triangles 1
5091 #endif /* GL_AMD_transform_feedback3_lines_triangles */
5092
5093 #ifndef GL_AMD_transform_feedback4
5094 #define GL_AMD_transform_feedback4 1
5095 #define GL_STREAM_RASTERIZATION_AMD 0x91A0
5096 #endif /* GL_AMD_transform_feedback4 */
5097
5098 #ifndef GL_AMD_vertex_shader_layer
5099 #define GL_AMD_vertex_shader_layer 1
5100 #endif /* GL_AMD_vertex_shader_layer */
5101
5102 #ifndef GL_AMD_vertex_shader_tessellator
5103 #define GL_AMD_vertex_shader_tessellator 1
5104 #define GL_SAMPLER_BUFFER_AMD 0x9001
5105 #define GL_INT_SAMPLER_BUFFER_AMD 0x9002
5106 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
5107 #define GL_TESSELLATION_MODE_AMD 0x9004
5108 #define GL_TESSELLATION_FACTOR_AMD 0x9005
5109 #define GL_DISCRETE_AMD 0x9006
5110 #define GL_CONTINUOUS_AMD 0x9007
5111 typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
5112 typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
5113 #ifdef GL_GLEXT_PROTOTYPES
5114 GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
5115 GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
5116 #endif
5117 #endif /* GL_AMD_vertex_shader_tessellator */
5118
5119 #ifndef GL_AMD_vertex_shader_viewport_index
5120 #define GL_AMD_vertex_shader_viewport_index 1
5121 #endif /* GL_AMD_vertex_shader_viewport_index */
5122
5123 #ifndef GL_APPLE_aux_depth_stencil
5124 #define GL_APPLE_aux_depth_stencil 1
5125 #define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
5126 #endif /* GL_APPLE_aux_depth_stencil */
5127
5128 #ifndef GL_APPLE_client_storage
5129 #define GL_APPLE_client_storage 1
5130 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
5131 #endif /* GL_APPLE_client_storage */
5132
5133 #ifndef GL_APPLE_element_array
5134 #define GL_APPLE_element_array 1
5135 #define GL_ELEMENT_ARRAY_APPLE 0x8A0C
5136 #define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
5137 #define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
5138 typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
5139 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
5140 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5141 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5142 typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5143 #ifdef GL_GLEXT_PROTOTYPES
5144 GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);
5145 GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
5146 GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
5147 GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
5148 GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
5149 #endif
5150 #endif /* GL_APPLE_element_array */
5151
5152 #ifndef GL_APPLE_fence
5153 #define GL_APPLE_fence 1
5154 #define GL_DRAW_PIXELS_APPLE 0x8A0A
5155 #define GL_FENCE_APPLE 0x8A0B
5156 typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
5157 typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
5158 typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
5159 typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
5160 typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
5161 typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
5162 typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
5163 typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
5164 #ifdef GL_GLEXT_PROTOTYPES
5165 GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
5166 GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
5167 GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
5168 GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
5169 GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
5170 GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
5171 GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
5172 GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
5173 #endif
5174 #endif /* GL_APPLE_fence */
5175
5176 #ifndef GL_APPLE_float_pixels
5177 #define GL_APPLE_float_pixels 1
5178 #define GL_HALF_APPLE 0x140B
5179 #define GL_RGBA_FLOAT32_APPLE 0x8814
5180 #define GL_RGB_FLOAT32_APPLE 0x8815
5181 #define GL_ALPHA_FLOAT32_APPLE 0x8816
5182 #define GL_INTENSITY_FLOAT32_APPLE 0x8817
5183 #define GL_LUMINANCE_FLOAT32_APPLE 0x8818
5184 #define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
5185 #define GL_RGBA_FLOAT16_APPLE 0x881A
5186 #define GL_RGB_FLOAT16_APPLE 0x881B
5187 #define GL_ALPHA_FLOAT16_APPLE 0x881C
5188 #define GL_INTENSITY_FLOAT16_APPLE 0x881D
5189 #define GL_LUMINANCE_FLOAT16_APPLE 0x881E
5190 #define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
5191 #define GL_COLOR_FLOAT_APPLE 0x8A0F
5192 #endif /* GL_APPLE_float_pixels */
5193
5194 #ifndef GL_APPLE_flush_buffer_range
5195 #define GL_APPLE_flush_buffer_range 1
5196 #define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
5197 #define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
5198 typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
5199 typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
5200 #ifdef GL_GLEXT_PROTOTYPES
5201 GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
5202 GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
5203 #endif
5204 #endif /* GL_APPLE_flush_buffer_range */
5205
5206 #ifndef GL_APPLE_object_purgeable
5207 #define GL_APPLE_object_purgeable 1
5208 #define GL_BUFFER_OBJECT_APPLE 0x85B3
5209 #define GL_RELEASED_APPLE 0x8A19
5210 #define GL_VOLATILE_APPLE 0x8A1A
5211 #define GL_RETAINED_APPLE 0x8A1B
5212 #define GL_UNDEFINED_APPLE 0x8A1C
5213 #define GL_PURGEABLE_APPLE 0x8A1D
5214 typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5215 typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
5216 typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5217 #ifdef GL_GLEXT_PROTOTYPES
5218 GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5219 GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
5220 GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
5221 #endif
5222 #endif /* GL_APPLE_object_purgeable */
5223
5224 #ifndef GL_APPLE_rgb_422
5225 #define GL_APPLE_rgb_422 1
5226 #define GL_RGB_422_APPLE 0x8A1F
5227 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
5228 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
5229 #define GL_RGB_RAW_422_APPLE 0x8A51
5230 #endif /* GL_APPLE_rgb_422 */
5231
5232 #ifndef GL_APPLE_row_bytes
5233 #define GL_APPLE_row_bytes 1
5234 #define GL_PACK_ROW_BYTES_APPLE 0x8A15
5235 #define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
5236 #endif /* GL_APPLE_row_bytes */
5237
5238 #ifndef GL_APPLE_specular_vector
5239 #define GL_APPLE_specular_vector 1
5240 #define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
5241 #endif /* GL_APPLE_specular_vector */
5242
5243 #ifndef GL_APPLE_texture_range
5244 #define GL_APPLE_texture_range 1
5245 #define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
5246 #define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
5247 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
5248 #define GL_STORAGE_PRIVATE_APPLE 0x85BD
5249 #define GL_STORAGE_CACHED_APPLE 0x85BE
5250 #define GL_STORAGE_SHARED_APPLE 0x85BF
5251 typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);
5252 typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
5253 #ifdef GL_GLEXT_PROTOTYPES
5254 GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);
5255 GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);
5256 #endif
5257 #endif /* GL_APPLE_texture_range */
5258
5259 #ifndef GL_APPLE_transform_hint
5260 #define GL_APPLE_transform_hint 1
5261 #define GL_TRANSFORM_HINT_APPLE 0x85B1
5262 #endif /* GL_APPLE_transform_hint */
5263
5264 #ifndef GL_APPLE_vertex_array_object
5265 #define GL_APPLE_vertex_array_object 1
5266 #define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
5267 typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
5268 typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
5269 typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
5270 typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
5271 #ifdef GL_GLEXT_PROTOTYPES
5272 GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
5273 GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
5274 GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
5275 GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
5276 #endif
5277 #endif /* GL_APPLE_vertex_array_object */
5278
5279 #ifndef GL_APPLE_vertex_array_range
5280 #define GL_APPLE_vertex_array_range 1
5281 #define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
5282 #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
5283 #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
5284 #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
5285 #define GL_STORAGE_CLIENT_APPLE 0x85B4
5286 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5287 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
5288 typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
5289 #ifdef GL_GLEXT_PROTOTYPES
5290 GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5291 GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);
5292 GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
5293 #endif
5294 #endif /* GL_APPLE_vertex_array_range */
5295
5296 #ifndef GL_APPLE_vertex_program_evaluators
5297 #define GL_APPLE_vertex_program_evaluators 1
5298 #define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
5299 #define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
5300 #define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
5301 #define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
5302 #define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
5303 #define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
5304 #define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
5305 #define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
5306 #define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
5307 #define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
5308 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5309 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
5310 typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
5311 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5312 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5313 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5314 typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5315 #ifdef GL_GLEXT_PROTOTYPES
5316 GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
5317 GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
5318 GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
5319 GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
5320 GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
5321 GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
5322 GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
5323 #endif
5324 #endif /* GL_APPLE_vertex_program_evaluators */
5325
5326 #ifndef GL_APPLE_ycbcr_422
5327 #define GL_APPLE_ycbcr_422 1
5328 #define GL_YCBCR_422_APPLE 0x85B9
5329 #endif /* GL_APPLE_ycbcr_422 */
5330
5331 #ifndef GL_ATI_draw_buffers
5332 #define GL_ATI_draw_buffers 1
5333 #define GL_MAX_DRAW_BUFFERS_ATI 0x8824
5334 #define GL_DRAW_BUFFER0_ATI 0x8825
5335 #define GL_DRAW_BUFFER1_ATI 0x8826
5336 #define GL_DRAW_BUFFER2_ATI 0x8827
5337 #define GL_DRAW_BUFFER3_ATI 0x8828
5338 #define GL_DRAW_BUFFER4_ATI 0x8829
5339 #define GL_DRAW_BUFFER5_ATI 0x882A
5340 #define GL_DRAW_BUFFER6_ATI 0x882B
5341 #define GL_DRAW_BUFFER7_ATI 0x882C
5342 #define GL_DRAW_BUFFER8_ATI 0x882D
5343 #define GL_DRAW_BUFFER9_ATI 0x882E
5344 #define GL_DRAW_BUFFER10_ATI 0x882F
5345 #define GL_DRAW_BUFFER11_ATI 0x8830
5346 #define GL_DRAW_BUFFER12_ATI 0x8831
5347 #define GL_DRAW_BUFFER13_ATI 0x8832
5348 #define GL_DRAW_BUFFER14_ATI 0x8833
5349 #define GL_DRAW_BUFFER15_ATI 0x8834
5350 typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
5351 #ifdef GL_GLEXT_PROTOTYPES
5352 GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
5353 #endif
5354 #endif /* GL_ATI_draw_buffers */
5355
5356 #ifndef GL_ATI_element_array
5357 #define GL_ATI_element_array 1
5358 #define GL_ELEMENT_ARRAY_ATI 0x8768
5359 #define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
5360 #define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
5361 typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
5362 typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
5363 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
5364 #ifdef GL_GLEXT_PROTOTYPES
5365 GLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);
5366 GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
5367 GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
5368 #endif
5369 #endif /* GL_ATI_element_array */
5370
5371 #ifndef GL_ATI_envmap_bumpmap
5372 #define GL_ATI_envmap_bumpmap 1
5373 #define GL_BUMP_ROT_MATRIX_ATI 0x8775
5374 #define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
5375 #define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
5376 #define GL_BUMP_TEX_UNITS_ATI 0x8778
5377 #define GL_DUDV_ATI 0x8779
5378 #define GL_DU8DV8_ATI 0x877A
5379 #define GL_BUMP_ENVMAP_ATI 0x877B
5380 #define GL_BUMP_TARGET_ATI 0x877C
5381 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
5382 typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
5383 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
5384 typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
5385 #ifdef GL_GLEXT_PROTOTYPES
5386 GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
5387 GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
5388 GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
5389 GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
5390 #endif
5391 #endif /* GL_ATI_envmap_bumpmap */
5392
5393 #ifndef GL_ATI_fragment_shader
5394 #define GL_ATI_fragment_shader 1
5395 #define GL_FRAGMENT_SHADER_ATI 0x8920
5396 #define GL_REG_0_ATI 0x8921
5397 #define GL_REG_1_ATI 0x8922
5398 #define GL_REG_2_ATI 0x8923
5399 #define GL_REG_3_ATI 0x8924
5400 #define GL_REG_4_ATI 0x8925
5401 #define GL_REG_5_ATI 0x8926
5402 #define GL_REG_6_ATI 0x8927
5403 #define GL_REG_7_ATI 0x8928
5404 #define GL_REG_8_ATI 0x8929
5405 #define GL_REG_9_ATI 0x892A
5406 #define GL_REG_10_ATI 0x892B
5407 #define GL_REG_11_ATI 0x892C
5408 #define GL_REG_12_ATI 0x892D
5409 #define GL_REG_13_ATI 0x892E
5410 #define GL_REG_14_ATI 0x892F
5411 #define GL_REG_15_ATI 0x8930
5412 #define GL_REG_16_ATI 0x8931
5413 #define GL_REG_17_ATI 0x8932
5414 #define GL_REG_18_ATI 0x8933
5415 #define GL_REG_19_ATI 0x8934
5416 #define GL_REG_20_ATI 0x8935
5417 #define GL_REG_21_ATI 0x8936
5418 #define GL_REG_22_ATI 0x8937
5419 #define GL_REG_23_ATI 0x8938
5420 #define GL_REG_24_ATI 0x8939
5421 #define GL_REG_25_ATI 0x893A
5422 #define GL_REG_26_ATI 0x893B
5423 #define GL_REG_27_ATI 0x893C
5424 #define GL_REG_28_ATI 0x893D
5425 #define GL_REG_29_ATI 0x893E
5426 #define GL_REG_30_ATI 0x893F
5427 #define GL_REG_31_ATI 0x8940
5428 #define GL_CON_0_ATI 0x8941
5429 #define GL_CON_1_ATI 0x8942
5430 #define GL_CON_2_ATI 0x8943
5431 #define GL_CON_3_ATI 0x8944
5432 #define GL_CON_4_ATI 0x8945
5433 #define GL_CON_5_ATI 0x8946
5434 #define GL_CON_6_ATI 0x8947
5435 #define GL_CON_7_ATI 0x8948
5436 #define GL_CON_8_ATI 0x8949
5437 #define GL_CON_9_ATI 0x894A
5438 #define GL_CON_10_ATI 0x894B
5439 #define GL_CON_11_ATI 0x894C
5440 #define GL_CON_12_ATI 0x894D
5441 #define GL_CON_13_ATI 0x894E
5442 #define GL_CON_14_ATI 0x894F
5443 #define GL_CON_15_ATI 0x8950
5444 #define GL_CON_16_ATI 0x8951
5445 #define GL_CON_17_ATI 0x8952
5446 #define GL_CON_18_ATI 0x8953
5447 #define GL_CON_19_ATI 0x8954
5448 #define GL_CON_20_ATI 0x8955
5449 #define GL_CON_21_ATI 0x8956
5450 #define GL_CON_22_ATI 0x8957
5451 #define GL_CON_23_ATI 0x8958
5452 #define GL_CON_24_ATI 0x8959
5453 #define GL_CON_25_ATI 0x895A
5454 #define GL_CON_26_ATI 0x895B
5455 #define GL_CON_27_ATI 0x895C
5456 #define GL_CON_28_ATI 0x895D
5457 #define GL_CON_29_ATI 0x895E
5458 #define GL_CON_30_ATI 0x895F
5459 #define GL_CON_31_ATI 0x8960
5460 #define GL_MOV_ATI 0x8961
5461 #define GL_ADD_ATI 0x8963
5462 #define GL_MUL_ATI 0x8964
5463 #define GL_SUB_ATI 0x8965
5464 #define GL_DOT3_ATI 0x8966
5465 #define GL_DOT4_ATI 0x8967
5466 #define GL_MAD_ATI 0x8968
5467 #define GL_LERP_ATI 0x8969
5468 #define GL_CND_ATI 0x896A
5469 #define GL_CND0_ATI 0x896B
5470 #define GL_DOT2_ADD_ATI 0x896C
5471 #define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
5472 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
5473 #define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
5474 #define GL_NUM_PASSES_ATI 0x8970
5475 #define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
5476 #define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
5477 #define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
5478 #define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
5479 #define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
5480 #define GL_SWIZZLE_STR_ATI 0x8976
5481 #define GL_SWIZZLE_STQ_ATI 0x8977
5482 #define GL_SWIZZLE_STR_DR_ATI 0x8978
5483 #define GL_SWIZZLE_STQ_DQ_ATI 0x8979
5484 #define GL_SWIZZLE_STRQ_ATI 0x897A
5485 #define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
5486 #define GL_RED_BIT_ATI 0x00000001
5487 #define GL_GREEN_BIT_ATI 0x00000002
5488 #define GL_BLUE_BIT_ATI 0x00000004
5489 #define GL_2X_BIT_ATI 0x00000001
5490 #define GL_4X_BIT_ATI 0x00000002
5491 #define GL_8X_BIT_ATI 0x00000004
5492 #define GL_HALF_BIT_ATI 0x00000008
5493 #define GL_QUARTER_BIT_ATI 0x00000010
5494 #define GL_EIGHTH_BIT_ATI 0x00000020
5495 #define GL_SATURATE_BIT_ATI 0x00000040
5496 #define GL_COMP_BIT_ATI 0x00000002
5497 #define GL_NEGATE_BIT_ATI 0x00000004
5498 #define GL_BIAS_BIT_ATI 0x00000008
5499 typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
5500 typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
5501 typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
5502 typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
5503 typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
5504 typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
5505 typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
5506 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5507 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5508 typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5509 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5510 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5511 typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5512 typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
5513 #ifdef GL_GLEXT_PROTOTYPES
5514 GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
5515 GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
5516 GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
5517 GLAPI void APIENTRY glBeginFragmentShaderATI (void);
5518 GLAPI void APIENTRY glEndFragmentShaderATI (void);
5519 GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
5520 GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
5521 GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5522 GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5523 GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5524 GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
5525 GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
5526 GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
5527 GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
5528 #endif
5529 #endif /* GL_ATI_fragment_shader */
5530
5531 #ifndef GL_ATI_map_object_buffer
5532 #define GL_ATI_map_object_buffer 1
5533 typedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5534 typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
5535 #ifdef GL_GLEXT_PROTOTYPES
5536 GLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);
5537 GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
5538 #endif
5539 #endif /* GL_ATI_map_object_buffer */
5540
5541 #ifndef GL_ATI_meminfo
5542 #define GL_ATI_meminfo 1
5543 #define GL_VBO_FREE_MEMORY_ATI 0x87FB
5544 #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
5545 #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
5546 #endif /* GL_ATI_meminfo */
5547
5548 #ifndef GL_ATI_pixel_format_float
5549 #define GL_ATI_pixel_format_float 1
5550 #define GL_RGBA_FLOAT_MODE_ATI 0x8820
5551 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
5552 #endif /* GL_ATI_pixel_format_float */
5553
5554 #ifndef GL_ATI_pn_triangles
5555 #define GL_ATI_pn_triangles 1
5556 #define GL_PN_TRIANGLES_ATI 0x87F0
5557 #define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
5558 #define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
5559 #define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
5560 #define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
5561 #define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
5562 #define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
5563 #define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
5564 #define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
5565 typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
5566 typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
5567 #ifdef GL_GLEXT_PROTOTYPES
5568 GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
5569 GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
5570 #endif
5571 #endif /* GL_ATI_pn_triangles */
5572
5573 #ifndef GL_ATI_separate_stencil
5574 #define GL_ATI_separate_stencil 1
5575 #define GL_STENCIL_BACK_FUNC_ATI 0x8800
5576 #define GL_STENCIL_BACK_FAIL_ATI 0x8801
5577 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
5578 #define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
5579 typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5580 typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5581 #ifdef GL_GLEXT_PROTOTYPES
5582 GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
5583 GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
5584 #endif
5585 #endif /* GL_ATI_separate_stencil */
5586
5587 #ifndef GL_ATI_text_fragment_shader
5588 #define GL_ATI_text_fragment_shader 1
5589 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
5590 #endif /* GL_ATI_text_fragment_shader */
5591
5592 #ifndef GL_ATI_texture_env_combine3
5593 #define GL_ATI_texture_env_combine3 1
5594 #define GL_MODULATE_ADD_ATI 0x8744
5595 #define GL_MODULATE_SIGNED_ADD_ATI 0x8745
5596 #define GL_MODULATE_SUBTRACT_ATI 0x8746
5597 #endif /* GL_ATI_texture_env_combine3 */
5598
5599 #ifndef GL_ATI_texture_float
5600 #define GL_ATI_texture_float 1
5601 #define GL_RGBA_FLOAT32_ATI 0x8814
5602 #define GL_RGB_FLOAT32_ATI 0x8815
5603 #define GL_ALPHA_FLOAT32_ATI 0x8816
5604 #define GL_INTENSITY_FLOAT32_ATI 0x8817
5605 #define GL_LUMINANCE_FLOAT32_ATI 0x8818
5606 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
5607 #define GL_RGBA_FLOAT16_ATI 0x881A
5608 #define GL_RGB_FLOAT16_ATI 0x881B
5609 #define GL_ALPHA_FLOAT16_ATI 0x881C
5610 #define GL_INTENSITY_FLOAT16_ATI 0x881D
5611 #define GL_LUMINANCE_FLOAT16_ATI 0x881E
5612 #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
5613 #endif /* GL_ATI_texture_float */
5614
5615 #ifndef GL_ATI_texture_mirror_once
5616 #define GL_ATI_texture_mirror_once 1
5617 #define GL_MIRROR_CLAMP_ATI 0x8742
5618 #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
5619 #endif /* GL_ATI_texture_mirror_once */
5620
5621 #ifndef GL_ATI_vertex_array_object
5622 #define GL_ATI_vertex_array_object 1
5623 #define GL_STATIC_ATI 0x8760
5624 #define GL_DYNAMIC_ATI 0x8761
5625 #define GL_PRESERVE_ATI 0x8762
5626 #define GL_DISCARD_ATI 0x8763
5627 #define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
5628 #define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
5629 #define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
5630 #define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
5631 typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
5632 typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
5633 typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5634 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
5635 typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
5636 typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
5637 typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5638 typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
5639 typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
5640 typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5641 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
5642 typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
5643 #ifdef GL_GLEXT_PROTOTYPES
5644 GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);
5645 GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
5646 GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
5647 GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
5648 GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
5649 GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
5650 GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5651 GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
5652 GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
5653 GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
5654 GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
5655 GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
5656 #endif
5657 #endif /* GL_ATI_vertex_array_object */
5658
5659 #ifndef GL_ATI_vertex_attrib_array_object
5660 #define GL_ATI_vertex_attrib_array_object 1
5661 typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5662 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
5663 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
5664 #ifdef GL_GLEXT_PROTOTYPES
5665 GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
5666 GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
5667 GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
5668 #endif
5669 #endif /* GL_ATI_vertex_attrib_array_object */
5670
5671 #ifndef GL_ATI_vertex_streams
5672 #define GL_ATI_vertex_streams 1
5673 #define GL_MAX_VERTEX_STREAMS_ATI 0x876B
5674 #define GL_VERTEX_STREAM0_ATI 0x876C
5675 #define GL_VERTEX_STREAM1_ATI 0x876D
5676 #define GL_VERTEX_STREAM2_ATI 0x876E
5677 #define GL_VERTEX_STREAM3_ATI 0x876F
5678 #define GL_VERTEX_STREAM4_ATI 0x8770
5679 #define GL_VERTEX_STREAM5_ATI 0x8771
5680 #define GL_VERTEX_STREAM6_ATI 0x8772
5681 #define GL_VERTEX_STREAM7_ATI 0x8773
5682 #define GL_VERTEX_SOURCE_ATI 0x8774
5683 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
5684 typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
5685 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
5686 typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
5687 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
5688 typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
5689 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
5690 typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
5691 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
5692 typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
5693 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
5694 typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
5695 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
5696 typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
5697 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
5698 typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
5699 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
5700 typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5701 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
5702 typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5703 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5704 typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5705 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5706 typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5707 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5708 typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
5709 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5710 typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
5711 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5712 typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
5713 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5714 typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
5715 typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5716 typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
5717 typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5718 typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
5719 typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
5720 typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
5721 typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5722 typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
5723 typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5724 typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
5725 typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
5726 typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
5727 typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
5728 #ifdef GL_GLEXT_PROTOTYPES
5729 GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
5730 GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
5731 GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
5732 GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
5733 GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
5734 GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
5735 GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
5736 GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
5737 GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
5738 GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
5739 GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
5740 GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
5741 GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
5742 GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
5743 GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
5744 GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
5745 GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
5746 GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
5747 GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
5748 GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
5749 GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
5750 GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
5751 GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
5752 GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
5753 GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
5754 GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
5755 GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
5756 GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
5757 GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
5758 GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
5759 GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
5760 GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
5761 GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
5762 GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
5763 GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
5764 GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
5765 GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
5766 GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
5767 GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
5768 GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
5769 GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
5770 GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
5771 GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
5772 GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
5773 GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
5774 #endif
5775 #endif /* GL_ATI_vertex_streams */
5776
5777 #ifndef GL_EXT_422_pixels
5778 #define GL_EXT_422_pixels 1
5779 #define GL_422_EXT 0x80CC
5780 #define GL_422_REV_EXT 0x80CD
5781 #define GL_422_AVERAGE_EXT 0x80CE
5782 #define GL_422_REV_AVERAGE_EXT 0x80CF
5783 #endif /* GL_EXT_422_pixels */
5784
5785 #ifndef GL_EXT_abgr
5786 #define GL_EXT_abgr 1
5787 #define GL_ABGR_EXT 0x8000
5788 #endif /* GL_EXT_abgr */
5789
5790 #ifndef GL_EXT_bgra
5791 #define GL_EXT_bgra 1
5792 #define GL_BGR_EXT 0x80E0
5793 #define GL_BGRA_EXT 0x80E1
5794 #endif /* GL_EXT_bgra */
5795
5796 #ifndef GL_EXT_bindable_uniform
5797 #define GL_EXT_bindable_uniform 1
5798 #define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
5799 #define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
5800 #define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
5801 #define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
5802 #define GL_UNIFORM_BUFFER_EXT 0x8DEE
5803 #define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
5804 typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
5805 typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
5806 typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
5807 #ifdef GL_GLEXT_PROTOTYPES
5808 GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
5809 GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
5810 GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
5811 #endif
5812 #endif /* GL_EXT_bindable_uniform */
5813
5814 #ifndef GL_EXT_blend_color
5815 #define GL_EXT_blend_color 1
5816 #define GL_CONSTANT_COLOR_EXT 0x8001
5817 #define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
5818 #define GL_CONSTANT_ALPHA_EXT 0x8003
5819 #define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
5820 #define GL_BLEND_COLOR_EXT 0x8005
5821 typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5822 #ifdef GL_GLEXT_PROTOTYPES
5823 GLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
5824 #endif
5825 #endif /* GL_EXT_blend_color */
5826
5827 #ifndef GL_EXT_blend_equation_separate
5828 #define GL_EXT_blend_equation_separate 1
5829 #define GL_BLEND_EQUATION_RGB_EXT 0x8009
5830 #define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
5831 typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
5832 #ifdef GL_GLEXT_PROTOTYPES
5833 GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
5834 #endif
5835 #endif /* GL_EXT_blend_equation_separate */
5836
5837 #ifndef GL_EXT_blend_func_separate
5838 #define GL_EXT_blend_func_separate 1
5839 #define GL_BLEND_DST_RGB_EXT 0x80C8
5840 #define GL_BLEND_SRC_RGB_EXT 0x80C9
5841 #define GL_BLEND_DST_ALPHA_EXT 0x80CA
5842 #define GL_BLEND_SRC_ALPHA_EXT 0x80CB
5843 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5844 #ifdef GL_GLEXT_PROTOTYPES
5845 GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
5846 #endif
5847 #endif /* GL_EXT_blend_func_separate */
5848
5849 #ifndef GL_EXT_blend_logic_op
5850 #define GL_EXT_blend_logic_op 1
5851 #endif /* GL_EXT_blend_logic_op */
5852
5853 #ifndef GL_EXT_blend_minmax
5854 #define GL_EXT_blend_minmax 1
5855 #define GL_MIN_EXT 0x8007
5856 #define GL_MAX_EXT 0x8008
5857 #define GL_FUNC_ADD_EXT 0x8006
5858 #define GL_BLEND_EQUATION_EXT 0x8009
5859 typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
5860 #ifdef GL_GLEXT_PROTOTYPES
5861 GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
5862 #endif
5863 #endif /* GL_EXT_blend_minmax */
5864
5865 #ifndef GL_EXT_blend_subtract
5866 #define GL_EXT_blend_subtract 1
5867 #define GL_FUNC_SUBTRACT_EXT 0x800A
5868 #define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
5869 #endif /* GL_EXT_blend_subtract */
5870
5871 #ifndef GL_EXT_clip_volume_hint
5872 #define GL_EXT_clip_volume_hint 1
5873 #define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
5874 #endif /* GL_EXT_clip_volume_hint */
5875
5876 #ifndef GL_EXT_cmyka
5877 #define GL_EXT_cmyka 1
5878 #define GL_CMYK_EXT 0x800C
5879 #define GL_CMYKA_EXT 0x800D
5880 #define GL_PACK_CMYK_HINT_EXT 0x800E
5881 #define GL_UNPACK_CMYK_HINT_EXT 0x800F
5882 #endif /* GL_EXT_cmyka */
5883
5884 #ifndef GL_EXT_color_subtable
5885 #define GL_EXT_color_subtable 1
5886 typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5887 typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5888 #ifdef GL_GLEXT_PROTOTYPES
5889 GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
5890 GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
5891 #endif
5892 #endif /* GL_EXT_color_subtable */
5893
5894 #ifndef GL_EXT_compiled_vertex_array
5895 #define GL_EXT_compiled_vertex_array 1
5896 #define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
5897 #define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
5898 typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
5899 typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
5900 #ifdef GL_GLEXT_PROTOTYPES
5901 GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
5902 GLAPI void APIENTRY glUnlockArraysEXT (void);
5903 #endif
5904 #endif /* GL_EXT_compiled_vertex_array */
5905
5906 #ifndef GL_EXT_convolution
5907 #define GL_EXT_convolution 1
5908 #define GL_CONVOLUTION_1D_EXT 0x8010
5909 #define GL_CONVOLUTION_2D_EXT 0x8011
5910 #define GL_SEPARABLE_2D_EXT 0x8012
5911 #define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
5912 #define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
5913 #define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
5914 #define GL_REDUCE_EXT 0x8016
5915 #define GL_CONVOLUTION_FORMAT_EXT 0x8017
5916 #define GL_CONVOLUTION_WIDTH_EXT 0x8018
5917 #define GL_CONVOLUTION_HEIGHT_EXT 0x8019
5918 #define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
5919 #define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
5920 #define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
5921 #define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
5922 #define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
5923 #define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
5924 #define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
5925 #define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
5926 #define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
5927 #define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
5928 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5929 typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5930 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
5931 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
5932 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
5933 typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
5934 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5935 typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5936 typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
5937 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
5938 typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
5939 typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5940 typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5941 #ifdef GL_GLEXT_PROTOTYPES
5942 GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
5943 GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
5944 GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
5945 GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
5946 GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
5947 GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
5948 GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
5949 GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
5950 GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);
5951 GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
5952 GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
5953 GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
5954 GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
5955 #endif
5956 #endif /* GL_EXT_convolution */
5957
5958 #ifndef GL_EXT_coordinate_frame
5959 #define GL_EXT_coordinate_frame 1
5960 #define GL_TANGENT_ARRAY_EXT 0x8439
5961 #define GL_BINORMAL_ARRAY_EXT 0x843A
5962 #define GL_CURRENT_TANGENT_EXT 0x843B
5963 #define GL_CURRENT_BINORMAL_EXT 0x843C
5964 #define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
5965 #define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
5966 #define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
5967 #define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
5968 #define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
5969 #define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
5970 #define GL_MAP1_TANGENT_EXT 0x8444
5971 #define GL_MAP2_TANGENT_EXT 0x8445
5972 #define GL_MAP1_BINORMAL_EXT 0x8446
5973 #define GL_MAP2_BINORMAL_EXT 0x8447
5974 typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
5975 typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
5976 typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
5977 typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
5978 typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
5979 typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
5980 typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
5981 typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
5982 typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
5983 typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
5984 typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
5985 typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
5986 typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
5987 typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
5988 typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
5989 typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
5990 typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
5991 typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
5992 typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
5993 typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
5994 typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5995 typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
5996 #ifdef GL_GLEXT_PROTOTYPES
5997 GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
5998 GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
5999 GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
6000 GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
6001 GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
6002 GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
6003 GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
6004 GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
6005 GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
6006 GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
6007 GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
6008 GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
6009 GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
6010 GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
6011 GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
6012 GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
6013 GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
6014 GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
6015 GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
6016 GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
6017 GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6018 GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6019 #endif
6020 #endif /* GL_EXT_coordinate_frame */
6021
6022 #ifndef GL_EXT_copy_texture
6023 #define GL_EXT_copy_texture 1
6024 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6025 typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6026 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6027 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6028 typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6029 #ifdef GL_GLEXT_PROTOTYPES
6030 GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6031 GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6032 GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6033 GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6034 GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6035 #endif
6036 #endif /* GL_EXT_copy_texture */
6037
6038 #ifndef GL_EXT_cull_vertex
6039 #define GL_EXT_cull_vertex 1
6040 #define GL_CULL_VERTEX_EXT 0x81AA
6041 #define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
6042 #define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
6043 typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
6044 typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
6045 #ifdef GL_GLEXT_PROTOTYPES
6046 GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
6047 GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
6048 #endif
6049 #endif /* GL_EXT_cull_vertex */
6050
6051 #ifndef GL_EXT_debug_label
6052 #define GL_EXT_debug_label 1
6053 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
6054 #define GL_PROGRAM_OBJECT_EXT 0x8B40
6055 #define GL_SHADER_OBJECT_EXT 0x8B48
6056 #define GL_BUFFER_OBJECT_EXT 0x9151
6057 #define GL_QUERY_OBJECT_EXT 0x9153
6058 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
6059 typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6060 typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6061 #ifdef GL_GLEXT_PROTOTYPES
6062 GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
6063 GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
6064 #endif
6065 #endif /* GL_EXT_debug_label */
6066
6067 #ifndef GL_EXT_debug_marker
6068 #define GL_EXT_debug_marker 1
6069 typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6070 typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
6071 typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
6072 #ifdef GL_GLEXT_PROTOTYPES
6073 GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
6074 GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
6075 GLAPI void APIENTRY glPopGroupMarkerEXT (void);
6076 #endif
6077 #endif /* GL_EXT_debug_marker */
6078
6079 #ifndef GL_EXT_depth_bounds_test
6080 #define GL_EXT_depth_bounds_test 1
6081 #define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
6082 #define GL_DEPTH_BOUNDS_EXT 0x8891
6083 typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
6084 #ifdef GL_GLEXT_PROTOTYPES
6085 GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
6086 #endif
6087 #endif /* GL_EXT_depth_bounds_test */
6088
6089 #ifndef GL_EXT_direct_state_access
6090 #define GL_EXT_direct_state_access 1
6091 #define GL_PROGRAM_MATRIX_EXT 0x8E2D
6092 #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
6093 #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
6094 typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
6095 typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
6096 typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
6097 typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
6098 typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
6099 typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6100 typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6101 typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6102 typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6103 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6104 typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6105 typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6106 typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6107 typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
6108 typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
6109 typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6110 typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
6111 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6112 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6113 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
6114 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6115 typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6116 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6117 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6118 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6119 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6120 typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6121 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6122 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6123 typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6124 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6125 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6126 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6127 typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6128 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6129 typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6130 typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6131 typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
6132 typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6133 typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6134 typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6135 typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6136 typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6137 typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6138 typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6139 typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6140 typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6141 typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6142 typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6143 typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6144 typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6145 typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6146 typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6147 typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6148 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
6149 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6150 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6151 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6152 typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6153 typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6154 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6155 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6156 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6157 typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6158 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6159 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6160 typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6161 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6162 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6163 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6164 typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6165 typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6166 typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6167 typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6168 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6169 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
6170 typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
6171 typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
6172 typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);
6173 typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6174 typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
6175 typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
6176 typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
6177 typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
6178 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6179 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6180 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6181 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6182 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6183 typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6184 typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);
6185 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6186 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6187 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6188 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6189 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6190 typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6191 typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);
6192 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6193 typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6194 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
6195 typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
6196 typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6197 typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6198 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
6199 typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
6200 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
6201 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);
6202 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6203 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
6204 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6205 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6206 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6207 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
6208 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
6209 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6210 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6211 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6212 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6213 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6214 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6215 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6216 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6217 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6218 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
6219 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6220 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6221 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6222 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6223 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6224 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6225 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6226 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6227 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6228 typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6229 typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6230 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6231 typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6232 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
6233 typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6234 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6235 typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6236 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6237 typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6238 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
6239 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
6240 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6241 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6242 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6243 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6244 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6245 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
6246 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6247 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6248 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
6249 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6250 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6251 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
6252 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6253 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
6254 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
6255 typedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6256 typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
6257 typedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);
6258 typedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);
6259 typedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);
6260 typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6261 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6262 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6263 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6264 typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6265 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
6266 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
6267 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
6268 typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
6269 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6270 typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
6271 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6272 typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6273 typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
6274 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6275 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6276 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6277 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6278 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6279 typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
6280 typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
6281 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6282 typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6283 typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
6284 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6285 typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6286 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6287 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6288 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6289 typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
6290 typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
6291 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6292 typedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6293 typedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6294 typedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6295 typedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6296 typedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6297 typedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6298 typedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6299 typedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6300 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6301 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6302 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6303 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
6304 typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6305 typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
6306 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);
6307 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);
6308 typedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6309 typedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);
6310 typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6311 typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
6312 typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6313 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6314 typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6315 typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
6316 typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
6317 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
6318 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
6319 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6320 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6321 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6322 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6323 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6324 typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6325 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6326 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6327 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6328 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6329 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6330 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6331 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6332 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6333 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6334 typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6335 typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6336 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6337 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6338 typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6339 typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6340 typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6341 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6342 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6343 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6344 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6345 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6346 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6347 typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6348 typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
6349 #ifdef GL_GLEXT_PROTOTYPES
6350 GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
6351 GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
6352 GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
6353 GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
6354 GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
6355 GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
6356 GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
6357 GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6358 GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6359 GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
6360 GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
6361 GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6362 GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
6363 GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
6364 GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
6365 GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
6366 GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
6367 GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
6368 GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
6369 GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
6370 GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6371 GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6372 GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6373 GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6374 GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6375 GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6376 GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6377 GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6378 GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6379 GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6380 GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
6381 GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6382 GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
6383 GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
6384 GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6385 GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6386 GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6387 GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
6388 GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
6389 GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6390 GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6391 GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6392 GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6393 GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
6394 GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
6395 GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
6396 GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
6397 GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
6398 GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
6399 GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6400 GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6401 GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
6402 GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
6403 GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
6404 GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
6405 GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6406 GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
6407 GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
6408 GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
6409 GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
6410 GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
6411 GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
6412 GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
6413 GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
6414 GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
6415 GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6416 GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
6417 GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
6418 GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6419 GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
6420 GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
6421 GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
6422 GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
6423 GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
6424 GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
6425 GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
6426 GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
6427 GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
6428 GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);
6429 GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
6430 GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
6431 GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
6432 GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
6433 GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
6434 GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6435 GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6436 GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6437 GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6438 GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6439 GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6440 GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);
6441 GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);
6442 GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);
6443 GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);
6444 GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);
6445 GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);
6446 GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);
6447 GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);
6448 GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
6449 GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
6450 GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
6451 GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
6452 GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
6453 GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
6454 GLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
6455 GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
6456 GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
6457 GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);
6458 GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
6459 GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
6460 GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
6461 GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
6462 GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
6463 GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
6464 GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
6465 GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
6466 GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
6467 GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6468 GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6469 GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6470 GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
6471 GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6472 GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6473 GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6474 GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
6475 GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6476 GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6477 GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6478 GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6479 GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6480 GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6481 GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6482 GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6483 GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
6484 GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
6485 GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
6486 GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
6487 GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
6488 GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
6489 GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
6490 GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
6491 GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
6492 GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
6493 GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
6494 GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
6495 GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
6496 GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
6497 GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6498 GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6499 GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6500 GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6501 GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
6502 GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6503 GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
6504 GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
6505 GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
6506 GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
6507 GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
6508 GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
6509 GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
6510 GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
6511 GLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);
6512 GLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);
6513 GLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);
6514 GLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);
6515 GLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);
6516 GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
6517 GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6518 GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
6519 GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
6520 GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
6521 GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
6522 GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
6523 GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
6524 GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);
6525 GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
6526 GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
6527 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6528 GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
6529 GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
6530 GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6531 GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6532 GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6533 GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6534 GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
6535 GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
6536 GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
6537 GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
6538 GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
6539 GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
6540 GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6541 GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
6542 GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
6543 GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
6544 GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
6545 GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
6546 GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
6547 GLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6548 GLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6549 GLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
6550 GLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6551 GLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6552 GLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6553 GLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6554 GLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
6555 GLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6556 GLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
6557 GLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6558 GLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);
6559 GLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);
6560 GLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6561 GLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);
6562 GLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);
6563 GLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);
6564 GLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
6565 GLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);
6566 GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
6567 GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
6568 GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
6569 GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
6570 GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
6571 GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
6572 GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
6573 GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
6574 GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
6575 GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
6576 GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
6577 GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6578 GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6579 GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6580 GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
6581 GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6582 GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6583 GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6584 GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6585 GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6586 GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6587 GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6588 GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6589 GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
6590 GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
6591 GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
6592 GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
6593 GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
6594 GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
6595 GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
6596 GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
6597 GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
6598 GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6599 GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
6600 GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
6601 GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
6602 GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
6603 GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
6604 GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);
6605 #endif
6606 #endif /* GL_EXT_direct_state_access */
6607
6608 #ifndef GL_EXT_draw_buffers2
6609 #define GL_EXT_draw_buffers2 1
6610 typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6611 #ifdef GL_GLEXT_PROTOTYPES
6612 GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
6613 #endif
6614 #endif /* GL_EXT_draw_buffers2 */
6615
6616 #ifndef GL_EXT_draw_instanced
6617 #define GL_EXT_draw_instanced 1
6618 typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6619 typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6620 #ifdef GL_GLEXT_PROTOTYPES
6621 GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
6622 GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
6623 #endif
6624 #endif /* GL_EXT_draw_instanced */
6625
6626 #ifndef GL_EXT_draw_range_elements
6627 #define GL_EXT_draw_range_elements 1
6628 #define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
6629 #define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
6630 typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6631 #ifdef GL_GLEXT_PROTOTYPES
6632 GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
6633 #endif
6634 #endif /* GL_EXT_draw_range_elements */
6635
6636 #ifndef GL_EXT_fog_coord
6637 #define GL_EXT_fog_coord 1
6638 #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
6639 #define GL_FOG_COORDINATE_EXT 0x8451
6640 #define GL_FRAGMENT_DEPTH_EXT 0x8452
6641 #define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
6642 #define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
6643 #define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
6644 #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
6645 #define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
6646 typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
6647 typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
6648 typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
6649 typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
6650 typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
6651 #ifdef GL_GLEXT_PROTOTYPES
6652 GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
6653 GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
6654 GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
6655 GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
6656 GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);
6657 #endif
6658 #endif /* GL_EXT_fog_coord */
6659
6660 #ifndef GL_EXT_framebuffer_blit
6661 #define GL_EXT_framebuffer_blit 1
6662 #define GL_READ_FRAMEBUFFER_EXT 0x8CA8
6663 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
6664 #define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
6665 #define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
6666 typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6667 #ifdef GL_GLEXT_PROTOTYPES
6668 GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
6669 #endif
6670 #endif /* GL_EXT_framebuffer_blit */
6671
6672 #ifndef GL_EXT_framebuffer_multisample
6673 #define GL_EXT_framebuffer_multisample 1
6674 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
6675 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
6676 #define GL_MAX_SAMPLES_EXT 0x8D57
6677 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6678 #ifdef GL_GLEXT_PROTOTYPES
6679 GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
6680 #endif
6681 #endif /* GL_EXT_framebuffer_multisample */
6682
6683 #ifndef GL_EXT_framebuffer_multisample_blit_scaled
6684 #define GL_EXT_framebuffer_multisample_blit_scaled 1
6685 #define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
6686 #define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
6687 #endif /* GL_EXT_framebuffer_multisample_blit_scaled */
6688
6689 #ifndef GL_EXT_framebuffer_object
6690 #define GL_EXT_framebuffer_object 1
6691 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
6692 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
6693 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
6694 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
6695 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
6696 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
6697 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
6698 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
6699 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
6700 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
6701 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
6702 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
6703 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
6704 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
6705 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
6706 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
6707 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
6708 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
6709 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
6710 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
6711 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
6712 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
6713 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
6714 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
6715 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
6716 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
6717 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
6718 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
6719 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
6720 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
6721 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
6722 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
6723 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
6724 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
6725 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00
6726 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20
6727 #define GL_FRAMEBUFFER_EXT 0x8D40
6728 #define GL_RENDERBUFFER_EXT 0x8D41
6729 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
6730 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
6731 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
6732 #define GL_STENCIL_INDEX1_EXT 0x8D46
6733 #define GL_STENCIL_INDEX4_EXT 0x8D47
6734 #define GL_STENCIL_INDEX8_EXT 0x8D48
6735 #define GL_STENCIL_INDEX16_EXT 0x8D49
6736 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
6737 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
6738 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
6739 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
6740 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
6741 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
6742 typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
6743 typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
6744 typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
6745 typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
6746 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6747 typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6748 typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
6749 typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
6750 typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
6751 typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
6752 typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
6753 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6754 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6755 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6756 typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6757 typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6758 typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
6759 #ifdef GL_GLEXT_PROTOTYPES
6760 GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
6761 GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
6762 GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
6763 GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
6764 GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
6765 GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
6766 GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
6767 GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
6768 GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
6769 GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
6770 GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
6771 GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6772 GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
6773 GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
6774 GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
6775 GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
6776 GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
6777 #endif
6778 #endif /* GL_EXT_framebuffer_object */
6779
6780 #ifndef GL_EXT_framebuffer_sRGB
6781 #define GL_EXT_framebuffer_sRGB 1
6782 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
6783 #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
6784 #endif /* GL_EXT_framebuffer_sRGB */
6785
6786 #ifndef GL_EXT_geometry_shader4
6787 #define GL_EXT_geometry_shader4 1
6788 #define GL_GEOMETRY_SHADER_EXT 0x8DD9
6789 #define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
6790 #define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
6791 #define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
6792 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
6793 #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
6794 #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
6795 #define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
6796 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
6797 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
6798 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
6799 #define GL_LINES_ADJACENCY_EXT 0x000A
6800 #define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
6801 #define GL_TRIANGLES_ADJACENCY_EXT 0x000C
6802 #define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
6803 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
6804 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
6805 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
6806 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
6807 #define GL_PROGRAM_POINT_SIZE_EXT 0x8642
6808 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
6809 #ifdef GL_GLEXT_PROTOTYPES
6810 GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
6811 #endif
6812 #endif /* GL_EXT_geometry_shader4 */
6813
6814 #ifndef GL_EXT_gpu_program_parameters
6815 #define GL_EXT_gpu_program_parameters 1
6816 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6817 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6818 #ifdef GL_GLEXT_PROTOTYPES
6819 GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6820 GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
6821 #endif
6822 #endif /* GL_EXT_gpu_program_parameters */
6823
6824 #ifndef GL_EXT_gpu_shader4
6825 #define GL_EXT_gpu_shader4 1
6826 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
6827 #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
6828 #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
6829 #define GL_SAMPLER_BUFFER_EXT 0x8DC2
6830 #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
6831 #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
6832 #define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
6833 #define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
6834 #define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
6835 #define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
6836 #define GL_INT_SAMPLER_1D_EXT 0x8DC9
6837 #define GL_INT_SAMPLER_2D_EXT 0x8DCA
6838 #define GL_INT_SAMPLER_3D_EXT 0x8DCB
6839 #define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
6840 #define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
6841 #define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
6842 #define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
6843 #define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
6844 #define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
6845 #define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
6846 #define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
6847 #define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
6848 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
6849 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
6850 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
6851 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
6852 #define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
6853 #define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
6854 typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
6855 typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
6856 typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
6857 typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
6858 typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
6859 typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
6860 typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6861 typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6862 typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6863 typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6864 typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
6865 #ifdef GL_GLEXT_PROTOTYPES
6866 GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
6867 GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
6868 GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
6869 GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
6870 GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
6871 GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
6872 GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
6873 GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
6874 GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
6875 GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
6876 GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
6877 #endif
6878 #endif /* GL_EXT_gpu_shader4 */
6879
6880 #ifndef GL_EXT_histogram
6881 #define GL_EXT_histogram 1
6882 #define GL_HISTOGRAM_EXT 0x8024
6883 #define GL_PROXY_HISTOGRAM_EXT 0x8025
6884 #define GL_HISTOGRAM_WIDTH_EXT 0x8026
6885 #define GL_HISTOGRAM_FORMAT_EXT 0x8027
6886 #define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
6887 #define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
6888 #define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
6889 #define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
6890 #define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
6891 #define GL_HISTOGRAM_SINK_EXT 0x802D
6892 #define GL_MINMAX_EXT 0x802E
6893 #define GL_MINMAX_FORMAT_EXT 0x802F
6894 #define GL_MINMAX_SINK_EXT 0x8030
6895 #define GL_TABLE_TOO_LARGE_EXT 0x8031
6896 typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6897 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6898 typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6899 typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6900 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
6901 typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
6902 typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6903 typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
6904 typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
6905 typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
6906 #ifdef GL_GLEXT_PROTOTYPES
6907 GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6908 GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6909 GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
6910 GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
6911 GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
6912 GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
6913 GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
6914 GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
6915 GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
6916 GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
6917 #endif
6918 #endif /* GL_EXT_histogram */
6919
6920 #ifndef GL_EXT_index_array_formats
6921 #define GL_EXT_index_array_formats 1
6922 #define GL_IUI_V2F_EXT 0x81AD
6923 #define GL_IUI_V3F_EXT 0x81AE
6924 #define GL_IUI_N3F_V2F_EXT 0x81AF
6925 #define GL_IUI_N3F_V3F_EXT 0x81B0
6926 #define GL_T2F_IUI_V2F_EXT 0x81B1
6927 #define GL_T2F_IUI_V3F_EXT 0x81B2
6928 #define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
6929 #define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
6930 #endif /* GL_EXT_index_array_formats */
6931
6932 #ifndef GL_EXT_index_func
6933 #define GL_EXT_index_func 1
6934 #define GL_INDEX_TEST_EXT 0x81B5
6935 #define GL_INDEX_TEST_FUNC_EXT 0x81B6
6936 #define GL_INDEX_TEST_REF_EXT 0x81B7
6937 typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
6938 #ifdef GL_GLEXT_PROTOTYPES
6939 GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
6940 #endif
6941 #endif /* GL_EXT_index_func */
6942
6943 #ifndef GL_EXT_index_material
6944 #define GL_EXT_index_material 1
6945 #define GL_INDEX_MATERIAL_EXT 0x81B8
6946 #define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
6947 #define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
6948 typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
6949 #ifdef GL_GLEXT_PROTOTYPES
6950 GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
6951 #endif
6952 #endif /* GL_EXT_index_material */
6953
6954 #ifndef GL_EXT_index_texture
6955 #define GL_EXT_index_texture 1
6956 #endif /* GL_EXT_index_texture */
6957
6958 #ifndef GL_EXT_light_texture
6959 #define GL_EXT_light_texture 1
6960 #define GL_FRAGMENT_MATERIAL_EXT 0x8349
6961 #define GL_FRAGMENT_NORMAL_EXT 0x834A
6962 #define GL_FRAGMENT_COLOR_EXT 0x834C
6963 #define GL_ATTENUATION_EXT 0x834D
6964 #define GL_SHADOW_ATTENUATION_EXT 0x834E
6965 #define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
6966 #define GL_TEXTURE_LIGHT_EXT 0x8350
6967 #define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
6968 #define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
6969 typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
6970 typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
6971 typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
6972 #ifdef GL_GLEXT_PROTOTYPES
6973 GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
6974 GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
6975 GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
6976 #endif
6977 #endif /* GL_EXT_light_texture */
6978
6979 #ifndef GL_EXT_misc_attribute
6980 #define GL_EXT_misc_attribute 1
6981 #endif /* GL_EXT_misc_attribute */
6982
6983 #ifndef GL_EXT_multi_draw_arrays
6984 #define GL_EXT_multi_draw_arrays 1
6985 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6986 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6987 #ifdef GL_GLEXT_PROTOTYPES
6988 GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
6989 GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
6990 #endif
6991 #endif /* GL_EXT_multi_draw_arrays */
6992
6993 #ifndef GL_EXT_multisample
6994 #define GL_EXT_multisample 1
6995 #define GL_MULTISAMPLE_EXT 0x809D
6996 #define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
6997 #define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
6998 #define GL_SAMPLE_MASK_EXT 0x80A0
6999 #define GL_1PASS_EXT 0x80A1
7000 #define GL_2PASS_0_EXT 0x80A2
7001 #define GL_2PASS_1_EXT 0x80A3
7002 #define GL_4PASS_0_EXT 0x80A4
7003 #define GL_4PASS_1_EXT 0x80A5
7004 #define GL_4PASS_2_EXT 0x80A6
7005 #define GL_4PASS_3_EXT 0x80A7
7006 #define GL_SAMPLE_BUFFERS_EXT 0x80A8
7007 #define GL_SAMPLES_EXT 0x80A9
7008 #define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
7009 #define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
7010 #define GL_SAMPLE_PATTERN_EXT 0x80AC
7011 #define GL_MULTISAMPLE_BIT_EXT 0x20000000
7012 typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
7013 typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
7014 #ifdef GL_GLEXT_PROTOTYPES
7015 GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
7016 GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
7017 #endif
7018 #endif /* GL_EXT_multisample */
7019
7020 #ifndef GL_EXT_packed_depth_stencil
7021 #define GL_EXT_packed_depth_stencil 1
7022 #define GL_DEPTH_STENCIL_EXT 0x84F9
7023 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA
7024 #define GL_DEPTH24_STENCIL8_EXT 0x88F0
7025 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
7026 #endif /* GL_EXT_packed_depth_stencil */
7027
7028 #ifndef GL_EXT_packed_float
7029 #define GL_EXT_packed_float 1
7030 #define GL_R11F_G11F_B10F_EXT 0x8C3A
7031 #define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
7032 #define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
7033 #endif /* GL_EXT_packed_float */
7034
7035 #ifndef GL_EXT_packed_pixels
7036 #define GL_EXT_packed_pixels 1
7037 #define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
7038 #define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
7039 #define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
7040 #define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
7041 #define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
7042 #endif /* GL_EXT_packed_pixels */
7043
7044 #ifndef GL_EXT_paletted_texture
7045 #define GL_EXT_paletted_texture 1
7046 #define GL_COLOR_INDEX1_EXT 0x80E2
7047 #define GL_COLOR_INDEX2_EXT 0x80E3
7048 #define GL_COLOR_INDEX4_EXT 0x80E4
7049 #define GL_COLOR_INDEX8_EXT 0x80E5
7050 #define GL_COLOR_INDEX12_EXT 0x80E6
7051 #define GL_COLOR_INDEX16_EXT 0x80E7
7052 #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
7053 typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7054 typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
7055 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7056 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7057 #ifdef GL_GLEXT_PROTOTYPES
7058 GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);
7059 GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);
7060 GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
7061 GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7062 #endif
7063 #endif /* GL_EXT_paletted_texture */
7064
7065 #ifndef GL_EXT_pixel_buffer_object
7066 #define GL_EXT_pixel_buffer_object 1
7067 #define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
7068 #define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
7069 #define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
7070 #define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
7071 #endif /* GL_EXT_pixel_buffer_object */
7072
7073 #ifndef GL_EXT_pixel_transform
7074 #define GL_EXT_pixel_transform 1
7075 #define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
7076 #define GL_PIXEL_MAG_FILTER_EXT 0x8331
7077 #define GL_PIXEL_MIN_FILTER_EXT 0x8332
7078 #define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
7079 #define GL_CUBIC_EXT 0x8334
7080 #define GL_AVERAGE_EXT 0x8335
7081 #define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
7082 #define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
7083 #define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
7084 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
7085 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
7086 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7087 typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
7088 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7089 typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
7090 #ifdef GL_GLEXT_PROTOTYPES
7091 GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
7092 GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
7093 GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
7094 GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
7095 GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);
7096 GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
7097 #endif
7098 #endif /* GL_EXT_pixel_transform */
7099
7100 #ifndef GL_EXT_pixel_transform_color_table
7101 #define GL_EXT_pixel_transform_color_table 1
7102 #endif /* GL_EXT_pixel_transform_color_table */
7103
7104 #ifndef GL_EXT_point_parameters
7105 #define GL_EXT_point_parameters 1
7106 #define GL_POINT_SIZE_MIN_EXT 0x8126
7107 #define GL_POINT_SIZE_MAX_EXT 0x8127
7108 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
7109 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
7110 typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
7111 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
7112 #ifdef GL_GLEXT_PROTOTYPES
7113 GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
7114 GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
7115 #endif
7116 #endif /* GL_EXT_point_parameters */
7117
7118 #ifndef GL_EXT_polygon_offset
7119 #define GL_EXT_polygon_offset 1
7120 #define GL_POLYGON_OFFSET_EXT 0x8037
7121 #define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
7122 #define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
7123 typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
7124 #ifdef GL_GLEXT_PROTOTYPES
7125 GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
7126 #endif
7127 #endif /* GL_EXT_polygon_offset */
7128
7129 #ifndef GL_EXT_provoking_vertex
7130 #define GL_EXT_provoking_vertex 1
7131 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
7132 #define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
7133 #define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
7134 #define GL_PROVOKING_VERTEX_EXT 0x8E4F
7135 typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
7136 #ifdef GL_GLEXT_PROTOTYPES
7137 GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
7138 #endif
7139 #endif /* GL_EXT_provoking_vertex */
7140
7141 #ifndef GL_EXT_rescale_normal
7142 #define GL_EXT_rescale_normal 1
7143 #define GL_RESCALE_NORMAL_EXT 0x803A
7144 #endif /* GL_EXT_rescale_normal */
7145
7146 #ifndef GL_EXT_secondary_color
7147 #define GL_EXT_secondary_color 1
7148 #define GL_COLOR_SUM_EXT 0x8458
7149 #define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
7150 #define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
7151 #define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
7152 #define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
7153 #define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
7154 #define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
7155 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
7156 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
7157 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
7158 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
7159 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
7160 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
7161 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
7162 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
7163 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
7164 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
7165 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
7166 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
7167 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
7168 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
7169 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
7170 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
7171 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
7172 #ifdef GL_GLEXT_PROTOTYPES
7173 GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
7174 GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
7175 GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
7176 GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
7177 GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
7178 GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
7179 GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
7180 GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
7181 GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
7182 GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
7183 GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
7184 GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
7185 GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
7186 GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
7187 GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
7188 GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
7189 GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
7190 #endif
7191 #endif /* GL_EXT_secondary_color */
7192
7193 #ifndef GL_EXT_separate_shader_objects
7194 #define GL_EXT_separate_shader_objects 1
7195 #define GL_ACTIVE_PROGRAM_EXT 0x8B8D
7196 typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
7197 typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
7198 typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
7199 #ifdef GL_GLEXT_PROTOTYPES
7200 GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
7201 GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
7202 GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
7203 #endif
7204 #endif /* GL_EXT_separate_shader_objects */
7205
7206 #ifndef GL_EXT_separate_specular_color
7207 #define GL_EXT_separate_specular_color 1
7208 #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
7209 #define GL_SINGLE_COLOR_EXT 0x81F9
7210 #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
7211 #endif /* GL_EXT_separate_specular_color */
7212
7213 #ifndef GL_EXT_shader_image_load_formatted
7214 #define GL_EXT_shader_image_load_formatted 1
7215 #endif /* GL_EXT_shader_image_load_formatted */
7216
7217 #ifndef GL_EXT_shader_image_load_store
7218 #define GL_EXT_shader_image_load_store 1
7219 #define GL_MAX_IMAGE_UNITS_EXT 0x8F38
7220 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
7221 #define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
7222 #define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
7223 #define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
7224 #define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
7225 #define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
7226 #define GL_IMAGE_1D_EXT 0x904C
7227 #define GL_IMAGE_2D_EXT 0x904D
7228 #define GL_IMAGE_3D_EXT 0x904E
7229 #define GL_IMAGE_2D_RECT_EXT 0x904F
7230 #define GL_IMAGE_CUBE_EXT 0x9050
7231 #define GL_IMAGE_BUFFER_EXT 0x9051
7232 #define GL_IMAGE_1D_ARRAY_EXT 0x9052
7233 #define GL_IMAGE_2D_ARRAY_EXT 0x9053
7234 #define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
7235 #define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
7236 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
7237 #define GL_INT_IMAGE_1D_EXT 0x9057
7238 #define GL_INT_IMAGE_2D_EXT 0x9058
7239 #define GL_INT_IMAGE_3D_EXT 0x9059
7240 #define GL_INT_IMAGE_2D_RECT_EXT 0x905A
7241 #define GL_INT_IMAGE_CUBE_EXT 0x905B
7242 #define GL_INT_IMAGE_BUFFER_EXT 0x905C
7243 #define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
7244 #define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
7245 #define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
7246 #define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
7247 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
7248 #define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
7249 #define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
7250 #define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
7251 #define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
7252 #define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
7253 #define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
7254 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
7255 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
7256 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
7257 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
7258 #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
7259 #define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
7260 #define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
7261 #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
7262 #define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
7263 #define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
7264 #define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
7265 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
7266 #define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
7267 #define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
7268 #define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
7269 #define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
7270 #define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
7271 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
7272 #define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
7273 #define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
7274 typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7275 typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
7276 #ifdef GL_GLEXT_PROTOTYPES
7277 GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
7278 GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
7279 #endif
7280 #endif /* GL_EXT_shader_image_load_store */
7281
7282 #ifndef GL_EXT_shader_integer_mix
7283 #define GL_EXT_shader_integer_mix 1
7284 #endif /* GL_EXT_shader_integer_mix */
7285
7286 #ifndef GL_EXT_shadow_funcs
7287 #define GL_EXT_shadow_funcs 1
7288 #endif /* GL_EXT_shadow_funcs */
7289
7290 #ifndef GL_EXT_shared_texture_palette
7291 #define GL_EXT_shared_texture_palette 1
7292 #define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
7293 #endif /* GL_EXT_shared_texture_palette */
7294
7295 #ifndef GL_EXT_stencil_clear_tag
7296 #define GL_EXT_stencil_clear_tag 1
7297 #define GL_STENCIL_TAG_BITS_EXT 0x88F2
7298 #define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
7299 typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
7300 #ifdef GL_GLEXT_PROTOTYPES
7301 GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
7302 #endif
7303 #endif /* GL_EXT_stencil_clear_tag */
7304
7305 #ifndef GL_EXT_stencil_two_side
7306 #define GL_EXT_stencil_two_side 1
7307 #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
7308 #define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
7309 typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
7310 #ifdef GL_GLEXT_PROTOTYPES
7311 GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
7312 #endif
7313 #endif /* GL_EXT_stencil_two_side */
7314
7315 #ifndef GL_EXT_stencil_wrap
7316 #define GL_EXT_stencil_wrap 1
7317 #define GL_INCR_WRAP_EXT 0x8507
7318 #define GL_DECR_WRAP_EXT 0x8508
7319 #endif /* GL_EXT_stencil_wrap */
7320
7321 #ifndef GL_EXT_subtexture
7322 #define GL_EXT_subtexture 1
7323 typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7324 typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7325 #ifdef GL_GLEXT_PROTOTYPES
7326 GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
7327 GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
7328 #endif
7329 #endif /* GL_EXT_subtexture */
7330
7331 #ifndef GL_EXT_texture
7332 #define GL_EXT_texture 1
7333 #define GL_ALPHA4_EXT 0x803B
7334 #define GL_ALPHA8_EXT 0x803C
7335 #define GL_ALPHA12_EXT 0x803D
7336 #define GL_ALPHA16_EXT 0x803E
7337 #define GL_LUMINANCE4_EXT 0x803F
7338 #define GL_LUMINANCE8_EXT 0x8040
7339 #define GL_LUMINANCE12_EXT 0x8041
7340 #define GL_LUMINANCE16_EXT 0x8042
7341 #define GL_LUMINANCE4_ALPHA4_EXT 0x8043
7342 #define GL_LUMINANCE6_ALPHA2_EXT 0x8044
7343 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
7344 #define GL_LUMINANCE12_ALPHA4_EXT 0x8046
7345 #define GL_LUMINANCE12_ALPHA12_EXT 0x8047
7346 #define GL_LUMINANCE16_ALPHA16_EXT 0x8048
7347 #define GL_INTENSITY_EXT 0x8049
7348 #define GL_INTENSITY4_EXT 0x804A
7349 #define GL_INTENSITY8_EXT 0x804B
7350 #define GL_INTENSITY12_EXT 0x804C
7351 #define GL_INTENSITY16_EXT 0x804D
7352 #define GL_RGB2_EXT 0x804E
7353 #define GL_RGB4_EXT 0x804F
7354 #define GL_RGB5_EXT 0x8050
7355 #define GL_RGB8_EXT 0x8051
7356 #define GL_RGB10_EXT 0x8052
7357 #define GL_RGB12_EXT 0x8053
7358 #define GL_RGB16_EXT 0x8054
7359 #define GL_RGBA2_EXT 0x8055
7360 #define GL_RGBA4_EXT 0x8056
7361 #define GL_RGB5_A1_EXT 0x8057
7362 #define GL_RGBA8_EXT 0x8058
7363 #define GL_RGB10_A2_EXT 0x8059
7364 #define GL_RGBA12_EXT 0x805A
7365 #define GL_RGBA16_EXT 0x805B
7366 #define GL_TEXTURE_RED_SIZE_EXT 0x805C
7367 #define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
7368 #define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
7369 #define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
7370 #define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
7371 #define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
7372 #define GL_REPLACE_EXT 0x8062
7373 #define GL_PROXY_TEXTURE_1D_EXT 0x8063
7374 #define GL_PROXY_TEXTURE_2D_EXT 0x8064
7375 #define GL_TEXTURE_TOO_LARGE_EXT 0x8065
7376 #endif /* GL_EXT_texture */
7377
7378 #ifndef GL_EXT_texture3D
7379 #define GL_EXT_texture3D 1
7380 #define GL_PACK_SKIP_IMAGES_EXT 0x806B
7381 #define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
7382 #define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
7383 #define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
7384 #define GL_TEXTURE_3D_EXT 0x806F
7385 #define GL_PROXY_TEXTURE_3D_EXT 0x8070
7386 #define GL_TEXTURE_DEPTH_EXT 0x8071
7387 #define GL_TEXTURE_WRAP_R_EXT 0x8072
7388 #define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
7389 typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7390 typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7391 #ifdef GL_GLEXT_PROTOTYPES
7392 GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
7393 GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
7394 #endif
7395 #endif /* GL_EXT_texture3D */
7396
7397 #ifndef GL_EXT_texture_array
7398 #define GL_EXT_texture_array 1
7399 #define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
7400 #define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
7401 #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
7402 #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
7403 #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
7404 #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
7405 #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
7406 #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
7407 #endif /* GL_EXT_texture_array */
7408
7409 #ifndef GL_EXT_texture_buffer_object
7410 #define GL_EXT_texture_buffer_object 1
7411 #define GL_TEXTURE_BUFFER_EXT 0x8C2A
7412 #define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
7413 #define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
7414 #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
7415 #define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
7416 typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
7417 #ifdef GL_GLEXT_PROTOTYPES
7418 GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
7419 #endif
7420 #endif /* GL_EXT_texture_buffer_object */
7421
7422 #ifndef GL_EXT_texture_compression_latc
7423 #define GL_EXT_texture_compression_latc 1
7424 #define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
7425 #define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
7426 #define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
7427 #define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
7428 #endif /* GL_EXT_texture_compression_latc */
7429
7430 #ifndef GL_EXT_texture_compression_rgtc
7431 #define GL_EXT_texture_compression_rgtc 1
7432 #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
7433 #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
7434 #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
7435 #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
7436 #endif /* GL_EXT_texture_compression_rgtc */
7437
7438 #ifndef GL_EXT_texture_compression_s3tc
7439 #define GL_EXT_texture_compression_s3tc 1
7440 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
7441 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
7442 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
7443 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
7444 #endif /* GL_EXT_texture_compression_s3tc */
7445
7446 #ifndef GL_EXT_texture_cube_map
7447 #define GL_EXT_texture_cube_map 1
7448 #define GL_NORMAL_MAP_EXT 0x8511
7449 #define GL_REFLECTION_MAP_EXT 0x8512
7450 #define GL_TEXTURE_CUBE_MAP_EXT 0x8513
7451 #define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
7452 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
7453 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
7454 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
7455 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
7456 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
7457 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
7458 #define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
7459 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
7460 #endif /* GL_EXT_texture_cube_map */
7461
7462 #ifndef GL_EXT_texture_env_add
7463 #define GL_EXT_texture_env_add 1
7464 #endif /* GL_EXT_texture_env_add */
7465
7466 #ifndef GL_EXT_texture_env_combine
7467 #define GL_EXT_texture_env_combine 1
7468 #define GL_COMBINE_EXT 0x8570
7469 #define GL_COMBINE_RGB_EXT 0x8571
7470 #define GL_COMBINE_ALPHA_EXT 0x8572
7471 #define GL_RGB_SCALE_EXT 0x8573
7472 #define GL_ADD_SIGNED_EXT 0x8574
7473 #define GL_INTERPOLATE_EXT 0x8575
7474 #define GL_CONSTANT_EXT 0x8576
7475 #define GL_PRIMARY_COLOR_EXT 0x8577
7476 #define GL_PREVIOUS_EXT 0x8578
7477 #define GL_SOURCE0_RGB_EXT 0x8580
7478 #define GL_SOURCE1_RGB_EXT 0x8581
7479 #define GL_SOURCE2_RGB_EXT 0x8582
7480 #define GL_SOURCE0_ALPHA_EXT 0x8588
7481 #define GL_SOURCE1_ALPHA_EXT 0x8589
7482 #define GL_SOURCE2_ALPHA_EXT 0x858A
7483 #define GL_OPERAND0_RGB_EXT 0x8590
7484 #define GL_OPERAND1_RGB_EXT 0x8591
7485 #define GL_OPERAND2_RGB_EXT 0x8592
7486 #define GL_OPERAND0_ALPHA_EXT 0x8598
7487 #define GL_OPERAND1_ALPHA_EXT 0x8599
7488 #define GL_OPERAND2_ALPHA_EXT 0x859A
7489 #endif /* GL_EXT_texture_env_combine */
7490
7491 #ifndef GL_EXT_texture_env_dot3
7492 #define GL_EXT_texture_env_dot3 1
7493 #define GL_DOT3_RGB_EXT 0x8740
7494 #define GL_DOT3_RGBA_EXT 0x8741
7495 #endif /* GL_EXT_texture_env_dot3 */
7496
7497 #ifndef GL_EXT_texture_filter_anisotropic
7498 #define GL_EXT_texture_filter_anisotropic 1
7499 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
7500 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
7501 #endif /* GL_EXT_texture_filter_anisotropic */
7502
7503 #ifndef GL_EXT_texture_integer
7504 #define GL_EXT_texture_integer 1
7505 #define GL_RGBA32UI_EXT 0x8D70
7506 #define GL_RGB32UI_EXT 0x8D71
7507 #define GL_ALPHA32UI_EXT 0x8D72
7508 #define GL_INTENSITY32UI_EXT 0x8D73
7509 #define GL_LUMINANCE32UI_EXT 0x8D74
7510 #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
7511 #define GL_RGBA16UI_EXT 0x8D76
7512 #define GL_RGB16UI_EXT 0x8D77
7513 #define GL_ALPHA16UI_EXT 0x8D78
7514 #define GL_INTENSITY16UI_EXT 0x8D79
7515 #define GL_LUMINANCE16UI_EXT 0x8D7A
7516 #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
7517 #define GL_RGBA8UI_EXT 0x8D7C
7518 #define GL_RGB8UI_EXT 0x8D7D
7519 #define GL_ALPHA8UI_EXT 0x8D7E
7520 #define GL_INTENSITY8UI_EXT 0x8D7F
7521 #define GL_LUMINANCE8UI_EXT 0x8D80
7522 #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
7523 #define GL_RGBA32I_EXT 0x8D82
7524 #define GL_RGB32I_EXT 0x8D83
7525 #define GL_ALPHA32I_EXT 0x8D84
7526 #define GL_INTENSITY32I_EXT 0x8D85
7527 #define GL_LUMINANCE32I_EXT 0x8D86
7528 #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
7529 #define GL_RGBA16I_EXT 0x8D88
7530 #define GL_RGB16I_EXT 0x8D89
7531 #define GL_ALPHA16I_EXT 0x8D8A
7532 #define GL_INTENSITY16I_EXT 0x8D8B
7533 #define GL_LUMINANCE16I_EXT 0x8D8C
7534 #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
7535 #define GL_RGBA8I_EXT 0x8D8E
7536 #define GL_RGB8I_EXT 0x8D8F
7537 #define GL_ALPHA8I_EXT 0x8D90
7538 #define GL_INTENSITY8I_EXT 0x8D91
7539 #define GL_LUMINANCE8I_EXT 0x8D92
7540 #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
7541 #define GL_RED_INTEGER_EXT 0x8D94
7542 #define GL_GREEN_INTEGER_EXT 0x8D95
7543 #define GL_BLUE_INTEGER_EXT 0x8D96
7544 #define GL_ALPHA_INTEGER_EXT 0x8D97
7545 #define GL_RGB_INTEGER_EXT 0x8D98
7546 #define GL_RGBA_INTEGER_EXT 0x8D99
7547 #define GL_BGR_INTEGER_EXT 0x8D9A
7548 #define GL_BGRA_INTEGER_EXT 0x8D9B
7549 #define GL_LUMINANCE_INTEGER_EXT 0x8D9C
7550 #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
7551 #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
7552 typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
7553 typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
7554 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
7555 typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
7556 typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
7557 typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7558 #ifdef GL_GLEXT_PROTOTYPES
7559 GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
7560 GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
7561 GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
7562 GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
7563 GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
7564 GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
7565 #endif
7566 #endif /* GL_EXT_texture_integer */
7567
7568 #ifndef GL_EXT_texture_lod_bias
7569 #define GL_EXT_texture_lod_bias 1
7570 #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
7571 #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
7572 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501
7573 #endif /* GL_EXT_texture_lod_bias */
7574
7575 #ifndef GL_EXT_texture_mirror_clamp
7576 #define GL_EXT_texture_mirror_clamp 1
7577 #define GL_MIRROR_CLAMP_EXT 0x8742
7578 #define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
7579 #define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
7580 #endif /* GL_EXT_texture_mirror_clamp */
7581
7582 #ifndef GL_EXT_texture_object
7583 #define GL_EXT_texture_object 1
7584 #define GL_TEXTURE_PRIORITY_EXT 0x8066
7585 #define GL_TEXTURE_RESIDENT_EXT 0x8067
7586 #define GL_TEXTURE_1D_BINDING_EXT 0x8068
7587 #define GL_TEXTURE_2D_BINDING_EXT 0x8069
7588 #define GL_TEXTURE_3D_BINDING_EXT 0x806A
7589 typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
7590 typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
7591 typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
7592 typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
7593 typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
7594 typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7595 #ifdef GL_GLEXT_PROTOTYPES
7596 GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
7597 GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
7598 GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
7599 GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
7600 GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
7601 GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
7602 #endif
7603 #endif /* GL_EXT_texture_object */
7604
7605 #ifndef GL_EXT_texture_perturb_normal
7606 #define GL_EXT_texture_perturb_normal 1
7607 #define GL_PERTURB_EXT 0x85AE
7608 #define GL_TEXTURE_NORMAL_EXT 0x85AF
7609 typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
7610 #ifdef GL_GLEXT_PROTOTYPES
7611 GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
7612 #endif
7613 #endif /* GL_EXT_texture_perturb_normal */
7614
7615 #ifndef GL_EXT_texture_sRGB
7616 #define GL_EXT_texture_sRGB 1
7617 #define GL_SRGB_EXT 0x8C40
7618 #define GL_SRGB8_EXT 0x8C41
7619 #define GL_SRGB_ALPHA_EXT 0x8C42
7620 #define GL_SRGB8_ALPHA8_EXT 0x8C43
7621 #define GL_SLUMINANCE_ALPHA_EXT 0x8C44
7622 #define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
7623 #define GL_SLUMINANCE_EXT 0x8C46
7624 #define GL_SLUMINANCE8_EXT 0x8C47
7625 #define GL_COMPRESSED_SRGB_EXT 0x8C48
7626 #define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
7627 #define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
7628 #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
7629 #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
7630 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
7631 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
7632 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
7633 #endif /* GL_EXT_texture_sRGB */
7634
7635 #ifndef GL_EXT_texture_sRGB_decode
7636 #define GL_EXT_texture_sRGB_decode 1
7637 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
7638 #define GL_DECODE_EXT 0x8A49
7639 #define GL_SKIP_DECODE_EXT 0x8A4A
7640 #endif /* GL_EXT_texture_sRGB_decode */
7641
7642 #ifndef GL_EXT_texture_shared_exponent
7643 #define GL_EXT_texture_shared_exponent 1
7644 #define GL_RGB9_E5_EXT 0x8C3D
7645 #define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
7646 #define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
7647 #endif /* GL_EXT_texture_shared_exponent */
7648
7649 #ifndef GL_EXT_texture_snorm
7650 #define GL_EXT_texture_snorm 1
7651 #define GL_ALPHA_SNORM 0x9010
7652 #define GL_LUMINANCE_SNORM 0x9011
7653 #define GL_LUMINANCE_ALPHA_SNORM 0x9012
7654 #define GL_INTENSITY_SNORM 0x9013
7655 #define GL_ALPHA8_SNORM 0x9014
7656 #define GL_LUMINANCE8_SNORM 0x9015
7657 #define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
7658 #define GL_INTENSITY8_SNORM 0x9017
7659 #define GL_ALPHA16_SNORM 0x9018
7660 #define GL_LUMINANCE16_SNORM 0x9019
7661 #define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
7662 #define GL_INTENSITY16_SNORM 0x901B
7663 #define GL_RED_SNORM 0x8F90
7664 #define GL_RG_SNORM 0x8F91
7665 #define GL_RGB_SNORM 0x8F92
7666 #define GL_RGBA_SNORM 0x8F93
7667 #endif /* GL_EXT_texture_snorm */
7668
7669 #ifndef GL_EXT_texture_swizzle
7670 #define GL_EXT_texture_swizzle 1
7671 #define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
7672 #define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
7673 #define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
7674 #define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
7675 #define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
7676 #endif /* GL_EXT_texture_swizzle */
7677
7678 #ifndef GL_EXT_timer_query
7679 #define GL_EXT_timer_query 1
7680 #define GL_TIME_ELAPSED_EXT 0x88BF
7681 typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
7682 typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
7683 #ifdef GL_GLEXT_PROTOTYPES
7684 GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
7685 GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
7686 #endif
7687 #endif /* GL_EXT_timer_query */
7688
7689 #ifndef GL_EXT_transform_feedback
7690 #define GL_EXT_transform_feedback 1
7691 #define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
7692 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
7693 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
7694 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
7695 #define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
7696 #define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
7697 #define GL_PRIMITIVES_GENERATED_EXT 0x8C87
7698 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
7699 #define GL_RASTERIZER_DISCARD_EXT 0x8C89
7700 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
7701 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
7702 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
7703 #define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
7704 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
7705 #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
7706 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
7707 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
7708 typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7709 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7710 typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
7711 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7712 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7713 #ifdef GL_GLEXT_PROTOTYPES
7714 GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
7715 GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
7716 GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
7717 GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
7718 GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
7719 GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
7720 GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
7721 #endif
7722 #endif /* GL_EXT_transform_feedback */
7723
7724 #ifndef GL_EXT_vertex_array
7725 #define GL_EXT_vertex_array 1
7726 #define GL_VERTEX_ARRAY_EXT 0x8074
7727 #define GL_NORMAL_ARRAY_EXT 0x8075
7728 #define GL_COLOR_ARRAY_EXT 0x8076
7729 #define GL_INDEX_ARRAY_EXT 0x8077
7730 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
7731 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079
7732 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
7733 #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
7734 #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
7735 #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
7736 #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
7737 #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
7738 #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
7739 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081
7740 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082
7741 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
7742 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084
7743 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085
7744 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
7745 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087
7746 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
7747 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
7748 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
7749 #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
7750 #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
7751 #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
7752 #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
7753 #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
7754 #define GL_COLOR_ARRAY_POINTER_EXT 0x8090
7755 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091
7756 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
7757 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
7758 typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
7759 typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7760 typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
7761 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
7762 typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);
7763 typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7764 typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7765 typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7766 typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7767 #ifdef GL_GLEXT_PROTOTYPES
7768 GLAPI void APIENTRY glArrayElementEXT (GLint i);
7769 GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7770 GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
7771 GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
7772 GLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);
7773 GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7774 GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7775 GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7776 GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
7777 #endif
7778 #endif /* GL_EXT_vertex_array */
7779
7780 #ifndef GL_EXT_vertex_array_bgra
7781 #define GL_EXT_vertex_array_bgra 1
7782 #endif /* GL_EXT_vertex_array_bgra */
7783
7784 #ifndef GL_EXT_vertex_attrib_64bit
7785 #define GL_EXT_vertex_attrib_64bit 1
7786 #define GL_DOUBLE_VEC2_EXT 0x8FFC
7787 #define GL_DOUBLE_VEC3_EXT 0x8FFD
7788 #define GL_DOUBLE_VEC4_EXT 0x8FFE
7789 #define GL_DOUBLE_MAT2_EXT 0x8F46
7790 #define GL_DOUBLE_MAT3_EXT 0x8F47
7791 #define GL_DOUBLE_MAT4_EXT 0x8F48
7792 #define GL_DOUBLE_MAT2x3_EXT 0x8F49
7793 #define GL_DOUBLE_MAT2x4_EXT 0x8F4A
7794 #define GL_DOUBLE_MAT3x2_EXT 0x8F4B
7795 #define GL_DOUBLE_MAT3x4_EXT 0x8F4C
7796 #define GL_DOUBLE_MAT4x2_EXT 0x8F4D
7797 #define GL_DOUBLE_MAT4x3_EXT 0x8F4E
7798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
7799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
7800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
7803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
7804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
7805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
7806 typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7807 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
7808 #ifdef GL_GLEXT_PROTOTYPES
7809 GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
7810 GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
7811 GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
7812 GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
7813 GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
7814 GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
7815 GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
7816 GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
7817 GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
7818 GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
7819 #endif
7820 #endif /* GL_EXT_vertex_attrib_64bit */
7821
7822 #ifndef GL_EXT_vertex_shader
7823 #define GL_EXT_vertex_shader 1
7824 #define GL_VERTEX_SHADER_EXT 0x8780
7825 #define GL_VERTEX_SHADER_BINDING_EXT 0x8781
7826 #define GL_OP_INDEX_EXT 0x8782
7827 #define GL_OP_NEGATE_EXT 0x8783
7828 #define GL_OP_DOT3_EXT 0x8784
7829 #define GL_OP_DOT4_EXT 0x8785
7830 #define GL_OP_MUL_EXT 0x8786
7831 #define GL_OP_ADD_EXT 0x8787
7832 #define GL_OP_MADD_EXT 0x8788
7833 #define GL_OP_FRAC_EXT 0x8789
7834 #define GL_OP_MAX_EXT 0x878A
7835 #define GL_OP_MIN_EXT 0x878B
7836 #define GL_OP_SET_GE_EXT 0x878C
7837 #define GL_OP_SET_LT_EXT 0x878D
7838 #define GL_OP_CLAMP_EXT 0x878E
7839 #define GL_OP_FLOOR_EXT 0x878F
7840 #define GL_OP_ROUND_EXT 0x8790
7841 #define GL_OP_EXP_BASE_2_EXT 0x8791
7842 #define GL_OP_LOG_BASE_2_EXT 0x8792
7843 #define GL_OP_POWER_EXT 0x8793
7844 #define GL_OP_RECIP_EXT 0x8794
7845 #define GL_OP_RECIP_SQRT_EXT 0x8795
7846 #define GL_OP_SUB_EXT 0x8796
7847 #define GL_OP_CROSS_PRODUCT_EXT 0x8797
7848 #define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
7849 #define GL_OP_MOV_EXT 0x8799
7850 #define GL_OUTPUT_VERTEX_EXT 0x879A
7851 #define GL_OUTPUT_COLOR0_EXT 0x879B
7852 #define GL_OUTPUT_COLOR1_EXT 0x879C
7853 #define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
7854 #define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
7855 #define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
7856 #define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
7857 #define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
7858 #define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
7859 #define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
7860 #define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
7861 #define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
7862 #define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
7863 #define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
7864 #define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
7865 #define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
7866 #define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
7867 #define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
7868 #define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
7869 #define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
7870 #define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
7871 #define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
7872 #define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
7873 #define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
7874 #define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
7875 #define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
7876 #define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
7877 #define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
7878 #define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
7879 #define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
7880 #define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
7881 #define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
7882 #define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
7883 #define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
7884 #define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
7885 #define GL_OUTPUT_FOG_EXT 0x87BD
7886 #define GL_SCALAR_EXT 0x87BE
7887 #define GL_VECTOR_EXT 0x87BF
7888 #define GL_MATRIX_EXT 0x87C0
7889 #define GL_VARIANT_EXT 0x87C1
7890 #define GL_INVARIANT_EXT 0x87C2
7891 #define GL_LOCAL_CONSTANT_EXT 0x87C3
7892 #define GL_LOCAL_EXT 0x87C4
7893 #define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
7894 #define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
7895 #define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
7896 #define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
7897 #define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
7898 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
7899 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
7900 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
7901 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
7902 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
7903 #define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
7904 #define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
7905 #define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
7906 #define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
7907 #define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
7908 #define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
7909 #define GL_X_EXT 0x87D5
7910 #define GL_Y_EXT 0x87D6
7911 #define GL_Z_EXT 0x87D7
7912 #define GL_W_EXT 0x87D8
7913 #define GL_NEGATIVE_X_EXT 0x87D9
7914 #define GL_NEGATIVE_Y_EXT 0x87DA
7915 #define GL_NEGATIVE_Z_EXT 0x87DB
7916 #define GL_NEGATIVE_W_EXT 0x87DC
7917 #define GL_ZERO_EXT 0x87DD
7918 #define GL_ONE_EXT 0x87DE
7919 #define GL_NEGATIVE_ONE_EXT 0x87DF
7920 #define GL_NORMALIZED_RANGE_EXT 0x87E0
7921 #define GL_FULL_RANGE_EXT 0x87E1
7922 #define GL_CURRENT_VERTEX_EXT 0x87E2
7923 #define GL_MVP_MATRIX_EXT 0x87E3
7924 #define GL_VARIANT_VALUE_EXT 0x87E4
7925 #define GL_VARIANT_DATATYPE_EXT 0x87E5
7926 #define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
7927 #define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
7928 #define GL_VARIANT_ARRAY_EXT 0x87E8
7929 #define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
7930 #define GL_INVARIANT_VALUE_EXT 0x87EA
7931 #define GL_INVARIANT_DATATYPE_EXT 0x87EB
7932 #define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
7933 #define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
7934 typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
7935 typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
7936 typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
7937 typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
7938 typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
7939 typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
7940 typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7941 typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7942 typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7943 typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7944 typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7945 typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
7946 typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7947 typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7948 typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
7949 typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
7950 typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
7951 typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
7952 typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
7953 typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
7954 typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
7955 typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
7956 typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
7957 typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
7958 typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7959 typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
7960 typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
7961 typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
7962 typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
7963 typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
7964 typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
7965 typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
7966 typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7967 typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7968 typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7969 typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
7970 typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7971 typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7972 typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7973 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
7974 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
7975 typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
7976 #ifdef GL_GLEXT_PROTOTYPES
7977 GLAPI void APIENTRY glBeginVertexShaderEXT (void);
7978 GLAPI void APIENTRY glEndVertexShaderEXT (void);
7979 GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
7980 GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
7981 GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
7982 GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
7983 GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
7984 GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
7985 GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7986 GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
7987 GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
7988 GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
7989 GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
7990 GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);
7991 GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);
7992 GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
7993 GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
7994 GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
7995 GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
7996 GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
7997 GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
7998 GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
7999 GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
8000 GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);
8001 GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
8002 GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
8003 GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
8004 GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
8005 GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
8006 GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
8007 GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
8008 GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
8009 GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8010 GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8011 GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8012 GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);
8013 GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8014 GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
8015 GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8016 GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
8017 GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
8018 GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
8019 #endif
8020 #endif /* GL_EXT_vertex_shader */
8021
8022 #ifndef GL_EXT_vertex_weighting
8023 #define GL_EXT_vertex_weighting 1
8024 #define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
8025 #define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
8026 #define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
8027 #define GL_MODELVIEW1_MATRIX_EXT 0x8506
8028 #define GL_VERTEX_WEIGHTING_EXT 0x8509
8029 #define GL_MODELVIEW0_EXT 0x1700
8030 #define GL_MODELVIEW1_EXT 0x850A
8031 #define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
8032 #define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
8033 #define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
8034 #define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
8035 #define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
8036 #define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
8037 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
8038 typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
8039 typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
8040 #ifdef GL_GLEXT_PROTOTYPES
8041 GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
8042 GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
8043 GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);
8044 #endif
8045 #endif /* GL_EXT_vertex_weighting */
8046
8047 #ifndef GL_EXT_x11_sync_object
8048 #define GL_EXT_x11_sync_object 1
8049 #define GL_SYNC_X11_FENCE_EXT 0x90E1
8050 typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8051 #ifdef GL_GLEXT_PROTOTYPES
8052 GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
8053 #endif
8054 #endif /* GL_EXT_x11_sync_object */
8055
8056 #ifndef GL_GREMEDY_frame_terminator
8057 #define GL_GREMEDY_frame_terminator 1
8058 typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
8059 #ifdef GL_GLEXT_PROTOTYPES
8060 GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
8061 #endif
8062 #endif /* GL_GREMEDY_frame_terminator */
8063
8064 #ifndef GL_GREMEDY_string_marker
8065 #define GL_GREMEDY_string_marker 1
8066 typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
8067 #ifdef GL_GLEXT_PROTOTYPES
8068 GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);
8069 #endif
8070 #endif /* GL_GREMEDY_string_marker */
8071
8072 #ifndef GL_HP_convolution_border_modes
8073 #define GL_HP_convolution_border_modes 1
8074 #define GL_IGNORE_BORDER_HP 0x8150
8075 #define GL_CONSTANT_BORDER_HP 0x8151
8076 #define GL_REPLICATE_BORDER_HP 0x8153
8077 #define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
8078 #endif /* GL_HP_convolution_border_modes */
8079
8080 #ifndef GL_HP_image_transform
8081 #define GL_HP_image_transform 1
8082 #define GL_IMAGE_SCALE_X_HP 0x8155
8083 #define GL_IMAGE_SCALE_Y_HP 0x8156
8084 #define GL_IMAGE_TRANSLATE_X_HP 0x8157
8085 #define GL_IMAGE_TRANSLATE_Y_HP 0x8158
8086 #define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
8087 #define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
8088 #define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
8089 #define GL_IMAGE_MAG_FILTER_HP 0x815C
8090 #define GL_IMAGE_MIN_FILTER_HP 0x815D
8091 #define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
8092 #define GL_CUBIC_HP 0x815F
8093 #define GL_AVERAGE_HP 0x8160
8094 #define GL_IMAGE_TRANSFORM_2D_HP 0x8161
8095 #define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
8096 #define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
8097 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
8098 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
8099 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
8100 typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
8101 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
8102 typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
8103 #ifdef GL_GLEXT_PROTOTYPES
8104 GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
8105 GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
8106 GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
8107 GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
8108 GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
8109 GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
8110 #endif
8111 #endif /* GL_HP_image_transform */
8112
8113 #ifndef GL_HP_occlusion_test
8114 #define GL_HP_occlusion_test 1
8115 #define GL_OCCLUSION_TEST_HP 0x8165
8116 #define GL_OCCLUSION_TEST_RESULT_HP 0x8166
8117 #endif /* GL_HP_occlusion_test */
8118
8119 #ifndef GL_HP_texture_lighting
8120 #define GL_HP_texture_lighting 1
8121 #define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
8122 #define GL_TEXTURE_POST_SPECULAR_HP 0x8168
8123 #define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
8124 #endif /* GL_HP_texture_lighting */
8125
8126 #ifndef GL_IBM_cull_vertex
8127 #define GL_IBM_cull_vertex 1
8128 #define GL_CULL_VERTEX_IBM 103050
8129 #endif /* GL_IBM_cull_vertex */
8130
8131 #ifndef GL_IBM_multimode_draw_arrays
8132 #define GL_IBM_multimode_draw_arrays 1
8133 typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8134 typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8135 #ifdef GL_GLEXT_PROTOTYPES
8136 GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
8137 GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);
8138 #endif
8139 #endif /* GL_IBM_multimode_draw_arrays */
8140
8141 #ifndef GL_IBM_rasterpos_clip
8142 #define GL_IBM_rasterpos_clip 1
8143 #define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
8144 #endif /* GL_IBM_rasterpos_clip */
8145
8146 #ifndef GL_IBM_static_data
8147 #define GL_IBM_static_data 1
8148 #define GL_ALL_STATIC_DATA_IBM 103060
8149 #define GL_STATIC_VERTEX_ARRAY_IBM 103061
8150 typedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);
8151 #ifdef GL_GLEXT_PROTOTYPES
8152 GLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);
8153 #endif
8154 #endif /* GL_IBM_static_data */
8155
8156 #ifndef GL_IBM_texture_mirrored_repeat
8157 #define GL_IBM_texture_mirrored_repeat 1
8158 #define GL_MIRRORED_REPEAT_IBM 0x8370
8159 #endif /* GL_IBM_texture_mirrored_repeat */
8160
8161 #ifndef GL_IBM_vertex_array_lists
8162 #define GL_IBM_vertex_array_lists 1
8163 #define GL_VERTEX_ARRAY_LIST_IBM 103070
8164 #define GL_NORMAL_ARRAY_LIST_IBM 103071
8165 #define GL_COLOR_ARRAY_LIST_IBM 103072
8166 #define GL_INDEX_ARRAY_LIST_IBM 103073
8167 #define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
8168 #define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
8169 #define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
8170 #define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
8171 #define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
8172 #define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
8173 #define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
8174 #define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
8175 #define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
8176 #define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
8177 #define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
8178 #define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
8179 typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8180 typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8181 typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
8182 typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8183 typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8184 typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8185 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8186 typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8187 #ifdef GL_GLEXT_PROTOTYPES
8188 GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8189 GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8190 GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);
8191 GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8192 GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8193 GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8194 GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8195 GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);
8196 #endif
8197 #endif /* GL_IBM_vertex_array_lists */
8198
8199 #ifndef GL_INGR_blend_func_separate
8200 #define GL_INGR_blend_func_separate 1
8201 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8202 #ifdef GL_GLEXT_PROTOTYPES
8203 GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
8204 #endif
8205 #endif /* GL_INGR_blend_func_separate */
8206
8207 #ifndef GL_INGR_color_clamp
8208 #define GL_INGR_color_clamp 1
8209 #define GL_RED_MIN_CLAMP_INGR 0x8560
8210 #define GL_GREEN_MIN_CLAMP_INGR 0x8561
8211 #define GL_BLUE_MIN_CLAMP_INGR 0x8562
8212 #define GL_ALPHA_MIN_CLAMP_INGR 0x8563
8213 #define GL_RED_MAX_CLAMP_INGR 0x8564
8214 #define GL_GREEN_MAX_CLAMP_INGR 0x8565
8215 #define GL_BLUE_MAX_CLAMP_INGR 0x8566
8216 #define GL_ALPHA_MAX_CLAMP_INGR 0x8567
8217 #endif /* GL_INGR_color_clamp */
8218
8219 #ifndef GL_INGR_interlace_read
8220 #define GL_INGR_interlace_read 1
8221 #define GL_INTERLACE_READ_INGR 0x8568
8222 #endif /* GL_INGR_interlace_read */
8223
8224 #ifndef GL_INTEL_fragment_shader_ordering
8225 #define GL_INTEL_fragment_shader_ordering 1
8226 #endif /* GL_INTEL_fragment_shader_ordering */
8227
8228 #ifndef GL_INTEL_map_texture
8229 #define GL_INTEL_map_texture 1
8230 #define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
8231 #define GL_LAYOUT_DEFAULT_INTEL 0
8232 #define GL_LAYOUT_LINEAR_INTEL 1
8233 #define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
8234 typedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
8235 typedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
8236 typedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8237 #ifdef GL_GLEXT_PROTOTYPES
8238 GLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);
8239 GLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);
8240 GLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);
8241 #endif
8242 #endif /* GL_INTEL_map_texture */
8243
8244 #ifndef GL_INTEL_parallel_arrays
8245 #define GL_INTEL_parallel_arrays 1
8246 #define GL_PARALLEL_ARRAYS_INTEL 0x83F4
8247 #define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
8248 #define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
8249 #define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
8250 #define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
8251 typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8252 typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);
8253 typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8254 typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);
8255 #ifdef GL_GLEXT_PROTOTYPES
8256 GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);
8257 GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);
8258 GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);
8259 GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);
8260 #endif
8261 #endif /* GL_INTEL_parallel_arrays */
8262
8263 #ifndef GL_INTEL_performance_query
8264 #define GL_INTEL_performance_query 1
8265 #define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
8266 #define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
8267 #define GL_PERFQUERY_WAIT_INTEL 0x83FB
8268 #define GL_PERFQUERY_FLUSH_INTEL 0x83FA
8269 #define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
8270 #define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
8271 #define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
8272 #define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
8273 #define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
8274 #define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
8275 #define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
8276 #define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
8277 #define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
8278 #define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
8279 #define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
8280 #define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
8281 #define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
8282 #define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
8283 #define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
8284 #define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
8285 typedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
8286 typedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
8287 typedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
8288 typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
8289 typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
8290 typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
8291 typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8292 typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8293 typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
8294 typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8295 #ifdef GL_GLEXT_PROTOTYPES
8296 GLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
8297 GLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
8298 GLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
8299 GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
8300 GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
8301 GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
8302 GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
8303 GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
8304 GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
8305 GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
8306 #endif
8307 #endif /* GL_INTEL_performance_query */
8308
8309 #ifndef GL_MESAX_texture_stack
8310 #define GL_MESAX_texture_stack 1
8311 #define GL_TEXTURE_1D_STACK_MESAX 0x8759
8312 #define GL_TEXTURE_2D_STACK_MESAX 0x875A
8313 #define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
8314 #define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
8315 #define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
8316 #define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
8317 #endif /* GL_MESAX_texture_stack */
8318
8319 #ifndef GL_MESA_pack_invert
8320 #define GL_MESA_pack_invert 1
8321 #define GL_PACK_INVERT_MESA 0x8758
8322 #endif /* GL_MESA_pack_invert */
8323
8324 #ifndef GL_MESA_resize_buffers
8325 #define GL_MESA_resize_buffers 1
8326 typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
8327 #ifdef GL_GLEXT_PROTOTYPES
8328 GLAPI void APIENTRY glResizeBuffersMESA (void);
8329 #endif
8330 #endif /* GL_MESA_resize_buffers */
8331
8332 #ifndef GL_MESA_window_pos
8333 #define GL_MESA_window_pos 1
8334 typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
8335 typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
8336 typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
8337 typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
8338 typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
8339 typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
8340 typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
8341 typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
8342 typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
8343 typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
8344 typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
8345 typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
8346 typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
8347 typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
8348 typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
8349 typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
8350 typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8351 typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
8352 typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8353 typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
8354 typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
8355 typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
8356 typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
8357 typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
8358 #ifdef GL_GLEXT_PROTOTYPES
8359 GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
8360 GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
8361 GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
8362 GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
8363 GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
8364 GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
8365 GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
8366 GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
8367 GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
8368 GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
8369 GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
8370 GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
8371 GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
8372 GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
8373 GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
8374 GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
8375 GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8376 GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
8377 GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8378 GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
8379 GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
8380 GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
8381 GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
8382 GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
8383 #endif
8384 #endif /* GL_MESA_window_pos */
8385
8386 #ifndef GL_MESA_ycbcr_texture
8387 #define GL_MESA_ycbcr_texture 1
8388 #define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
8389 #define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
8390 #define GL_YCBCR_MESA 0x8757
8391 #endif /* GL_MESA_ycbcr_texture */
8392
8393 #ifndef GL_NVX_conditional_render
8394 #define GL_NVX_conditional_render 1
8395 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
8396 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);
8397 #ifdef GL_GLEXT_PROTOTYPES
8398 GLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);
8399 GLAPI void APIENTRY glEndConditionalRenderNVX (void);
8400 #endif
8401 #endif /* GL_NVX_conditional_render */
8402
8403 #ifndef GL_NVX_gpu_memory_info
8404 #define GL_NVX_gpu_memory_info 1
8405 #define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
8406 #define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
8407 #define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
8408 #define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
8409 #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
8410 #endif /* GL_NVX_gpu_memory_info */
8411
8412 #ifndef GL_NV_bindless_multi_draw_indirect
8413 #define GL_NV_bindless_multi_draw_indirect 1
8414 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8415 typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8416 #ifdef GL_GLEXT_PROTOTYPES
8417 GLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8418 GLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
8419 #endif
8420 #endif /* GL_NV_bindless_multi_draw_indirect */
8421
8422 #ifndef GL_NV_bindless_texture
8423 #define GL_NV_bindless_texture 1
8424 typedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
8425 typedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
8426 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8427 typedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8428 typedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8429 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
8430 typedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
8431 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
8432 typedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);
8433 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
8434 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8435 typedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
8436 typedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
8437 #ifdef GL_GLEXT_PROTOTYPES
8438 GLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);
8439 GLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);
8440 GLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);
8441 GLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);
8442 GLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
8443 GLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);
8444 GLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);
8445 GLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);
8446 GLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);
8447 GLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);
8448 GLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);
8449 GLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);
8450 GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);
8451 #endif
8452 #endif /* GL_NV_bindless_texture */
8453
8454 #ifndef GL_NV_blend_equation_advanced
8455 #define GL_NV_blend_equation_advanced 1
8456 #define GL_BLEND_OVERLAP_NV 0x9281
8457 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
8458 #define GL_BLUE_NV 0x1905
8459 #define GL_COLORBURN_NV 0x929A
8460 #define GL_COLORDODGE_NV 0x9299
8461 #define GL_CONJOINT_NV 0x9284
8462 #define GL_CONTRAST_NV 0x92A1
8463 #define GL_DARKEN_NV 0x9297
8464 #define GL_DIFFERENCE_NV 0x929E
8465 #define GL_DISJOINT_NV 0x9283
8466 #define GL_DST_ATOP_NV 0x928F
8467 #define GL_DST_IN_NV 0x928B
8468 #define GL_DST_NV 0x9287
8469 #define GL_DST_OUT_NV 0x928D
8470 #define GL_DST_OVER_NV 0x9289
8471 #define GL_EXCLUSION_NV 0x92A0
8472 #define GL_GREEN_NV 0x1904
8473 #define GL_HARDLIGHT_NV 0x929B
8474 #define GL_HARDMIX_NV 0x92A9
8475 #define GL_HSL_COLOR_NV 0x92AF
8476 #define GL_HSL_HUE_NV 0x92AD
8477 #define GL_HSL_LUMINOSITY_NV 0x92B0
8478 #define GL_HSL_SATURATION_NV 0x92AE
8479 #define GL_INVERT_OVG_NV 0x92B4
8480 #define GL_INVERT_RGB_NV 0x92A3
8481 #define GL_LIGHTEN_NV 0x9298
8482 #define GL_LINEARBURN_NV 0x92A5
8483 #define GL_LINEARDODGE_NV 0x92A4
8484 #define GL_LINEARLIGHT_NV 0x92A7
8485 #define GL_MINUS_CLAMPED_NV 0x92B3
8486 #define GL_MINUS_NV 0x929F
8487 #define GL_MULTIPLY_NV 0x9294
8488 #define GL_OVERLAY_NV 0x9296
8489 #define GL_PINLIGHT_NV 0x92A8
8490 #define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
8491 #define GL_PLUS_CLAMPED_NV 0x92B1
8492 #define GL_PLUS_DARKER_NV 0x9292
8493 #define GL_PLUS_NV 0x9291
8494 #define GL_RED_NV 0x1903
8495 #define GL_SCREEN_NV 0x9295
8496 #define GL_SOFTLIGHT_NV 0x929C
8497 #define GL_SRC_ATOP_NV 0x928E
8498 #define GL_SRC_IN_NV 0x928A
8499 #define GL_SRC_NV 0x9286
8500 #define GL_SRC_OUT_NV 0x928C
8501 #define GL_SRC_OVER_NV 0x9288
8502 #define GL_UNCORRELATED_NV 0x9282
8503 #define GL_VIVIDLIGHT_NV 0x92A6
8504 #define GL_XOR_NV 0x1506
8505 typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
8506 typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
8507 #ifdef GL_GLEXT_PROTOTYPES
8508 GLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
8509 GLAPI void APIENTRY glBlendBarrierNV (void);
8510 #endif
8511 #endif /* GL_NV_blend_equation_advanced */
8512
8513 #ifndef GL_NV_blend_equation_advanced_coherent
8514 #define GL_NV_blend_equation_advanced_coherent 1
8515 #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
8516 #endif /* GL_NV_blend_equation_advanced_coherent */
8517
8518 #ifndef GL_NV_blend_square
8519 #define GL_NV_blend_square 1
8520 #endif /* GL_NV_blend_square */
8521
8522 #ifndef GL_NV_compute_program5
8523 #define GL_NV_compute_program5 1
8524 #define GL_COMPUTE_PROGRAM_NV 0x90FB
8525 #define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
8526 #endif /* GL_NV_compute_program5 */
8527
8528 #ifndef GL_NV_conditional_render
8529 #define GL_NV_conditional_render 1
8530 #define GL_QUERY_WAIT_NV 0x8E13
8531 #define GL_QUERY_NO_WAIT_NV 0x8E14
8532 #define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
8533 #define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
8534 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
8535 typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
8536 #ifdef GL_GLEXT_PROTOTYPES
8537 GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
8538 GLAPI void APIENTRY glEndConditionalRenderNV (void);
8539 #endif
8540 #endif /* GL_NV_conditional_render */
8541
8542 #ifndef GL_NV_copy_depth_to_color
8543 #define GL_NV_copy_depth_to_color 1
8544 #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
8545 #define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
8546 #endif /* GL_NV_copy_depth_to_color */
8547
8548 #ifndef GL_NV_copy_image
8549 #define GL_NV_copy_image 1
8550 typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8551 #ifdef GL_GLEXT_PROTOTYPES
8552 GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
8553 #endif
8554 #endif /* GL_NV_copy_image */
8555
8556 #ifndef GL_NV_deep_texture3D
8557 #define GL_NV_deep_texture3D 1
8558 #define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
8559 #define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
8560 #endif /* GL_NV_deep_texture3D */
8561
8562 #ifndef GL_NV_depth_buffer_float
8563 #define GL_NV_depth_buffer_float 1
8564 #define GL_DEPTH_COMPONENT32F_NV 0x8DAB
8565 #define GL_DEPTH32F_STENCIL8_NV 0x8DAC
8566 #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
8567 #define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
8568 typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
8569 typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
8570 typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
8571 #ifdef GL_GLEXT_PROTOTYPES
8572 GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
8573 GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
8574 GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
8575 #endif
8576 #endif /* GL_NV_depth_buffer_float */
8577
8578 #ifndef GL_NV_depth_clamp
8579 #define GL_NV_depth_clamp 1
8580 #define GL_DEPTH_CLAMP_NV 0x864F
8581 #endif /* GL_NV_depth_clamp */
8582
8583 #ifndef GL_NV_draw_texture
8584 #define GL_NV_draw_texture 1
8585 typedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8586 #ifdef GL_GLEXT_PROTOTYPES
8587 GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
8588 #endif
8589 #endif /* GL_NV_draw_texture */
8590
8591 #ifndef GL_NV_evaluators
8592 #define GL_NV_evaluators 1
8593 #define GL_EVAL_2D_NV 0x86C0
8594 #define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
8595 #define GL_MAP_TESSELLATION_NV 0x86C2
8596 #define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
8597 #define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
8598 #define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
8599 #define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
8600 #define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
8601 #define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
8602 #define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
8603 #define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
8604 #define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
8605 #define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
8606 #define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
8607 #define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
8608 #define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
8609 #define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
8610 #define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
8611 #define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
8612 #define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
8613 #define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
8614 #define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
8615 #define GL_MAX_MAP_TESSELLATION_NV 0x86D6
8616 #define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
8617 typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8618 typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
8619 typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
8620 typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8621 typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
8622 typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
8623 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
8624 typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8625 typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
8626 #ifdef GL_GLEXT_PROTOTYPES
8627 GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
8628 GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
8629 GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
8630 GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
8631 GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
8632 GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
8633 GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
8634 GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
8635 GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
8636 #endif
8637 #endif /* GL_NV_evaluators */
8638
8639 #ifndef GL_NV_explicit_multisample
8640 #define GL_NV_explicit_multisample 1
8641 #define GL_SAMPLE_POSITION_NV 0x8E50
8642 #define GL_SAMPLE_MASK_NV 0x8E51
8643 #define GL_SAMPLE_MASK_VALUE_NV 0x8E52
8644 #define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
8645 #define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
8646 #define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
8647 #define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
8648 #define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
8649 #define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
8650 #define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
8651 typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
8652 typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
8653 typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
8654 #ifdef GL_GLEXT_PROTOTYPES
8655 GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
8656 GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
8657 GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
8658 #endif
8659 #endif /* GL_NV_explicit_multisample */
8660
8661 #ifndef GL_NV_fence
8662 #define GL_NV_fence 1
8663 #define GL_ALL_COMPLETED_NV 0x84F2
8664 #define GL_FENCE_STATUS_NV 0x84F3
8665 #define GL_FENCE_CONDITION_NV 0x84F4
8666 typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
8667 typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
8668 typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
8669 typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
8670 typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
8671 typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
8672 typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
8673 #ifdef GL_GLEXT_PROTOTYPES
8674 GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
8675 GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
8676 GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
8677 GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
8678 GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
8679 GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
8680 GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
8681 #endif
8682 #endif /* GL_NV_fence */
8683
8684 #ifndef GL_NV_float_buffer
8685 #define GL_NV_float_buffer 1
8686 #define GL_FLOAT_R_NV 0x8880
8687 #define GL_FLOAT_RG_NV 0x8881
8688 #define GL_FLOAT_RGB_NV 0x8882
8689 #define GL_FLOAT_RGBA_NV 0x8883
8690 #define GL_FLOAT_R16_NV 0x8884
8691 #define GL_FLOAT_R32_NV 0x8885
8692 #define GL_FLOAT_RG16_NV 0x8886
8693 #define GL_FLOAT_RG32_NV 0x8887
8694 #define GL_FLOAT_RGB16_NV 0x8888
8695 #define GL_FLOAT_RGB32_NV 0x8889
8696 #define GL_FLOAT_RGBA16_NV 0x888A
8697 #define GL_FLOAT_RGBA32_NV 0x888B
8698 #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
8699 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
8700 #define GL_FLOAT_RGBA_MODE_NV 0x888E
8701 #endif /* GL_NV_float_buffer */
8702
8703 #ifndef GL_NV_fog_distance
8704 #define GL_NV_fog_distance 1
8705 #define GL_FOG_DISTANCE_MODE_NV 0x855A
8706 #define GL_EYE_RADIAL_NV 0x855B
8707 #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
8708 #endif /* GL_NV_fog_distance */
8709
8710 #ifndef GL_NV_fragment_program
8711 #define GL_NV_fragment_program 1
8712 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
8713 #define GL_FRAGMENT_PROGRAM_NV 0x8870
8714 #define GL_MAX_TEXTURE_COORDS_NV 0x8871
8715 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
8716 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
8717 #define GL_PROGRAM_ERROR_STRING_NV 0x8874
8718 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8719 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8720 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8721 typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8722 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8723 typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8724 #ifdef GL_GLEXT_PROTOTYPES
8725 GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
8726 GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
8727 GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
8728 GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
8729 GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
8730 GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
8731 #endif
8732 #endif /* GL_NV_fragment_program */
8733
8734 #ifndef GL_NV_fragment_program2
8735 #define GL_NV_fragment_program2 1
8736 #define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
8737 #define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
8738 #define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
8739 #define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
8740 #define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
8741 #endif /* GL_NV_fragment_program2 */
8742
8743 #ifndef GL_NV_fragment_program4
8744 #define GL_NV_fragment_program4 1
8745 #endif /* GL_NV_fragment_program4 */
8746
8747 #ifndef GL_NV_fragment_program_option
8748 #define GL_NV_fragment_program_option 1
8749 #endif /* GL_NV_fragment_program_option */
8750
8751 #ifndef GL_NV_framebuffer_multisample_coverage
8752 #define GL_NV_framebuffer_multisample_coverage 1
8753 #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
8754 #define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
8755 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
8756 #define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
8757 typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8758 #ifdef GL_GLEXT_PROTOTYPES
8759 GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
8760 #endif
8761 #endif /* GL_NV_framebuffer_multisample_coverage */
8762
8763 #ifndef GL_NV_geometry_program4
8764 #define GL_NV_geometry_program4 1
8765 #define GL_GEOMETRY_PROGRAM_NV 0x8C26
8766 #define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
8767 #define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
8768 typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
8769 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
8770 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8771 typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8772 #ifdef GL_GLEXT_PROTOTYPES
8773 GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
8774 GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
8775 GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
8776 GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
8777 #endif
8778 #endif /* GL_NV_geometry_program4 */
8779
8780 #ifndef GL_NV_geometry_shader4
8781 #define GL_NV_geometry_shader4 1
8782 #endif /* GL_NV_geometry_shader4 */
8783
8784 #ifndef GL_NV_gpu_program4
8785 #define GL_NV_gpu_program4 1
8786 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
8787 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
8788 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
8789 #define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
8790 #define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
8791 #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
8792 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
8793 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
8794 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8795 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8796 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8797 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8798 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8799 typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8800 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8801 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
8802 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
8803 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8804 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
8805 typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8806 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8807 typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8808 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
8809 typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
8810 #ifdef GL_GLEXT_PROTOTYPES
8811 GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8812 GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8813 GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8814 GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8815 GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8816 GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8817 GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
8818 GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
8819 GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
8820 GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
8821 GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
8822 GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
8823 GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
8824 GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8825 GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
8826 GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
8827 #endif
8828 #endif /* GL_NV_gpu_program4 */
8829
8830 #ifndef GL_NV_gpu_program5
8831 #define GL_NV_gpu_program5 1
8832 #define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
8833 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
8834 #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
8835 #define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
8836 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
8837 #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
8838 #define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
8839 #define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45
8840 typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
8841 typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
8842 #ifdef GL_GLEXT_PROTOTYPES
8843 GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
8844 GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
8845 #endif
8846 #endif /* GL_NV_gpu_program5 */
8847
8848 #ifndef GL_NV_gpu_program5_mem_extended
8849 #define GL_NV_gpu_program5_mem_extended 1
8850 #endif /* GL_NV_gpu_program5_mem_extended */
8851
8852 #ifndef GL_NV_gpu_shader5
8853 #define GL_NV_gpu_shader5 1
8854 #endif /* GL_NV_gpu_shader5 */
8855
8856 #ifndef GL_NV_half_float
8857 #define GL_NV_half_float 1
8858 typedef unsigned short GLhalfNV;
8859 #define GL_HALF_FLOAT_NV 0x140B
8860 typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
8861 typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
8862 typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8863 typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
8864 typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8865 typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
8866 typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8867 typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
8868 typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8869 typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
8870 typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8871 typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
8872 typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
8873 typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
8874 typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
8875 typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
8876 typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8877 typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
8878 typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8879 typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
8880 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
8881 typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
8882 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
8883 typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
8884 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8885 typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
8886 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8887 typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
8888 typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
8889 typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
8890 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8891 typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
8892 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
8893 typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
8894 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
8895 typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
8896 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
8897 typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
8898 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8899 typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
8900 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8901 typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
8902 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8903 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8904 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8905 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
8906 #ifdef GL_GLEXT_PROTOTYPES
8907 GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
8908 GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
8909 GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
8910 GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
8911 GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8912 GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
8913 GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
8914 GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
8915 GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8916 GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
8917 GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
8918 GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
8919 GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
8920 GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
8921 GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
8922 GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
8923 GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
8924 GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
8925 GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8926 GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
8927 GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
8928 GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
8929 GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
8930 GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
8931 GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
8932 GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
8933 GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
8934 GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
8935 GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
8936 GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
8937 GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
8938 GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
8939 GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
8940 GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
8941 GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
8942 GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
8943 GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
8944 GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
8945 GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
8946 GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
8947 GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
8948 GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
8949 GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8950 GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8951 GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8952 GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
8953 #endif
8954 #endif /* GL_NV_half_float */
8955
8956 #ifndef GL_NV_light_max_exponent
8957 #define GL_NV_light_max_exponent 1
8958 #define GL_MAX_SHININESS_NV 0x8504
8959 #define GL_MAX_SPOT_EXPONENT_NV 0x8505
8960 #endif /* GL_NV_light_max_exponent */
8961
8962 #ifndef GL_NV_multisample_coverage
8963 #define GL_NV_multisample_coverage 1
8964 #define GL_COLOR_SAMPLES_NV 0x8E20
8965 #endif /* GL_NV_multisample_coverage */
8966
8967 #ifndef GL_NV_multisample_filter_hint
8968 #define GL_NV_multisample_filter_hint 1
8969 #define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
8970 #endif /* GL_NV_multisample_filter_hint */
8971
8972 #ifndef GL_NV_occlusion_query
8973 #define GL_NV_occlusion_query 1
8974 #define GL_PIXEL_COUNTER_BITS_NV 0x8864
8975 #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
8976 #define GL_PIXEL_COUNT_NV 0x8866
8977 #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
8978 typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
8979 typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
8980 typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
8981 typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
8982 typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
8983 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
8984 typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
8985 #ifdef GL_GLEXT_PROTOTYPES
8986 GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
8987 GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
8988 GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
8989 GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
8990 GLAPI void APIENTRY glEndOcclusionQueryNV (void);
8991 GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
8992 GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
8993 #endif
8994 #endif /* GL_NV_occlusion_query */
8995
8996 #ifndef GL_NV_packed_depth_stencil
8997 #define GL_NV_packed_depth_stencil 1
8998 #define GL_DEPTH_STENCIL_NV 0x84F9
8999 #define GL_UNSIGNED_INT_24_8_NV 0x84FA
9000 #endif /* GL_NV_packed_depth_stencil */
9001
9002 #ifndef GL_NV_parameter_buffer_object
9003 #define GL_NV_parameter_buffer_object 1
9004 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
9005 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
9006 #define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
9007 #define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
9008 #define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
9009 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9010 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9011 typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9012 #ifdef GL_GLEXT_PROTOTYPES
9013 GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);
9014 GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);
9015 GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);
9016 #endif
9017 #endif /* GL_NV_parameter_buffer_object */
9018
9019 #ifndef GL_NV_parameter_buffer_object2
9020 #define GL_NV_parameter_buffer_object2 1
9021 #endif /* GL_NV_parameter_buffer_object2 */
9022
9023 #ifndef GL_NV_path_rendering
9024 #define GL_NV_path_rendering 1
9025 #define GL_PATH_FORMAT_SVG_NV 0x9070
9026 #define GL_PATH_FORMAT_PS_NV 0x9071
9027 #define GL_STANDARD_FONT_NAME_NV 0x9072
9028 #define GL_SYSTEM_FONT_NAME_NV 0x9073
9029 #define GL_FILE_NAME_NV 0x9074
9030 #define GL_PATH_STROKE_WIDTH_NV 0x9075
9031 #define GL_PATH_END_CAPS_NV 0x9076
9032 #define GL_PATH_INITIAL_END_CAP_NV 0x9077
9033 #define GL_PATH_TERMINAL_END_CAP_NV 0x9078
9034 #define GL_PATH_JOIN_STYLE_NV 0x9079
9035 #define GL_PATH_MITER_LIMIT_NV 0x907A
9036 #define GL_PATH_DASH_CAPS_NV 0x907B
9037 #define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
9038 #define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
9039 #define GL_PATH_DASH_OFFSET_NV 0x907E
9040 #define GL_PATH_CLIENT_LENGTH_NV 0x907F
9041 #define GL_PATH_FILL_MODE_NV 0x9080
9042 #define GL_PATH_FILL_MASK_NV 0x9081
9043 #define GL_PATH_FILL_COVER_MODE_NV 0x9082
9044 #define GL_PATH_STROKE_COVER_MODE_NV 0x9083
9045 #define GL_PATH_STROKE_MASK_NV 0x9084
9046 #define GL_COUNT_UP_NV 0x9088
9047 #define GL_COUNT_DOWN_NV 0x9089
9048 #define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
9049 #define GL_CONVEX_HULL_NV 0x908B
9050 #define GL_BOUNDING_BOX_NV 0x908D
9051 #define GL_TRANSLATE_X_NV 0x908E
9052 #define GL_TRANSLATE_Y_NV 0x908F
9053 #define GL_TRANSLATE_2D_NV 0x9090
9054 #define GL_TRANSLATE_3D_NV 0x9091
9055 #define GL_AFFINE_2D_NV 0x9092
9056 #define GL_AFFINE_3D_NV 0x9094
9057 #define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
9058 #define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
9059 #define GL_UTF8_NV 0x909A
9060 #define GL_UTF16_NV 0x909B
9061 #define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
9062 #define GL_PATH_COMMAND_COUNT_NV 0x909D
9063 #define GL_PATH_COORD_COUNT_NV 0x909E
9064 #define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
9065 #define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
9066 #define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
9067 #define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
9068 #define GL_SQUARE_NV 0x90A3
9069 #define GL_ROUND_NV 0x90A4
9070 #define GL_TRIANGULAR_NV 0x90A5
9071 #define GL_BEVEL_NV 0x90A6
9072 #define GL_MITER_REVERT_NV 0x90A7
9073 #define GL_MITER_TRUNCATE_NV 0x90A8
9074 #define GL_SKIP_MISSING_GLYPH_NV 0x90A9
9075 #define GL_USE_MISSING_GLYPH_NV 0x90AA
9076 #define GL_PATH_ERROR_POSITION_NV 0x90AB
9077 #define GL_PATH_FOG_GEN_MODE_NV 0x90AC
9078 #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
9079 #define GL_ADJACENT_PAIRS_NV 0x90AE
9080 #define GL_FIRST_TO_REST_NV 0x90AF
9081 #define GL_PATH_GEN_MODE_NV 0x90B0
9082 #define GL_PATH_GEN_COEFF_NV 0x90B1
9083 #define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
9084 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3
9085 #define GL_PATH_STENCIL_FUNC_NV 0x90B7
9086 #define GL_PATH_STENCIL_REF_NV 0x90B8
9087 #define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
9088 #define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
9089 #define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
9090 #define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
9091 #define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
9092 #define GL_MOVE_TO_RESETS_NV 0x90B5
9093 #define GL_MOVE_TO_CONTINUES_NV 0x90B6
9094 #define GL_CLOSE_PATH_NV 0x00
9095 #define GL_MOVE_TO_NV 0x02
9096 #define GL_RELATIVE_MOVE_TO_NV 0x03
9097 #define GL_LINE_TO_NV 0x04
9098 #define GL_RELATIVE_LINE_TO_NV 0x05
9099 #define GL_HORIZONTAL_LINE_TO_NV 0x06
9100 #define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
9101 #define GL_VERTICAL_LINE_TO_NV 0x08
9102 #define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
9103 #define GL_QUADRATIC_CURVE_TO_NV 0x0A
9104 #define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
9105 #define GL_CUBIC_CURVE_TO_NV 0x0C
9106 #define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
9107 #define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
9108 #define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
9109 #define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
9110 #define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
9111 #define GL_SMALL_CCW_ARC_TO_NV 0x12
9112 #define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
9113 #define GL_SMALL_CW_ARC_TO_NV 0x14
9114 #define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
9115 #define GL_LARGE_CCW_ARC_TO_NV 0x16
9116 #define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
9117 #define GL_LARGE_CW_ARC_TO_NV 0x18
9118 #define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
9119 #define GL_RESTART_PATH_NV 0xF0
9120 #define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
9121 #define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
9122 #define GL_RECT_NV 0xF6
9123 #define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
9124 #define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
9125 #define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
9126 #define GL_ARC_TO_NV 0xFE
9127 #define GL_RELATIVE_ARC_TO_NV 0xFF
9128 #define GL_BOLD_BIT_NV 0x01
9129 #define GL_ITALIC_BIT_NV 0x02
9130 #define GL_GLYPH_WIDTH_BIT_NV 0x01
9131 #define GL_GLYPH_HEIGHT_BIT_NV 0x02
9132 #define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
9133 #define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
9134 #define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
9135 #define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
9136 #define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
9137 #define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
9138 #define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
9139 #define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
9140 #define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
9141 #define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
9142 #define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
9143 #define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
9144 #define GL_FONT_ASCENDER_BIT_NV 0x00200000
9145 #define GL_FONT_DESCENDER_BIT_NV 0x00400000
9146 #define GL_FONT_HEIGHT_BIT_NV 0x00800000
9147 #define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
9148 #define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
9149 #define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
9150 #define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
9151 #define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
9152 #define GL_PRIMARY_COLOR_NV 0x852C
9153 #define GL_SECONDARY_COLOR_NV 0x852D
9154 typedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);
9155 typedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
9156 typedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);
9157 typedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9158 typedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9159 typedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9160 typedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9161 typedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
9162 typedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9163 typedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9164 typedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9165 typedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
9166 typedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9167 typedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9168 typedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);
9169 typedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
9170 typedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);
9171 typedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
9172 typedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9173 typedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
9174 typedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
9175 typedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
9176 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
9177 typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9178 typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9179 typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
9180 typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9181 typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9182 typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
9183 typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
9184 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
9185 typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9186 typedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9187 typedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);
9188 typedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);
9189 typedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);
9190 typedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);
9191 typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);
9192 typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9193 typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9194 typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9195 typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
9196 typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
9197 typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
9198 typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
9199 typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9200 typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
9201 typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
9202 typedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9203 #ifdef GL_GLEXT_PROTOTYPES
9204 GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
9205 GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
9206 GLAPI GLboolean APIENTRY glIsPathNV (GLuint path);
9207 GLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9208 GLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
9209 GLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);
9210 GLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
9211 GLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);
9212 GLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9213 GLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
9214 GLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);
9215 GLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);
9216 GLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
9217 GLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);
9218 GLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);
9219 GLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);
9220 GLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);
9221 GLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);
9222 GLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);
9223 GLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);
9224 GLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);
9225 GLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);
9226 GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);
9227 GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9228 GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
9229 GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
9230 GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
9231 GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
9232 GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
9233 GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
9234 GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
9235 GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9236 GLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
9237 GLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);
9238 GLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);
9239 GLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);
9240 GLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);
9241 GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
9242 GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
9243 GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
9244 GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
9245 GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
9246 GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
9247 GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
9248 GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
9249 GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
9250 GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
9251 GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
9252 GLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
9253 #endif
9254 #endif /* GL_NV_path_rendering */
9255
9256 #ifndef GL_NV_pixel_data_range
9257 #define GL_NV_pixel_data_range 1
9258 #define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
9259 #define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
9260 #define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
9261 #define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
9262 #define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
9263 #define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
9264 typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);
9265 typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
9266 #ifdef GL_GLEXT_PROTOTYPES
9267 GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);
9268 GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
9269 #endif
9270 #endif /* GL_NV_pixel_data_range */
9271
9272 #ifndef GL_NV_point_sprite
9273 #define GL_NV_point_sprite 1
9274 #define GL_POINT_SPRITE_NV 0x8861
9275 #define GL_COORD_REPLACE_NV 0x8862
9276 #define GL_POINT_SPRITE_R_MODE_NV 0x8863
9277 typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
9278 typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9279 #ifdef GL_GLEXT_PROTOTYPES
9280 GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
9281 GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
9282 #endif
9283 #endif /* GL_NV_point_sprite */
9284
9285 #ifndef GL_NV_present_video
9286 #define GL_NV_present_video 1
9287 #define GL_FRAME_NV 0x8E26
9288 #define GL_FIELDS_NV 0x8E27
9289 #define GL_CURRENT_TIME_NV 0x8E28
9290 #define GL_NUM_FILL_STREAMS_NV 0x8E29
9291 #define GL_PRESENT_TIME_NV 0x8E2A
9292 #define GL_PRESENT_DURATION_NV 0x8E2B
9293 typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9294 typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9295 typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
9296 typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
9297 typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
9298 typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9299 #ifdef GL_GLEXT_PROTOTYPES
9300 GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
9301 GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
9302 GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
9303 GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
9304 GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
9305 GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
9306 #endif
9307 #endif /* GL_NV_present_video */
9308
9309 #ifndef GL_NV_primitive_restart
9310 #define GL_NV_primitive_restart 1
9311 #define GL_PRIMITIVE_RESTART_NV 0x8558
9312 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
9313 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
9314 typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
9315 #ifdef GL_GLEXT_PROTOTYPES
9316 GLAPI void APIENTRY glPrimitiveRestartNV (void);
9317 GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
9318 #endif
9319 #endif /* GL_NV_primitive_restart */
9320
9321 #ifndef GL_NV_register_combiners
9322 #define GL_NV_register_combiners 1
9323 #define GL_REGISTER_COMBINERS_NV 0x8522
9324 #define GL_VARIABLE_A_NV 0x8523
9325 #define GL_VARIABLE_B_NV 0x8524
9326 #define GL_VARIABLE_C_NV 0x8525
9327 #define GL_VARIABLE_D_NV 0x8526
9328 #define GL_VARIABLE_E_NV 0x8527
9329 #define GL_VARIABLE_F_NV 0x8528
9330 #define GL_VARIABLE_G_NV 0x8529
9331 #define GL_CONSTANT_COLOR0_NV 0x852A
9332 #define GL_CONSTANT_COLOR1_NV 0x852B
9333 #define GL_SPARE0_NV 0x852E
9334 #define GL_SPARE1_NV 0x852F
9335 #define GL_DISCARD_NV 0x8530
9336 #define GL_E_TIMES_F_NV 0x8531
9337 #define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
9338 #define GL_UNSIGNED_IDENTITY_NV 0x8536
9339 #define GL_UNSIGNED_INVERT_NV 0x8537
9340 #define GL_EXPAND_NORMAL_NV 0x8538
9341 #define GL_EXPAND_NEGATE_NV 0x8539
9342 #define GL_HALF_BIAS_NORMAL_NV 0x853A
9343 #define GL_HALF_BIAS_NEGATE_NV 0x853B
9344 #define GL_SIGNED_IDENTITY_NV 0x853C
9345 #define GL_SIGNED_NEGATE_NV 0x853D
9346 #define GL_SCALE_BY_TWO_NV 0x853E
9347 #define GL_SCALE_BY_FOUR_NV 0x853F
9348 #define GL_SCALE_BY_ONE_HALF_NV 0x8540
9349 #define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
9350 #define GL_COMBINER_INPUT_NV 0x8542
9351 #define GL_COMBINER_MAPPING_NV 0x8543
9352 #define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
9353 #define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
9354 #define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
9355 #define GL_COMBINER_MUX_SUM_NV 0x8547
9356 #define GL_COMBINER_SCALE_NV 0x8548
9357 #define GL_COMBINER_BIAS_NV 0x8549
9358 #define GL_COMBINER_AB_OUTPUT_NV 0x854A
9359 #define GL_COMBINER_CD_OUTPUT_NV 0x854B
9360 #define GL_COMBINER_SUM_OUTPUT_NV 0x854C
9361 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D
9362 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E
9363 #define GL_COLOR_SUM_CLAMP_NV 0x854F
9364 #define GL_COMBINER0_NV 0x8550
9365 #define GL_COMBINER1_NV 0x8551
9366 #define GL_COMBINER2_NV 0x8552
9367 #define GL_COMBINER3_NV 0x8553
9368 #define GL_COMBINER4_NV 0x8554
9369 #define GL_COMBINER5_NV 0x8555
9370 #define GL_COMBINER6_NV 0x8556
9371 #define GL_COMBINER7_NV 0x8557
9372 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
9373 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
9374 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
9375 typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
9376 typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9377 typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9378 typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9379 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9380 typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9381 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9382 typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9383 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
9384 typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
9385 #ifdef GL_GLEXT_PROTOTYPES
9386 GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
9387 GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
9388 GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
9389 GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
9390 GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9391 GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
9392 GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
9393 GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
9394 GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
9395 GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
9396 GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
9397 GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
9398 GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
9399 #endif
9400 #endif /* GL_NV_register_combiners */
9401
9402 #ifndef GL_NV_register_combiners2
9403 #define GL_NV_register_combiners2 1
9404 #define GL_PER_STAGE_CONSTANTS_NV 0x8535
9405 typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
9406 typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
9407 #ifdef GL_GLEXT_PROTOTYPES
9408 GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
9409 GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
9410 #endif
9411 #endif /* GL_NV_register_combiners2 */
9412
9413 #ifndef GL_NV_shader_atomic_counters
9414 #define GL_NV_shader_atomic_counters 1
9415 #endif /* GL_NV_shader_atomic_counters */
9416
9417 #ifndef GL_NV_shader_atomic_float
9418 #define GL_NV_shader_atomic_float 1
9419 #endif /* GL_NV_shader_atomic_float */
9420
9421 #ifndef GL_NV_shader_buffer_load
9422 #define GL_NV_shader_buffer_load 1
9423 #define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
9424 #define GL_GPU_ADDRESS_NV 0x8F34
9425 #define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
9426 typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
9427 typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
9428 typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
9429 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
9430 typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
9431 typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
9432 typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
9433 typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
9434 typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
9435 typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
9436 typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
9437 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
9438 typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9439 #ifdef GL_GLEXT_PROTOTYPES
9440 GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
9441 GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
9442 GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
9443 GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
9444 GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
9445 GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
9446 GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
9447 GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
9448 GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
9449 GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
9450 GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
9451 GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
9452 GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
9453 #endif
9454 #endif /* GL_NV_shader_buffer_load */
9455
9456 #ifndef GL_NV_shader_buffer_store
9457 #define GL_NV_shader_buffer_store 1
9458 #define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
9459 #endif /* GL_NV_shader_buffer_store */
9460
9461 #ifndef GL_NV_shader_storage_buffer_object
9462 #define GL_NV_shader_storage_buffer_object 1
9463 #endif /* GL_NV_shader_storage_buffer_object */
9464
9465 #ifndef GL_NV_shader_thread_group
9466 #define GL_NV_shader_thread_group 1
9467 #define GL_WARP_SIZE_NV 0x9339
9468 #define GL_WARPS_PER_SM_NV 0x933A
9469 #define GL_SM_COUNT_NV 0x933B
9470 #endif /* GL_NV_shader_thread_group */
9471
9472 #ifndef GL_NV_shader_thread_shuffle
9473 #define GL_NV_shader_thread_shuffle 1
9474 #endif /* GL_NV_shader_thread_shuffle */
9475
9476 #ifndef GL_NV_tessellation_program5
9477 #define GL_NV_tessellation_program5 1
9478 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
9479 #define GL_TESS_CONTROL_PROGRAM_NV 0x891E
9480 #define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
9481 #define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
9482 #define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
9483 #endif /* GL_NV_tessellation_program5 */
9484
9485 #ifndef GL_NV_texgen_emboss
9486 #define GL_NV_texgen_emboss 1
9487 #define GL_EMBOSS_LIGHT_NV 0x855D
9488 #define GL_EMBOSS_CONSTANT_NV 0x855E
9489 #define GL_EMBOSS_MAP_NV 0x855F
9490 #endif /* GL_NV_texgen_emboss */
9491
9492 #ifndef GL_NV_texgen_reflection
9493 #define GL_NV_texgen_reflection 1
9494 #define GL_NORMAL_MAP_NV 0x8511
9495 #define GL_REFLECTION_MAP_NV 0x8512
9496 #endif /* GL_NV_texgen_reflection */
9497
9498 #ifndef GL_NV_texture_barrier
9499 #define GL_NV_texture_barrier 1
9500 typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
9501 #ifdef GL_GLEXT_PROTOTYPES
9502 GLAPI void APIENTRY glTextureBarrierNV (void);
9503 #endif
9504 #endif /* GL_NV_texture_barrier */
9505
9506 #ifndef GL_NV_texture_compression_vtc
9507 #define GL_NV_texture_compression_vtc 1
9508 #endif /* GL_NV_texture_compression_vtc */
9509
9510 #ifndef GL_NV_texture_env_combine4
9511 #define GL_NV_texture_env_combine4 1
9512 #define GL_COMBINE4_NV 0x8503
9513 #define GL_SOURCE3_RGB_NV 0x8583
9514 #define GL_SOURCE3_ALPHA_NV 0x858B
9515 #define GL_OPERAND3_RGB_NV 0x8593
9516 #define GL_OPERAND3_ALPHA_NV 0x859B
9517 #endif /* GL_NV_texture_env_combine4 */
9518
9519 #ifndef GL_NV_texture_expand_normal
9520 #define GL_NV_texture_expand_normal 1
9521 #define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
9522 #endif /* GL_NV_texture_expand_normal */
9523
9524 #ifndef GL_NV_texture_multisample
9525 #define GL_NV_texture_multisample 1
9526 #define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
9527 #define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
9528 typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9529 typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9530 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9531 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9532 typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9533 typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9534 #ifdef GL_GLEXT_PROTOTYPES
9535 GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9536 GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9537 GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9538 GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9539 GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
9540 GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
9541 #endif
9542 #endif /* GL_NV_texture_multisample */
9543
9544 #ifndef GL_NV_texture_rectangle
9545 #define GL_NV_texture_rectangle 1
9546 #define GL_TEXTURE_RECTANGLE_NV 0x84F5
9547 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
9548 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
9549 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
9550 #endif /* GL_NV_texture_rectangle */
9551
9552 #ifndef GL_NV_texture_shader
9553 #define GL_NV_texture_shader 1
9554 #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
9555 #define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
9556 #define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
9557 #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
9558 #define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
9559 #define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
9560 #define GL_DSDT_MAG_INTENSITY_NV 0x86DC
9561 #define GL_SHADER_CONSISTENT_NV 0x86DD
9562 #define GL_TEXTURE_SHADER_NV 0x86DE
9563 #define GL_SHADER_OPERATION_NV 0x86DF
9564 #define GL_CULL_MODES_NV 0x86E0
9565 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
9566 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
9567 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
9568 #define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
9569 #define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
9570 #define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
9571 #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
9572 #define GL_CONST_EYE_NV 0x86E5
9573 #define GL_PASS_THROUGH_NV 0x86E6
9574 #define GL_CULL_FRAGMENT_NV 0x86E7
9575 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8
9576 #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
9577 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
9578 #define GL_DOT_PRODUCT_NV 0x86EC
9579 #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
9580 #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
9581 #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
9582 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
9583 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
9584 #define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
9585 #define GL_HILO_NV 0x86F4
9586 #define GL_DSDT_NV 0x86F5
9587 #define GL_DSDT_MAG_NV 0x86F6
9588 #define GL_DSDT_MAG_VIB_NV 0x86F7
9589 #define GL_HILO16_NV 0x86F8
9590 #define GL_SIGNED_HILO_NV 0x86F9
9591 #define GL_SIGNED_HILO16_NV 0x86FA
9592 #define GL_SIGNED_RGBA_NV 0x86FB
9593 #define GL_SIGNED_RGBA8_NV 0x86FC
9594 #define GL_SIGNED_RGB_NV 0x86FE
9595 #define GL_SIGNED_RGB8_NV 0x86FF
9596 #define GL_SIGNED_LUMINANCE_NV 0x8701
9597 #define GL_SIGNED_LUMINANCE8_NV 0x8702
9598 #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
9599 #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
9600 #define GL_SIGNED_ALPHA_NV 0x8705
9601 #define GL_SIGNED_ALPHA8_NV 0x8706
9602 #define GL_SIGNED_INTENSITY_NV 0x8707
9603 #define GL_SIGNED_INTENSITY8_NV 0x8708
9604 #define GL_DSDT8_NV 0x8709
9605 #define GL_DSDT8_MAG8_NV 0x870A
9606 #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
9607 #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
9608 #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
9609 #define GL_HI_SCALE_NV 0x870E
9610 #define GL_LO_SCALE_NV 0x870F
9611 #define GL_DS_SCALE_NV 0x8710
9612 #define GL_DT_SCALE_NV 0x8711
9613 #define GL_MAGNITUDE_SCALE_NV 0x8712
9614 #define GL_VIBRANCE_SCALE_NV 0x8713
9615 #define GL_HI_BIAS_NV 0x8714
9616 #define GL_LO_BIAS_NV 0x8715
9617 #define GL_DS_BIAS_NV 0x8716
9618 #define GL_DT_BIAS_NV 0x8717
9619 #define GL_MAGNITUDE_BIAS_NV 0x8718
9620 #define GL_VIBRANCE_BIAS_NV 0x8719
9621 #define GL_TEXTURE_BORDER_VALUES_NV 0x871A
9622 #define GL_TEXTURE_HI_SIZE_NV 0x871B
9623 #define GL_TEXTURE_LO_SIZE_NV 0x871C
9624 #define GL_TEXTURE_DS_SIZE_NV 0x871D
9625 #define GL_TEXTURE_DT_SIZE_NV 0x871E
9626 #define GL_TEXTURE_MAG_SIZE_NV 0x871F
9627 #endif /* GL_NV_texture_shader */
9628
9629 #ifndef GL_NV_texture_shader2
9630 #define GL_NV_texture_shader2 1
9631 #define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
9632 #endif /* GL_NV_texture_shader2 */
9633
9634 #ifndef GL_NV_texture_shader3
9635 #define GL_NV_texture_shader3 1
9636 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
9637 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
9638 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
9639 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
9640 #define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
9641 #define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
9642 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
9643 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
9644 #define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
9645 #define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
9646 #define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
9647 #define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
9648 #define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
9649 #define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
9650 #define GL_HILO8_NV 0x885E
9651 #define GL_SIGNED_HILO8_NV 0x885F
9652 #define GL_FORCE_BLUE_TO_ONE_NV 0x8860
9653 #endif /* GL_NV_texture_shader3 */
9654
9655 #ifndef GL_NV_transform_feedback
9656 #define GL_NV_transform_feedback 1
9657 #define GL_BACK_PRIMARY_COLOR_NV 0x8C77
9658 #define GL_BACK_SECONDARY_COLOR_NV 0x8C78
9659 #define GL_TEXTURE_COORD_NV 0x8C79
9660 #define GL_CLIP_DISTANCE_NV 0x8C7A
9661 #define GL_VERTEX_ID_NV 0x8C7B
9662 #define GL_PRIMITIVE_ID_NV 0x8C7C
9663 #define GL_GENERIC_ATTRIB_NV 0x8C7D
9664 #define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
9665 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
9666 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
9667 #define GL_ACTIVE_VARYINGS_NV 0x8C81
9668 #define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
9669 #define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
9670 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
9671 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
9672 #define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
9673 #define GL_PRIMITIVES_GENERATED_NV 0x8C87
9674 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
9675 #define GL_RASTERIZER_DISCARD_NV 0x8C89
9676 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
9677 #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
9678 #define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
9679 #define GL_SEPARATE_ATTRIBS_NV 0x8C8D
9680 #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
9681 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
9682 #define GL_LAYER_NV 0x8DAA
9683 #define GL_NEXT_BUFFER_NV -2
9684 #define GL_SKIP_COMPONENTS4_NV -3
9685 #define GL_SKIP_COMPONENTS3_NV -4
9686 #define GL_SKIP_COMPONENTS2_NV -5
9687 #define GL_SKIP_COMPONENTS1_NV -6
9688 typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
9689 typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
9690 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
9691 typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9692 typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9693 typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
9694 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9695 typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
9696 typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
9697 typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9698 typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
9699 typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9700 #ifdef GL_GLEXT_PROTOTYPES
9701 GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
9702 GLAPI void APIENTRY glEndTransformFeedbackNV (void);
9703 GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);
9704 GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
9705 GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
9706 GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
9707 GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
9708 GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
9709 GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
9710 GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
9711 GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
9712 GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
9713 #endif
9714 #endif /* GL_NV_transform_feedback */
9715
9716 #ifndef GL_NV_transform_feedback2
9717 #define GL_NV_transform_feedback2 1
9718 #define GL_TRANSFORM_FEEDBACK_NV 0x8E22
9719 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
9720 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
9721 #define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
9722 typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
9723 typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
9724 typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
9725 typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
9726 typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
9727 typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
9728 typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
9729 #ifdef GL_GLEXT_PROTOTYPES
9730 GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
9731 GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
9732 GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
9733 GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
9734 GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
9735 GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
9736 GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
9737 #endif
9738 #endif /* GL_NV_transform_feedback2 */
9739
9740 #ifndef GL_NV_vdpau_interop
9741 #define GL_NV_vdpau_interop 1
9742 typedef GLintptr GLvdpauSurfaceNV;
9743 #define GL_SURFACE_STATE_NV 0x86EB
9744 #define GL_SURFACE_REGISTERED_NV 0x86FD
9745 #define GL_SURFACE_MAPPED_NV 0x8700
9746 #define GL_WRITE_DISCARD_NV 0x88BE
9747 typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);
9748 typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
9749 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9750 typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9751 typedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
9752 typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
9753 typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9754 typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
9755 typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9756 typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9757 #ifdef GL_GLEXT_PROTOTYPES
9758 GLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);
9759 GLAPI void APIENTRY glVDPAUFiniNV (void);
9760 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9761 GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
9762 GLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
9763 GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
9764 GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
9765 GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
9766 GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
9767 GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
9768 #endif
9769 #endif /* GL_NV_vdpau_interop */
9770
9771 #ifndef GL_NV_vertex_array_range
9772 #define GL_NV_vertex_array_range 1
9773 #define GL_VERTEX_ARRAY_RANGE_NV 0x851D
9774 #define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
9775 #define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
9776 #define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
9777 #define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
9778 typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
9779 typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);
9780 #ifdef GL_GLEXT_PROTOTYPES
9781 GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
9782 GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);
9783 #endif
9784 #endif /* GL_NV_vertex_array_range */
9785
9786 #ifndef GL_NV_vertex_array_range2
9787 #define GL_NV_vertex_array_range2 1
9788 #define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
9789 #endif /* GL_NV_vertex_array_range2 */
9790
9791 #ifndef GL_NV_vertex_attrib_integer_64bit
9792 #define GL_NV_vertex_attrib_integer_64bit 1
9793 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
9794 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
9795 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9796 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9797 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
9798 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
9799 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
9800 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
9801 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
9802 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
9803 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9804 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9805 typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9806 typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9807 typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9808 typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
9809 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
9810 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
9811 typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9812 #ifdef GL_GLEXT_PROTOTYPES
9813 GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
9814 GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
9815 GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
9816 GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
9817 GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
9818 GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
9819 GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
9820 GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
9821 GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
9822 GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
9823 GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
9824 GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
9825 GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
9826 GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
9827 GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
9828 GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
9829 GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
9830 GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
9831 GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9832 #endif
9833 #endif /* GL_NV_vertex_attrib_integer_64bit */
9834
9835 #ifndef GL_NV_vertex_buffer_unified_memory
9836 #define GL_NV_vertex_buffer_unified_memory 1
9837 #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
9838 #define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
9839 #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
9840 #define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
9841 #define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
9842 #define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
9843 #define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
9844 #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
9845 #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
9846 #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
9847 #define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
9848 #define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
9849 #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
9850 #define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
9851 #define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
9852 #define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
9853 #define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
9854 #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
9855 #define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
9856 #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
9857 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
9858 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
9859 #define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
9860 #define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
9861 #define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
9862 typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9863 typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9864 typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
9865 typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9866 typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
9867 typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9868 typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
9869 typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
9870 typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
9871 typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9872 typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
9873 typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
9874 #ifdef GL_GLEXT_PROTOTYPES
9875 GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
9876 GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
9877 GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
9878 GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
9879 GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
9880 GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
9881 GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
9882 GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
9883 GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
9884 GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
9885 GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
9886 GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
9887 #endif
9888 #endif /* GL_NV_vertex_buffer_unified_memory */
9889
9890 #ifndef GL_NV_vertex_program
9891 #define GL_NV_vertex_program 1
9892 #define GL_VERTEX_PROGRAM_NV 0x8620
9893 #define GL_VERTEX_STATE_PROGRAM_NV 0x8621
9894 #define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
9895 #define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
9896 #define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
9897 #define GL_CURRENT_ATTRIB_NV 0x8626
9898 #define GL_PROGRAM_LENGTH_NV 0x8627
9899 #define GL_PROGRAM_STRING_NV 0x8628
9900 #define GL_MODELVIEW_PROJECTION_NV 0x8629
9901 #define GL_IDENTITY_NV 0x862A
9902 #define GL_INVERSE_NV 0x862B
9903 #define GL_TRANSPOSE_NV 0x862C
9904 #define GL_INVERSE_TRANSPOSE_NV 0x862D
9905 #define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
9906 #define GL_MAX_TRACK_MATRICES_NV 0x862F
9907 #define GL_MATRIX0_NV 0x8630
9908 #define GL_MATRIX1_NV 0x8631
9909 #define GL_MATRIX2_NV 0x8632
9910 #define GL_MATRIX3_NV 0x8633
9911 #define GL_MATRIX4_NV 0x8634
9912 #define GL_MATRIX5_NV 0x8635
9913 #define GL_MATRIX6_NV 0x8636
9914 #define GL_MATRIX7_NV 0x8637
9915 #define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
9916 #define GL_CURRENT_MATRIX_NV 0x8641
9917 #define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
9918 #define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
9919 #define GL_PROGRAM_PARAMETER_NV 0x8644
9920 #define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
9921 #define GL_PROGRAM_TARGET_NV 0x8646
9922 #define GL_PROGRAM_RESIDENT_NV 0x8647
9923 #define GL_TRACK_MATRIX_NV 0x8648
9924 #define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
9925 #define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
9926 #define GL_PROGRAM_ERROR_POSITION_NV 0x864B
9927 #define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
9928 #define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
9929 #define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
9930 #define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
9931 #define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
9932 #define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
9933 #define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
9934 #define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
9935 #define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
9936 #define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
9937 #define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
9938 #define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
9939 #define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
9940 #define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
9941 #define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
9942 #define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
9943 #define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
9944 #define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
9945 #define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
9946 #define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
9947 #define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
9948 #define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
9949 #define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
9950 #define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
9951 #define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
9952 #define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
9953 #define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
9954 #define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
9955 #define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
9956 #define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
9957 #define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
9958 #define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
9959 #define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
9960 #define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
9961 #define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
9962 #define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
9963 #define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
9964 #define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
9965 #define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
9966 #define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
9967 #define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
9968 #define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
9969 #define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
9970 #define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
9971 #define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
9972 #define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
9973 #define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
9974 #define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
9975 typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
9976 typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
9977 typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9978 typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
9979 typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
9980 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
9981 typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
9982 typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
9983 typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
9984 typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
9985 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
9986 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
9987 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
9988 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);
9989 typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
9990 typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
9991 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
9992 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
9993 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
9994 typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
9995 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
9996 typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
9997 typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
9998 typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
9999 typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10000 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
10001 typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
10002 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
10003 typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
10004 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
10005 typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
10006 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
10007 typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
10008 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
10009 typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
10010 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
10011 typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
10012 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10013 typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
10014 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10015 typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
10016 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
10017 typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
10018 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10019 typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
10020 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10021 typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
10022 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10023 typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
10024 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10025 typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
10026 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10027 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10028 typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10029 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10030 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10031 typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10032 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10033 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10034 typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10035 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
10036 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
10037 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
10038 typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
10039 #ifdef GL_GLEXT_PROTOTYPES
10040 GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
10041 GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
10042 GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
10043 GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
10044 GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
10045 GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
10046 GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
10047 GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
10048 GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
10049 GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
10050 GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
10051 GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
10052 GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
10053 GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);
10054 GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
10055 GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
10056 GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10057 GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
10058 GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10059 GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
10060 GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);
10061 GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);
10062 GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
10063 GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
10064 GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
10065 GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
10066 GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
10067 GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
10068 GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
10069 GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
10070 GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
10071 GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
10072 GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
10073 GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
10074 GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
10075 GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
10076 GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
10077 GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
10078 GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
10079 GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
10080 GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
10081 GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
10082 GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
10083 GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
10084 GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
10085 GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
10086 GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
10087 GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
10088 GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
10089 GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
10090 GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
10091 GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
10092 GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
10093 GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
10094 GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
10095 GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
10096 GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
10097 GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
10098 GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
10099 GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
10100 GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
10101 GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
10102 GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
10103 GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
10104 #endif
10105 #endif /* GL_NV_vertex_program */
10106
10107 #ifndef GL_NV_vertex_program1_1
10108 #define GL_NV_vertex_program1_1 1
10109 #endif /* GL_NV_vertex_program1_1 */
10110
10111 #ifndef GL_NV_vertex_program2
10112 #define GL_NV_vertex_program2 1
10113 #endif /* GL_NV_vertex_program2 */
10114
10115 #ifndef GL_NV_vertex_program2_option
10116 #define GL_NV_vertex_program2_option 1
10117 #endif /* GL_NV_vertex_program2_option */
10118
10119 #ifndef GL_NV_vertex_program3
10120 #define GL_NV_vertex_program3 1
10121 #endif /* GL_NV_vertex_program3 */
10122
10123 #ifndef GL_NV_vertex_program4
10124 #define GL_NV_vertex_program4 1
10125 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
10126 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
10127 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
10128 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
10129 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
10130 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
10131 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
10132 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
10133 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10134 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
10135 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
10136 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
10137 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
10138 typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
10139 typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
10140 typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
10141 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
10142 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
10143 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
10144 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
10145 typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
10146 typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10147 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
10148 typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
10149 #ifdef GL_GLEXT_PROTOTYPES
10150 GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
10151 GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
10152 GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
10153 GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
10154 GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
10155 GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
10156 GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
10157 GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10158 GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
10159 GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
10160 GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
10161 GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
10162 GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
10163 GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
10164 GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
10165 GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
10166 GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
10167 GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
10168 GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
10169 GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
10170 GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
10171 GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
10172 GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
10173 #endif
10174 #endif /* GL_NV_vertex_program4 */
10175
10176 #ifndef GL_NV_video_capture
10177 #define GL_NV_video_capture 1
10178 #define GL_VIDEO_BUFFER_NV 0x9020
10179 #define GL_VIDEO_BUFFER_BINDING_NV 0x9021
10180 #define GL_FIELD_UPPER_NV 0x9022
10181 #define GL_FIELD_LOWER_NV 0x9023
10182 #define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
10183 #define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
10184 #define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
10185 #define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
10186 #define GL_VIDEO_BUFFER_PITCH_NV 0x9028
10187 #define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
10188 #define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
10189 #define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
10190 #define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
10191 #define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
10192 #define GL_PARTIAL_SUCCESS_NV 0x902E
10193 #define GL_SUCCESS_NV 0x902F
10194 #define GL_FAILURE_NV 0x9030
10195 #define GL_YCBYCR8_422_NV 0x9031
10196 #define GL_YCBAYCR8A_4224_NV 0x9032
10197 #define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
10198 #define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
10199 #define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
10200 #define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
10201 #define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
10202 #define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
10203 #define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
10204 #define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
10205 #define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
10206 #define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
10207 typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10208 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10209 typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10210 typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
10211 typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
10212 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10213 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10214 typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10215 typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10216 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10217 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10218 typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10219 #ifdef GL_GLEXT_PROTOTYPES
10220 GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
10221 GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
10222 GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
10223 GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
10224 GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
10225 GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
10226 GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
10227 GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
10228 GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
10229 GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
10230 GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
10231 GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
10232 #endif
10233 #endif /* GL_NV_video_capture */
10234
10235 #ifndef GL_OML_interlace
10236 #define GL_OML_interlace 1
10237 #define GL_INTERLACE_OML 0x8980
10238 #define GL_INTERLACE_READ_OML 0x8981
10239 #endif /* GL_OML_interlace */
10240
10241 #ifndef GL_OML_resample
10242 #define GL_OML_resample 1
10243 #define GL_PACK_RESAMPLE_OML 0x8984
10244 #define GL_UNPACK_RESAMPLE_OML 0x8985
10245 #define GL_RESAMPLE_REPLICATE_OML 0x8986
10246 #define GL_RESAMPLE_ZERO_FILL_OML 0x8987
10247 #define GL_RESAMPLE_AVERAGE_OML 0x8988
10248 #define GL_RESAMPLE_DECIMATE_OML 0x8989
10249 #endif /* GL_OML_resample */
10250
10251 #ifndef GL_OML_subsample
10252 #define GL_OML_subsample 1
10253 #define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
10254 #define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
10255 #endif /* GL_OML_subsample */
10256
10257 #ifndef GL_PGI_misc_hints
10258 #define GL_PGI_misc_hints 1
10259 #define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
10260 #define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
10261 #define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
10262 #define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
10263 #define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
10264 #define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
10265 #define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
10266 #define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
10267 #define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
10268 #define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
10269 #define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
10270 #define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
10271 #define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
10272 #define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
10273 #define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
10274 #define GL_FULL_STIPPLE_HINT_PGI 0x1A219
10275 #define GL_CLIP_NEAR_HINT_PGI 0x1A220
10276 #define GL_CLIP_FAR_HINT_PGI 0x1A221
10277 #define GL_WIDE_LINE_HINT_PGI 0x1A222
10278 #define GL_BACK_NORMALS_HINT_PGI 0x1A223
10279 typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
10280 #ifdef GL_GLEXT_PROTOTYPES
10281 GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
10282 #endif
10283 #endif /* GL_PGI_misc_hints */
10284
10285 #ifndef GL_PGI_vertex_hints
10286 #define GL_PGI_vertex_hints 1
10287 #define GL_VERTEX_DATA_HINT_PGI 0x1A22A
10288 #define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
10289 #define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
10290 #define GL_MAX_VERTEX_HINT_PGI 0x1A22D
10291 #define GL_COLOR3_BIT_PGI 0x00010000
10292 #define GL_COLOR4_BIT_PGI 0x00020000
10293 #define GL_EDGEFLAG_BIT_PGI 0x00040000
10294 #define GL_INDEX_BIT_PGI 0x00080000
10295 #define GL_MAT_AMBIENT_BIT_PGI 0x00100000
10296 #define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
10297 #define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
10298 #define GL_MAT_EMISSION_BIT_PGI 0x00800000
10299 #define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
10300 #define GL_MAT_SHININESS_BIT_PGI 0x02000000
10301 #define GL_MAT_SPECULAR_BIT_PGI 0x04000000
10302 #define GL_NORMAL_BIT_PGI 0x08000000
10303 #define GL_TEXCOORD1_BIT_PGI 0x10000000
10304 #define GL_TEXCOORD2_BIT_PGI 0x20000000
10305 #define GL_TEXCOORD3_BIT_PGI 0x40000000
10306 #define GL_TEXCOORD4_BIT_PGI 0x80000000
10307 #define GL_VERTEX23_BIT_PGI 0x00000004
10308 #define GL_VERTEX4_BIT_PGI 0x00000008
10309 #endif /* GL_PGI_vertex_hints */
10310
10311 #ifndef GL_REND_screen_coordinates
10312 #define GL_REND_screen_coordinates 1
10313 #define GL_SCREEN_COORDINATES_REND 0x8490
10314 #define GL_INVERTED_SCREEN_W_REND 0x8491
10315 #endif /* GL_REND_screen_coordinates */
10316
10317 #ifndef GL_S3_s3tc
10318 #define GL_S3_s3tc 1
10319 #define GL_RGB_S3TC 0x83A0
10320 #define GL_RGB4_S3TC 0x83A1
10321 #define GL_RGBA_S3TC 0x83A2
10322 #define GL_RGBA4_S3TC 0x83A3
10323 #define GL_RGBA_DXT5_S3TC 0x83A4
10324 #define GL_RGBA4_DXT5_S3TC 0x83A5
10325 #endif /* GL_S3_s3tc */
10326
10327 #ifndef GL_SGIS_detail_texture
10328 #define GL_SGIS_detail_texture 1
10329 #define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
10330 #define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
10331 #define GL_LINEAR_DETAIL_SGIS 0x8097
10332 #define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
10333 #define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
10334 #define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
10335 #define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
10336 #define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
10337 typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10338 typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10339 #ifdef GL_GLEXT_PROTOTYPES
10340 GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10341 GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
10342 #endif
10343 #endif /* GL_SGIS_detail_texture */
10344
10345 #ifndef GL_SGIS_fog_function
10346 #define GL_SGIS_fog_function 1
10347 #define GL_FOG_FUNC_SGIS 0x812A
10348 #define GL_FOG_FUNC_POINTS_SGIS 0x812B
10349 #define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
10350 typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
10351 typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
10352 #ifdef GL_GLEXT_PROTOTYPES
10353 GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
10354 GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
10355 #endif
10356 #endif /* GL_SGIS_fog_function */
10357
10358 #ifndef GL_SGIS_generate_mipmap
10359 #define GL_SGIS_generate_mipmap 1
10360 #define GL_GENERATE_MIPMAP_SGIS 0x8191
10361 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
10362 #endif /* GL_SGIS_generate_mipmap */
10363
10364 #ifndef GL_SGIS_multisample
10365 #define GL_SGIS_multisample 1
10366 #define GL_MULTISAMPLE_SGIS 0x809D
10367 #define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
10368 #define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
10369 #define GL_SAMPLE_MASK_SGIS 0x80A0
10370 #define GL_1PASS_SGIS 0x80A1
10371 #define GL_2PASS_0_SGIS 0x80A2
10372 #define GL_2PASS_1_SGIS 0x80A3
10373 #define GL_4PASS_0_SGIS 0x80A4
10374 #define GL_4PASS_1_SGIS 0x80A5
10375 #define GL_4PASS_2_SGIS 0x80A6
10376 #define GL_4PASS_3_SGIS 0x80A7
10377 #define GL_SAMPLE_BUFFERS_SGIS 0x80A8
10378 #define GL_SAMPLES_SGIS 0x80A9
10379 #define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
10380 #define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
10381 #define GL_SAMPLE_PATTERN_SGIS 0x80AC
10382 typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
10383 typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
10384 #ifdef GL_GLEXT_PROTOTYPES
10385 GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
10386 GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
10387 #endif
10388 #endif /* GL_SGIS_multisample */
10389
10390 #ifndef GL_SGIS_pixel_texture
10391 #define GL_SGIS_pixel_texture 1
10392 #define GL_PIXEL_TEXTURE_SGIS 0x8353
10393 #define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
10394 #define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
10395 #define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
10396 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
10397 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
10398 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10399 typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10400 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
10401 typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
10402 #ifdef GL_GLEXT_PROTOTYPES
10403 GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
10404 GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
10405 GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
10406 GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
10407 GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
10408 GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
10409 #endif
10410 #endif /* GL_SGIS_pixel_texture */
10411
10412 #ifndef GL_SGIS_point_line_texgen
10413 #define GL_SGIS_point_line_texgen 1
10414 #define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
10415 #define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
10416 #define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
10417 #define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
10418 #define GL_EYE_POINT_SGIS 0x81F4
10419 #define GL_OBJECT_POINT_SGIS 0x81F5
10420 #define GL_EYE_LINE_SGIS 0x81F6
10421 #define GL_OBJECT_LINE_SGIS 0x81F7
10422 #endif /* GL_SGIS_point_line_texgen */
10423
10424 #ifndef GL_SGIS_point_parameters
10425 #define GL_SGIS_point_parameters 1
10426 #define GL_POINT_SIZE_MIN_SGIS 0x8126
10427 #define GL_POINT_SIZE_MAX_SGIS 0x8127
10428 #define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
10429 #define GL_DISTANCE_ATTENUATION_SGIS 0x8129
10430 typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
10431 typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
10432 #ifdef GL_GLEXT_PROTOTYPES
10433 GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
10434 GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
10435 #endif
10436 #endif /* GL_SGIS_point_parameters */
10437
10438 #ifndef GL_SGIS_sharpen_texture
10439 #define GL_SGIS_sharpen_texture 1
10440 #define GL_LINEAR_SHARPEN_SGIS 0x80AD
10441 #define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
10442 #define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
10443 #define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
10444 typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
10445 typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
10446 #ifdef GL_GLEXT_PROTOTYPES
10447 GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
10448 GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
10449 #endif
10450 #endif /* GL_SGIS_sharpen_texture */
10451
10452 #ifndef GL_SGIS_texture4D
10453 #define GL_SGIS_texture4D 1
10454 #define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
10455 #define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
10456 #define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
10457 #define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
10458 #define GL_TEXTURE_4D_SGIS 0x8134
10459 #define GL_PROXY_TEXTURE_4D_SGIS 0x8135
10460 #define GL_TEXTURE_4DSIZE_SGIS 0x8136
10461 #define GL_TEXTURE_WRAP_Q_SGIS 0x8137
10462 #define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
10463 #define GL_TEXTURE_4D_BINDING_SGIS 0x814F
10464 typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10465 typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10466 #ifdef GL_GLEXT_PROTOTYPES
10467 GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);
10468 GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);
10469 #endif
10470 #endif /* GL_SGIS_texture4D */
10471
10472 #ifndef GL_SGIS_texture_border_clamp
10473 #define GL_SGIS_texture_border_clamp 1
10474 #define GL_CLAMP_TO_BORDER_SGIS 0x812D
10475 #endif /* GL_SGIS_texture_border_clamp */
10476
10477 #ifndef GL_SGIS_texture_color_mask
10478 #define GL_SGIS_texture_color_mask 1
10479 #define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
10480 typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10481 #ifdef GL_GLEXT_PROTOTYPES
10482 GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
10483 #endif
10484 #endif /* GL_SGIS_texture_color_mask */
10485
10486 #ifndef GL_SGIS_texture_edge_clamp
10487 #define GL_SGIS_texture_edge_clamp 1
10488 #define GL_CLAMP_TO_EDGE_SGIS 0x812F
10489 #endif /* GL_SGIS_texture_edge_clamp */
10490
10491 #ifndef GL_SGIS_texture_filter4
10492 #define GL_SGIS_texture_filter4 1
10493 #define GL_FILTER4_SGIS 0x8146
10494 #define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
10495 typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
10496 typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10497 #ifdef GL_GLEXT_PROTOTYPES
10498 GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
10499 GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
10500 #endif
10501 #endif /* GL_SGIS_texture_filter4 */
10502
10503 #ifndef GL_SGIS_texture_lod
10504 #define GL_SGIS_texture_lod 1
10505 #define GL_TEXTURE_MIN_LOD_SGIS 0x813A
10506 #define GL_TEXTURE_MAX_LOD_SGIS 0x813B
10507 #define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
10508 #define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
10509 #endif /* GL_SGIS_texture_lod */
10510
10511 #ifndef GL_SGIS_texture_select
10512 #define GL_SGIS_texture_select 1
10513 #define GL_DUAL_ALPHA4_SGIS 0x8110
10514 #define GL_DUAL_ALPHA8_SGIS 0x8111
10515 #define GL_DUAL_ALPHA12_SGIS 0x8112
10516 #define GL_DUAL_ALPHA16_SGIS 0x8113
10517 #define GL_DUAL_LUMINANCE4_SGIS 0x8114
10518 #define GL_DUAL_LUMINANCE8_SGIS 0x8115
10519 #define GL_DUAL_LUMINANCE12_SGIS 0x8116
10520 #define GL_DUAL_LUMINANCE16_SGIS 0x8117
10521 #define GL_DUAL_INTENSITY4_SGIS 0x8118
10522 #define GL_DUAL_INTENSITY8_SGIS 0x8119
10523 #define GL_DUAL_INTENSITY12_SGIS 0x811A
10524 #define GL_DUAL_INTENSITY16_SGIS 0x811B
10525 #define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
10526 #define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
10527 #define GL_QUAD_ALPHA4_SGIS 0x811E
10528 #define GL_QUAD_ALPHA8_SGIS 0x811F
10529 #define GL_QUAD_LUMINANCE4_SGIS 0x8120
10530 #define GL_QUAD_LUMINANCE8_SGIS 0x8121
10531 #define GL_QUAD_INTENSITY4_SGIS 0x8122
10532 #define GL_QUAD_INTENSITY8_SGIS 0x8123
10533 #define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
10534 #define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
10535 #endif /* GL_SGIS_texture_select */
10536
10537 #ifndef GL_SGIX_async
10538 #define GL_SGIX_async 1
10539 #define GL_ASYNC_MARKER_SGIX 0x8329
10540 typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
10541 typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
10542 typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
10543 typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
10544 typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
10545 typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
10546 #ifdef GL_GLEXT_PROTOTYPES
10547 GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
10548 GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
10549 GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
10550 GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
10551 GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
10552 GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
10553 #endif
10554 #endif /* GL_SGIX_async */
10555
10556 #ifndef GL_SGIX_async_histogram
10557 #define GL_SGIX_async_histogram 1
10558 #define GL_ASYNC_HISTOGRAM_SGIX 0x832C
10559 #define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
10560 #endif /* GL_SGIX_async_histogram */
10561
10562 #ifndef GL_SGIX_async_pixel
10563 #define GL_SGIX_async_pixel 1
10564 #define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
10565 #define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
10566 #define GL_ASYNC_READ_PIXELS_SGIX 0x835E
10567 #define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
10568 #define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
10569 #define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
10570 #endif /* GL_SGIX_async_pixel */
10571
10572 #ifndef GL_SGIX_blend_alpha_minmax
10573 #define GL_SGIX_blend_alpha_minmax 1
10574 #define GL_ALPHA_MIN_SGIX 0x8320
10575 #define GL_ALPHA_MAX_SGIX 0x8321
10576 #endif /* GL_SGIX_blend_alpha_minmax */
10577
10578 #ifndef GL_SGIX_calligraphic_fragment
10579 #define GL_SGIX_calligraphic_fragment 1
10580 #define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
10581 #endif /* GL_SGIX_calligraphic_fragment */
10582
10583 #ifndef GL_SGIX_clipmap
10584 #define GL_SGIX_clipmap 1
10585 #define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
10586 #define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
10587 #define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
10588 #define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
10589 #define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
10590 #define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
10591 #define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
10592 #define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
10593 #define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
10594 #define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
10595 #define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
10596 #define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
10597 #endif /* GL_SGIX_clipmap */
10598
10599 #ifndef GL_SGIX_convolution_accuracy
10600 #define GL_SGIX_convolution_accuracy 1
10601 #define GL_CONVOLUTION_HINT_SGIX 0x8316
10602 #endif /* GL_SGIX_convolution_accuracy */
10603
10604 #ifndef GL_SGIX_depth_pass_instrument
10605 #define GL_SGIX_depth_pass_instrument 1
10606 #endif /* GL_SGIX_depth_pass_instrument */
10607
10608 #ifndef GL_SGIX_depth_texture
10609 #define GL_SGIX_depth_texture 1
10610 #define GL_DEPTH_COMPONENT16_SGIX 0x81A5
10611 #define GL_DEPTH_COMPONENT24_SGIX 0x81A6
10612 #define GL_DEPTH_COMPONENT32_SGIX 0x81A7
10613 #endif /* GL_SGIX_depth_texture */
10614
10615 #ifndef GL_SGIX_flush_raster
10616 #define GL_SGIX_flush_raster 1
10617 typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
10618 #ifdef GL_GLEXT_PROTOTYPES
10619 GLAPI void APIENTRY glFlushRasterSGIX (void);
10620 #endif
10621 #endif /* GL_SGIX_flush_raster */
10622
10623 #ifndef GL_SGIX_fog_offset
10624 #define GL_SGIX_fog_offset 1
10625 #define GL_FOG_OFFSET_SGIX 0x8198
10626 #define GL_FOG_OFFSET_VALUE_SGIX 0x8199
10627 #endif /* GL_SGIX_fog_offset */
10628
10629 #ifndef GL_SGIX_fragment_lighting
10630 #define GL_SGIX_fragment_lighting 1
10631 #define GL_FRAGMENT_LIGHTING_SGIX 0x8400
10632 #define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
10633 #define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
10634 #define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
10635 #define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
10636 #define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
10637 #define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
10638 #define GL_LIGHT_ENV_MODE_SGIX 0x8407
10639 #define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
10640 #define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
10641 #define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
10642 #define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
10643 #define GL_FRAGMENT_LIGHT0_SGIX 0x840C
10644 #define GL_FRAGMENT_LIGHT1_SGIX 0x840D
10645 #define GL_FRAGMENT_LIGHT2_SGIX 0x840E
10646 #define GL_FRAGMENT_LIGHT3_SGIX 0x840F
10647 #define GL_FRAGMENT_LIGHT4_SGIX 0x8410
10648 #define GL_FRAGMENT_LIGHT5_SGIX 0x8411
10649 #define GL_FRAGMENT_LIGHT6_SGIX 0x8412
10650 #define GL_FRAGMENT_LIGHT7_SGIX 0x8413
10651 typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
10652 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
10653 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
10654 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
10655 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
10656 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
10657 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
10658 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
10659 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
10660 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
10661 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
10662 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
10663 typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
10664 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
10665 typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
10666 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
10667 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
10668 typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
10669 #ifdef GL_GLEXT_PROTOTYPES
10670 GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
10671 GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
10672 GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
10673 GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
10674 GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
10675 GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
10676 GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
10677 GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
10678 GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
10679 GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
10680 GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
10681 GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
10682 GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
10683 GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
10684 GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
10685 GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
10686 GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
10687 GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
10688 #endif
10689 #endif /* GL_SGIX_fragment_lighting */
10690
10691 #ifndef GL_SGIX_framezoom
10692 #define GL_SGIX_framezoom 1
10693 #define GL_FRAMEZOOM_SGIX 0x818B
10694 #define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
10695 #define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
10696 typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
10697 #ifdef GL_GLEXT_PROTOTYPES
10698 GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
10699 #endif
10700 #endif /* GL_SGIX_framezoom */
10701
10702 #ifndef GL_SGIX_igloo_interface
10703 #define GL_SGIX_igloo_interface 1
10704 typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);
10705 #ifdef GL_GLEXT_PROTOTYPES
10706 GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);
10707 #endif
10708 #endif /* GL_SGIX_igloo_interface */
10709
10710 #ifndef GL_SGIX_instruments
10711 #define GL_SGIX_instruments 1
10712 #define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
10713 #define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
10714 typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
10715 typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
10716 typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
10717 typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
10718 typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
10719 typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
10720 #ifdef GL_GLEXT_PROTOTYPES
10721 GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
10722 GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
10723 GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
10724 GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
10725 GLAPI void APIENTRY glStartInstrumentsSGIX (void);
10726 GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
10727 #endif
10728 #endif /* GL_SGIX_instruments */
10729
10730 #ifndef GL_SGIX_interlace
10731 #define GL_SGIX_interlace 1
10732 #define GL_INTERLACE_SGIX 0x8094
10733 #endif /* GL_SGIX_interlace */
10734
10735 #ifndef GL_SGIX_ir_instrument1
10736 #define GL_SGIX_ir_instrument1 1
10737 #define GL_IR_INSTRUMENT1_SGIX 0x817F
10738 #endif /* GL_SGIX_ir_instrument1 */
10739
10740 #ifndef GL_SGIX_list_priority
10741 #define GL_SGIX_list_priority 1
10742 #define GL_LIST_PRIORITY_SGIX 0x8182
10743 typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
10744 typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
10745 typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
10746 typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
10747 typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
10748 typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
10749 #ifdef GL_GLEXT_PROTOTYPES
10750 GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
10751 GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
10752 GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
10753 GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
10754 GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
10755 GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
10756 #endif
10757 #endif /* GL_SGIX_list_priority */
10758
10759 #ifndef GL_SGIX_pixel_texture
10760 #define GL_SGIX_pixel_texture 1
10761 #define GL_PIXEL_TEX_GEN_SGIX 0x8139
10762 #define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
10763 typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
10764 #ifdef GL_GLEXT_PROTOTYPES
10765 GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
10766 #endif
10767 #endif /* GL_SGIX_pixel_texture */
10768
10769 #ifndef GL_SGIX_pixel_tiles
10770 #define GL_SGIX_pixel_tiles 1
10771 #define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
10772 #define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
10773 #define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
10774 #define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
10775 #define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
10776 #define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
10777 #define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
10778 #define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
10779 #endif /* GL_SGIX_pixel_tiles */
10780
10781 #ifndef GL_SGIX_polynomial_ffd
10782 #define GL_SGIX_polynomial_ffd 1
10783 #define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
10784 #define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
10785 #define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
10786 #define GL_TEXTURE_DEFORMATION_SGIX 0x8195
10787 #define GL_DEFORMATIONS_MASK_SGIX 0x8196
10788 #define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
10789 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10790 typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10791 typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
10792 typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
10793 #ifdef GL_GLEXT_PROTOTYPES
10794 GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
10795 GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
10796 GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
10797 GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
10798 #endif
10799 #endif /* GL_SGIX_polynomial_ffd */
10800
10801 #ifndef GL_SGIX_reference_plane
10802 #define GL_SGIX_reference_plane 1
10803 #define GL_REFERENCE_PLANE_SGIX 0x817D
10804 #define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
10805 typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
10806 #ifdef GL_GLEXT_PROTOTYPES
10807 GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
10808 #endif
10809 #endif /* GL_SGIX_reference_plane */
10810
10811 #ifndef GL_SGIX_resample
10812 #define GL_SGIX_resample 1
10813 #define GL_PACK_RESAMPLE_SGIX 0x842C
10814 #define GL_UNPACK_RESAMPLE_SGIX 0x842D
10815 #define GL_RESAMPLE_REPLICATE_SGIX 0x842E
10816 #define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
10817 #define GL_RESAMPLE_DECIMATE_SGIX 0x8430
10818 #endif /* GL_SGIX_resample */
10819
10820 #ifndef GL_SGIX_scalebias_hint
10821 #define GL_SGIX_scalebias_hint 1
10822 #define GL_SCALEBIAS_HINT_SGIX 0x8322
10823 #endif /* GL_SGIX_scalebias_hint */
10824
10825 #ifndef GL_SGIX_shadow
10826 #define GL_SGIX_shadow 1
10827 #define GL_TEXTURE_COMPARE_SGIX 0x819A
10828 #define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
10829 #define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
10830 #define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
10831 #endif /* GL_SGIX_shadow */
10832
10833 #ifndef GL_SGIX_shadow_ambient
10834 #define GL_SGIX_shadow_ambient 1
10835 #define GL_SHADOW_AMBIENT_SGIX 0x80BF
10836 #endif /* GL_SGIX_shadow_ambient */
10837
10838 #ifndef GL_SGIX_sprite
10839 #define GL_SGIX_sprite 1
10840 #define GL_SPRITE_SGIX 0x8148
10841 #define GL_SPRITE_MODE_SGIX 0x8149
10842 #define GL_SPRITE_AXIS_SGIX 0x814A
10843 #define GL_SPRITE_TRANSLATION_SGIX 0x814B
10844 #define GL_SPRITE_AXIAL_SGIX 0x814C
10845 #define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
10846 #define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
10847 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
10848 typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
10849 typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
10850 typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
10851 #ifdef GL_GLEXT_PROTOTYPES
10852 GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
10853 GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
10854 GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
10855 GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
10856 #endif
10857 #endif /* GL_SGIX_sprite */
10858
10859 #ifndef GL_SGIX_subsample
10860 #define GL_SGIX_subsample 1
10861 #define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
10862 #define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
10863 #define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
10864 #define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
10865 #define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
10866 #endif /* GL_SGIX_subsample */
10867
10868 #ifndef GL_SGIX_tag_sample_buffer
10869 #define GL_SGIX_tag_sample_buffer 1
10870 typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
10871 #ifdef GL_GLEXT_PROTOTYPES
10872 GLAPI void APIENTRY glTagSampleBufferSGIX (void);
10873 #endif
10874 #endif /* GL_SGIX_tag_sample_buffer */
10875
10876 #ifndef GL_SGIX_texture_add_env
10877 #define GL_SGIX_texture_add_env 1
10878 #define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
10879 #endif /* GL_SGIX_texture_add_env */
10880
10881 #ifndef GL_SGIX_texture_coordinate_clamp
10882 #define GL_SGIX_texture_coordinate_clamp 1
10883 #define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
10884 #define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
10885 #define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
10886 #endif /* GL_SGIX_texture_coordinate_clamp */
10887
10888 #ifndef GL_SGIX_texture_lod_bias
10889 #define GL_SGIX_texture_lod_bias 1
10890 #define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
10891 #define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
10892 #define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
10893 #endif /* GL_SGIX_texture_lod_bias */
10894
10895 #ifndef GL_SGIX_texture_multi_buffer
10896 #define GL_SGIX_texture_multi_buffer 1
10897 #define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
10898 #endif /* GL_SGIX_texture_multi_buffer */
10899
10900 #ifndef GL_SGIX_texture_scale_bias
10901 #define GL_SGIX_texture_scale_bias 1
10902 #define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
10903 #define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
10904 #define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
10905 #define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
10906 #endif /* GL_SGIX_texture_scale_bias */
10907
10908 #ifndef GL_SGIX_vertex_preclip
10909 #define GL_SGIX_vertex_preclip 1
10910 #define GL_VERTEX_PRECLIP_SGIX 0x83EE
10911 #define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
10912 #endif /* GL_SGIX_vertex_preclip */
10913
10914 #ifndef GL_SGIX_ycrcb
10915 #define GL_SGIX_ycrcb 1
10916 #define GL_YCRCB_422_SGIX 0x81BB
10917 #define GL_YCRCB_444_SGIX 0x81BC
10918 #endif /* GL_SGIX_ycrcb */
10919
10920 #ifndef GL_SGIX_ycrcb_subsample
10921 #define GL_SGIX_ycrcb_subsample 1
10922 #endif /* GL_SGIX_ycrcb_subsample */
10923
10924 #ifndef GL_SGIX_ycrcba
10925 #define GL_SGIX_ycrcba 1
10926 #define GL_YCRCB_SGIX 0x8318
10927 #define GL_YCRCBA_SGIX 0x8319
10928 #endif /* GL_SGIX_ycrcba */
10929
10930 #ifndef GL_SGI_color_matrix
10931 #define GL_SGI_color_matrix 1
10932 #define GL_COLOR_MATRIX_SGI 0x80B1
10933 #define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
10934 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
10935 #define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
10936 #define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
10937 #define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
10938 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
10939 #define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
10940 #define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
10941 #define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
10942 #define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
10943 #endif /* GL_SGI_color_matrix */
10944
10945 #ifndef GL_SGI_color_table
10946 #define GL_SGI_color_table 1
10947 #define GL_COLOR_TABLE_SGI 0x80D0
10948 #define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
10949 #define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
10950 #define GL_PROXY_COLOR_TABLE_SGI 0x80D3
10951 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
10952 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
10953 #define GL_COLOR_TABLE_SCALE_SGI 0x80D6
10954 #define GL_COLOR_TABLE_BIAS_SGI 0x80D7
10955 #define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
10956 #define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
10957 #define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
10958 #define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
10959 #define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
10960 #define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
10961 #define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
10962 #define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
10963 typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10964 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
10965 typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
10966 typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10967 typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
10968 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
10969 typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
10970 #ifdef GL_GLEXT_PROTOTYPES
10971 GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
10972 GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
10973 GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
10974 GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
10975 GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);
10976 GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
10977 GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
10978 #endif
10979 #endif /* GL_SGI_color_table */
10980
10981 #ifndef GL_SGI_texture_color_table
10982 #define GL_SGI_texture_color_table 1
10983 #define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
10984 #define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
10985 #endif /* GL_SGI_texture_color_table */
10986
10987 #ifndef GL_SUNX_constant_data
10988 #define GL_SUNX_constant_data 1
10989 #define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
10990 #define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
10991 typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
10992 #ifdef GL_GLEXT_PROTOTYPES
10993 GLAPI void APIENTRY glFinishTextureSUNX (void);
10994 #endif
10995 #endif /* GL_SUNX_constant_data */
10996
10997 #ifndef GL_SUN_convolution_border_modes
10998 #define GL_SUN_convolution_border_modes 1
10999 #define GL_WRAP_BORDER_SUN 0x81D4
11000 #endif /* GL_SUN_convolution_border_modes */
11001
11002 #ifndef GL_SUN_global_alpha
11003 #define GL_SUN_global_alpha 1
11004 #define GL_GLOBAL_ALPHA_SUN 0x81D9
11005 #define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
11006 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
11007 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
11008 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
11009 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
11010 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
11011 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
11012 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
11013 typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
11014 #ifdef GL_GLEXT_PROTOTYPES
11015 GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
11016 GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
11017 GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
11018 GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
11019 GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
11020 GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
11021 GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
11022 GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
11023 #endif
11024 #endif /* GL_SUN_global_alpha */
11025
11026 #ifndef GL_SUN_mesh_array
11027 #define GL_SUN_mesh_array 1
11028 #define GL_QUAD_MESH_SUN 0x8614
11029 #define GL_TRIANGLE_MESH_SUN 0x8615
11030 typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
11031 #ifdef GL_GLEXT_PROTOTYPES
11032 GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
11033 #endif
11034 #endif /* GL_SUN_mesh_array */
11035
11036 #ifndef GL_SUN_slice_accum
11037 #define GL_SUN_slice_accum 1
11038 #define GL_SLICE_ACCUM_SUN 0x85CC
11039 #endif /* GL_SUN_slice_accum */
11040
11041 #ifndef GL_SUN_triangle_list
11042 #define GL_SUN_triangle_list 1
11043 #define GL_RESTART_SUN 0x0001
11044 #define GL_REPLACE_MIDDLE_SUN 0x0002
11045 #define GL_REPLACE_OLDEST_SUN 0x0003
11046 #define GL_TRIANGLE_LIST_SUN 0x81D7
11047 #define GL_REPLACEMENT_CODE_SUN 0x81D8
11048 #define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
11049 #define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
11050 #define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
11051 #define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
11052 #define GL_R1UI_V3F_SUN 0x85C4
11053 #define GL_R1UI_C4UB_V3F_SUN 0x85C5
11054 #define GL_R1UI_C3F_V3F_SUN 0x85C6
11055 #define GL_R1UI_N3F_V3F_SUN 0x85C7
11056 #define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
11057 #define GL_R1UI_T2F_V3F_SUN 0x85C9
11058 #define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
11059 #define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
11060 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
11061 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
11062 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
11063 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
11064 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
11065 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
11066 typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);
11067 #ifdef GL_GLEXT_PROTOTYPES
11068 GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
11069 GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
11070 GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
11071 GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
11072 GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
11073 GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
11074 GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);
11075 #endif
11076 #endif /* GL_SUN_triangle_list */
11077
11078 #ifndef GL_SUN_vertex
11079 #define GL_SUN_vertex 1
11080 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11081 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11082 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11083 typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
11084 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11085 typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
11086 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11087 typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
11088 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11089 typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11090 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11091 typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11092 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11093 typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
11094 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11095 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11096 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11097 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11098 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11099 typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11100 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11101 typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11102 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11103 typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11104 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11105 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
11106 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11107 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11108 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11109 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11110 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11111 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11112 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11113 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11114 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11115 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11116 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11117 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11118 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11119 typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11120 #ifdef GL_GLEXT_PROTOTYPES
11121 GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
11122 GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
11123 GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11124 GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
11125 GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11126 GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
11127 GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11128 GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
11129 GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11130 GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
11131 GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11132 GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
11133 GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11134 GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
11135 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11136 GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
11137 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11138 GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
11139 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11140 GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11141 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11142 GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11143 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
11144 GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11145 GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
11146 GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
11147 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
11148 GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
11149 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
11150 GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
11151 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11152 GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
11153 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11154 GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11155 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
11156 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
11157 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11158 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
11159 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
11160 GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
11161 #endif
11162 #endif /* GL_SUN_vertex */
11163
11164 #ifndef GL_WIN_phong_shading
11165 #define GL_WIN_phong_shading 1
11166 #define GL_PHONG_WIN 0x80EA
11167 #define GL_PHONG_HINT_WIN 0x80EB
11168 #endif /* GL_WIN_phong_shading */
11169
11170 #ifndef GL_WIN_specular_fog
11171 #define GL_WIN_specular_fog 1
11172 #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
11173 #endif /* GL_WIN_specular_fog */
11174
11175 #ifdef __cplusplus
11176 }
11177 #endif
11178
11179 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #ifdef __IPHONEOS__
29 #include <OpenGLES/ES1/gl.h>
30 #include <OpenGLES/ES1/glext.h>
31 #else
32 #include <GLES/gl.h>
33 #include <GLES/glext.h>
34 #endif
35
36 #ifndef APIENTRY
37 #define APIENTRY
38 #endif
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_opengles2.h
23 *
24 * This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
25 */
26 #include <SDL2/SDL_config.h>
27
28 #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
29
30 #ifdef __IPHONEOS__
31 #include <OpenGLES/ES2/gl.h>
32 #include <OpenGLES/ES2/glext.h>
33 #else
34 #include <GLES2/gl2platform.h>
35 #include <GLES2/gl2.h>
36 #include <GLES2/gl2ext.h>
37 #endif
38
39 #else /* _MSC_VER */
40
41 /* OpenGL ES2 headers for Visual Studio */
42 #include <SDL2/SDL_opengles2_khrplatform.h>
43 #include <SDL2/SDL_opengles2_gl2platform.h>
44 #include <SDL2/SDL_opengles2_gl2.h>
45 #include <SDL2/SDL_opengles2_gl2ext.h>
46
47 #endif /* _MSC_VER */
48
49 #ifndef APIENTRY
50 #define APIENTRY GL_APIENTRY
51 #endif
0 #ifndef __gl2_h_
1 #define __gl2_h_
2
3 /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
4
5 /*#include <GLES2/gl2platform.h>*/
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /*
12 * This document is licensed under the SGI Free Software B License Version
13 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
14 */
15
16 /*-------------------------------------------------------------------------
17 * Data type definitions
18 *-----------------------------------------------------------------------*/
19
20 typedef void GLvoid;
21 typedef char GLchar;
22 typedef unsigned int GLenum;
23 typedef unsigned char GLboolean;
24 typedef unsigned int GLbitfield;
25 typedef khronos_int8_t GLbyte;
26 typedef short GLshort;
27 typedef int GLint;
28 typedef int GLsizei;
29 typedef khronos_uint8_t GLubyte;
30 typedef unsigned short GLushort;
31 typedef unsigned int GLuint;
32 typedef khronos_float_t GLfloat;
33 typedef khronos_float_t GLclampf;
34 typedef khronos_int32_t GLfixed;
35
36 /* GL types for handling large vertex buffer objects */
37 typedef khronos_intptr_t GLintptr;
38 typedef khronos_ssize_t GLsizeiptr;
39
40 /* OpenGL ES core versions */
41 #define GL_ES_VERSION_2_0 1
42
43 /* ClearBufferMask */
44 #define GL_DEPTH_BUFFER_BIT 0x00000100
45 #define GL_STENCIL_BUFFER_BIT 0x00000400
46 #define GL_COLOR_BUFFER_BIT 0x00004000
47
48 /* Boolean */
49 #define GL_FALSE 0
50 #define GL_TRUE 1
51
52 /* BeginMode */
53 #define GL_POINTS 0x0000
54 #define GL_LINES 0x0001
55 #define GL_LINE_LOOP 0x0002
56 #define GL_LINE_STRIP 0x0003
57 #define GL_TRIANGLES 0x0004
58 #define GL_TRIANGLE_STRIP 0x0005
59 #define GL_TRIANGLE_FAN 0x0006
60
61 /* AlphaFunction (not supported in ES20) */
62 /* GL_NEVER */
63 /* GL_LESS */
64 /* GL_EQUAL */
65 /* GL_LEQUAL */
66 /* GL_GREATER */
67 /* GL_NOTEQUAL */
68 /* GL_GEQUAL */
69 /* GL_ALWAYS */
70
71 /* BlendingFactorDest */
72 #define GL_ZERO 0
73 #define GL_ONE 1
74 #define GL_SRC_COLOR 0x0300
75 #define GL_ONE_MINUS_SRC_COLOR 0x0301
76 #define GL_SRC_ALPHA 0x0302
77 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
78 #define GL_DST_ALPHA 0x0304
79 #define GL_ONE_MINUS_DST_ALPHA 0x0305
80
81 /* BlendingFactorSrc */
82 /* GL_ZERO */
83 /* GL_ONE */
84 #define GL_DST_COLOR 0x0306
85 #define GL_ONE_MINUS_DST_COLOR 0x0307
86 #define GL_SRC_ALPHA_SATURATE 0x0308
87 /* GL_SRC_ALPHA */
88 /* GL_ONE_MINUS_SRC_ALPHA */
89 /* GL_DST_ALPHA */
90 /* GL_ONE_MINUS_DST_ALPHA */
91
92 /* BlendEquationSeparate */
93 #define GL_FUNC_ADD 0x8006
94 #define GL_BLEND_EQUATION 0x8009
95 #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
96 #define GL_BLEND_EQUATION_ALPHA 0x883D
97
98 /* BlendSubtract */
99 #define GL_FUNC_SUBTRACT 0x800A
100 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
101
102 /* Separate Blend Functions */
103 #define GL_BLEND_DST_RGB 0x80C8
104 #define GL_BLEND_SRC_RGB 0x80C9
105 #define GL_BLEND_DST_ALPHA 0x80CA
106 #define GL_BLEND_SRC_ALPHA 0x80CB
107 #define GL_CONSTANT_COLOR 0x8001
108 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
109 #define GL_CONSTANT_ALPHA 0x8003
110 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
111 #define GL_BLEND_COLOR 0x8005
112
113 /* Buffer Objects */
114 #define GL_ARRAY_BUFFER 0x8892
115 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
116 #define GL_ARRAY_BUFFER_BINDING 0x8894
117 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
118
119 #define GL_STREAM_DRAW 0x88E0
120 #define GL_STATIC_DRAW 0x88E4
121 #define GL_DYNAMIC_DRAW 0x88E8
122
123 #define GL_BUFFER_SIZE 0x8764
124 #define GL_BUFFER_USAGE 0x8765
125
126 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
127
128 /* CullFaceMode */
129 #define GL_FRONT 0x0404
130 #define GL_BACK 0x0405
131 #define GL_FRONT_AND_BACK 0x0408
132
133 /* DepthFunction */
134 /* GL_NEVER */
135 /* GL_LESS */
136 /* GL_EQUAL */
137 /* GL_LEQUAL */
138 /* GL_GREATER */
139 /* GL_NOTEQUAL */
140 /* GL_GEQUAL */
141 /* GL_ALWAYS */
142
143 /* EnableCap */
144 #define GL_TEXTURE_2D 0x0DE1
145 #define GL_CULL_FACE 0x0B44
146 #define GL_BLEND 0x0BE2
147 #define GL_DITHER 0x0BD0
148 #define GL_STENCIL_TEST 0x0B90
149 #define GL_DEPTH_TEST 0x0B71
150 #define GL_SCISSOR_TEST 0x0C11
151 #define GL_POLYGON_OFFSET_FILL 0x8037
152 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
153 #define GL_SAMPLE_COVERAGE 0x80A0
154
155 /* ErrorCode */
156 #define GL_NO_ERROR 0
157 #define GL_INVALID_ENUM 0x0500
158 #define GL_INVALID_VALUE 0x0501
159 #define GL_INVALID_OPERATION 0x0502
160 #define GL_OUT_OF_MEMORY 0x0505
161
162 /* FrontFaceDirection */
163 #define GL_CW 0x0900
164 #define GL_CCW 0x0901
165
166 /* GetPName */
167 #define GL_LINE_WIDTH 0x0B21
168 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
169 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
170 #define GL_CULL_FACE_MODE 0x0B45
171 #define GL_FRONT_FACE 0x0B46
172 #define GL_DEPTH_RANGE 0x0B70
173 #define GL_DEPTH_WRITEMASK 0x0B72
174 #define GL_DEPTH_CLEAR_VALUE 0x0B73
175 #define GL_DEPTH_FUNC 0x0B74
176 #define GL_STENCIL_CLEAR_VALUE 0x0B91
177 #define GL_STENCIL_FUNC 0x0B92
178 #define GL_STENCIL_FAIL 0x0B94
179 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
180 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
181 #define GL_STENCIL_REF 0x0B97
182 #define GL_STENCIL_VALUE_MASK 0x0B93
183 #define GL_STENCIL_WRITEMASK 0x0B98
184 #define GL_STENCIL_BACK_FUNC 0x8800
185 #define GL_STENCIL_BACK_FAIL 0x8801
186 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
187 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
188 #define GL_STENCIL_BACK_REF 0x8CA3
189 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
190 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
191 #define GL_VIEWPORT 0x0BA2
192 #define GL_SCISSOR_BOX 0x0C10
193 /* GL_SCISSOR_TEST */
194 #define GL_COLOR_CLEAR_VALUE 0x0C22
195 #define GL_COLOR_WRITEMASK 0x0C23
196 #define GL_UNPACK_ALIGNMENT 0x0CF5
197 #define GL_PACK_ALIGNMENT 0x0D05
198 #define GL_MAX_TEXTURE_SIZE 0x0D33
199 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
200 #define GL_SUBPIXEL_BITS 0x0D50
201 #define GL_RED_BITS 0x0D52
202 #define GL_GREEN_BITS 0x0D53
203 #define GL_BLUE_BITS 0x0D54
204 #define GL_ALPHA_BITS 0x0D55
205 #define GL_DEPTH_BITS 0x0D56
206 #define GL_STENCIL_BITS 0x0D57
207 #define GL_POLYGON_OFFSET_UNITS 0x2A00
208 /* GL_POLYGON_OFFSET_FILL */
209 #define GL_POLYGON_OFFSET_FACTOR 0x8038
210 #define GL_TEXTURE_BINDING_2D 0x8069
211 #define GL_SAMPLE_BUFFERS 0x80A8
212 #define GL_SAMPLES 0x80A9
213 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
214 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
215
216 /* GetTextureParameter */
217 /* GL_TEXTURE_MAG_FILTER */
218 /* GL_TEXTURE_MIN_FILTER */
219 /* GL_TEXTURE_WRAP_S */
220 /* GL_TEXTURE_WRAP_T */
221
222 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
223 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
224
225 /* HintMode */
226 #define GL_DONT_CARE 0x1100
227 #define GL_FASTEST 0x1101
228 #define GL_NICEST 0x1102
229
230 /* HintTarget */
231 #define GL_GENERATE_MIPMAP_HINT 0x8192
232
233 /* DataType */
234 #define GL_BYTE 0x1400
235 #define GL_UNSIGNED_BYTE 0x1401
236 #define GL_SHORT 0x1402
237 #define GL_UNSIGNED_SHORT 0x1403
238 #define GL_INT 0x1404
239 #define GL_UNSIGNED_INT 0x1405
240 #define GL_FLOAT 0x1406
241 #define GL_FIXED 0x140C
242
243 /* PixelFormat */
244 #define GL_DEPTH_COMPONENT 0x1902
245 #define GL_ALPHA 0x1906
246 #define GL_RGB 0x1907
247 #define GL_RGBA 0x1908
248 #define GL_LUMINANCE 0x1909
249 #define GL_LUMINANCE_ALPHA 0x190A
250
251 /* PixelType */
252 /* GL_UNSIGNED_BYTE */
253 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
254 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
255 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
256
257 /* Shaders */
258 #define GL_FRAGMENT_SHADER 0x8B30
259 #define GL_VERTEX_SHADER 0x8B31
260 #define GL_MAX_VERTEX_ATTRIBS 0x8869
261 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
262 #define GL_MAX_VARYING_VECTORS 0x8DFC
263 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
264 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
265 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
266 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
267 #define GL_SHADER_TYPE 0x8B4F
268 #define GL_DELETE_STATUS 0x8B80
269 #define GL_LINK_STATUS 0x8B82
270 #define GL_VALIDATE_STATUS 0x8B83
271 #define GL_ATTACHED_SHADERS 0x8B85
272 #define GL_ACTIVE_UNIFORMS 0x8B86
273 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
274 #define GL_ACTIVE_ATTRIBUTES 0x8B89
275 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
276 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
277 #define GL_CURRENT_PROGRAM 0x8B8D
278
279 /* StencilFunction */
280 #define GL_NEVER 0x0200
281 #define GL_LESS 0x0201
282 #define GL_EQUAL 0x0202
283 #define GL_LEQUAL 0x0203
284 #define GL_GREATER 0x0204
285 #define GL_NOTEQUAL 0x0205
286 #define GL_GEQUAL 0x0206
287 #define GL_ALWAYS 0x0207
288
289 /* StencilOp */
290 /* GL_ZERO */
291 #define GL_KEEP 0x1E00
292 #define GL_REPLACE 0x1E01
293 #define GL_INCR 0x1E02
294 #define GL_DECR 0x1E03
295 #define GL_INVERT 0x150A
296 #define GL_INCR_WRAP 0x8507
297 #define GL_DECR_WRAP 0x8508
298
299 /* StringName */
300 #define GL_VENDOR 0x1F00
301 #define GL_RENDERER 0x1F01
302 #define GL_VERSION 0x1F02
303 #define GL_EXTENSIONS 0x1F03
304
305 /* TextureMagFilter */
306 #define GL_NEAREST 0x2600
307 #define GL_LINEAR 0x2601
308
309 /* TextureMinFilter */
310 /* GL_NEAREST */
311 /* GL_LINEAR */
312 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
313 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
314 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
315 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
316
317 /* TextureParameterName */
318 #define GL_TEXTURE_MAG_FILTER 0x2800
319 #define GL_TEXTURE_MIN_FILTER 0x2801
320 #define GL_TEXTURE_WRAP_S 0x2802
321 #define GL_TEXTURE_WRAP_T 0x2803
322
323 /* TextureTarget */
324 /* GL_TEXTURE_2D */
325 #define GL_TEXTURE 0x1702
326
327 #define GL_TEXTURE_CUBE_MAP 0x8513
328 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
329 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
330 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
331 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
332 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
333 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
334 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
335 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
336
337 /* TextureUnit */
338 #define GL_TEXTURE0 0x84C0
339 #define GL_TEXTURE1 0x84C1
340 #define GL_TEXTURE2 0x84C2
341 #define GL_TEXTURE3 0x84C3
342 #define GL_TEXTURE4 0x84C4
343 #define GL_TEXTURE5 0x84C5
344 #define GL_TEXTURE6 0x84C6
345 #define GL_TEXTURE7 0x84C7
346 #define GL_TEXTURE8 0x84C8
347 #define GL_TEXTURE9 0x84C9
348 #define GL_TEXTURE10 0x84CA
349 #define GL_TEXTURE11 0x84CB
350 #define GL_TEXTURE12 0x84CC
351 #define GL_TEXTURE13 0x84CD
352 #define GL_TEXTURE14 0x84CE
353 #define GL_TEXTURE15 0x84CF
354 #define GL_TEXTURE16 0x84D0
355 #define GL_TEXTURE17 0x84D1
356 #define GL_TEXTURE18 0x84D2
357 #define GL_TEXTURE19 0x84D3
358 #define GL_TEXTURE20 0x84D4
359 #define GL_TEXTURE21 0x84D5
360 #define GL_TEXTURE22 0x84D6
361 #define GL_TEXTURE23 0x84D7
362 #define GL_TEXTURE24 0x84D8
363 #define GL_TEXTURE25 0x84D9
364 #define GL_TEXTURE26 0x84DA
365 #define GL_TEXTURE27 0x84DB
366 #define GL_TEXTURE28 0x84DC
367 #define GL_TEXTURE29 0x84DD
368 #define GL_TEXTURE30 0x84DE
369 #define GL_TEXTURE31 0x84DF
370 #define GL_ACTIVE_TEXTURE 0x84E0
371
372 /* TextureWrapMode */
373 #define GL_REPEAT 0x2901
374 #define GL_CLAMP_TO_EDGE 0x812F
375 #define GL_MIRRORED_REPEAT 0x8370
376
377 /* Uniform Types */
378 #define GL_FLOAT_VEC2 0x8B50
379 #define GL_FLOAT_VEC3 0x8B51
380 #define GL_FLOAT_VEC4 0x8B52
381 #define GL_INT_VEC2 0x8B53
382 #define GL_INT_VEC3 0x8B54
383 #define GL_INT_VEC4 0x8B55
384 #define GL_BOOL 0x8B56
385 #define GL_BOOL_VEC2 0x8B57
386 #define GL_BOOL_VEC3 0x8B58
387 #define GL_BOOL_VEC4 0x8B59
388 #define GL_FLOAT_MAT2 0x8B5A
389 #define GL_FLOAT_MAT3 0x8B5B
390 #define GL_FLOAT_MAT4 0x8B5C
391 #define GL_SAMPLER_2D 0x8B5E
392 #define GL_SAMPLER_CUBE 0x8B60
393
394 /* Vertex Arrays */
395 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
396 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
397 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
398 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
399 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
400 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
401 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
402
403 /* Read Format */
404 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
405 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
406
407 /* Shader Source */
408 #define GL_COMPILE_STATUS 0x8B81
409 #define GL_INFO_LOG_LENGTH 0x8B84
410 #define GL_SHADER_SOURCE_LENGTH 0x8B88
411 #define GL_SHADER_COMPILER 0x8DFA
412
413 /* Shader Binary */
414 #define GL_SHADER_BINARY_FORMATS 0x8DF8
415 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
416
417 /* Shader Precision-Specified Types */
418 #define GL_LOW_FLOAT 0x8DF0
419 #define GL_MEDIUM_FLOAT 0x8DF1
420 #define GL_HIGH_FLOAT 0x8DF2
421 #define GL_LOW_INT 0x8DF3
422 #define GL_MEDIUM_INT 0x8DF4
423 #define GL_HIGH_INT 0x8DF5
424
425 /* Framebuffer Object. */
426 #define GL_FRAMEBUFFER 0x8D40
427 #define GL_RENDERBUFFER 0x8D41
428
429 #define GL_RGBA4 0x8056
430 #define GL_RGB5_A1 0x8057
431 #define GL_RGB565 0x8D62
432 #define GL_DEPTH_COMPONENT16 0x81A5
433 #define GL_STENCIL_INDEX8 0x8D48
434
435 #define GL_RENDERBUFFER_WIDTH 0x8D42
436 #define GL_RENDERBUFFER_HEIGHT 0x8D43
437 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
438 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
439 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
440 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
441 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
442 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
443 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
444
445 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
446 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
447 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
448 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
449
450 #define GL_COLOR_ATTACHMENT0 0x8CE0
451 #define GL_DEPTH_ATTACHMENT 0x8D00
452 #define GL_STENCIL_ATTACHMENT 0x8D20
453
454 #define GL_NONE 0
455
456 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
457 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
458 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
459 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
460 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
461
462 #define GL_FRAMEBUFFER_BINDING 0x8CA6
463 #define GL_RENDERBUFFER_BINDING 0x8CA7
464 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
465
466 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
467
468 /*-------------------------------------------------------------------------
469 * GL core functions.
470 *-----------------------------------------------------------------------*/
471
472 GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
473 GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
474 GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
475 GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
476 GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
477 GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
478 GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
479 GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
480 GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
481 GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
482 GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
483 GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
484 GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
485 GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
486 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
487 GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
488 GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
489 GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
490 GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
491 GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
492 GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
493 GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
494 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);
495 GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
496 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
497 GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
498 GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
499 GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
500 GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
501 GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
502 GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
503 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
504 GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
505 GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
506 GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
507 GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
508 GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
509 GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
510 GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
511 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
512 GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
513 GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
514 GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
515 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
516 GL_APICALL void GL_APIENTRY glFinish (void);
517 GL_APICALL void GL_APIENTRY glFlush (void);
518 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
519 GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
520 GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
521 GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
522 GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
523 GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
524 GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
525 GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
526 GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
527 GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
528 GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
529 GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
530 GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
531 GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
532 GL_APICALL GLenum GL_APIENTRY glGetError (void);
533 GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
534 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
535 GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
536 GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
537 GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
538 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
539 GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
540 GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
541 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
542 GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
543 GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
544 GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
545 GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
546 GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
547 GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
548 GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
549 GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
550 GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
551 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
552 GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
553 GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
554 GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
555 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
556 GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
557 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
558 GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
559 GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
560 GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
561 GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
562 GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
563 GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
564 GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
565 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
566 GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
567 GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
568 GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
569 GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
570 GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
571 GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
572 GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
573 GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
574 GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
575 GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
576 GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
577 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);
578 GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
579 GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
580 GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
581 GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
582 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);
583 GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
584 GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
585 GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
586 GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
587 GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
588 GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
589 GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
590 GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
591 GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
592 GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
593 GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
594 GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
595 GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
596 GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
597 GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
598 GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
599 GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
600 GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
601 GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
602 GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
603 GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
604 GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
605 GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
606 GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
607 GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
608 GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
609 GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
610 GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
611 GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
612 GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
613 GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
614
615 #ifdef __cplusplus
616 }
617 #endif
618
619 #endif /* __gl2_h_ */
620
0 #ifndef __gl2ext_h_
1 #define __gl2ext_h_
2
3 /* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /*
10 * This document is licensed under the SGI Free Software B License Version
11 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
12 */
13
14 #ifndef GL_APIENTRYP
15 # define GL_APIENTRYP GL_APIENTRY*
16 #endif
17
18 /* New types shared by several extensions */
19
20 #ifndef __gl3_h_
21 /* These are defined with respect to <inttypes.h> in the
22 * Apple extension spec, but they are also used by non-APPLE
23 * extensions, and in the Khronos header we use the Khronos
24 * portable types in khrplatform.h, which must be defined.
25 */
26 typedef khronos_int64_t GLint64;
27 typedef khronos_uint64_t GLuint64;
28 typedef struct __GLsync *GLsync;
29 #endif
30
31
32 /*------------------------------------------------------------------------*
33 * OES extension tokens
34 *------------------------------------------------------------------------*/
35
36 /* GL_OES_compressed_ETC1_RGB8_texture */
37 #ifndef GL_OES_compressed_ETC1_RGB8_texture
38 #define GL_ETC1_RGB8_OES 0x8D64
39 #endif
40
41 /* GL_OES_compressed_paletted_texture */
42 #ifndef GL_OES_compressed_paletted_texture
43 #define GL_PALETTE4_RGB8_OES 0x8B90
44 #define GL_PALETTE4_RGBA8_OES 0x8B91
45 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92
46 #define GL_PALETTE4_RGBA4_OES 0x8B93
47 #define GL_PALETTE4_RGB5_A1_OES 0x8B94
48 #define GL_PALETTE8_RGB8_OES 0x8B95
49 #define GL_PALETTE8_RGBA8_OES 0x8B96
50 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97
51 #define GL_PALETTE8_RGBA4_OES 0x8B98
52 #define GL_PALETTE8_RGB5_A1_OES 0x8B99
53 #endif
54
55 /* GL_OES_depth24 */
56 #ifndef GL_OES_depth24
57 #define GL_DEPTH_COMPONENT24_OES 0x81A6
58 #endif
59
60 /* GL_OES_depth32 */
61 #ifndef GL_OES_depth32
62 #define GL_DEPTH_COMPONENT32_OES 0x81A7
63 #endif
64
65 /* GL_OES_depth_texture */
66 /* No new tokens introduced by this extension. */
67
68 /* GL_OES_EGL_image */
69 #ifndef GL_OES_EGL_image
70 typedef void* GLeglImageOES;
71 #endif
72
73 /* GL_OES_EGL_image_external */
74 #ifndef GL_OES_EGL_image_external
75 /* GLeglImageOES defined in GL_OES_EGL_image already. */
76 #define GL_TEXTURE_EXTERNAL_OES 0x8D65
77 #define GL_SAMPLER_EXTERNAL_OES 0x8D66
78 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
79 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
80 #endif
81
82 /* GL_OES_element_index_uint */
83 #ifndef GL_OES_element_index_uint
84 #define GL_UNSIGNED_INT 0x1405
85 #endif
86
87 /* GL_OES_get_program_binary */
88 #ifndef GL_OES_get_program_binary
89 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
90 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
91 #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
92 #endif
93
94 /* GL_OES_mapbuffer */
95 #ifndef GL_OES_mapbuffer
96 #define GL_WRITE_ONLY_OES 0x88B9
97 #define GL_BUFFER_ACCESS_OES 0x88BB
98 #define GL_BUFFER_MAPPED_OES 0x88BC
99 #define GL_BUFFER_MAP_POINTER_OES 0x88BD
100 #endif
101
102 /* GL_OES_packed_depth_stencil */
103 #ifndef GL_OES_packed_depth_stencil
104 #define GL_DEPTH_STENCIL_OES 0x84F9
105 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
106 #define GL_DEPTH24_STENCIL8_OES 0x88F0
107 #endif
108
109 /* GL_OES_required_internalformat */
110 #ifndef GL_OES_required_internalformat
111 #define GL_ALPHA8_OES 0x803C
112 #define GL_DEPTH_COMPONENT16_OES 0x81A5
113 /* reuse GL_DEPTH_COMPONENT24_OES */
114 /* reuse GL_DEPTH24_STENCIL8_OES */
115 /* reuse GL_DEPTH_COMPONENT32_OES */
116 #define GL_LUMINANCE4_ALPHA4_OES 0x8043
117 #define GL_LUMINANCE8_ALPHA8_OES 0x8045
118 #define GL_LUMINANCE8_OES 0x8040
119 #define GL_RGBA4_OES 0x8056
120 #define GL_RGB5_A1_OES 0x8057
121 #define GL_RGB565_OES 0x8D62
122 /* reuse GL_RGB8_OES */
123 /* reuse GL_RGBA8_OES */
124 /* reuse GL_RGB10_EXT */
125 /* reuse GL_RGB10_A2_EXT */
126 #endif
127
128 /* GL_OES_rgb8_rgba8 */
129 #ifndef GL_OES_rgb8_rgba8
130 #define GL_RGB8_OES 0x8051
131 #define GL_RGBA8_OES 0x8058
132 #endif
133
134 /* GL_OES_standard_derivatives */
135 #ifndef GL_OES_standard_derivatives
136 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
137 #endif
138
139 /* GL_OES_stencil1 */
140 #ifndef GL_OES_stencil1
141 #define GL_STENCIL_INDEX1_OES 0x8D46
142 #endif
143
144 /* GL_OES_stencil4 */
145 #ifndef GL_OES_stencil4
146 #define GL_STENCIL_INDEX4_OES 0x8D47
147 #endif
148
149 #ifndef GL_OES_surfaceless_context
150 #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219
151 #endif
152
153 /* GL_OES_texture_3D */
154 #ifndef GL_OES_texture_3D
155 #define GL_TEXTURE_WRAP_R_OES 0x8072
156 #define GL_TEXTURE_3D_OES 0x806F
157 #define GL_TEXTURE_BINDING_3D_OES 0x806A
158 #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
159 #define GL_SAMPLER_3D_OES 0x8B5F
160 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
161 #endif
162
163 /* GL_OES_texture_float */
164 /* No new tokens introduced by this extension. */
165
166 /* GL_OES_texture_float_linear */
167 /* No new tokens introduced by this extension. */
168
169 /* GL_OES_texture_half_float */
170 #ifndef GL_OES_texture_half_float
171 #define GL_HALF_FLOAT_OES 0x8D61
172 #endif
173
174 /* GL_OES_texture_half_float_linear */
175 /* No new tokens introduced by this extension. */
176
177 /* GL_OES_texture_npot */
178 /* No new tokens introduced by this extension. */
179
180 /* GL_OES_vertex_array_object */
181 #ifndef GL_OES_vertex_array_object
182 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
183 #endif
184
185 /* GL_OES_vertex_half_float */
186 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
187
188 /* GL_OES_vertex_type_10_10_10_2 */
189 #ifndef GL_OES_vertex_type_10_10_10_2
190 #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
191 #define GL_INT_10_10_10_2_OES 0x8DF7
192 #endif
193
194 /*------------------------------------------------------------------------*
195 * KHR extension tokens
196 *------------------------------------------------------------------------*/
197
198 #ifndef GL_KHR_debug
199 typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
200 #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
201 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
202 #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
203 #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
204 #define GL_DEBUG_SOURCE_API_KHR 0x8246
205 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
206 #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
207 #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
208 #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
209 #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
210 #define GL_DEBUG_TYPE_ERROR_KHR 0x824C
211 #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
212 #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
213 #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
214 #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
215 #define GL_DEBUG_TYPE_OTHER_KHR 0x8251
216 #define GL_DEBUG_TYPE_MARKER_KHR 0x8268
217 #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
218 #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
219 #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
220 #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
221 #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
222 #define GL_BUFFER_KHR 0x82E0
223 #define GL_SHADER_KHR 0x82E1
224 #define GL_PROGRAM_KHR 0x82E2
225 #define GL_QUERY_KHR 0x82E3
226 /* PROGRAM_PIPELINE only in GL */
227 #define GL_SAMPLER_KHR 0x82E6
228 /* DISPLAY_LIST only in GL */
229 #define GL_MAX_LABEL_LENGTH_KHR 0x82E8
230 #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
231 #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
232 #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
233 #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
234 #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
235 #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
236 #define GL_DEBUG_OUTPUT_KHR 0x92E0
237 #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
238 #define GL_STACK_OVERFLOW_KHR 0x0503
239 #define GL_STACK_UNDERFLOW_KHR 0x0504
240 #endif
241
242 #ifndef GL_KHR_texture_compression_astc_ldr
243 #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
244 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
245 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
246 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
247 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
248 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
249 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
250 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
251 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
252 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
253 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
254 #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
255 #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
256 #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
257 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
258 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
259 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
260 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
261 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
262 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
263 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
264 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
265 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
266 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
267 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
268 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
269 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
270 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
271 #endif
272
273 /*------------------------------------------------------------------------*
274 * AMD extension tokens
275 *------------------------------------------------------------------------*/
276
277 /* GL_AMD_compressed_3DC_texture */
278 #ifndef GL_AMD_compressed_3DC_texture
279 #define GL_3DC_X_AMD 0x87F9
280 #define GL_3DC_XY_AMD 0x87FA
281 #endif
282
283 /* GL_AMD_compressed_ATC_texture */
284 #ifndef GL_AMD_compressed_ATC_texture
285 #define GL_ATC_RGB_AMD 0x8C92
286 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
287 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
288 #endif
289
290 /* GL_AMD_performance_monitor */
291 #ifndef GL_AMD_performance_monitor
292 #define GL_COUNTER_TYPE_AMD 0x8BC0
293 #define GL_COUNTER_RANGE_AMD 0x8BC1
294 #define GL_UNSIGNED_INT64_AMD 0x8BC2
295 #define GL_PERCENTAGE_AMD 0x8BC3
296 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
297 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
298 #define GL_PERFMON_RESULT_AMD 0x8BC6
299 #endif
300
301 /* GL_AMD_program_binary_Z400 */
302 #ifndef GL_AMD_program_binary_Z400
303 #define GL_Z400_BINARY_AMD 0x8740
304 #endif
305
306 /*------------------------------------------------------------------------*
307 * ANGLE extension tokens
308 *------------------------------------------------------------------------*/
309
310 /* GL_ANGLE_depth_texture */
311 #ifndef GL_ANGLE_depth_texture
312 #define GL_DEPTH_COMPONENT 0x1902
313 #define GL_DEPTH_STENCIL_OES 0x84F9
314 #define GL_UNSIGNED_SHORT 0x1403
315 #define GL_UNSIGNED_INT 0x1405
316 #define GL_UNSIGNED_INT_24_8_OES 0x84FA
317 #define GL_DEPTH_COMPONENT16 0x81A5
318 #define GL_DEPTH_COMPONENT32_OES 0x81A7
319 #define GL_DEPTH24_STENCIL8_OES 0x88F0
320 #endif
321
322 /* GL_ANGLE_framebuffer_blit */
323 #ifndef GL_ANGLE_framebuffer_blit
324 #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
325 #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
326 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
327 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
328 #endif
329
330 /* GL_ANGLE_framebuffer_multisample */
331 #ifndef GL_ANGLE_framebuffer_multisample
332 #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
333 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
334 #define GL_MAX_SAMPLES_ANGLE 0x8D57
335 #endif
336
337 /* GL_ANGLE_instanced_arrays */
338 #ifndef GL_ANGLE_instanced_arrays
339 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
340 #endif
341
342 /* GL_ANGLE_pack_reverse_row_order */
343 #ifndef GL_ANGLE_pack_reverse_row_order
344 #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
345 #endif
346
347 /* GL_ANGLE_program_binary */
348 #ifndef GL_ANGLE_program_binary
349 #define GL_PROGRAM_BINARY_ANGLE 0x93A6
350 #endif
351
352 /* GL_ANGLE_texture_compression_dxt3 */
353 #ifndef GL_ANGLE_texture_compression_dxt3
354 #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
355 #endif
356
357 /* GL_ANGLE_texture_compression_dxt5 */
358 #ifndef GL_ANGLE_texture_compression_dxt5
359 #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
360 #endif
361
362 /* GL_ANGLE_texture_usage */
363 #ifndef GL_ANGLE_texture_usage
364 #define GL_TEXTURE_USAGE_ANGLE 0x93A2
365 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
366 #endif
367
368 /* GL_ANGLE_translated_shader_source */
369 #ifndef GL_ANGLE_translated_shader_source
370 #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
371 #endif
372
373 /*------------------------------------------------------------------------*
374 * APPLE extension tokens
375 *------------------------------------------------------------------------*/
376
377 /* GL_APPLE_copy_texture_levels */
378 /* No new tokens introduced by this extension. */
379
380 /* GL_APPLE_framebuffer_multisample */
381 #ifndef GL_APPLE_framebuffer_multisample
382 #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
383 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
384 #define GL_MAX_SAMPLES_APPLE 0x8D57
385 #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
386 #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
387 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
388 #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
389 #endif
390
391 /* GL_APPLE_rgb_422 */
392 #ifndef GL_APPLE_rgb_422
393 #define GL_RGB_422_APPLE 0x8A1F
394 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
395 #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
396 #endif
397
398 /* GL_APPLE_sync */
399 #ifndef GL_APPLE_sync
400
401 #define GL_SYNC_OBJECT_APPLE 0x8A53
402 #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
403 #define GL_OBJECT_TYPE_APPLE 0x9112
404 #define GL_SYNC_CONDITION_APPLE 0x9113
405 #define GL_SYNC_STATUS_APPLE 0x9114
406 #define GL_SYNC_FLAGS_APPLE 0x9115
407 #define GL_SYNC_FENCE_APPLE 0x9116
408 #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
409 #define GL_UNSIGNALED_APPLE 0x9118
410 #define GL_SIGNALED_APPLE 0x9119
411 #define GL_ALREADY_SIGNALED_APPLE 0x911A
412 #define GL_TIMEOUT_EXPIRED_APPLE 0x911B
413 #define GL_CONDITION_SATISFIED_APPLE 0x911C
414 #define GL_WAIT_FAILED_APPLE 0x911D
415 #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001
416 #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull
417 #endif
418
419 /* GL_APPLE_texture_format_BGRA8888 */
420 #ifndef GL_APPLE_texture_format_BGRA8888
421 #define GL_BGRA_EXT 0x80E1
422 #endif
423
424 /* GL_APPLE_texture_max_level */
425 #ifndef GL_APPLE_texture_max_level
426 #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
427 #endif
428
429 /*------------------------------------------------------------------------*
430 * ARM extension tokens
431 *------------------------------------------------------------------------*/
432
433 /* GL_ARM_mali_program_binary */
434 #ifndef GL_ARM_mali_program_binary
435 #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61
436 #endif
437
438 /* GL_ARM_mali_shader_binary */
439 #ifndef GL_ARM_mali_shader_binary
440 #define GL_MALI_SHADER_BINARY_ARM 0x8F60
441 #endif
442
443 /* GL_ARM_rgba8 */
444 /* No new tokens introduced by this extension. */
445
446 /*------------------------------------------------------------------------*
447 * EXT extension tokens
448 *------------------------------------------------------------------------*/
449
450 /* GL_EXT_blend_minmax */
451 #ifndef GL_EXT_blend_minmax
452 #define GL_MIN_EXT 0x8007
453 #define GL_MAX_EXT 0x8008
454 #endif
455
456 /* GL_EXT_color_buffer_half_float */
457 #ifndef GL_EXT_color_buffer_half_float
458 #define GL_RGBA16F_EXT 0x881A
459 #define GL_RGB16F_EXT 0x881B
460 #define GL_RG16F_EXT 0x822F
461 #define GL_R16F_EXT 0x822D
462 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
463 #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
464 #endif
465
466 /* GL_EXT_debug_label */
467 #ifndef GL_EXT_debug_label
468 #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
469 #define GL_PROGRAM_OBJECT_EXT 0x8B40
470 #define GL_SHADER_OBJECT_EXT 0x8B48
471 #define GL_BUFFER_OBJECT_EXT 0x9151
472 #define GL_QUERY_OBJECT_EXT 0x9153
473 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
474 #endif
475
476 /* GL_EXT_debug_marker */
477 /* No new tokens introduced by this extension. */
478
479 /* GL_EXT_discard_framebuffer */
480 #ifndef GL_EXT_discard_framebuffer
481 #define GL_COLOR_EXT 0x1800
482 #define GL_DEPTH_EXT 0x1801
483 #define GL_STENCIL_EXT 0x1802
484 #endif
485
486 #ifndef GL_EXT_disjoint_timer_query
487 #define GL_QUERY_COUNTER_BITS_EXT 0x8864
488 #define GL_CURRENT_QUERY_EXT 0x8865
489 #define GL_QUERY_RESULT_EXT 0x8866
490 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
491 #define GL_TIME_ELAPSED_EXT 0x88BF
492 #define GL_TIMESTAMP_EXT 0x8E28
493 #define GL_GPU_DISJOINT_EXT 0x8FBB
494 #endif
495
496 #ifndef GL_EXT_draw_buffers
497 #define GL_EXT_draw_buffers 1
498 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
499 #define GL_MAX_DRAW_BUFFERS_EXT 0x8824
500 #define GL_DRAW_BUFFER0_EXT 0x8825
501 #define GL_DRAW_BUFFER1_EXT 0x8826
502 #define GL_DRAW_BUFFER2_EXT 0x8827
503 #define GL_DRAW_BUFFER3_EXT 0x8828
504 #define GL_DRAW_BUFFER4_EXT 0x8829
505 #define GL_DRAW_BUFFER5_EXT 0x882A
506 #define GL_DRAW_BUFFER6_EXT 0x882B
507 #define GL_DRAW_BUFFER7_EXT 0x882C
508 #define GL_DRAW_BUFFER8_EXT 0x882D
509 #define GL_DRAW_BUFFER9_EXT 0x882E
510 #define GL_DRAW_BUFFER10_EXT 0x882F
511 #define GL_DRAW_BUFFER11_EXT 0x8830
512 #define GL_DRAW_BUFFER12_EXT 0x8831
513 #define GL_DRAW_BUFFER13_EXT 0x8832
514 #define GL_DRAW_BUFFER14_EXT 0x8833
515 #define GL_DRAW_BUFFER15_EXT 0x8834
516 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
517 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
518 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
519 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
520 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
521 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
522 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
523 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
524 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
525 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
526 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
527 #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
528 #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
529 #define GL_COLOR_ATTACHMENT13_EXT 0x8CED
530 #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
531 #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
532 #endif
533
534 /* GL_EXT_map_buffer_range */
535 #ifndef GL_EXT_map_buffer_range
536 #define GL_MAP_READ_BIT_EXT 0x0001
537 #define GL_MAP_WRITE_BIT_EXT 0x0002
538 #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004
539 #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008
540 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010
541 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020
542 #endif
543
544 /* GL_EXT_multisampled_render_to_texture */
545 #ifndef GL_EXT_multisampled_render_to_texture
546 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
547 /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
548 #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
549 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
550 #define GL_MAX_SAMPLES_EXT 0x8D57
551 #endif
552
553 /* GL_EXT_multiview_draw_buffers */
554 #ifndef GL_EXT_multiview_draw_buffers
555 #define GL_COLOR_ATTACHMENT_EXT 0x90F0
556 #define GL_MULTIVIEW_EXT 0x90F1
557 #define GL_DRAW_BUFFER_EXT 0x0C01
558 #define GL_READ_BUFFER_EXT 0x0C02
559 #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2
560 #endif
561
562 /* GL_EXT_multi_draw_arrays */
563 /* No new tokens introduced by this extension. */
564
565 /* GL_EXT_occlusion_query_boolean */
566 #ifndef GL_EXT_occlusion_query_boolean
567 #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
568 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
569 #define GL_CURRENT_QUERY_EXT 0x8865
570 #define GL_QUERY_RESULT_EXT 0x8866
571 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
572 #endif
573
574 /* GL_EXT_read_format_bgra */
575 #ifndef GL_EXT_read_format_bgra
576 #define GL_BGRA_EXT 0x80E1
577 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
578 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
579 #endif
580
581 /* GL_EXT_robustness */
582 #ifndef GL_EXT_robustness
583 /* reuse GL_NO_ERROR */
584 #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
585 #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
586 #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
587 #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
588 #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
589 #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
590 #define GL_NO_RESET_NOTIFICATION_EXT 0x8261
591 #endif
592
593 /* GL_EXT_separate_shader_objects */
594 #ifndef GL_EXT_separate_shader_objects
595 #define GL_VERTEX_SHADER_BIT_EXT 0x00000001
596 #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
597 #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
598 #define GL_PROGRAM_SEPARABLE_EXT 0x8258
599 #define GL_ACTIVE_PROGRAM_EXT 0x8259
600 #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
601 #endif
602
603 /* GL_EXT_shader_framebuffer_fetch */
604 #ifndef GL_EXT_shader_framebuffer_fetch
605 #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
606 #endif
607
608 /* GL_EXT_shader_texture_lod */
609 /* No new tokens introduced by this extension. */
610
611 /* GL_EXT_shadow_samplers */
612 #ifndef GL_EXT_shadow_samplers
613 #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
614 #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
615 #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
616 #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
617 #endif
618
619 /* GL_EXT_sRGB */
620 #ifndef GL_EXT_sRGB
621 #define GL_SRGB_EXT 0x8C40
622 #define GL_SRGB_ALPHA_EXT 0x8C42
623 #define GL_SRGB8_ALPHA8_EXT 0x8C43
624 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
625 #endif
626
627 /* GL_EXT_sRGB_write_control */
628 #ifndef GL_EXT_sRGB_write_control
629 #define GL_EXT_sRGB_write_control 1
630 #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
631 #endif
632
633 /* GL_EXT_texture_compression_dxt1 */
634 #ifndef GL_EXT_texture_compression_dxt1
635 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
636 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
637 #endif
638
639 /* GL_EXT_texture_filter_anisotropic */
640 #ifndef GL_EXT_texture_filter_anisotropic
641 #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
642 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
643 #endif
644
645 /* GL_EXT_texture_format_BGRA8888 */
646 #ifndef GL_EXT_texture_format_BGRA8888
647 #define GL_BGRA_EXT 0x80E1
648 #endif
649
650 /* GL_EXT_texture_rg */
651 #ifndef GL_EXT_texture_rg
652 #define GL_RED_EXT 0x1903
653 #define GL_RG_EXT 0x8227
654 #define GL_R8_EXT 0x8229
655 #define GL_RG8_EXT 0x822B
656 #endif
657
658 /* GL_EXT_texture_sRGB_decode */
659 #ifndef GL_EXT_texture_sRGB_decode
660 #define GL_EXT_texture_sRGB_decode 1
661 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
662 #define GL_DECODE_EXT 0x8A49
663 #define GL_SKIP_DECODE_EXT 0x8A4A
664 #endif
665
666 /* GL_EXT_texture_storage */
667 #ifndef GL_EXT_texture_storage
668 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
669 #define GL_ALPHA8_EXT 0x803C
670 #define GL_LUMINANCE8_EXT 0x8040
671 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045
672 #define GL_RGBA32F_EXT 0x8814
673 #define GL_RGB32F_EXT 0x8815
674 #define GL_ALPHA32F_EXT 0x8816
675 #define GL_LUMINANCE32F_EXT 0x8818
676 #define GL_LUMINANCE_ALPHA32F_EXT 0x8819
677 /* reuse GL_RGBA16F_EXT */
678 /* reuse GL_RGB16F_EXT */
679 #define GL_ALPHA16F_EXT 0x881C
680 #define GL_LUMINANCE16F_EXT 0x881E
681 #define GL_LUMINANCE_ALPHA16F_EXT 0x881F
682 #define GL_RGB10_A2_EXT 0x8059
683 #define GL_RGB10_EXT 0x8052
684 #define GL_BGRA8_EXT 0x93A1
685 #define GL_R8_EXT 0x8229
686 #define GL_RG8_EXT 0x822B
687 #define GL_R32F_EXT 0x822E
688 #define GL_RG32F_EXT 0x8230
689 #define GL_R16F_EXT 0x822D
690 #define GL_RG16F_EXT 0x822F
691 #endif
692
693 /* GL_EXT_texture_type_2_10_10_10_REV */
694 #ifndef GL_EXT_texture_type_2_10_10_10_REV
695 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
696 #endif
697
698 /* GL_EXT_unpack_subimage */
699 #ifndef GL_EXT_unpack_subimage
700 #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
701 #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
702 #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
703 #endif
704
705 /*------------------------------------------------------------------------*
706 * DMP extension tokens
707 *------------------------------------------------------------------------*/
708
709 /* GL_DMP_shader_binary */
710 #ifndef GL_DMP_shader_binary
711 #define GL_SHADER_BINARY_DMP 0x9250
712 #endif
713
714 /*------------------------------------------------------------------------*
715 * FJ extension tokens
716 *------------------------------------------------------------------------*/
717
718 /* GL_FJ_shader_binary_GCCSO */
719 #ifndef GL_FJ_shader_binary_GCCSO
720 #define GL_GCCSO_SHADER_BINARY_FJ 0x9260
721 #endif
722
723 /*------------------------------------------------------------------------*
724 * IMG extension tokens
725 *------------------------------------------------------------------------*/
726
727 /* GL_IMG_program_binary */
728 #ifndef GL_IMG_program_binary
729 #define GL_SGX_PROGRAM_BINARY_IMG 0x9130
730 #endif
731
732 /* GL_IMG_read_format */
733 #ifndef GL_IMG_read_format
734 #define GL_BGRA_IMG 0x80E1
735 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
736 #endif
737
738 /* GL_IMG_shader_binary */
739 #ifndef GL_IMG_shader_binary
740 #define GL_SGX_BINARY_IMG 0x8C0A
741 #endif
742
743 /* GL_IMG_texture_compression_pvrtc */
744 #ifndef GL_IMG_texture_compression_pvrtc
745 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
746 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
747 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
748 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
749 #endif
750
751 /* GL_IMG_texture_compression_pvrtc2 */
752 #ifndef GL_IMG_texture_compression_pvrtc2
753 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
754 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
755 #endif
756
757 /* GL_IMG_multisampled_render_to_texture */
758 #ifndef GL_IMG_multisampled_render_to_texture
759 #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
760 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
761 #define GL_MAX_SAMPLES_IMG 0x9135
762 #define GL_TEXTURE_SAMPLES_IMG 0x9136
763 #endif
764
765 /*------------------------------------------------------------------------*
766 * NV extension tokens
767 *------------------------------------------------------------------------*/
768
769 /* GL_NV_coverage_sample */
770 #ifndef GL_NV_coverage_sample
771 #define GL_COVERAGE_COMPONENT_NV 0x8ED0
772 #define GL_COVERAGE_COMPONENT4_NV 0x8ED1
773 #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
774 #define GL_COVERAGE_BUFFERS_NV 0x8ED3
775 #define GL_COVERAGE_SAMPLES_NV 0x8ED4
776 #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
777 #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
778 #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
779 #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
780 #endif
781
782 /* GL_NV_depth_nonlinear */
783 #ifndef GL_NV_depth_nonlinear
784 #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
785 #endif
786
787 /* GL_NV_draw_buffers */
788 #ifndef GL_NV_draw_buffers
789 #define GL_MAX_DRAW_BUFFERS_NV 0x8824
790 #define GL_DRAW_BUFFER0_NV 0x8825
791 #define GL_DRAW_BUFFER1_NV 0x8826
792 #define GL_DRAW_BUFFER2_NV 0x8827
793 #define GL_DRAW_BUFFER3_NV 0x8828
794 #define GL_DRAW_BUFFER4_NV 0x8829
795 #define GL_DRAW_BUFFER5_NV 0x882A
796 #define GL_DRAW_BUFFER6_NV 0x882B
797 #define GL_DRAW_BUFFER7_NV 0x882C
798 #define GL_DRAW_BUFFER8_NV 0x882D
799 #define GL_DRAW_BUFFER9_NV 0x882E
800 #define GL_DRAW_BUFFER10_NV 0x882F
801 #define GL_DRAW_BUFFER11_NV 0x8830
802 #define GL_DRAW_BUFFER12_NV 0x8831
803 #define GL_DRAW_BUFFER13_NV 0x8832
804 #define GL_DRAW_BUFFER14_NV 0x8833
805 #define GL_DRAW_BUFFER15_NV 0x8834
806 #define GL_COLOR_ATTACHMENT0_NV 0x8CE0
807 #define GL_COLOR_ATTACHMENT1_NV 0x8CE1
808 #define GL_COLOR_ATTACHMENT2_NV 0x8CE2
809 #define GL_COLOR_ATTACHMENT3_NV 0x8CE3
810 #define GL_COLOR_ATTACHMENT4_NV 0x8CE4
811 #define GL_COLOR_ATTACHMENT5_NV 0x8CE5
812 #define GL_COLOR_ATTACHMENT6_NV 0x8CE6
813 #define GL_COLOR_ATTACHMENT7_NV 0x8CE7
814 #define GL_COLOR_ATTACHMENT8_NV 0x8CE8
815 #define GL_COLOR_ATTACHMENT9_NV 0x8CE9
816 #define GL_COLOR_ATTACHMENT10_NV 0x8CEA
817 #define GL_COLOR_ATTACHMENT11_NV 0x8CEB
818 #define GL_COLOR_ATTACHMENT12_NV 0x8CEC
819 #define GL_COLOR_ATTACHMENT13_NV 0x8CED
820 #define GL_COLOR_ATTACHMENT14_NV 0x8CEE
821 #define GL_COLOR_ATTACHMENT15_NV 0x8CEF
822 #endif
823
824 /* GL_NV_draw_instanced */
825 /* No new tokens introduced by this extension. */
826
827 /* GL_NV_fbo_color_attachments */
828 #ifndef GL_NV_fbo_color_attachments
829 #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
830 /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
831 #endif
832
833 /* GL_NV_fence */
834 #ifndef GL_NV_fence
835 #define GL_ALL_COMPLETED_NV 0x84F2
836 #define GL_FENCE_STATUS_NV 0x84F3
837 #define GL_FENCE_CONDITION_NV 0x84F4
838 #endif
839
840 /* GL_NV_framebuffer_blit */
841 #ifndef GL_NV_framebuffer_blit
842 #define GL_READ_FRAMEBUFFER_NV 0x8CA8
843 #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
844 #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
845 #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
846 #endif
847
848 /* GL_NV_framebuffer_multisample */
849 #ifndef GL_NV_framebuffer_multisample
850 #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
851 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
852 #define GL_MAX_SAMPLES_NV 0x8D57
853 #endif
854
855 /* GL_NV_generate_mipmap_sRGB */
856 /* No new tokens introduced by this extension. */
857
858 /* GL_NV_instanced_arrays */
859 #ifndef GL_NV_instanced_arrays
860 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
861 #endif
862
863 /* GL_NV_read_buffer */
864 #ifndef GL_NV_read_buffer
865 #define GL_READ_BUFFER_NV 0x0C02
866 #endif
867
868 /* GL_NV_read_buffer_front */
869 /* No new tokens introduced by this extension. */
870
871 /* GL_NV_read_depth */
872 /* No new tokens introduced by this extension. */
873
874 /* GL_NV_read_depth_stencil */
875 /* No new tokens introduced by this extension. */
876
877 /* GL_NV_read_stencil */
878 /* No new tokens introduced by this extension. */
879
880 /* GL_NV_shadow_samplers_array */
881 #ifndef GL_NV_shadow_samplers_array
882 #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
883 #endif
884
885 /* GL_NV_shadow_samplers_cube */
886 #ifndef GL_NV_shadow_samplers_cube
887 #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
888 #endif
889
890 /* GL_NV_sRGB_formats */
891 #ifndef GL_NV_sRGB_formats
892 #define GL_SLUMINANCE_NV 0x8C46
893 #define GL_SLUMINANCE_ALPHA_NV 0x8C44
894 #define GL_SRGB8_NV 0x8C41
895 #define GL_SLUMINANCE8_NV 0x8C47
896 #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
897 #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
898 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
899 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
900 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
901 #define GL_ETC1_SRGB8_NV 0x88EE
902 #endif
903
904 /* GL_NV_texture_border_clamp */
905 #ifndef GL_NV_texture_border_clamp
906 #define GL_TEXTURE_BORDER_COLOR_NV 0x1004
907 #define GL_CLAMP_TO_BORDER_NV 0x812D
908 #endif
909
910 /* GL_NV_texture_compression_s3tc_update */
911 /* No new tokens introduced by this extension. */
912
913 /* GL_NV_texture_npot_2D_mipmap */
914 /* No new tokens introduced by this extension. */
915
916 /*------------------------------------------------------------------------*
917 * QCOM extension tokens
918 *------------------------------------------------------------------------*/
919
920 /* GL_QCOM_alpha_test */
921 #ifndef GL_QCOM_alpha_test
922 #define GL_ALPHA_TEST_QCOM 0x0BC0
923 #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
924 #define GL_ALPHA_TEST_REF_QCOM 0x0BC2
925 #endif
926
927 /* GL_QCOM_binning_control */
928 #ifndef GL_QCOM_binning_control
929 #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0
930 #define GL_CPU_OPTIMIZED_QCOM 0x8FB1
931 #define GL_GPU_OPTIMIZED_QCOM 0x8FB2
932 #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
933 #endif
934
935 /* GL_QCOM_driver_control */
936 /* No new tokens introduced by this extension. */
937
938 /* GL_QCOM_extended_get */
939 #ifndef GL_QCOM_extended_get
940 #define GL_TEXTURE_WIDTH_QCOM 0x8BD2
941 #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
942 #define GL_TEXTURE_DEPTH_QCOM 0x8BD4
943 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
944 #define GL_TEXTURE_FORMAT_QCOM 0x8BD6
945 #define GL_TEXTURE_TYPE_QCOM 0x8BD7
946 #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
947 #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
948 #define GL_TEXTURE_TARGET_QCOM 0x8BDA
949 #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
950 #define GL_STATE_RESTORE 0x8BDC
951 #endif
952
953 /* GL_QCOM_extended_get2 */
954 /* No new tokens introduced by this extension. */
955
956 /* GL_QCOM_perfmon_global_mode */
957 #ifndef GL_QCOM_perfmon_global_mode
958 #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
959 #endif
960
961 /* GL_QCOM_writeonly_rendering */
962 #ifndef GL_QCOM_writeonly_rendering
963 #define GL_WRITEONLY_RENDERING_QCOM 0x8823
964 #endif
965
966 /* GL_QCOM_tiled_rendering */
967 #ifndef GL_QCOM_tiled_rendering
968 #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
969 #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
970 #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
971 #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
972 #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
973 #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
974 #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
975 #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
976 #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
977 #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
978 #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
979 #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
980 #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
981 #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
982 #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
983 #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
984 #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
985 #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
986 #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
987 #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
988 #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
989 #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
990 #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
991 #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
992 #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
993 #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
994 #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
995 #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
996 #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
997 #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
998 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
999 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
1000 #endif
1001
1002 /*------------------------------------------------------------------------*
1003 * VIV extension tokens
1004 *------------------------------------------------------------------------*/
1005
1006 /* GL_VIV_shader_binary */
1007 #ifndef GL_VIV_shader_binary
1008 #define GL_SHADER_BINARY_VIV 0x8FC4
1009 #endif
1010
1011 /*------------------------------------------------------------------------*
1012 * End of extension tokens, start of corresponding extension functions
1013 *------------------------------------------------------------------------*/
1014
1015 /*------------------------------------------------------------------------*
1016 * OES extension functions
1017 *------------------------------------------------------------------------*/
1018
1019 /* GL_OES_compressed_ETC1_RGB8_texture */
1020 #ifndef GL_OES_compressed_ETC1_RGB8_texture
1021 #define GL_OES_compressed_ETC1_RGB8_texture 1
1022 #endif
1023
1024 /* GL_OES_compressed_paletted_texture */
1025 #ifndef GL_OES_compressed_paletted_texture
1026 #define GL_OES_compressed_paletted_texture 1
1027 #endif
1028
1029 /* GL_OES_depth24 */
1030 #ifndef GL_OES_depth24
1031 #define GL_OES_depth24 1
1032 #endif
1033
1034 /* GL_OES_depth32 */
1035 #ifndef GL_OES_depth32
1036 #define GL_OES_depth32 1
1037 #endif
1038
1039 /* GL_OES_depth_texture */
1040 #ifndef GL_OES_depth_texture
1041 #define GL_OES_depth_texture 1
1042 #endif
1043
1044 /* GL_OES_EGL_image */
1045 #ifndef GL_OES_EGL_image
1046 #define GL_OES_EGL_image 1
1047 #ifdef GL_GLEXT_PROTOTYPES
1048 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
1049 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
1050 #endif
1051 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
1052 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
1053 #endif
1054
1055 /* GL_OES_EGL_image_external */
1056 #ifndef GL_OES_EGL_image_external
1057 #define GL_OES_EGL_image_external 1
1058 /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
1059 #endif
1060
1061 /* GL_OES_element_index_uint */
1062 #ifndef GL_OES_element_index_uint
1063 #define GL_OES_element_index_uint 1
1064 #endif
1065
1066 /* GL_OES_fbo_render_mipmap */
1067 #ifndef GL_OES_fbo_render_mipmap
1068 #define GL_OES_fbo_render_mipmap 1
1069 #endif
1070
1071 /* GL_OES_fragment_precision_high */
1072 #ifndef GL_OES_fragment_precision_high
1073 #define GL_OES_fragment_precision_high 1
1074 #endif
1075
1076 /* GL_OES_get_program_binary */
1077 #ifndef GL_OES_get_program_binary
1078 #define GL_OES_get_program_binary 1
1079 #ifdef GL_GLEXT_PROTOTYPES
1080 GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1081 GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1082 #endif
1083 typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
1084 typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
1085 #endif
1086
1087 /* GL_OES_mapbuffer */
1088 #ifndef GL_OES_mapbuffer
1089 #define GL_OES_mapbuffer 1
1090 #ifdef GL_GLEXT_PROTOTYPES
1091 GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
1092 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
1093 GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);
1094 #endif
1095 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
1096 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
1097 typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);
1098 #endif
1099
1100 /* GL_OES_packed_depth_stencil */
1101 #ifndef GL_OES_packed_depth_stencil
1102 #define GL_OES_packed_depth_stencil 1
1103 #endif
1104
1105 /* GL_OES_required_internalformat */
1106 #ifndef GL_OES_required_internalformat
1107 #define GL_OES_required_internalformat 1
1108 #endif
1109
1110 /* GL_OES_rgb8_rgba8 */
1111 #ifndef GL_OES_rgb8_rgba8
1112 #define GL_OES_rgb8_rgba8 1
1113 #endif
1114
1115 /* GL_OES_standard_derivatives */
1116 #ifndef GL_OES_standard_derivatives
1117 #define GL_OES_standard_derivatives 1
1118 #endif
1119
1120 /* GL_OES_stencil1 */
1121 #ifndef GL_OES_stencil1
1122 #define GL_OES_stencil1 1
1123 #endif
1124
1125 /* GL_OES_stencil4 */
1126 #ifndef GL_OES_stencil4
1127 #define GL_OES_stencil4 1
1128 #endif
1129
1130 #ifndef GL_OES_surfaceless_context
1131 #define GL_OES_surfaceless_context 1
1132 #endif
1133
1134 /* GL_OES_texture_3D */
1135 #ifndef GL_OES_texture_3D
1136 #define GL_OES_texture_3D 1
1137 #ifdef GL_GLEXT_PROTOTYPES
1138 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);
1139 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);
1140 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1141 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);
1142 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);
1143 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1144 #endif
1145 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);
1146 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);
1147 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1148 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
1149 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);
1150 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1151 #endif
1152
1153 /* GL_OES_texture_float */
1154 #ifndef GL_OES_texture_float
1155 #define GL_OES_texture_float 1
1156 #endif
1157
1158 /* GL_OES_texture_float_linear */
1159 #ifndef GL_OES_texture_float_linear
1160 #define GL_OES_texture_float_linear 1
1161 #endif
1162
1163 /* GL_OES_texture_half_float */
1164 #ifndef GL_OES_texture_half_float
1165 #define GL_OES_texture_half_float 1
1166 #endif
1167
1168 /* GL_OES_texture_half_float_linear */
1169 #ifndef GL_OES_texture_half_float_linear
1170 #define GL_OES_texture_half_float_linear 1
1171 #endif
1172
1173 /* GL_OES_texture_npot */
1174 #ifndef GL_OES_texture_npot
1175 #define GL_OES_texture_npot 1
1176 #endif
1177
1178 /* GL_OES_vertex_array_object */
1179 #ifndef GL_OES_vertex_array_object
1180 #define GL_OES_vertex_array_object 1
1181 #ifdef GL_GLEXT_PROTOTYPES
1182 GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
1183 GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
1184 GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
1185 GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
1186 #endif
1187 typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
1188 typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
1189 typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
1190 typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
1191 #endif
1192
1193 /* GL_OES_vertex_half_float */
1194 #ifndef GL_OES_vertex_half_float
1195 #define GL_OES_vertex_half_float 1
1196 #endif
1197
1198 /* GL_OES_vertex_type_10_10_10_2 */
1199 #ifndef GL_OES_vertex_type_10_10_10_2
1200 #define GL_OES_vertex_type_10_10_10_2 1
1201 #endif
1202
1203 /*------------------------------------------------------------------------*
1204 * KHR extension functions
1205 *------------------------------------------------------------------------*/
1206
1207 #ifndef GL_KHR_debug
1208 #define GL_KHR_debug 1
1209 #ifdef GL_GLEXT_PROTOTYPES
1210 GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1211 GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1212 GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
1213 GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1214 GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1215 GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
1216 GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1217 GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1218 GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
1219 GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1220 GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);
1221 #endif
1222 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
1223 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
1224 typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
1225 typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
1226 typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
1227 typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
1228 typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
1229 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
1230 typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
1231 typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
1232 typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);
1233 #endif
1234
1235 #ifndef GL_KHR_texture_compression_astc_ldr
1236 #define GL_KHR_texture_compression_astc_ldr 1
1237 #endif
1238
1239
1240 /*------------------------------------------------------------------------*
1241 * AMD extension functions
1242 *------------------------------------------------------------------------*/
1243
1244 /* GL_AMD_compressed_3DC_texture */
1245 #ifndef GL_AMD_compressed_3DC_texture
1246 #define GL_AMD_compressed_3DC_texture 1
1247 #endif
1248
1249 /* GL_AMD_compressed_ATC_texture */
1250 #ifndef GL_AMD_compressed_ATC_texture
1251 #define GL_AMD_compressed_ATC_texture 1
1252 #endif
1253
1254 /* AMD_performance_monitor */
1255 #ifndef GL_AMD_performance_monitor
1256 #define GL_AMD_performance_monitor 1
1257 #ifdef GL_GLEXT_PROTOTYPES
1258 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1259 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1260 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1261 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1262 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1263 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
1264 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
1265 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1266 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
1267 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
1268 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1269 #endif
1270 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
1271 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
1272 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
1273 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
1274 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
1275 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1276 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
1277 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
1278 typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
1279 typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
1280 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
1281 #endif
1282
1283 /* GL_AMD_program_binary_Z400 */
1284 #ifndef GL_AMD_program_binary_Z400
1285 #define GL_AMD_program_binary_Z400 1
1286 #endif
1287
1288 /*------------------------------------------------------------------------*
1289 * ANGLE extension functions
1290 *------------------------------------------------------------------------*/
1291
1292 /* GL_ANGLE_depth_texture */
1293 #ifndef GL_ANGLE_depth_texture
1294 #define GL_ANGLE_depth_texture 1
1295 #endif
1296
1297 /* GL_ANGLE_framebuffer_blit */
1298 #ifndef GL_ANGLE_framebuffer_blit
1299 #define GL_ANGLE_framebuffer_blit 1
1300 #ifdef GL_GLEXT_PROTOTYPES
1301 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);
1302 #endif
1303 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);
1304 #endif
1305
1306 /* GL_ANGLE_framebuffer_multisample */
1307 #ifndef GL_ANGLE_framebuffer_multisample
1308 #define GL_ANGLE_framebuffer_multisample 1
1309 #ifdef GL_GLEXT_PROTOTYPES
1310 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1311 #endif
1312 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1313 #endif
1314
1315 #ifndef GL_ANGLE_instanced_arrays
1316 #define GL_ANGLE_instanced_arrays 1
1317 #ifdef GL_GLEXT_PROTOTYPES
1318 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1319 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1320 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
1321 #endif
1322 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1323 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
1324 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
1325 #endif
1326
1327 /* GL_ANGLE_pack_reverse_row_order */
1328 #ifndef GL_ANGLE_pack_reverse_row_order
1329 #define GL_ANGLE_pack_reverse_row_order 1
1330 #endif
1331
1332 /* GL_ANGLE_program_binary */
1333 #ifndef GL_ANGLE_program_binary
1334 #define GL_ANGLE_program_binary 1
1335 #endif
1336
1337 /* GL_ANGLE_texture_compression_dxt3 */
1338 #ifndef GL_ANGLE_texture_compression_dxt3
1339 #define GL_ANGLE_texture_compression_dxt3 1
1340 #endif
1341
1342 /* GL_ANGLE_texture_compression_dxt5 */
1343 #ifndef GL_ANGLE_texture_compression_dxt5
1344 #define GL_ANGLE_texture_compression_dxt5 1
1345 #endif
1346
1347 /* GL_ANGLE_texture_usage */
1348 #ifndef GL_ANGLE_texture_usage
1349 #define GL_ANGLE_texture_usage 1
1350 #endif
1351
1352 #ifndef GL_ANGLE_translated_shader_source
1353 #define GL_ANGLE_translated_shader_source 1
1354 #ifdef GL_GLEXT_PROTOTYPES
1355 GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1356 #endif
1357 typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
1358 #endif
1359
1360 /*------------------------------------------------------------------------*
1361 * APPLE extension functions
1362 *------------------------------------------------------------------------*/
1363
1364 /* GL_APPLE_copy_texture_levels */
1365 #ifndef GL_APPLE_copy_texture_levels
1366 #define GL_APPLE_copy_texture_levels 1
1367 #ifdef GL_GLEXT_PROTOTYPES
1368 GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1369 #endif
1370 typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
1371 #endif
1372
1373 /* GL_APPLE_framebuffer_multisample */
1374 #ifndef GL_APPLE_framebuffer_multisample
1375 #define GL_APPLE_framebuffer_multisample 1
1376 #ifdef GL_GLEXT_PROTOTYPES
1377 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1378 GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
1379 #endif /* GL_GLEXT_PROTOTYPES */
1380 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1381 typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
1382 #endif
1383
1384 /* GL_APPLE_rgb_422 */
1385 #ifndef GL_APPLE_rgb_422
1386 #define GL_APPLE_rgb_422 1
1387 #endif
1388
1389 /* GL_APPLE_sync */
1390 #ifndef GL_APPLE_sync
1391 #define GL_APPLE_sync 1
1392 #ifdef GL_GLEXT_PROTOTYPES
1393 GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
1394 GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
1395 GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
1396 GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1397 GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
1398 GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
1399 GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1400 #endif
1401 typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
1402 typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
1403 typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
1404 typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1405 typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
1406 typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
1407 typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
1408 #endif
1409
1410 /* GL_APPLE_texture_format_BGRA8888 */
1411 #ifndef GL_APPLE_texture_format_BGRA8888
1412 #define GL_APPLE_texture_format_BGRA8888 1
1413 #endif
1414
1415 /* GL_APPLE_texture_max_level */
1416 #ifndef GL_APPLE_texture_max_level
1417 #define GL_APPLE_texture_max_level 1
1418 #endif
1419
1420 /*------------------------------------------------------------------------*
1421 * ARM extension functions
1422 *------------------------------------------------------------------------*/
1423
1424 /* GL_ARM_mali_program_binary */
1425 #ifndef GL_ARM_mali_program_binary
1426 #define GL_ARM_mali_program_binary 1
1427 #endif
1428
1429 /* GL_ARM_mali_shader_binary */
1430 #ifndef GL_ARM_mali_shader_binary
1431 #define GL_ARM_mali_shader_binary 1
1432 #endif
1433
1434 /* GL_ARM_rgba8 */
1435 #ifndef GL_ARM_rgba8
1436 #define GL_ARM_rgba8 1
1437 #endif
1438
1439 /*------------------------------------------------------------------------*
1440 * EXT extension functions
1441 *------------------------------------------------------------------------*/
1442
1443 /* GL_EXT_blend_minmax */
1444 #ifndef GL_EXT_blend_minmax
1445 #define GL_EXT_blend_minmax 1
1446 #endif
1447
1448 /* GL_EXT_color_buffer_half_float */
1449 #ifndef GL_EXT_color_buffer_half_float
1450 #define GL_EXT_color_buffer_half_float 1
1451 #endif
1452
1453 /* GL_EXT_debug_label */
1454 #ifndef GL_EXT_debug_label
1455 #define GL_EXT_debug_label 1
1456 #ifdef GL_GLEXT_PROTOTYPES
1457 GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1458 GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1459 #endif
1460 typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
1461 typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
1462 #endif
1463
1464 /* GL_EXT_debug_marker */
1465 #ifndef GL_EXT_debug_marker
1466 #define GL_EXT_debug_marker 1
1467 #ifdef GL_GLEXT_PROTOTYPES
1468 GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
1469 GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
1470 GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
1471 #endif
1472 typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1473 typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
1474 typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
1475 #endif
1476
1477 /* GL_EXT_discard_framebuffer */
1478 #ifndef GL_EXT_discard_framebuffer
1479 #define GL_EXT_discard_framebuffer 1
1480 #ifdef GL_GLEXT_PROTOTYPES
1481 GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1482 #endif
1483 typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
1484 #endif
1485
1486 #ifndef GL_EXT_disjoint_timer_query
1487 #define GL_EXT_disjoint_timer_query 1
1488 #ifdef GL_GLEXT_PROTOTYPES
1489 GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
1490 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
1491 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
1492 GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
1493 GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
1494 GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
1495 GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
1496 GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
1497 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
1498 GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
1499 GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
1500 #endif
1501 typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
1502 typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
1503 typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
1504 typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
1505 typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
1506 typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
1507 typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
1508 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
1509 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
1510 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
1511 typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
1512 #endif /* GL_EXT_disjoint_timer_query */
1513
1514 #ifndef GL_EXT_draw_buffers
1515 #define GL_EXT_draw_buffers 1
1516 #ifdef GL_GLEXT_PROTOTYPES
1517 GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
1518 #endif
1519 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
1520 #endif /* GL_EXT_draw_buffers */
1521
1522 /* GL_EXT_map_buffer_range */
1523 #ifndef GL_EXT_map_buffer_range
1524 #define GL_EXT_map_buffer_range 1
1525 #ifdef GL_GLEXT_PROTOTYPES
1526 GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1527 GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
1528 #endif
1529 typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
1530 typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
1531 #endif
1532
1533 /* GL_EXT_multisampled_render_to_texture */
1534 #ifndef GL_EXT_multisampled_render_to_texture
1535 #define GL_EXT_multisampled_render_to_texture 1
1536 #ifdef GL_GLEXT_PROTOTYPES
1537 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1538 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1539 #endif
1540 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1541 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1542 #endif
1543
1544 /* GL_EXT_multiview_draw_buffers */
1545 #ifndef GL_EXT_multiview_draw_buffers
1546 #define GL_EXT_multiview_draw_buffers 1
1547 #ifdef GL_GLEXT_PROTOTYPES
1548 GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
1549 GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
1550 GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
1551 #endif
1552 typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
1553 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
1554 typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
1555 #endif
1556
1557 #ifndef GL_EXT_multi_draw_arrays
1558 #define GL_EXT_multi_draw_arrays 1
1559 #ifdef GL_GLEXT_PROTOTYPES
1560 GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1561 GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1562 #endif /* GL_GLEXT_PROTOTYPES */
1563 typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
1564 typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
1565 #endif
1566
1567 /* GL_EXT_occlusion_query_boolean */
1568 #ifndef GL_EXT_occlusion_query_boolean
1569 #define GL_EXT_occlusion_query_boolean 1
1570 /* All entry points also exist in GL_EXT_disjoint_timer_query */
1571 #endif
1572
1573 /* GL_EXT_read_format_bgra */
1574 #ifndef GL_EXT_read_format_bgra
1575 #define GL_EXT_read_format_bgra 1
1576 #endif
1577
1578 /* GL_EXT_robustness */
1579 #ifndef GL_EXT_robustness
1580 #define GL_EXT_robustness 1
1581 #ifdef GL_GLEXT_PROTOTYPES
1582 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
1583 GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1584 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1585 GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1586 #endif
1587 typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
1588 typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
1589 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
1590 typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
1591 #endif
1592
1593 /* GL_EXT_separate_shader_objects */
1594 #ifndef GL_EXT_separate_shader_objects
1595 #define GL_EXT_separate_shader_objects 1
1596 #ifdef GL_GLEXT_PROTOTYPES
1597 GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
1598 GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
1599 GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
1600 GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
1601 GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
1602 GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
1603 GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
1604 GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
1605 GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
1606 GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
1607 GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
1608 GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
1609 GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1610 GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
1611 GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
1612 GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1613 GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1614 GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1615 GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1616 GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1617 GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
1618 GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1619 GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1620 GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1621 GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1622 GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1623 GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1624 GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1625 GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
1626 GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1627 #endif
1628 typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
1629 typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
1630 typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
1631 typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1632 typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
1633 typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
1634 typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1635 typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
1636 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
1637 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
1638 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
1639 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
1640 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
1641 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
1642 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
1643 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
1644 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1645 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1646 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1647 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1648 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
1649 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1650 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1651 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1652 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
1653 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1654 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1655 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
1656 typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
1657 typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
1658 #endif
1659
1660 /* GL_EXT_shader_framebuffer_fetch */
1661 #ifndef GL_EXT_shader_framebuffer_fetch
1662 #define GL_EXT_shader_framebuffer_fetch 1
1663 #endif
1664
1665 /* GL_EXT_shader_texture_lod */
1666 #ifndef GL_EXT_shader_texture_lod
1667 #define GL_EXT_shader_texture_lod 1
1668 #endif
1669
1670 /* GL_EXT_shadow_samplers */
1671 #ifndef GL_EXT_shadow_samplers
1672 #define GL_EXT_shadow_samplers 1
1673 #endif
1674
1675 /* GL_EXT_sRGB */
1676 #ifndef GL_EXT_sRGB
1677 #define GL_EXT_sRGB 1
1678 #endif
1679
1680 /* GL_EXT_texture_compression_dxt1 */
1681 #ifndef GL_EXT_texture_compression_dxt1
1682 #define GL_EXT_texture_compression_dxt1 1
1683 #endif
1684
1685 /* GL_EXT_texture_filter_anisotropic */
1686 #ifndef GL_EXT_texture_filter_anisotropic
1687 #define GL_EXT_texture_filter_anisotropic 1
1688 #endif
1689
1690 /* GL_EXT_texture_format_BGRA8888 */
1691 #ifndef GL_EXT_texture_format_BGRA8888
1692 #define GL_EXT_texture_format_BGRA8888 1
1693 #endif
1694
1695 /* GL_EXT_texture_rg */
1696 #ifndef GL_EXT_texture_rg
1697 #define GL_EXT_texture_rg 1
1698 #endif
1699
1700 /* GL_EXT_texture_storage */
1701 #ifndef GL_EXT_texture_storage
1702 #define GL_EXT_texture_storage 1
1703 #ifdef GL_GLEXT_PROTOTYPES
1704 GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1705 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1706 GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1707 GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1708 GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1709 GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1710 #endif
1711 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1712 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1713 typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1714 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
1715 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
1716 typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
1717 #endif
1718
1719 /* GL_EXT_texture_type_2_10_10_10_REV */
1720 #ifndef GL_EXT_texture_type_2_10_10_10_REV
1721 #define GL_EXT_texture_type_2_10_10_10_REV 1
1722 #endif
1723
1724 /* GL_EXT_unpack_subimage */
1725 #ifndef GL_EXT_unpack_subimage
1726 #define GL_EXT_unpack_subimage 1
1727 #endif
1728
1729 /*------------------------------------------------------------------------*
1730 * DMP extension functions
1731 *------------------------------------------------------------------------*/
1732
1733 /* GL_DMP_shader_binary */
1734 #ifndef GL_DMP_shader_binary
1735 #define GL_DMP_shader_binary 1
1736 #endif
1737
1738 /*------------------------------------------------------------------------*
1739 * FJ extension functions
1740 *------------------------------------------------------------------------*/
1741
1742 /* GL_FJ_shader_binary_GCCSO */
1743 #ifndef GL_FJ_shader_binary_GCCSO
1744 #define GL_FJ_shader_binary_GCCSO 1
1745 #endif
1746
1747 /*------------------------------------------------------------------------*
1748 * IMG extension functions
1749 *------------------------------------------------------------------------*/
1750
1751 /* GL_IMG_program_binary */
1752 #ifndef GL_IMG_program_binary
1753 #define GL_IMG_program_binary 1
1754 #endif
1755
1756 /* GL_IMG_read_format */
1757 #ifndef GL_IMG_read_format
1758 #define GL_IMG_read_format 1
1759 #endif
1760
1761 /* GL_IMG_shader_binary */
1762 #ifndef GL_IMG_shader_binary
1763 #define GL_IMG_shader_binary 1
1764 #endif
1765
1766 /* GL_IMG_texture_compression_pvrtc */
1767 #ifndef GL_IMG_texture_compression_pvrtc
1768 #define GL_IMG_texture_compression_pvrtc 1
1769 #endif
1770
1771 /* GL_IMG_texture_compression_pvrtc2 */
1772 #ifndef GL_IMG_texture_compression_pvrtc2
1773 #define GL_IMG_texture_compression_pvrtc2 1
1774 #endif
1775
1776 /* GL_IMG_multisampled_render_to_texture */
1777 #ifndef GL_IMG_multisampled_render_to_texture
1778 #define GL_IMG_multisampled_render_to_texture 1
1779 #ifdef GL_GLEXT_PROTOTYPES
1780 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1781 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1782 #endif
1783 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1784 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
1785 #endif
1786
1787 /*------------------------------------------------------------------------*
1788 * NV extension functions
1789 *------------------------------------------------------------------------*/
1790
1791 /* GL_NV_coverage_sample */
1792 #ifndef GL_NV_coverage_sample
1793 #define GL_NV_coverage_sample 1
1794 #ifdef GL_GLEXT_PROTOTYPES
1795 GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
1796 GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
1797 #endif
1798 typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
1799 typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
1800 #endif
1801
1802 /* GL_NV_depth_nonlinear */
1803 #ifndef GL_NV_depth_nonlinear
1804 #define GL_NV_depth_nonlinear 1
1805 #endif
1806
1807 /* GL_NV_draw_buffers */
1808 #ifndef GL_NV_draw_buffers
1809 #define GL_NV_draw_buffers 1
1810 #ifdef GL_GLEXT_PROTOTYPES
1811 GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
1812 #endif
1813 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
1814 #endif
1815
1816 /* GL_NV_draw_instanced */
1817 #ifndef GL_NV_draw_instanced
1818 #define GL_NV_draw_instanced 1
1819 #ifdef GL_GLEXT_PROTOTYPES
1820 GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1821 GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1822 #endif
1823 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
1824 typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
1825 #endif
1826
1827 /* GL_NV_fbo_color_attachments */
1828 #ifndef GL_NV_fbo_color_attachments
1829 #define GL_NV_fbo_color_attachments 1
1830 #endif
1831
1832 /* GL_NV_fence */
1833 #ifndef GL_NV_fence
1834 #define GL_NV_fence 1
1835 #ifdef GL_GLEXT_PROTOTYPES
1836 GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
1837 GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
1838 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
1839 GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
1840 GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
1841 GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
1842 GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
1843 #endif
1844 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
1845 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
1846 typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
1847 typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
1848 typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
1849 typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
1850 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
1851 #endif
1852
1853 /* GL_NV_framebuffer_blit */
1854 #ifndef GL_NV_framebuffer_blit
1855 #define GL_NV_framebuffer_blit 1
1856 #ifdef GL_GLEXT_PROTOTYPES
1857 GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1858 #endif
1859 typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
1860 #endif
1861
1862 /* GL_NV_framebuffer_multisample */
1863 #ifndef GL_NV_framebuffer_multisample
1864 #define GL_NV_framebuffer_multisample 1
1865 #ifdef GL_GLEXT_PROTOTYPES
1866 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1867 #endif
1868 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
1869 #endif
1870
1871 /* GL_NV_generate_mipmap_sRGB */
1872 #ifndef GL_NV_generate_mipmap_sRGB
1873 #define GL_NV_generate_mipmap_sRGB 1
1874 #endif
1875
1876 /* GL_NV_instanced_arrays */
1877 #ifndef GL_NV_instanced_arrays
1878 #define GL_NV_instanced_arrays 1
1879 #ifdef GL_GLEXT_PROTOTYPES
1880 GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
1881 #endif
1882 typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
1883 #endif
1884
1885 /* GL_NV_read_buffer */
1886 #ifndef GL_NV_read_buffer
1887 #define GL_NV_read_buffer 1
1888 #ifdef GL_GLEXT_PROTOTYPES
1889 GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
1890 #endif
1891 typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
1892 #endif
1893
1894 /* GL_NV_read_buffer_front */
1895 #ifndef GL_NV_read_buffer_front
1896 #define GL_NV_read_buffer_front 1
1897 #endif
1898
1899 /* GL_NV_read_depth */
1900 #ifndef GL_NV_read_depth
1901 #define GL_NV_read_depth 1
1902 #endif
1903
1904 /* GL_NV_read_depth_stencil */
1905 #ifndef GL_NV_read_depth_stencil
1906 #define GL_NV_read_depth_stencil 1
1907 #endif
1908
1909 /* GL_NV_read_stencil */
1910 #ifndef GL_NV_read_stencil
1911 #define GL_NV_read_stencil 1
1912 #endif
1913
1914 /* GL_NV_shadow_samplers_array */
1915 #ifndef GL_NV_shadow_samplers_array
1916 #define GL_NV_shadow_samplers_array 1
1917 #endif
1918
1919 /* GL_NV_shadow_samplers_cube */
1920 #ifndef GL_NV_shadow_samplers_cube
1921 #define GL_NV_shadow_samplers_cube 1
1922 #endif
1923
1924 /* GL_NV_sRGB_formats */
1925 #ifndef GL_NV_sRGB_formats
1926 #define GL_NV_sRGB_formats 1
1927 #endif
1928
1929 /* GL_NV_texture_border_clamp */
1930 #ifndef GL_NV_texture_border_clamp
1931 #define GL_NV_texture_border_clamp 1
1932 #endif
1933
1934 /* GL_NV_texture_compression_s3tc_update */
1935 #ifndef GL_NV_texture_compression_s3tc_update
1936 #define GL_NV_texture_compression_s3tc_update 1
1937 #endif
1938
1939 /* GL_NV_texture_npot_2D_mipmap */
1940 #ifndef GL_NV_texture_npot_2D_mipmap
1941 #define GL_NV_texture_npot_2D_mipmap 1
1942 #endif
1943
1944 /*------------------------------------------------------------------------*
1945 * QCOM extension functions
1946 *------------------------------------------------------------------------*/
1947
1948 /* GL_QCOM_alpha_test */
1949 #ifndef GL_QCOM_alpha_test
1950 #define GL_QCOM_alpha_test 1
1951 #ifdef GL_GLEXT_PROTOTYPES
1952 GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
1953 #endif
1954 typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
1955 #endif
1956
1957 /* GL_QCOM_binning_control */
1958 #ifndef GL_QCOM_binning_control
1959 #define GL_QCOM_binning_control 1
1960 #endif
1961
1962 /* GL_QCOM_driver_control */
1963 #ifndef GL_QCOM_driver_control
1964 #define GL_QCOM_driver_control 1
1965 #ifdef GL_GLEXT_PROTOTYPES
1966 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
1967 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1968 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
1969 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
1970 #endif
1971 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
1972 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
1973 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1974 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
1975 #endif
1976
1977 /* GL_QCOM_extended_get */
1978 #ifndef GL_QCOM_extended_get
1979 #define GL_QCOM_extended_get 1
1980 #ifdef GL_GLEXT_PROTOTYPES
1981 GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
1982 GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1983 GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1984 GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1985 GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1986 GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
1987 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);
1988 GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
1989 #endif
1990 typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
1991 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
1992 typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
1993 typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
1994 typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
1995 typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
1996 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);
1997 typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
1998 #endif
1999
2000 /* GL_QCOM_extended_get2 */
2001 #ifndef GL_QCOM_extended_get2
2002 #define GL_QCOM_extended_get2 1
2003 #ifdef GL_GLEXT_PROTOTYPES
2004 GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2005 GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2006 GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
2007 GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2008 #endif
2009 typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
2010 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
2011 typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
2012 typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
2013 #endif
2014
2015 /* GL_QCOM_perfmon_global_mode */
2016 #ifndef GL_QCOM_perfmon_global_mode
2017 #define GL_QCOM_perfmon_global_mode 1
2018 #endif
2019
2020 /* GL_QCOM_writeonly_rendering */
2021 #ifndef GL_QCOM_writeonly_rendering
2022 #define GL_QCOM_writeonly_rendering 1
2023 #endif
2024
2025 /* GL_QCOM_tiled_rendering */
2026 #ifndef GL_QCOM_tiled_rendering
2027 #define GL_QCOM_tiled_rendering 1
2028 #ifdef GL_GLEXT_PROTOTYPES
2029 GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2030 GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
2031 #endif
2032 typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
2033 typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
2034 #endif
2035
2036 /*------------------------------------------------------------------------*
2037 * VIV extension tokens
2038 *------------------------------------------------------------------------*/
2039
2040 /* GL_VIV_shader_binary */
2041 #ifndef GL_VIV_shader_binary
2042 #define GL_VIV_shader_binary 1
2043 #endif
2044
2045 #ifdef __cplusplus
2046 }
2047 #endif
2048
2049 #endif /* __gl2ext_h_ */
0 #ifndef __gl2platform_h_
1 #define __gl2platform_h_
2
3 /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
4
5 /*
6 * This document is licensed under the SGI Free Software B License Version
7 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
8 */
9
10 /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
11 *
12 * Adopters may modify khrplatform.h and this file to suit their platform.
13 * You are encouraged to submit all modifications to the Khronos group so that
14 * they can be included in future versions of this file. Please submit changes
15 * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
16 * by filing a bug against product "OpenGL-ES" component "Registry".
17 */
18
19 /*#include <KHR/khrplatform.h>*/
20
21 #ifndef GL_APICALL
22 #define GL_APICALL KHRONOS_APICALL
23 #endif
24
25 #ifndef GL_APIENTRY
26 #define GL_APIENTRY KHRONOS_APIENTRY
27 #endif
28
29 #endif /* __gl2platform_h_ */
0 #ifndef __khrplatform_h_
1 #define __khrplatform_h_
2
3 /*
4 ** Copyright (c) 2008-2009 The Khronos Group Inc.
5 **
6 ** Permission is hereby granted, free of charge, to any person obtaining a
7 ** copy of this software and/or associated documentation files (the
8 ** "Materials"), to deal in the Materials without restriction, including
9 ** without limitation the rights to use, copy, modify, merge, publish,
10 ** distribute, sublicense, and/or sell copies of the Materials, and to
11 ** permit persons to whom the Materials are furnished to do so, subject to
12 ** the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included
15 ** in all copies or substantial portions of the Materials.
16 **
17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25
26 /* Khronos platform-specific types and definitions.
27 *
28 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
29 *
30 * Adopters may modify this file to suit their platform. Adopters are
31 * encouraged to submit platform specific modifications to the Khronos
32 * group so that they can be included in future versions of this file.
33 * Please submit changes by sending them to the public Khronos Bugzilla
34 * (http://khronos.org/bugzilla) by filing a bug against product
35 * "Khronos (general)" component "Registry".
36 *
37 * A predefined template which fills in some of the bug fields can be
38 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
39 * must create a Bugzilla login first.
40 *
41 *
42 * See the Implementer's Guidelines for information about where this file
43 * should be located on your system and for more details of its use:
44 * http://www.khronos.org/registry/implementers_guide.pdf
45 *
46 * This file should be included as
47 * #include <KHR/khrplatform.h>
48 * by Khronos client API header files that use its types and defines.
49 *
50 * The types in khrplatform.h should only be used to define API-specific types.
51 *
52 * Types defined in khrplatform.h:
53 * khronos_int8_t signed 8 bit
54 * khronos_uint8_t unsigned 8 bit
55 * khronos_int16_t signed 16 bit
56 * khronos_uint16_t unsigned 16 bit
57 * khronos_int32_t signed 32 bit
58 * khronos_uint32_t unsigned 32 bit
59 * khronos_int64_t signed 64 bit
60 * khronos_uint64_t unsigned 64 bit
61 * khronos_intptr_t signed same number of bits as a pointer
62 * khronos_uintptr_t unsigned same number of bits as a pointer
63 * khronos_ssize_t signed size
64 * khronos_usize_t unsigned size
65 * khronos_float_t signed 32 bit floating point
66 * khronos_time_ns_t unsigned 64 bit time in nanoseconds
67 * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
68 * nanoseconds
69 * khronos_stime_nanoseconds_t signed time interval in nanoseconds
70 * khronos_boolean_enum_t enumerated boolean type. This should
71 * only be used as a base type when a client API's boolean type is
72 * an enum. Client APIs which use an integer or other type for
73 * booleans cannot use this as the base type for their boolean.
74 *
75 * Tokens defined in khrplatform.h:
76 *
77 * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
78 *
79 * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
80 * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
81 *
82 * Calling convention macros defined in this file:
83 * KHRONOS_APICALL
84 * KHRONOS_APIENTRY
85 * KHRONOS_APIATTRIBUTES
86 *
87 * These may be used in function prototypes as:
88 *
89 * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
90 * int arg1,
91 * int arg2) KHRONOS_APIATTRIBUTES;
92 */
93
94 /*-------------------------------------------------------------------------
95 * Definition of KHRONOS_APICALL
96 *-------------------------------------------------------------------------
97 * This precedes the return type of the function in the function prototype.
98 */
99 #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
100 # define KHRONOS_APICALL __declspec(dllimport)
101 #elif defined (__SYMBIAN32__)
102 # define KHRONOS_APICALL IMPORT_C
103 #else
104 # define KHRONOS_APICALL
105 #endif
106
107 /*-------------------------------------------------------------------------
108 * Definition of KHRONOS_APIENTRY
109 *-------------------------------------------------------------------------
110 * This follows the return type of the function and precedes the function
111 * name in the function prototype.
112 */
113 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
114 /* Win32 but not WinCE */
115 # define KHRONOS_APIENTRY __stdcall
116 #else
117 # define KHRONOS_APIENTRY
118 #endif
119
120 /*-------------------------------------------------------------------------
121 * Definition of KHRONOS_APIATTRIBUTES
122 *-------------------------------------------------------------------------
123 * This follows the closing parenthesis of the function prototype arguments.
124 */
125 #if defined (__ARMCC_2__)
126 #define KHRONOS_APIATTRIBUTES __softfp
127 #else
128 #define KHRONOS_APIATTRIBUTES
129 #endif
130
131 /*-------------------------------------------------------------------------
132 * basic type definitions
133 *-----------------------------------------------------------------------*/
134 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
135
136
137 /*
138 * Using <stdint.h>
139 */
140 #include <stdint.h>
141 typedef int32_t khronos_int32_t;
142 typedef uint32_t khronos_uint32_t;
143 typedef int64_t khronos_int64_t;
144 typedef uint64_t khronos_uint64_t;
145 #define KHRONOS_SUPPORT_INT64 1
146 #define KHRONOS_SUPPORT_FLOAT 1
147
148 #elif defined(__VMS ) || defined(__sgi)
149
150 /*
151 * Using <inttypes.h>
152 */
153 #include <inttypes.h>
154 typedef int32_t khronos_int32_t;
155 typedef uint32_t khronos_uint32_t;
156 typedef int64_t khronos_int64_t;
157 typedef uint64_t khronos_uint64_t;
158 #define KHRONOS_SUPPORT_INT64 1
159 #define KHRONOS_SUPPORT_FLOAT 1
160
161 #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
162
163 /*
164 * Win32
165 */
166 typedef __int32 khronos_int32_t;
167 typedef unsigned __int32 khronos_uint32_t;
168 typedef __int64 khronos_int64_t;
169 typedef unsigned __int64 khronos_uint64_t;
170 #define KHRONOS_SUPPORT_INT64 1
171 #define KHRONOS_SUPPORT_FLOAT 1
172
173 #elif defined(__sun__) || defined(__digital__)
174
175 /*
176 * Sun or Digital
177 */
178 typedef int khronos_int32_t;
179 typedef unsigned int khronos_uint32_t;
180 #if defined(__arch64__) || defined(_LP64)
181 typedef long int khronos_int64_t;
182 typedef unsigned long int khronos_uint64_t;
183 #else
184 typedef long long int khronos_int64_t;
185 typedef unsigned long long int khronos_uint64_t;
186 #endif /* __arch64__ */
187 #define KHRONOS_SUPPORT_INT64 1
188 #define KHRONOS_SUPPORT_FLOAT 1
189
190 #elif 0
191
192 /*
193 * Hypothetical platform with no float or int64 support
194 */
195 typedef int khronos_int32_t;
196 typedef unsigned int khronos_uint32_t;
197 #define KHRONOS_SUPPORT_INT64 0
198 #define KHRONOS_SUPPORT_FLOAT 0
199
200 #else
201
202 /*
203 * Generic fallback
204 */
205 #include <stdint.h>
206 typedef int32_t khronos_int32_t;
207 typedef uint32_t khronos_uint32_t;
208 typedef int64_t khronos_int64_t;
209 typedef uint64_t khronos_uint64_t;
210 #define KHRONOS_SUPPORT_INT64 1
211 #define KHRONOS_SUPPORT_FLOAT 1
212
213 #endif
214
215
216 /*
217 * Types that are (so far) the same on all platforms
218 */
219 typedef signed char khronos_int8_t;
220 typedef unsigned char khronos_uint8_t;
221 typedef signed short int khronos_int16_t;
222 typedef unsigned short int khronos_uint16_t;
223
224 /*
225 * Types that differ between LLP64 and LP64 architectures - in LLP64,
226 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
227 * to be the only LLP64 architecture in current use.
228 */
229 #ifdef _WIN64
230 typedef signed long long int khronos_intptr_t;
231 typedef unsigned long long int khronos_uintptr_t;
232 typedef signed long long int khronos_ssize_t;
233 typedef unsigned long long int khronos_usize_t;
234 #else
235 typedef signed long int khronos_intptr_t;
236 typedef unsigned long int khronos_uintptr_t;
237 typedef signed long int khronos_ssize_t;
238 typedef unsigned long int khronos_usize_t;
239 #endif
240
241 #if KHRONOS_SUPPORT_FLOAT
242 /*
243 * Float type
244 */
245 typedef float khronos_float_t;
246 #endif
247
248 #if KHRONOS_SUPPORT_INT64
249 /* Time types
250 *
251 * These types can be used to represent a time interval in nanoseconds or
252 * an absolute Unadjusted System Time. Unadjusted System Time is the number
253 * of nanoseconds since some arbitrary system event (e.g. since the last
254 * time the system booted). The Unadjusted System Time is an unsigned
255 * 64 bit value that wraps back to 0 every 584 years. Time intervals
256 * may be either signed or unsigned.
257 */
258 typedef khronos_uint64_t khronos_utime_nanoseconds_t;
259 typedef khronos_int64_t khronos_stime_nanoseconds_t;
260 #endif
261
262 /*
263 * Dummy value used to pad enum types to 32 bits.
264 */
265 #ifndef KHRONOS_MAX_ENUM
266 #define KHRONOS_MAX_ENUM 0x7FFFFFFF
267 #endif
268
269 /*
270 * Enumerated boolean type
271 *
272 * Values other than zero should be considered to be true. Therefore
273 * comparisons should not be made against KHRONOS_TRUE.
274 */
275 typedef enum {
276 KHRONOS_FALSE = 0,
277 KHRONOS_TRUE = 1,
278 KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
279 } khronos_boolean_enum_t;
280
281 #endif /* __khrplatform_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_pixels.h
23 *
24 * Header for the enumerated pixel format definitions.
25 */
26
27 #ifndef SDL_pixels_h_
28 #define SDL_pixels_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_endian.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * \name Transparency definitions
41 *
42 * These define alpha as the opacity of a surface.
43 */
44 /* @{ */
45 #define SDL_ALPHA_OPAQUE 255
46 #define SDL_ALPHA_TRANSPARENT 0
47 /* @} */
48
49 /** Pixel type. */
50 typedef enum
51 {
52 SDL_PIXELTYPE_UNKNOWN,
53 SDL_PIXELTYPE_INDEX1,
54 SDL_PIXELTYPE_INDEX4,
55 SDL_PIXELTYPE_INDEX8,
56 SDL_PIXELTYPE_PACKED8,
57 SDL_PIXELTYPE_PACKED16,
58 SDL_PIXELTYPE_PACKED32,
59 SDL_PIXELTYPE_ARRAYU8,
60 SDL_PIXELTYPE_ARRAYU16,
61 SDL_PIXELTYPE_ARRAYU32,
62 SDL_PIXELTYPE_ARRAYF16,
63 SDL_PIXELTYPE_ARRAYF32
64 } SDL_PixelType;
65
66 /** Bitmap pixel order, high bit -> low bit. */
67 typedef enum
68 {
69 SDL_BITMAPORDER_NONE,
70 SDL_BITMAPORDER_4321,
71 SDL_BITMAPORDER_1234
72 } SDL_BitmapOrder;
73
74 /** Packed component order, high bit -> low bit. */
75 typedef enum
76 {
77 SDL_PACKEDORDER_NONE,
78 SDL_PACKEDORDER_XRGB,
79 SDL_PACKEDORDER_RGBX,
80 SDL_PACKEDORDER_ARGB,
81 SDL_PACKEDORDER_RGBA,
82 SDL_PACKEDORDER_XBGR,
83 SDL_PACKEDORDER_BGRX,
84 SDL_PACKEDORDER_ABGR,
85 SDL_PACKEDORDER_BGRA
86 } SDL_PackedOrder;
87
88 /** Array component order, low byte -> high byte. */
89 /* !!! FIXME: in 2.1, make these not overlap differently with
90 !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
91 typedef enum
92 {
93 SDL_ARRAYORDER_NONE,
94 SDL_ARRAYORDER_RGB,
95 SDL_ARRAYORDER_RGBA,
96 SDL_ARRAYORDER_ARGB,
97 SDL_ARRAYORDER_BGR,
98 SDL_ARRAYORDER_BGRA,
99 SDL_ARRAYORDER_ABGR
100 } SDL_ArrayOrder;
101
102 /** Packed component layout. */
103 typedef enum
104 {
105 SDL_PACKEDLAYOUT_NONE,
106 SDL_PACKEDLAYOUT_332,
107 SDL_PACKEDLAYOUT_4444,
108 SDL_PACKEDLAYOUT_1555,
109 SDL_PACKEDLAYOUT_5551,
110 SDL_PACKEDLAYOUT_565,
111 SDL_PACKEDLAYOUT_8888,
112 SDL_PACKEDLAYOUT_2101010,
113 SDL_PACKEDLAYOUT_1010102
114 } SDL_PackedLayout;
115
116 #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
117
118 #define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
119 ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
120 ((bits) << 8) | ((bytes) << 0))
121
122 #define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F)
123 #define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F)
124 #define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F)
125 #define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F)
126 #define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
127 #define SDL_BYTESPERPIXEL(X) \
128 (SDL_ISPIXELFORMAT_FOURCC(X) ? \
129 ((((X) == SDL_PIXELFORMAT_YUY2) || \
130 ((X) == SDL_PIXELFORMAT_UYVY) || \
131 ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
132
133 #define SDL_ISPIXELFORMAT_INDEXED(format) \
134 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
135 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
136 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
137 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
138
139 #define SDL_ISPIXELFORMAT_PACKED(format) \
140 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
141 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
142 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
143 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
144
145 #define SDL_ISPIXELFORMAT_ARRAY(format) \
146 (!SDL_ISPIXELFORMAT_FOURCC(format) && \
147 ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
148 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
149 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
150 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
151 (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
152
153 #define SDL_ISPIXELFORMAT_ALPHA(format) \
154 ((SDL_ISPIXELFORMAT_PACKED(format) && \
155 ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
156 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
157 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
158 (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
159 (SDL_ISPIXELFORMAT_ARRAY(format) && \
160 ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
161 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
162 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
163 (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
164
165 /* The flag is set to 1 because 0x1? is not in the printable ASCII range */
166 #define SDL_ISPIXELFORMAT_FOURCC(format) \
167 ((format) && (SDL_PIXELFLAG(format) != 1))
168
169 /* Note: If you modify this list, update SDL_GetPixelFormatName() */
170 typedef enum
171 {
172 SDL_PIXELFORMAT_UNKNOWN,
173 SDL_PIXELFORMAT_INDEX1LSB =
174 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
175 1, 0),
176 SDL_PIXELFORMAT_INDEX1MSB =
177 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
178 1, 0),
179 SDL_PIXELFORMAT_INDEX4LSB =
180 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
181 4, 0),
182 SDL_PIXELFORMAT_INDEX4MSB =
183 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
184 4, 0),
185 SDL_PIXELFORMAT_INDEX8 =
186 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
187 SDL_PIXELFORMAT_RGB332 =
188 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
189 SDL_PACKEDLAYOUT_332, 8, 1),
190 SDL_PIXELFORMAT_XRGB4444 =
191 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
192 SDL_PACKEDLAYOUT_4444, 12, 2),
193 SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
194 SDL_PIXELFORMAT_XBGR4444 =
195 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
196 SDL_PACKEDLAYOUT_4444, 12, 2),
197 SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
198 SDL_PIXELFORMAT_XRGB1555 =
199 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
200 SDL_PACKEDLAYOUT_1555, 15, 2),
201 SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
202 SDL_PIXELFORMAT_XBGR1555 =
203 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
204 SDL_PACKEDLAYOUT_1555, 15, 2),
205 SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
206 SDL_PIXELFORMAT_ARGB4444 =
207 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
208 SDL_PACKEDLAYOUT_4444, 16, 2),
209 SDL_PIXELFORMAT_RGBA4444 =
210 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
211 SDL_PACKEDLAYOUT_4444, 16, 2),
212 SDL_PIXELFORMAT_ABGR4444 =
213 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
214 SDL_PACKEDLAYOUT_4444, 16, 2),
215 SDL_PIXELFORMAT_BGRA4444 =
216 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
217 SDL_PACKEDLAYOUT_4444, 16, 2),
218 SDL_PIXELFORMAT_ARGB1555 =
219 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
220 SDL_PACKEDLAYOUT_1555, 16, 2),
221 SDL_PIXELFORMAT_RGBA5551 =
222 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
223 SDL_PACKEDLAYOUT_5551, 16, 2),
224 SDL_PIXELFORMAT_ABGR1555 =
225 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
226 SDL_PACKEDLAYOUT_1555, 16, 2),
227 SDL_PIXELFORMAT_BGRA5551 =
228 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
229 SDL_PACKEDLAYOUT_5551, 16, 2),
230 SDL_PIXELFORMAT_RGB565 =
231 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
232 SDL_PACKEDLAYOUT_565, 16, 2),
233 SDL_PIXELFORMAT_BGR565 =
234 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
235 SDL_PACKEDLAYOUT_565, 16, 2),
236 SDL_PIXELFORMAT_RGB24 =
237 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
238 24, 3),
239 SDL_PIXELFORMAT_BGR24 =
240 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
241 24, 3),
242 SDL_PIXELFORMAT_XRGB8888 =
243 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
244 SDL_PACKEDLAYOUT_8888, 24, 4),
245 SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
246 SDL_PIXELFORMAT_RGBX8888 =
247 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
248 SDL_PACKEDLAYOUT_8888, 24, 4),
249 SDL_PIXELFORMAT_XBGR8888 =
250 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
251 SDL_PACKEDLAYOUT_8888, 24, 4),
252 SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
253 SDL_PIXELFORMAT_BGRX8888 =
254 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
255 SDL_PACKEDLAYOUT_8888, 24, 4),
256 SDL_PIXELFORMAT_ARGB8888 =
257 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
258 SDL_PACKEDLAYOUT_8888, 32, 4),
259 SDL_PIXELFORMAT_RGBA8888 =
260 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
261 SDL_PACKEDLAYOUT_8888, 32, 4),
262 SDL_PIXELFORMAT_ABGR8888 =
263 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
264 SDL_PACKEDLAYOUT_8888, 32, 4),
265 SDL_PIXELFORMAT_BGRA8888 =
266 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
267 SDL_PACKEDLAYOUT_8888, 32, 4),
268 SDL_PIXELFORMAT_ARGB2101010 =
269 SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
270 SDL_PACKEDLAYOUT_2101010, 32, 4),
271
272 /* Aliases for RGBA byte arrays of color data, for the current platform */
273 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
274 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
275 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
276 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
277 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
278 #else
279 SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
280 SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
281 SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
282 SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
283 #endif
284
285 SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
286 SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
287 SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
288 SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
289 SDL_PIXELFORMAT_YUY2 = /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
290 SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
291 SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
292 SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
293 SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
294 SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
295 SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
296 SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
297 SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
298 SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
299 SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
300 SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
301 } SDL_PixelFormatEnum;
302
303 /**
304 * The bits of this structure can be directly reinterpreted as an integer-packed
305 * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888
306 * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
307 */
308 typedef struct SDL_Color
309 {
310 Uint8 r;
311 Uint8 g;
312 Uint8 b;
313 Uint8 a;
314 } SDL_Color;
315 #define SDL_Colour SDL_Color
316
317 typedef struct SDL_Palette
318 {
319 int ncolors;
320 SDL_Color *colors;
321 Uint32 version;
322 int refcount;
323 } SDL_Palette;
324
325 /**
326 * \note Everything in the pixel format structure is read-only.
327 */
328 typedef struct SDL_PixelFormat
329 {
330 Uint32 format;
331 SDL_Palette *palette;
332 Uint8 BitsPerPixel;
333 Uint8 BytesPerPixel;
334 Uint8 padding[2];
335 Uint32 Rmask;
336 Uint32 Gmask;
337 Uint32 Bmask;
338 Uint32 Amask;
339 Uint8 Rloss;
340 Uint8 Gloss;
341 Uint8 Bloss;
342 Uint8 Aloss;
343 Uint8 Rshift;
344 Uint8 Gshift;
345 Uint8 Bshift;
346 Uint8 Ashift;
347 int refcount;
348 struct SDL_PixelFormat *next;
349 } SDL_PixelFormat;
350
351 /**
352 * Get the human readable name of a pixel format.
353 *
354 * \param format the pixel format to query
355 * \returns the human readable name of the specified pixel format or
356 * `SDL_PIXELFORMAT_UNKNOWN` if the format isn't recognized.
357 *
358 * \since This function is available since SDL 2.0.0.
359 */
360 extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
361
362 /**
363 * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
364 *
365 * \param format one of the SDL_PixelFormatEnum values
366 * \param bpp a bits per pixel value; usually 15, 16, or 32
367 * \param Rmask a pointer filled in with the red mask for the format
368 * \param Gmask a pointer filled in with the green mask for the format
369 * \param Bmask a pointer filled in with the blue mask for the format
370 * \param Amask a pointer filled in with the alpha mask for the format
371 * \returns SDL_TRUE on success or SDL_FALSE if the conversion wasn't
372 * possible; call SDL_GetError() for more information.
373 *
374 * \since This function is available since SDL 2.0.0.
375 *
376 * \sa SDL_MasksToPixelFormatEnum
377 */
378 extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
379 int *bpp,
380 Uint32 * Rmask,
381 Uint32 * Gmask,
382 Uint32 * Bmask,
383 Uint32 * Amask);
384
385 /**
386 * Convert a bpp value and RGBA masks to an enumerated pixel format.
387 *
388 * This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't
389 * possible.
390 *
391 * \param bpp a bits per pixel value; usually 15, 16, or 32
392 * \param Rmask the red mask for the format
393 * \param Gmask the green mask for the format
394 * \param Bmask the blue mask for the format
395 * \param Amask the alpha mask for the format
396 * \returns one of the SDL_PixelFormatEnum values
397 *
398 * \since This function is available since SDL 2.0.0.
399 *
400 * \sa SDL_PixelFormatEnumToMasks
401 */
402 extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
403 Uint32 Rmask,
404 Uint32 Gmask,
405 Uint32 Bmask,
406 Uint32 Amask);
407
408 /**
409 * Create an SDL_PixelFormat structure corresponding to a pixel format.
410 *
411 * Returned structure may come from a shared global cache (i.e. not newly
412 * allocated), and hence should not be modified, especially the palette. Weird
413 * errors such as `Blit combination not supported` may occur.
414 *
415 * \param pixel_format one of the SDL_PixelFormatEnum values
416 * \returns the new SDL_PixelFormat structure or NULL on failure; call
417 * SDL_GetError() for more information.
418 *
419 * \since This function is available since SDL 2.0.0.
420 *
421 * \sa SDL_FreeFormat
422 */
423 extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
424
425 /**
426 * Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
427 *
428 * \param format the SDL_PixelFormat structure to free
429 *
430 * \since This function is available since SDL 2.0.0.
431 *
432 * \sa SDL_AllocFormat
433 */
434 extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
435
436 /**
437 * Create a palette structure with the specified number of color entries.
438 *
439 * The palette entries are initialized to white.
440 *
441 * \param ncolors represents the number of color entries in the color palette
442 * \returns a new SDL_Palette structure on success or NULL on failure (e.g. if
443 * there wasn't enough memory); call SDL_GetError() for more
444 * information.
445 *
446 * \since This function is available since SDL 2.0.0.
447 *
448 * \sa SDL_FreePalette
449 */
450 extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
451
452 /**
453 * Set the palette for a pixel format structure.
454 *
455 * \param format the SDL_PixelFormat structure that will use the palette
456 * \param palette the SDL_Palette structure that will be used
457 * \returns 0 on success or a negative error code on failure; call
458 * SDL_GetError() for more information.
459 *
460 * \since This function is available since SDL 2.0.0.
461 *
462 * \sa SDL_AllocPalette
463 * \sa SDL_FreePalette
464 */
465 extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
466 SDL_Palette *palette);
467
468 /**
469 * Set a range of colors in a palette.
470 *
471 * \param palette the SDL_Palette structure to modify
472 * \param colors an array of SDL_Color structures to copy into the palette
473 * \param firstcolor the index of the first palette entry to modify
474 * \param ncolors the number of entries to modify
475 * \returns 0 on success or a negative error code if not all of the colors
476 * could be set; call SDL_GetError() for more information.
477 *
478 * \since This function is available since SDL 2.0.0.
479 *
480 * \sa SDL_AllocPalette
481 * \sa SDL_CreateRGBSurface
482 */
483 extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
484 const SDL_Color * colors,
485 int firstcolor, int ncolors);
486
487 /**
488 * Free a palette created with SDL_AllocPalette().
489 *
490 * \param palette the SDL_Palette structure to be freed
491 *
492 * \since This function is available since SDL 2.0.0.
493 *
494 * \sa SDL_AllocPalette
495 */
496 extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
497
498 /**
499 * Map an RGB triple to an opaque pixel value for a given pixel format.
500 *
501 * This function maps the RGB color value to the specified pixel format and
502 * returns the pixel value best approximating the given RGB color value for
503 * the given pixel format.
504 *
505 * If the format has a palette (8-bit) the index of the closest matching color
506 * in the palette will be returned.
507 *
508 * If the specified pixel format has an alpha component it will be returned as
509 * all 1 bits (fully opaque).
510 *
511 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
512 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
513 * format the return value can be assigned to a Uint16, and similarly a Uint8
514 * for an 8-bpp format).
515 *
516 * \param format an SDL_PixelFormat structure describing the pixel format
517 * \param r the red component of the pixel in the range 0-255
518 * \param g the green component of the pixel in the range 0-255
519 * \param b the blue component of the pixel in the range 0-255
520 * \returns a pixel value
521 *
522 * \since This function is available since SDL 2.0.0.
523 *
524 * \sa SDL_GetRGB
525 * \sa SDL_GetRGBA
526 * \sa SDL_MapRGBA
527 */
528 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
529 Uint8 r, Uint8 g, Uint8 b);
530
531 /**
532 * Map an RGBA quadruple to a pixel value for a given pixel format.
533 *
534 * This function maps the RGBA color value to the specified pixel format and
535 * returns the pixel value best approximating the given RGBA color value for
536 * the given pixel format.
537 *
538 * If the specified pixel format has no alpha component the alpha value will
539 * be ignored (as it will be in formats with a palette).
540 *
541 * If the format has a palette (8-bit) the index of the closest matching color
542 * in the palette will be returned.
543 *
544 * If the pixel format bpp (color depth) is less than 32-bpp then the unused
545 * upper bits of the return value can safely be ignored (e.g., with a 16-bpp
546 * format the return value can be assigned to a Uint16, and similarly a Uint8
547 * for an 8-bpp format).
548 *
549 * \param format an SDL_PixelFormat structure describing the format of the
550 * pixel
551 * \param r the red component of the pixel in the range 0-255
552 * \param g the green component of the pixel in the range 0-255
553 * \param b the blue component of the pixel in the range 0-255
554 * \param a the alpha component of the pixel in the range 0-255
555 * \returns a pixel value
556 *
557 * \since This function is available since SDL 2.0.0.
558 *
559 * \sa SDL_GetRGB
560 * \sa SDL_GetRGBA
561 * \sa SDL_MapRGB
562 */
563 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
564 Uint8 r, Uint8 g, Uint8 b,
565 Uint8 a);
566
567 /**
568 * Get RGB values from a pixel in the specified format.
569 *
570 * This function uses the entire 8-bit [0..255] range when converting color
571 * components from pixel formats with less than 8-bits per RGB component
572 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
573 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
574 *
575 * \param pixel a pixel value
576 * \param format an SDL_PixelFormat structure describing the format of the
577 * pixel
578 * \param r a pointer filled in with the red component
579 * \param g a pointer filled in with the green component
580 * \param b a pointer filled in with the blue component
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetRGBA
585 * \sa SDL_MapRGB
586 * \sa SDL_MapRGBA
587 */
588 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
589 const SDL_PixelFormat * format,
590 Uint8 * r, Uint8 * g, Uint8 * b);
591
592 /**
593 * Get RGBA values from a pixel in the specified format.
594 *
595 * This function uses the entire 8-bit [0..255] range when converting color
596 * components from pixel formats with less than 8-bits per RGB component
597 * (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,
598 * 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
599 *
600 * If the surface has no alpha component, the alpha will be returned as 0xff
601 * (100% opaque).
602 *
603 * \param pixel a pixel value
604 * \param format an SDL_PixelFormat structure describing the format of the
605 * pixel
606 * \param r a pointer filled in with the red component
607 * \param g a pointer filled in with the green component
608 * \param b a pointer filled in with the blue component
609 * \param a a pointer filled in with the alpha component
610 *
611 * \since This function is available since SDL 2.0.0.
612 *
613 * \sa SDL_GetRGB
614 * \sa SDL_MapRGB
615 * \sa SDL_MapRGBA
616 */
617 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
618 const SDL_PixelFormat * format,
619 Uint8 * r, Uint8 * g, Uint8 * b,
620 Uint8 * a);
621
622 /**
623 * Calculate a 256 entry gamma ramp for a gamma value.
624 *
625 * \param gamma a gamma value where 0.0 is black and 1.0 is identity
626 * \param ramp an array of 256 values filled in with the gamma ramp
627 *
628 * \since This function is available since SDL 2.0.0.
629 *
630 * \sa SDL_SetWindowGammaRamp
631 */
632 extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
633
634
635 /* Ends C function definitions when using C++ */
636 #ifdef __cplusplus
637 }
638 #endif
639 #include <SDL2/close_code.h>
640
641 #endif /* SDL_pixels_h_ */
642
643 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_platform.h
23 *
24 * Try to get a standard set of platform defines.
25 */
26
27 #ifndef SDL_platform_h_
28 #define SDL_platform_h_
29
30 #if defined(_AIX)
31 #undef __AIX__
32 #define __AIX__ 1
33 #endif
34 #if defined(__HAIKU__)
35 #undef __HAIKU__
36 #define __HAIKU__ 1
37 #endif
38 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
39 #undef __BSDI__
40 #define __BSDI__ 1
41 #endif
42 #if defined(_arch_dreamcast)
43 #undef __DREAMCAST__
44 #define __DREAMCAST__ 1
45 #endif
46 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
47 #undef __FREEBSD__
48 #define __FREEBSD__ 1
49 #endif
50 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
51 #undef __HPUX__
52 #define __HPUX__ 1
53 #endif
54 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
55 #undef __IRIX__
56 #define __IRIX__ 1
57 #endif
58 #if (defined(linux) || defined(__linux) || defined(__linux__))
59 #undef __LINUX__
60 #define __LINUX__ 1
61 #endif
62 #if defined(ANDROID) || defined(__ANDROID__)
63 #undef __ANDROID__
64 #undef __LINUX__ /* do we need to do this? */
65 #define __ANDROID__ 1
66 #endif
67
68 #if defined(__APPLE__)
69 /* lets us know what version of Mac OS X we're compiling on */
70 #include <AvailabilityMacros.h>
71 #include <TargetConditionals.h>
72
73 /* Fix building with older SDKs that don't define these
74 See this for more information:
75 https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
76 */
77 #ifndef TARGET_OS_MACCATALYST
78 #define TARGET_OS_MACCATALYST 0
79 #endif
80 #ifndef TARGET_OS_IOS
81 #define TARGET_OS_IOS 0
82 #endif
83 #ifndef TARGET_OS_IPHONE
84 #define TARGET_OS_IPHONE 0
85 #endif
86 #ifndef TARGET_OS_TV
87 #define TARGET_OS_TV 0
88 #endif
89 #ifndef TARGET_OS_SIMULATOR
90 #define TARGET_OS_SIMULATOR 0
91 #endif
92
93 #if TARGET_OS_TV
94 #undef __TVOS__
95 #define __TVOS__ 1
96 #endif
97 #if TARGET_OS_IPHONE
98 /* if compiling for iOS */
99 #undef __IPHONEOS__
100 #define __IPHONEOS__ 1
101 #undef __MACOSX__
102 #else
103 /* if not compiling for iOS */
104 #undef __MACOSX__
105 #define __MACOSX__ 1
106 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
107 # error SDL for Mac OS X only supports deploying on 10.6 and above.
108 #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
109 #endif /* TARGET_OS_IPHONE */
110 #endif /* defined(__APPLE__) */
111
112 #if defined(__NetBSD__)
113 #undef __NETBSD__
114 #define __NETBSD__ 1
115 #endif
116 #if defined(__OpenBSD__)
117 #undef __OPENBSD__
118 #define __OPENBSD__ 1
119 #endif
120 #if defined(__OS2__) || defined(__EMX__)
121 #undef __OS2__
122 #define __OS2__ 1
123 #endif
124 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
125 #undef __OSF__
126 #define __OSF__ 1
127 #endif
128 #if defined(__QNXNTO__)
129 #undef __QNXNTO__
130 #define __QNXNTO__ 1
131 #endif
132 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
133 #undef __RISCOS__
134 #define __RISCOS__ 1
135 #endif
136 #if defined(__sun) && defined(__SVR4)
137 #undef __SOLARIS__
138 #define __SOLARIS__ 1
139 #endif
140
141 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
142 /* Try to find out if we're compiling for WinRT or non-WinRT */
143 #if defined(_MSC_VER) && defined(__has_include)
144 #if __has_include(<winapifamily.h>)
145 #define HAVE_WINAPIFAMILY_H 1
146 #else
147 #define HAVE_WINAPIFAMILY_H 0
148 #endif
149
150 /* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
151 #elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
152 #define HAVE_WINAPIFAMILY_H 1
153 #else
154 #define HAVE_WINAPIFAMILY_H 0
155 #endif
156
157 #if HAVE_WINAPIFAMILY_H
158 #include <winapifamily.h>
159 #define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
160 #else
161 #define WINAPI_FAMILY_WINRT 0
162 #endif /* HAVE_WINAPIFAMILY_H */
163
164 #if WINAPI_FAMILY_WINRT
165 #undef __WINRT__
166 #define __WINRT__ 1
167 #else
168 #undef __WINDOWS__
169 #define __WINDOWS__ 1
170 #endif
171 #endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
172
173 #if defined(__WINDOWS__)
174 #undef __WIN32__
175 #define __WIN32__ 1
176 #endif
177 #if defined(__PSP__)
178 #undef __PSP__
179 #define __PSP__ 1
180 #endif
181
182 /* The NACL compiler defines __native_client__ and __pnacl__
183 * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
184 */
185 #if defined(__native_client__)
186 #undef __LINUX__
187 #undef __NACL__
188 #define __NACL__ 1
189 #endif
190 #if defined(__pnacl__)
191 #undef __LINUX__
192 #undef __PNACL__
193 #define __PNACL__ 1
194 /* PNACL with newlib supports static linking only */
195 #define __SDL_NOGETPROCADDR__
196 #endif
197
198 #if defined(__vita__)
199 #define __VITA__ 1
200 #endif
201
202 #include <SDL2/begin_code.h>
203 /* Set up for C function definitions, even when using C++ */
204 #ifdef __cplusplus
205 extern "C" {
206 #endif
207
208 /**
209 * Get the name of the platform.
210 *
211 * Here are the names returned for some (but not all) supported platforms:
212 *
213 * - "Windows"
214 * - "Mac OS X"
215 * - "Linux"
216 * - "iOS"
217 * - "Android"
218 *
219 * \returns the name of the platform. If the correct platform name is not
220 * available, returns a string beginning with the text "Unknown".
221 *
222 * \since This function is available since SDL 2.0.0.
223 */
224 extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
225
226 /* Ends C function definitions when using C++ */
227 #ifdef __cplusplus
228 }
229 #endif
230 #include <SDL2/close_code.h>
231
232 #endif /* SDL_platform_h_ */
233
234 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_power_h_
22 #define SDL_power_h_
23
24 /**
25 * \file SDL_power.h
26 *
27 * Header for the SDL power management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * The basic state for the system's power supply.
40 */
41 typedef enum
42 {
43 SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */
44 SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
45 SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
46 SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */
47 SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
48 } SDL_PowerState;
49
50
51 /**
52 * Get the current power supply details.
53 *
54 * You should never take a battery status as absolute truth. Batteries
55 * (especially failing batteries) are delicate hardware, and the values
56 * reported here are best estimates based on what that hardware reports. It's
57 * not uncommon for older batteries to lose stored power much faster than it
58 * reports, or completely drain when reporting it has 20 percent left, etc.
59 *
60 * Battery status can change at any time; if you are concerned with power
61 * state, you should call this function frequently, and perhaps ignore changes
62 * until they seem to be stable for a few seconds.
63 *
64 * It's possible a platform can only report battery percentage or time left
65 * but not both.
66 *
67 * \param secs seconds of battery life left, you can pass a NULL here if you
68 * don't care, will return -1 if we can't determine a value, or
69 * we're not running on a battery
70 * \param pct percentage of battery life left, between 0 and 100, you can pass
71 * a NULL here if you don't care, will return -1 if we can't
72 * determine a value, or we're not running on a battery
73 * \returns an SDL_PowerState enum representing the current battery state.
74 *
75 * \since This function is available since SDL 2.0.0.
76 */
77 extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
78
79 /* Ends C function definitions when using C++ */
80 #ifdef __cplusplus
81 }
82 #endif
83 #include <SDL2/close_code.h>
84
85 #endif /* SDL_power_h_ */
86
87 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_quit.h
23 *
24 * Include file for SDL quit event handling.
25 */
26
27 #ifndef SDL_quit_h_
28 #define SDL_quit_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /**
34 * \file SDL_quit.h
35 *
36 * An ::SDL_QUIT event is generated when the user tries to close the application
37 * window. If it is ignored or filtered out, the window will remain open.
38 * If it is not ignored or filtered, it is queued normally and the window
39 * is allowed to close. When the window is closed, screen updates will
40 * complete, but have no effect.
41 *
42 * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
43 * and SIGTERM (system termination request), if handlers do not already
44 * exist, that generate ::SDL_QUIT events as well. There is no way
45 * to determine the cause of an ::SDL_QUIT event, but setting a signal
46 * handler in your application will override the default generation of
47 * quit events for that signal.
48 *
49 * \sa SDL_Quit()
50 */
51
52 /* There are no functions directly affecting the quit event */
53
54 #define SDL_QuitRequested() \
55 (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
56
57 #endif /* SDL_quit_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rect.h
23 *
24 * Header file for SDL_rect definition and management functions.
25 */
26
27 #ifndef SDL_rect_h_
28 #define SDL_rect_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_pixels.h>
33 #include <SDL2/SDL_rwops.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * The structure that defines a point (integer)
43 *
44 * \sa SDL_EnclosePoints
45 * \sa SDL_PointInRect
46 */
47 typedef struct SDL_Point
48 {
49 int x;
50 int y;
51 } SDL_Point;
52
53 /**
54 * The structure that defines a point (floating point)
55 *
56 * \sa SDL_EncloseFPoints
57 * \sa SDL_PointInFRect
58 */
59 typedef struct SDL_FPoint
60 {
61 float x;
62 float y;
63 } SDL_FPoint;
64
65
66 /**
67 * A rectangle, with the origin at the upper left (integer).
68 *
69 * \sa SDL_RectEmpty
70 * \sa SDL_RectEquals
71 * \sa SDL_HasIntersection
72 * \sa SDL_IntersectRect
73 * \sa SDL_IntersectRectAndLine
74 * \sa SDL_UnionRect
75 * \sa SDL_EnclosePoints
76 */
77 typedef struct SDL_Rect
78 {
79 int x, y;
80 int w, h;
81 } SDL_Rect;
82
83
84 /**
85 * A rectangle, with the origin at the upper left (floating point).
86 *
87 * \sa SDL_FRectEmpty
88 * \sa SDL_FRectEquals
89 * \sa SDL_FRectEqualsEpsilon
90 * \sa SDL_HasIntersectionF
91 * \sa SDL_IntersectFRect
92 * \sa SDL_IntersectFRectAndLine
93 * \sa SDL_UnionFRect
94 * \sa SDL_EncloseFPoints
95 * \sa SDL_PointInFRect
96 */
97 typedef struct SDL_FRect
98 {
99 float x;
100 float y;
101 float w;
102 float h;
103 } SDL_FRect;
104
105
106 /**
107 * Returns true if point resides inside a rectangle.
108 */
109 SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
110 {
111 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
112 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
113 }
114
115 /**
116 * Returns true if the rectangle has no area.
117 */
118 SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
119 {
120 return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
121 }
122
123 /**
124 * Returns true if the two rectangles are equal.
125 */
126 SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
127 {
128 return (a && b && (a->x == b->x) && (a->y == b->y) &&
129 (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
130 }
131
132 /**
133 * Determine whether two rectangles intersect.
134 *
135 * If either pointer is NULL the function will return SDL_FALSE.
136 *
137 * \param A an SDL_Rect structure representing the first rectangle
138 * \param B an SDL_Rect structure representing the second rectangle
139 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_IntersectRect
144 */
145 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
146 const SDL_Rect * B);
147
148 /**
149 * Calculate the intersection of two rectangles.
150 *
151 * If `result` is NULL then this function will return SDL_FALSE.
152 *
153 * \param A an SDL_Rect structure representing the first rectangle
154 * \param B an SDL_Rect structure representing the second rectangle
155 * \param result an SDL_Rect structure filled in with the intersection of
156 * rectangles `A` and `B`
157 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
158 *
159 * \since This function is available since SDL 2.0.0.
160 *
161 * \sa SDL_HasIntersection
162 */
163 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
164 const SDL_Rect * B,
165 SDL_Rect * result);
166
167 /**
168 * Calculate the union of two rectangles.
169 *
170 * \param A an SDL_Rect structure representing the first rectangle
171 * \param B an SDL_Rect structure representing the second rectangle
172 * \param result an SDL_Rect structure filled in with the union of rectangles
173 * `A` and `B`
174 *
175 * \since This function is available since SDL 2.0.0.
176 */
177 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
178 const SDL_Rect * B,
179 SDL_Rect * result);
180
181 /**
182 * Calculate a minimal rectangle enclosing a set of points.
183 *
184 * If `clip` is not NULL then only points inside of the clipping rectangle are
185 * considered.
186 *
187 * \param points an array of SDL_Point structures representing points to be
188 * enclosed
189 * \param count the number of structures in the `points` array
190 * \param clip an SDL_Rect used for clipping or NULL to enclose all points
191 * \param result an SDL_Rect structure filled in with the minimal enclosing
192 * rectangle
193 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
194 * points were outside of the clipping rectangle.
195 *
196 * \since This function is available since SDL 2.0.0.
197 */
198 extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
199 int count,
200 const SDL_Rect * clip,
201 SDL_Rect * result);
202
203 /**
204 * Calculate the intersection of a rectangle and line segment.
205 *
206 * This function is used to clip a line segment to a rectangle. A line segment
207 * contained entirely within the rectangle or that does not intersect will
208 * remain unchanged. A line segment that crosses the rectangle at either or
209 * both ends will be clipped to the boundary of the rectangle and the new
210 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
211 *
212 * \param rect an SDL_Rect structure representing the rectangle to intersect
213 * \param X1 a pointer to the starting X-coordinate of the line
214 * \param Y1 a pointer to the starting Y-coordinate of the line
215 * \param X2 a pointer to the ending X-coordinate of the line
216 * \param Y2 a pointer to the ending Y-coordinate of the line
217 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
218 *
219 * \since This function is available since SDL 2.0.0.
220 */
221 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
222 rect, int *X1,
223 int *Y1, int *X2,
224 int *Y2);
225
226
227 /* SDL_FRect versions... */
228
229 /**
230 * Returns true if point resides inside a rectangle.
231 */
232 SDL_FORCE_INLINE SDL_bool SDL_PointInFRect(const SDL_FPoint *p, const SDL_FRect *r)
233 {
234 return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
235 (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
236 }
237
238 /**
239 * Returns true if the rectangle has no area.
240 */
241 SDL_FORCE_INLINE SDL_bool SDL_FRectEmpty(const SDL_FRect *r)
242 {
243 return ((!r) || (r->w <= 0.0f) || (r->h <= 0.0f)) ? SDL_TRUE : SDL_FALSE;
244 }
245
246 /**
247 * Returns true if the two rectangles are equal, within some given epsilon.
248 *
249 * \since This function is available since SDL 2.0.22.
250 */
251 SDL_FORCE_INLINE SDL_bool SDL_FRectEqualsEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
252 {
253 return (a && b && ((a == b) ||
254 ((SDL_fabs(a->x - b->x) <= epsilon) &&
255 (SDL_fabs(a->y - b->y) <= epsilon) &&
256 (SDL_fabs(a->w - b->w) <= epsilon) &&
257 (SDL_fabs(a->h - b->h) <= epsilon))))
258 ? SDL_TRUE : SDL_FALSE;
259 }
260
261 /**
262 * Returns true if the two rectangles are equal, using a default epsilon.
263 *
264 * \since This function is available since SDL 2.0.22.
265 */
266 SDL_FORCE_INLINE SDL_bool SDL_FRectEquals(const SDL_FRect *a, const SDL_FRect *b)
267 {
268 return SDL_FRectEqualsEpsilon(a, b, SDL_FLT_EPSILON);
269 }
270
271 /**
272 * Determine whether two rectangles intersect with float precision.
273 *
274 * If either pointer is NULL the function will return SDL_FALSE.
275 *
276 * \param A an SDL_FRect structure representing the first rectangle
277 * \param B an SDL_FRect structure representing the second rectangle
278 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
279 *
280 * \since This function is available since SDL 2.0.22.
281 *
282 * \sa SDL_IntersectRect
283 */
284 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersectionF(const SDL_FRect * A,
285 const SDL_FRect * B);
286
287 /**
288 * Calculate the intersection of two rectangles with float precision.
289 *
290 * If `result` is NULL then this function will return SDL_FALSE.
291 *
292 * \param A an SDL_FRect structure representing the first rectangle
293 * \param B an SDL_FRect structure representing the second rectangle
294 * \param result an SDL_FRect structure filled in with the intersection of
295 * rectangles `A` and `B`
296 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
297 *
298 * \since This function is available since SDL 2.0.22.
299 *
300 * \sa SDL_HasIntersectionF
301 */
302 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRect(const SDL_FRect * A,
303 const SDL_FRect * B,
304 SDL_FRect * result);
305
306 /**
307 * Calculate the union of two rectangles with float precision.
308 *
309 * \param A an SDL_FRect structure representing the first rectangle
310 * \param B an SDL_FRect structure representing the second rectangle
311 * \param result an SDL_FRect structure filled in with the union of rectangles
312 * `A` and `B`
313 *
314 * \since This function is available since SDL 2.0.22.
315 */
316 extern DECLSPEC void SDLCALL SDL_UnionFRect(const SDL_FRect * A,
317 const SDL_FRect * B,
318 SDL_FRect * result);
319
320 /**
321 * Calculate a minimal rectangle enclosing a set of points with float
322 * precision.
323 *
324 * If `clip` is not NULL then only points inside of the clipping rectangle are
325 * considered.
326 *
327 * \param points an array of SDL_FPoint structures representing points to be
328 * enclosed
329 * \param count the number of structures in the `points` array
330 * \param clip an SDL_FRect used for clipping or NULL to enclose all points
331 * \param result an SDL_FRect structure filled in with the minimal enclosing
332 * rectangle
333 * \returns SDL_TRUE if any points were enclosed or SDL_FALSE if all the
334 * points were outside of the clipping rectangle.
335 *
336 * \since This function is available since SDL 2.0.22.
337 */
338 extern DECLSPEC SDL_bool SDLCALL SDL_EncloseFPoints(const SDL_FPoint * points,
339 int count,
340 const SDL_FRect * clip,
341 SDL_FRect * result);
342
343 /**
344 * Calculate the intersection of a rectangle and line segment with float
345 * precision.
346 *
347 * This function is used to clip a line segment to a rectangle. A line segment
348 * contained entirely within the rectangle or that does not intersect will
349 * remain unchanged. A line segment that crosses the rectangle at either or
350 * both ends will be clipped to the boundary of the rectangle and the new
351 * coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.
352 *
353 * \param rect an SDL_FRect structure representing the rectangle to intersect
354 * \param X1 a pointer to the starting X-coordinate of the line
355 * \param Y1 a pointer to the starting Y-coordinate of the line
356 * \param X2 a pointer to the ending X-coordinate of the line
357 * \param Y2 a pointer to the ending Y-coordinate of the line
358 * \returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
359 *
360 * \since This function is available since SDL 2.0.22.
361 */
362 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectFRectAndLine(const SDL_FRect *
363 rect, float *X1,
364 float *Y1, float *X2,
365 float *Y2);
366
367 /* Ends C function definitions when using C++ */
368 #ifdef __cplusplus
369 }
370 #endif
371 #include <SDL2/close_code.h>
372
373 #endif /* SDL_rect_h_ */
374
375 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_render.h
23 *
24 * Header file for SDL 2D rendering functions.
25 *
26 * This API supports the following features:
27 * * single pixel points
28 * * single pixel lines
29 * * filled rectangles
30 * * texture images
31 *
32 * The primitives may be drawn in opaque, blended, or additive modes.
33 *
34 * The texture images may be drawn in opaque, blended, or additive modes.
35 * They can have an additional color tint or alpha modulation applied to
36 * them, and may also be stretched with linear interpolation.
37 *
38 * This API is designed to accelerate simple 2D operations. You may
39 * want more functionality such as polygons and particle effects and
40 * in that case you should use SDL's OpenGL/Direct3D support or one
41 * of the many good 3D engines.
42 *
43 * These functions must be called from the main thread.
44 * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
45 */
46
47 #ifndef SDL_render_h_
48 #define SDL_render_h_
49
50 #include <SDL2/SDL_stdinc.h>
51 #include <SDL2/SDL_rect.h>
52 #include <SDL2/SDL_video.h>
53
54 #include <SDL2/begin_code.h>
55 /* Set up for C function definitions, even when using C++ */
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 /**
61 * Flags used when creating a rendering context
62 */
63 typedef enum
64 {
65 SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */
66 SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware
67 acceleration */
68 SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized
69 with the refresh rate */
70 SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports
71 rendering to texture */
72 } SDL_RendererFlags;
73
74 /**
75 * Information on the capabilities of a render driver or context.
76 */
77 typedef struct SDL_RendererInfo
78 {
79 const char *name; /**< The name of the renderer */
80 Uint32 flags; /**< Supported ::SDL_RendererFlags */
81 Uint32 num_texture_formats; /**< The number of available texture formats */
82 Uint32 texture_formats[16]; /**< The available texture formats */
83 int max_texture_width; /**< The maximum texture width */
84 int max_texture_height; /**< The maximum texture height */
85 } SDL_RendererInfo;
86
87 /**
88 * Vertex structure
89 */
90 typedef struct SDL_Vertex
91 {
92 SDL_FPoint position; /**< Vertex position, in SDL_Renderer coordinates */
93 SDL_Color color; /**< Vertex color */
94 SDL_FPoint tex_coord; /**< Normalized texture coordinates, if needed */
95 } SDL_Vertex;
96
97 /**
98 * The scaling mode for a texture.
99 */
100 typedef enum
101 {
102 SDL_ScaleModeNearest, /**< nearest pixel sampling */
103 SDL_ScaleModeLinear, /**< linear filtering */
104 SDL_ScaleModeBest /**< anisotropic filtering */
105 } SDL_ScaleMode;
106
107 /**
108 * The access pattern allowed for a texture.
109 */
110 typedef enum
111 {
112 SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
113 SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
114 SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */
115 } SDL_TextureAccess;
116
117 /**
118 * The texture channel modulation used in SDL_RenderCopy().
119 */
120 typedef enum
121 {
122 SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */
123 SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */
124 SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */
125 } SDL_TextureModulate;
126
127 /**
128 * Flip constants for SDL_RenderCopyEx
129 */
130 typedef enum
131 {
132 SDL_FLIP_NONE = 0x00000000, /**< Do not flip */
133 SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */
134 SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */
135 } SDL_RendererFlip;
136
137 /**
138 * A structure representing rendering state
139 */
140 struct SDL_Renderer;
141 typedef struct SDL_Renderer SDL_Renderer;
142
143 /**
144 * An efficient driver-specific representation of pixel data
145 */
146 struct SDL_Texture;
147 typedef struct SDL_Texture SDL_Texture;
148
149 /* Function prototypes */
150
151 /**
152 * Get the number of 2D rendering drivers available for the current display.
153 *
154 * A render driver is a set of code that handles rendering and texture
155 * management on a particular display. Normally there is only one, but some
156 * drivers may have several available with different capabilities.
157 *
158 * There may be none if SDL was compiled without render support.
159 *
160 * \returns a number >= 0 on success or a negative error code on failure; call
161 * SDL_GetError() for more information.
162 *
163 * \since This function is available since SDL 2.0.0.
164 *
165 * \sa SDL_CreateRenderer
166 * \sa SDL_GetRenderDriverInfo
167 */
168 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
169
170 /**
171 * Get info about a specific 2D rendering driver for the current display.
172 *
173 * \param index the index of the driver to query information about
174 * \param info an SDL_RendererInfo structure to be filled with information on
175 * the rendering driver
176 * \returns 0 on success or a negative error code on failure; call
177 * SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.0.
180 *
181 * \sa SDL_CreateRenderer
182 * \sa SDL_GetNumRenderDrivers
183 */
184 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
185 SDL_RendererInfo * info);
186
187 /**
188 * Create a window and default renderer.
189 *
190 * \param width the width of the window
191 * \param height the height of the window
192 * \param window_flags the flags used to create the window (see
193 * SDL_CreateWindow())
194 * \param window a pointer filled with the window, or NULL on error
195 * \param renderer a pointer filled with the renderer, or NULL on error
196 * \returns 0 on success, or -1 on error; call SDL_GetError() for more
197 * information.
198 *
199 * \since This function is available since SDL 2.0.0.
200 *
201 * \sa SDL_CreateRenderer
202 * \sa SDL_CreateWindow
203 */
204 extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
205 int width, int height, Uint32 window_flags,
206 SDL_Window **window, SDL_Renderer **renderer);
207
208
209 /**
210 * Create a 2D rendering context for a window.
211 *
212 * \param window the window where rendering is displayed
213 * \param index the index of the rendering driver to initialize, or -1 to
214 * initialize the first one supporting the requested flags
215 * \param flags 0, or one or more SDL_RendererFlags OR'd together
216 * \returns a valid rendering context or NULL if there was an error; call
217 * SDL_GetError() for more information.
218 *
219 * \since This function is available since SDL 2.0.0.
220 *
221 * \sa SDL_CreateSoftwareRenderer
222 * \sa SDL_DestroyRenderer
223 * \sa SDL_GetNumRenderDrivers
224 * \sa SDL_GetRendererInfo
225 */
226 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
227 int index, Uint32 flags);
228
229 /**
230 * Create a 2D software rendering context for a surface.
231 *
232 * Two other API which can be used to create SDL_Renderer:
233 * SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_
234 * create a software renderer, but they are intended to be used with an
235 * SDL_Window as the final destination and not an SDL_Surface.
236 *
237 * \param surface the SDL_Surface structure representing the surface where
238 * rendering is done
239 * \returns a valid rendering context or NULL if there was an error; call
240 * SDL_GetError() for more information.
241 *
242 * \since This function is available since SDL 2.0.0.
243 *
244 * \sa SDL_CreateRenderer
245 * \sa SDL_CreateWindowRenderer
246 * \sa SDL_DestroyRenderer
247 */
248 extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
249
250 /**
251 * Get the renderer associated with a window.
252 *
253 * \param window the window to query
254 * \returns the rendering context on success or NULL on failure; call
255 * SDL_GetError() for more information.
256 *
257 * \since This function is available since SDL 2.0.0.
258 *
259 * \sa SDL_CreateRenderer
260 */
261 extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
262
263 /**
264 * Get the window associated with a renderer.
265 *
266 * \param renderer the renderer to query
267 * \returns the window on success or NULL on failure; call SDL_GetError() for
268 * more information.
269 *
270 * \since This function is available since SDL 2.0.22.
271 */
272 extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer);
273
274 /**
275 * Get information about a rendering context.
276 *
277 * \param renderer the rendering context
278 * \param info an SDL_RendererInfo structure filled with information about the
279 * current renderer
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 *
285 * \sa SDL_CreateRenderer
286 */
287 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
288 SDL_RendererInfo * info);
289
290 /**
291 * Get the output size in pixels of a rendering context.
292 *
293 * Due to high-dpi displays, you might end up with a rendering context that
294 * has more pixels than the window that contains it, so use this instead of
295 * SDL_GetWindowSize() to decide how much drawing area you have.
296 *
297 * \param renderer the rendering context
298 * \param w an int filled with the width
299 * \param h an int filled with the height
300 * \returns 0 on success or a negative error code on failure; call
301 * SDL_GetError() for more information.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetRenderer
306 */
307 extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
308 int *w, int *h);
309
310 /**
311 * Create a texture for a rendering context.
312 *
313 * You can set the texture scaling method by setting
314 * `SDL_HINT_RENDER_SCALE_QUALITY` before creating the texture.
315 *
316 * \param renderer the rendering context
317 * \param format one of the enumerated values in SDL_PixelFormatEnum
318 * \param access one of the enumerated values in SDL_TextureAccess
319 * \param w the width of the texture in pixels
320 * \param h the height of the texture in pixels
321 * \returns a pointer to the created texture or NULL if no rendering context
322 * was active, the format was unsupported, or the width or height
323 * were out of range; call SDL_GetError() for more information.
324 *
325 * \since This function is available since SDL 2.0.0.
326 *
327 * \sa SDL_CreateTextureFromSurface
328 * \sa SDL_DestroyTexture
329 * \sa SDL_QueryTexture
330 * \sa SDL_UpdateTexture
331 */
332 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
333 Uint32 format,
334 int access, int w,
335 int h);
336
337 /**
338 * Create a texture from an existing surface.
339 *
340 * The surface is not modified or freed by this function.
341 *
342 * The SDL_TextureAccess hint for the created texture is
343 * `SDL_TEXTUREACCESS_STATIC`.
344 *
345 * The pixel format of the created texture may be different from the pixel
346 * format of the surface. Use SDL_QueryTexture() to query the pixel format of
347 * the texture.
348 *
349 * \param renderer the rendering context
350 * \param surface the SDL_Surface structure containing pixel data used to fill
351 * the texture
352 * \returns the created texture or NULL on failure; call SDL_GetError() for
353 * more information.
354 *
355 * \since This function is available since SDL 2.0.0.
356 *
357 * \sa SDL_CreateTexture
358 * \sa SDL_DestroyTexture
359 * \sa SDL_QueryTexture
360 */
361 extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
362
363 /**
364 * Query the attributes of a texture.
365 *
366 * \param texture the texture to query
367 * \param format a pointer filled in with the raw format of the texture; the
368 * actual format may differ, but pixel transfers will use this
369 * format (one of the SDL_PixelFormatEnum values). This argument
370 * can be NULL if you don't need this information.
371 * \param access a pointer filled in with the actual access to the texture
372 * (one of the SDL_TextureAccess values). This argument can be
373 * NULL if you don't need this information.
374 * \param w a pointer filled in with the width of the texture in pixels. This
375 * argument can be NULL if you don't need this information.
376 * \param h a pointer filled in with the height of the texture in pixels. This
377 * argument can be NULL if you don't need this information.
378 * \returns 0 on success or a negative error code on failure; call
379 * SDL_GetError() for more information.
380 *
381 * \since This function is available since SDL 2.0.0.
382 *
383 * \sa SDL_CreateTexture
384 */
385 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
386 Uint32 * format, int *access,
387 int *w, int *h);
388
389 /**
390 * Set an additional color value multiplied into render copy operations.
391 *
392 * When this texture is rendered, during the copy operation each source color
393 * channel is modulated by the appropriate color value according to the
394 * following formula:
395 *
396 * `srcC = srcC * (color / 255)`
397 *
398 * Color modulation is not always supported by the renderer; it will return -1
399 * if color modulation is not supported.
400 *
401 * \param texture the texture to update
402 * \param r the red color value multiplied into copy operations
403 * \param g the green color value multiplied into copy operations
404 * \param b the blue color value multiplied into copy operations
405 * \returns 0 on success or a negative error code on failure; call
406 * SDL_GetError() for more information.
407 *
408 * \since This function is available since SDL 2.0.0.
409 *
410 * \sa SDL_GetTextureColorMod
411 * \sa SDL_SetTextureAlphaMod
412 */
413 extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
414 Uint8 r, Uint8 g, Uint8 b);
415
416
417 /**
418 * Get the additional color value multiplied into render copy operations.
419 *
420 * \param texture the texture to query
421 * \param r a pointer filled in with the current red color value
422 * \param g a pointer filled in with the current green color value
423 * \param b a pointer filled in with the current blue color value
424 * \returns 0 on success or a negative error code on failure; call
425 * SDL_GetError() for more information.
426 *
427 * \since This function is available since SDL 2.0.0.
428 *
429 * \sa SDL_GetTextureAlphaMod
430 * \sa SDL_SetTextureColorMod
431 */
432 extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
433 Uint8 * r, Uint8 * g,
434 Uint8 * b);
435
436 /**
437 * Set an additional alpha value multiplied into render copy operations.
438 *
439 * When this texture is rendered, during the copy operation the source alpha
440 * value is modulated by this alpha value according to the following formula:
441 *
442 * `srcA = srcA * (alpha / 255)`
443 *
444 * Alpha modulation is not always supported by the renderer; it will return -1
445 * if alpha modulation is not supported.
446 *
447 * \param texture the texture to update
448 * \param alpha the source alpha value multiplied into copy operations
449 * \returns 0 on success or a negative error code on failure; call
450 * SDL_GetError() for more information.
451 *
452 * \since This function is available since SDL 2.0.0.
453 *
454 * \sa SDL_GetTextureAlphaMod
455 * \sa SDL_SetTextureColorMod
456 */
457 extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
458 Uint8 alpha);
459
460 /**
461 * Get the additional alpha value multiplied into render copy operations.
462 *
463 * \param texture the texture to query
464 * \param alpha a pointer filled in with the current alpha value
465 * \returns 0 on success or a negative error code on failure; call
466 * SDL_GetError() for more information.
467 *
468 * \since This function is available since SDL 2.0.0.
469 *
470 * \sa SDL_GetTextureColorMod
471 * \sa SDL_SetTextureAlphaMod
472 */
473 extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
474 Uint8 * alpha);
475
476 /**
477 * Set the blend mode for a texture, used by SDL_RenderCopy().
478 *
479 * If the blend mode is not supported, the closest supported mode is chosen
480 * and this function returns -1.
481 *
482 * \param texture the texture to update
483 * \param blendMode the SDL_BlendMode to use for texture blending
484 * \returns 0 on success or a negative error code on failure; call
485 * SDL_GetError() for more information.
486 *
487 * \since This function is available since SDL 2.0.0.
488 *
489 * \sa SDL_GetTextureBlendMode
490 * \sa SDL_RenderCopy
491 */
492 extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
493 SDL_BlendMode blendMode);
494
495 /**
496 * Get the blend mode used for texture copy operations.
497 *
498 * \param texture the texture to query
499 * \param blendMode a pointer filled in with the current SDL_BlendMode
500 * \returns 0 on success or a negative error code on failure; call
501 * SDL_GetError() for more information.
502 *
503 * \since This function is available since SDL 2.0.0.
504 *
505 * \sa SDL_SetTextureBlendMode
506 */
507 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
508 SDL_BlendMode *blendMode);
509
510 /**
511 * Set the scale mode used for texture scale operations.
512 *
513 * If the scale mode is not supported, the closest supported mode is chosen.
514 *
515 * \param texture The texture to update.
516 * \param scaleMode the SDL_ScaleMode to use for texture scaling.
517 * \returns 0 on success, or -1 if the texture is not valid.
518 *
519 * \since This function is available since SDL 2.0.12.
520 *
521 * \sa SDL_GetTextureScaleMode
522 */
523 extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
524 SDL_ScaleMode scaleMode);
525
526 /**
527 * Get the scale mode used for texture scale operations.
528 *
529 * \param texture the texture to query.
530 * \param scaleMode a pointer filled in with the current scale mode.
531 * \return 0 on success, or -1 if the texture is not valid.
532 *
533 * \since This function is available since SDL 2.0.12.
534 *
535 * \sa SDL_SetTextureScaleMode
536 */
537 extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
538 SDL_ScaleMode *scaleMode);
539
540 /**
541 * Associate a user-specified pointer with a texture.
542 *
543 * \param texture the texture to update.
544 * \param userdata the pointer to associate with the texture.
545 * \returns 0 on success, or -1 if the texture is not valid.
546 *
547 * \since This function is available since SDL 2.0.18.
548 *
549 * \sa SDL_GetTextureUserData
550 */
551 extern DECLSPEC int SDLCALL SDL_SetTextureUserData(SDL_Texture * texture,
552 void *userdata);
553
554 /**
555 * Get the user-specified pointer associated with a texture
556 *
557 * \param texture the texture to query.
558 * \return the pointer associated with the texture, or NULL if the texture is
559 * not valid.
560 *
561 * \since This function is available since SDL 2.0.18.
562 *
563 * \sa SDL_SetTextureUserData
564 */
565 extern DECLSPEC void * SDLCALL SDL_GetTextureUserData(SDL_Texture * texture);
566
567 /**
568 * Update the given texture rectangle with new pixel data.
569 *
570 * The pixel data must be in the pixel format of the texture. Use
571 * SDL_QueryTexture() to query the pixel format of the texture.
572 *
573 * This is a fairly slow function, intended for use with static textures that
574 * do not change often.
575 *
576 * If the texture is intended to be updated often, it is preferred to create
577 * the texture as streaming and use the locking functions referenced below.
578 * While this function will work with streaming textures, for optimization
579 * reasons you may not get the pixels back if you lock the texture afterward.
580 *
581 * \param texture the texture to update
582 * \param rect an SDL_Rect structure representing the area to update, or NULL
583 * to update the entire texture
584 * \param pixels the raw pixel data in the format of the texture
585 * \param pitch the number of bytes in a row of pixel data, including padding
586 * between lines
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_CreateTexture
593 * \sa SDL_LockTexture
594 * \sa SDL_UnlockTexture
595 */
596 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
597 const SDL_Rect * rect,
598 const void *pixels, int pitch);
599
600 /**
601 * Update a rectangle within a planar YV12 or IYUV texture with new pixel
602 * data.
603 *
604 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
605 * block of Y and U/V planes in the proper order, but this function is
606 * available if your pixel data is not contiguous.
607 *
608 * \param texture the texture to update
609 * \param rect a pointer to the rectangle of pixels to update, or NULL to
610 * update the entire texture
611 * \param Yplane the raw pixel data for the Y plane
612 * \param Ypitch the number of bytes between rows of pixel data for the Y
613 * plane
614 * \param Uplane the raw pixel data for the U plane
615 * \param Upitch the number of bytes between rows of pixel data for the U
616 * plane
617 * \param Vplane the raw pixel data for the V plane
618 * \param Vpitch the number of bytes between rows of pixel data for the V
619 * plane
620 * \returns 0 on success or -1 if the texture is not valid; call
621 * SDL_GetError() for more information.
622 *
623 * \since This function is available since SDL 2.0.1.
624 *
625 * \sa SDL_UpdateTexture
626 */
627 extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
628 const SDL_Rect * rect,
629 const Uint8 *Yplane, int Ypitch,
630 const Uint8 *Uplane, int Upitch,
631 const Uint8 *Vplane, int Vpitch);
632
633 /**
634 * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
635 *
636 * You can use SDL_UpdateTexture() as long as your pixel data is a contiguous
637 * block of NV12/21 planes in the proper order, but this function is available
638 * if your pixel data is not contiguous.
639 *
640 * \param texture the texture to update
641 * \param rect a pointer to the rectangle of pixels to update, or NULL to
642 * update the entire texture.
643 * \param Yplane the raw pixel data for the Y plane.
644 * \param Ypitch the number of bytes between rows of pixel data for the Y
645 * plane.
646 * \param UVplane the raw pixel data for the UV plane.
647 * \param UVpitch the number of bytes between rows of pixel data for the UV
648 * plane.
649 * \return 0 on success, or -1 if the texture is not valid.
650 *
651 * \since This function is available since SDL 2.0.16.
652 */
653 extern DECLSPEC int SDLCALL SDL_UpdateNVTexture(SDL_Texture * texture,
654 const SDL_Rect * rect,
655 const Uint8 *Yplane, int Ypitch,
656 const Uint8 *UVplane, int UVpitch);
657
658 /**
659 * Lock a portion of the texture for **write-only** pixel access.
660 *
661 * As an optimization, the pixels made available for editing don't necessarily
662 * contain the old texture data. This is a write-only operation, and if you
663 * need to keep a copy of the texture data you should do that at the
664 * application level.
665 *
666 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
667 * changes.
668 *
669 * \param texture the texture to lock for access, which was created with
670 * `SDL_TEXTUREACCESS_STREAMING`
671 * \param rect an SDL_Rect structure representing the area to lock for access;
672 * NULL to lock the entire texture
673 * \param pixels this is filled in with a pointer to the locked pixels,
674 * appropriately offset by the locked area
675 * \param pitch this is filled in with the pitch of the locked pixels; the
676 * pitch is the length of one row in bytes
677 * \returns 0 on success or a negative error code if the texture is not valid
678 * or was not created with `SDL_TEXTUREACCESS_STREAMING`; call
679 * SDL_GetError() for more information.
680 *
681 * \since This function is available since SDL 2.0.0.
682 *
683 * \sa SDL_UnlockTexture
684 */
685 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
686 const SDL_Rect * rect,
687 void **pixels, int *pitch);
688
689 /**
690 * Lock a portion of the texture for **write-only** pixel access, and expose
691 * it as a SDL surface.
692 *
693 * Besides providing an SDL_Surface instead of raw pixel data, this function
694 * operates like SDL_LockTexture.
695 *
696 * As an optimization, the pixels made available for editing don't necessarily
697 * contain the old texture data. This is a write-only operation, and if you
698 * need to keep a copy of the texture data you should do that at the
699 * application level.
700 *
701 * You must use SDL_UnlockTexture() to unlock the pixels and apply any
702 * changes.
703 *
704 * The returned surface is freed internally after calling SDL_UnlockTexture()
705 * or SDL_DestroyTexture(). The caller should not free it.
706 *
707 * \param texture the texture to lock for access, which was created with
708 * `SDL_TEXTUREACCESS_STREAMING`
709 * \param rect a pointer to the rectangle to lock for access. If the rect is
710 * NULL, the entire texture will be locked
711 * \param surface this is filled in with an SDL surface representing the
712 * locked area
713 * \returns 0 on success, or -1 if the texture is not valid or was not created
714 * with `SDL_TEXTUREACCESS_STREAMING`
715 *
716 * \since This function is available since SDL 2.0.12.
717 *
718 * \sa SDL_LockTexture
719 * \sa SDL_UnlockTexture
720 */
721 extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
722 const SDL_Rect *rect,
723 SDL_Surface **surface);
724
725 /**
726 * Unlock a texture, uploading the changes to video memory, if needed.
727 *
728 * **Warning**: Please note that SDL_LockTexture() is intended to be
729 * write-only; it will not guarantee the previous contents of the texture will
730 * be provided. You must fully initialize any area of a texture that you lock
731 * before unlocking it, as the pixels might otherwise be uninitialized memory.
732 *
733 * Which is to say: locking and immediately unlocking a texture can result in
734 * corrupted textures, depending on the renderer in use.
735 *
736 * \param texture a texture locked by SDL_LockTexture()
737 *
738 * \since This function is available since SDL 2.0.0.
739 *
740 * \sa SDL_LockTexture
741 */
742 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
743
744 /**
745 * Determine whether a renderer supports the use of render targets.
746 *
747 * \param renderer the renderer that will be checked
748 * \returns SDL_TRUE if supported or SDL_FALSE if not.
749 *
750 * \since This function is available since SDL 2.0.0.
751 *
752 * \sa SDL_SetRenderTarget
753 */
754 extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
755
756 /**
757 * Set a texture as the current rendering target.
758 *
759 * Before using this function, you should check the
760 * `SDL_RENDERER_TARGETTEXTURE` bit in the flags of SDL_RendererInfo to see if
761 * render targets are supported.
762 *
763 * The default render target is the window for which the renderer was created.
764 * To stop rendering to a texture and render to the window again, call this
765 * function with a NULL `texture`.
766 *
767 * \param renderer the rendering context
768 * \param texture the targeted texture, which must be created with the
769 * `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the
770 * window instead of a texture.
771 * \returns 0 on success or a negative error code on failure; call
772 * SDL_GetError() for more information.
773 *
774 * \since This function is available since SDL 2.0.0.
775 *
776 * \sa SDL_GetRenderTarget
777 */
778 extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
779 SDL_Texture *texture);
780
781 /**
782 * Get the current render target.
783 *
784 * The default render target is the window for which the renderer was created,
785 * and is reported a NULL here.
786 *
787 * \param renderer the rendering context
788 * \returns the current render target or NULL for the default render target.
789 *
790 * \since This function is available since SDL 2.0.0.
791 *
792 * \sa SDL_SetRenderTarget
793 */
794 extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
795
796 /**
797 * Set a device independent resolution for rendering.
798 *
799 * This function uses the viewport and scaling functionality to allow a fixed
800 * logical resolution for rendering, regardless of the actual output
801 * resolution. If the actual output resolution doesn't have the same aspect
802 * ratio the output rendering will be centered within the output display.
803 *
804 * If the output display is a window, mouse and touch events in the window
805 * will be filtered and scaled so they seem to arrive within the logical
806 * resolution. The SDL_HINT_MOUSE_RELATIVE_SCALING hint controls whether
807 * relative motion events are also scaled.
808 *
809 * If this function results in scaling or subpixel drawing by the rendering
810 * backend, it will be handled using the appropriate quality hints.
811 *
812 * \param renderer the renderer for which resolution should be set
813 * \param w the width of the logical resolution
814 * \param h the height of the logical resolution
815 * \returns 0 on success or a negative error code on failure; call
816 * SDL_GetError() for more information.
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_RenderGetLogicalSize
821 */
822 extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
823
824 /**
825 * Get device independent resolution for rendering.
826 *
827 * This may return 0 for `w` and `h` if the SDL_Renderer has never had its
828 * logical size set by SDL_RenderSetLogicalSize() and never had a render
829 * target set.
830 *
831 * \param renderer a rendering context
832 * \param w an int to be filled with the width
833 * \param h an int to be filled with the height
834 *
835 * \since This function is available since SDL 2.0.0.
836 *
837 * \sa SDL_RenderSetLogicalSize
838 */
839 extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
840
841 /**
842 * Set whether to force integer scales for resolution-independent rendering.
843 *
844 * This function restricts the logical viewport to integer values - that is,
845 * when a resolution is between two multiples of a logical size, the viewport
846 * size is rounded down to the lower multiple.
847 *
848 * \param renderer the renderer for which integer scaling should be set
849 * \param enable enable or disable the integer scaling for rendering
850 * \returns 0 on success or a negative error code on failure; call
851 * SDL_GetError() for more information.
852 *
853 * \since This function is available since SDL 2.0.5.
854 *
855 * \sa SDL_RenderGetIntegerScale
856 * \sa SDL_RenderSetLogicalSize
857 */
858 extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
859 SDL_bool enable);
860
861 /**
862 * Get whether integer scales are forced for resolution-independent rendering.
863 *
864 * \param renderer the renderer from which integer scaling should be queried
865 * \returns SDL_TRUE if integer scales are forced or SDL_FALSE if not and on
866 * failure; call SDL_GetError() for more information.
867 *
868 * \since This function is available since SDL 2.0.5.
869 *
870 * \sa SDL_RenderSetIntegerScale
871 */
872 extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
873
874 /**
875 * Set the drawing area for rendering on the current target.
876 *
877 * When the window is resized, the viewport is reset to fill the entire new
878 * window size.
879 *
880 * \param renderer the rendering context
881 * \param rect the SDL_Rect structure representing the drawing area, or NULL
882 * to set the viewport to the entire target
883 * \returns 0 on success or a negative error code on failure; call
884 * SDL_GetError() for more information.
885 *
886 * \since This function is available since SDL 2.0.0.
887 *
888 * \sa SDL_RenderGetViewport
889 */
890 extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
891 const SDL_Rect * rect);
892
893 /**
894 * Get the drawing area for the current target.
895 *
896 * \param renderer the rendering context
897 * \param rect an SDL_Rect structure filled in with the current drawing area
898 *
899 * \since This function is available since SDL 2.0.0.
900 *
901 * \sa SDL_RenderSetViewport
902 */
903 extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
904 SDL_Rect * rect);
905
906 /**
907 * Set the clip rectangle for rendering on the specified target.
908 *
909 * \param renderer the rendering context for which clip rectangle should be
910 * set
911 * \param rect an SDL_Rect structure representing the clip area, relative to
912 * the viewport, or NULL to disable clipping
913 * \returns 0 on success or a negative error code on failure; call
914 * SDL_GetError() for more information.
915 *
916 * \since This function is available since SDL 2.0.0.
917 *
918 * \sa SDL_RenderGetClipRect
919 * \sa SDL_RenderIsClipEnabled
920 */
921 extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
922 const SDL_Rect * rect);
923
924 /**
925 * Get the clip rectangle for the current target.
926 *
927 * \param renderer the rendering context from which clip rectangle should be
928 * queried
929 * \param rect an SDL_Rect structure filled in with the current clipping area
930 * or an empty rectangle if clipping is disabled
931 *
932 * \since This function is available since SDL 2.0.0.
933 *
934 * \sa SDL_RenderIsClipEnabled
935 * \sa SDL_RenderSetClipRect
936 */
937 extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
938 SDL_Rect * rect);
939
940 /**
941 * Get whether clipping is enabled on the given renderer.
942 *
943 * \param renderer the renderer from which clip state should be queried
944 * \returns SDL_TRUE if clipping is enabled or SDL_FALSE if not; call
945 * SDL_GetError() for more information.
946 *
947 * \since This function is available since SDL 2.0.4.
948 *
949 * \sa SDL_RenderGetClipRect
950 * \sa SDL_RenderSetClipRect
951 */
952 extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
953
954
955 /**
956 * Set the drawing scale for rendering on the current target.
957 *
958 * The drawing coordinates are scaled by the x/y scaling factors before they
959 * are used by the renderer. This allows resolution independent drawing with a
960 * single coordinate system.
961 *
962 * If this results in scaling or subpixel drawing by the rendering backend, it
963 * will be handled using the appropriate quality hints. For best results use
964 * integer scaling factors.
965 *
966 * \param renderer a rendering context
967 * \param scaleX the horizontal scaling factor
968 * \param scaleY the vertical scaling factor
969 * \returns 0 on success or a negative error code on failure; call
970 * SDL_GetError() for more information.
971 *
972 * \since This function is available since SDL 2.0.0.
973 *
974 * \sa SDL_RenderGetScale
975 * \sa SDL_RenderSetLogicalSize
976 */
977 extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
978 float scaleX, float scaleY);
979
980 /**
981 * Get the drawing scale for the current target.
982 *
983 * \param renderer the renderer from which drawing scale should be queried
984 * \param scaleX a pointer filled in with the horizontal scaling factor
985 * \param scaleY a pointer filled in with the vertical scaling factor
986 *
987 * \since This function is available since SDL 2.0.0.
988 *
989 * \sa SDL_RenderSetScale
990 */
991 extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
992 float *scaleX, float *scaleY);
993
994 /**
995 * Get logical coordinates of point in renderer when given real coordinates of
996 * point in window.
997 *
998 * Logical coordinates will differ from real coordinates when render is scaled
999 * and logical renderer size set
1000 *
1001 * \param renderer the renderer from which the logical coordinates should be
1002 * calcualted
1003 * \param windowX the real X coordinate in the window
1004 * \param windowY the real Y coordinate in the window
1005 * \param logicalX the pointer filled with the logical x coordinate
1006 * \param logicalY the pointer filled with the logical y coordinate
1007 *
1008 * \since This function is available since SDL 2.0.18.
1009 *
1010 * \sa SDL_RenderGetScale
1011 * \sa SDL_RenderSetScale
1012 * \sa SDL_RenderGetLogicalSize
1013 * \sa SDL_RenderSetLogicalSize
1014 */
1015 extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
1016 int windowX, int windowY,
1017 float *logicalX, float *logicalY);
1018
1019 /**
1020 * Get real coordinates of point in window when given logical coordinates of point in renderer.
1021 * Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
1022 *
1023 * \param renderer the renderer from which the window coordinates should be calculated
1024 * \param logicalX the logical x coordinate
1025 * \param logicalY the logical y coordinate
1026 * \param windowX the pointer filled with the real X coordinate in the window
1027 * \param windowY the pointer filled with the real Y coordinate in the window
1028
1029 *
1030 * \since This function is available since SDL 2.0.18.
1031 *
1032 * \sa SDL_RenderGetScale
1033 * \sa SDL_RenderSetScale
1034 * \sa SDL_RenderGetLogicalSize
1035 * \sa SDL_RenderSetLogicalSize
1036 */
1037 extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
1038 float logicalX, float logicalY,
1039 int *windowX, int *windowY);
1040
1041 /**
1042 * Set the color used for drawing operations (Rect, Line and Clear).
1043 *
1044 * Set the color for drawing or filling rectangles, lines, and points, and for
1045 * SDL_RenderClear().
1046 *
1047 * \param renderer the rendering context
1048 * \param r the red value used to draw on the rendering target
1049 * \param g the green value used to draw on the rendering target
1050 * \param b the blue value used to draw on the rendering target
1051 * \param a the alpha value used to draw on the rendering target; usually
1052 * `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to
1053 * specify how the alpha channel is used
1054 * \returns 0 on success or a negative error code on failure; call
1055 * SDL_GetError() for more information.
1056 *
1057 * \since This function is available since SDL 2.0.0.
1058 *
1059 * \sa SDL_GetRenderDrawColor
1060 * \sa SDL_RenderClear
1061 * \sa SDL_RenderDrawLine
1062 * \sa SDL_RenderDrawLines
1063 * \sa SDL_RenderDrawPoint
1064 * \sa SDL_RenderDrawPoints
1065 * \sa SDL_RenderDrawRect
1066 * \sa SDL_RenderDrawRects
1067 * \sa SDL_RenderFillRect
1068 * \sa SDL_RenderFillRects
1069 */
1070 extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
1071 Uint8 r, Uint8 g, Uint8 b,
1072 Uint8 a);
1073
1074 /**
1075 * Get the color used for drawing operations (Rect, Line and Clear).
1076 *
1077 * \param renderer the rendering context
1078 * \param r a pointer filled in with the red value used to draw on the
1079 * rendering target
1080 * \param g a pointer filled in with the green value used to draw on the
1081 * rendering target
1082 * \param b a pointer filled in with the blue value used to draw on the
1083 * rendering target
1084 * \param a a pointer filled in with the alpha value used to draw on the
1085 * rendering target; usually `SDL_ALPHA_OPAQUE` (255)
1086 * \returns 0 on success or a negative error code on failure; call
1087 * SDL_GetError() for more information.
1088 *
1089 * \since This function is available since SDL 2.0.0.
1090 *
1091 * \sa SDL_SetRenderDrawColor
1092 */
1093 extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
1094 Uint8 * r, Uint8 * g, Uint8 * b,
1095 Uint8 * a);
1096
1097 /**
1098 * Set the blend mode used for drawing operations (Fill and Line).
1099 *
1100 * If the blend mode is not supported, the closest supported mode is chosen.
1101 *
1102 * \param renderer the rendering context
1103 * \param blendMode the SDL_BlendMode to use for blending
1104 * \returns 0 on success or a negative error code on failure; call
1105 * SDL_GetError() for more information.
1106 *
1107 * \since This function is available since SDL 2.0.0.
1108 *
1109 * \sa SDL_GetRenderDrawBlendMode
1110 * \sa SDL_RenderDrawLine
1111 * \sa SDL_RenderDrawLines
1112 * \sa SDL_RenderDrawPoint
1113 * \sa SDL_RenderDrawPoints
1114 * \sa SDL_RenderDrawRect
1115 * \sa SDL_RenderDrawRects
1116 * \sa SDL_RenderFillRect
1117 * \sa SDL_RenderFillRects
1118 */
1119 extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
1120 SDL_BlendMode blendMode);
1121
1122 /**
1123 * Get the blend mode used for drawing operations.
1124 *
1125 * \param renderer the rendering context
1126 * \param blendMode a pointer filled in with the current SDL_BlendMode
1127 * \returns 0 on success or a negative error code on failure; call
1128 * SDL_GetError() for more information.
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_SetRenderDrawBlendMode
1133 */
1134 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
1135 SDL_BlendMode *blendMode);
1136
1137 /**
1138 * Clear the current rendering target with the drawing color.
1139 *
1140 * This function clears the entire rendering target, ignoring the viewport and
1141 * the clip rectangle.
1142 *
1143 * \param renderer the rendering context
1144 * \returns 0 on success or a negative error code on failure; call
1145 * SDL_GetError() for more information.
1146 *
1147 * \since This function is available since SDL 2.0.0.
1148 *
1149 * \sa SDL_SetRenderDrawColor
1150 */
1151 extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
1152
1153 /**
1154 * Draw a point on the current rendering target.
1155 *
1156 * SDL_RenderDrawPoint() draws a single point. If you want to draw multiple,
1157 * use SDL_RenderDrawPoints() instead.
1158 *
1159 * \param renderer the rendering context
1160 * \param x the x coordinate of the point
1161 * \param y the y coordinate of the point
1162 * \returns 0 on success or a negative error code on failure; call
1163 * SDL_GetError() for more information.
1164 *
1165 * \since This function is available since SDL 2.0.0.
1166 *
1167 * \sa SDL_RenderDrawLine
1168 * \sa SDL_RenderDrawLines
1169 * \sa SDL_RenderDrawPoints
1170 * \sa SDL_RenderDrawRect
1171 * \sa SDL_RenderDrawRects
1172 * \sa SDL_RenderFillRect
1173 * \sa SDL_RenderFillRects
1174 * \sa SDL_RenderPresent
1175 * \sa SDL_SetRenderDrawBlendMode
1176 * \sa SDL_SetRenderDrawColor
1177 */
1178 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
1179 int x, int y);
1180
1181 /**
1182 * Draw multiple points on the current rendering target.
1183 *
1184 * \param renderer the rendering context
1185 * \param points an array of SDL_Point structures that represent the points to
1186 * draw
1187 * \param count the number of points to draw
1188 * \returns 0 on success or a negative error code on failure; call
1189 * SDL_GetError() for more information.
1190 *
1191 * \since This function is available since SDL 2.0.0.
1192 *
1193 * \sa SDL_RenderDrawLine
1194 * \sa SDL_RenderDrawLines
1195 * \sa SDL_RenderDrawPoint
1196 * \sa SDL_RenderDrawRect
1197 * \sa SDL_RenderDrawRects
1198 * \sa SDL_RenderFillRect
1199 * \sa SDL_RenderFillRects
1200 * \sa SDL_RenderPresent
1201 * \sa SDL_SetRenderDrawBlendMode
1202 * \sa SDL_SetRenderDrawColor
1203 */
1204 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
1205 const SDL_Point * points,
1206 int count);
1207
1208 /**
1209 * Draw a line on the current rendering target.
1210 *
1211 * SDL_RenderDrawLine() draws the line to include both end points. If you want
1212 * to draw multiple, connecting lines use SDL_RenderDrawLines() instead.
1213 *
1214 * \param renderer the rendering context
1215 * \param x1 the x coordinate of the start point
1216 * \param y1 the y coordinate of the start point
1217 * \param x2 the x coordinate of the end point
1218 * \param y2 the y coordinate of the end point
1219 * \returns 0 on success or a negative error code on failure; call
1220 * SDL_GetError() for more information.
1221 *
1222 * \since This function is available since SDL 2.0.0.
1223 *
1224 * \sa SDL_RenderDrawLines
1225 * \sa SDL_RenderDrawPoint
1226 * \sa SDL_RenderDrawPoints
1227 * \sa SDL_RenderDrawRect
1228 * \sa SDL_RenderDrawRects
1229 * \sa SDL_RenderFillRect
1230 * \sa SDL_RenderFillRects
1231 * \sa SDL_RenderPresent
1232 * \sa SDL_SetRenderDrawBlendMode
1233 * \sa SDL_SetRenderDrawColor
1234 */
1235 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
1236 int x1, int y1, int x2, int y2);
1237
1238 /**
1239 * Draw a series of connected lines on the current rendering target.
1240 *
1241 * \param renderer the rendering context
1242 * \param points an array of SDL_Point structures representing points along
1243 * the lines
1244 * \param count the number of points, drawing count-1 lines
1245 * \returns 0 on success or a negative error code on failure; call
1246 * SDL_GetError() for more information.
1247 *
1248 * \since This function is available since SDL 2.0.0.
1249 *
1250 * \sa SDL_RenderDrawLine
1251 * \sa SDL_RenderDrawPoint
1252 * \sa SDL_RenderDrawPoints
1253 * \sa SDL_RenderDrawRect
1254 * \sa SDL_RenderDrawRects
1255 * \sa SDL_RenderFillRect
1256 * \sa SDL_RenderFillRects
1257 * \sa SDL_RenderPresent
1258 * \sa SDL_SetRenderDrawBlendMode
1259 * \sa SDL_SetRenderDrawColor
1260 */
1261 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
1262 const SDL_Point * points,
1263 int count);
1264
1265 /**
1266 * Draw a rectangle on the current rendering target.
1267 *
1268 * \param renderer the rendering context
1269 * \param rect an SDL_Rect structure representing the rectangle to draw, or
1270 * NULL to outline the entire rendering target
1271 * \returns 0 on success or a negative error code on failure; call
1272 * SDL_GetError() for more information.
1273 *
1274 * \since This function is available since SDL 2.0.0.
1275 *
1276 * \sa SDL_RenderDrawLine
1277 * \sa SDL_RenderDrawLines
1278 * \sa SDL_RenderDrawPoint
1279 * \sa SDL_RenderDrawPoints
1280 * \sa SDL_RenderDrawRects
1281 * \sa SDL_RenderFillRect
1282 * \sa SDL_RenderFillRects
1283 * \sa SDL_RenderPresent
1284 * \sa SDL_SetRenderDrawBlendMode
1285 * \sa SDL_SetRenderDrawColor
1286 */
1287 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
1288 const SDL_Rect * rect);
1289
1290 /**
1291 * Draw some number of rectangles on the current rendering target.
1292 *
1293 * \param renderer the rendering context
1294 * \param rects an array of SDL_Rect structures representing the rectangles to
1295 * be drawn
1296 * \param count the number of rectangles
1297 * \returns 0 on success or a negative error code on failure; call
1298 * SDL_GetError() for more information.
1299 *
1300 * \since This function is available since SDL 2.0.0.
1301 *
1302 * \sa SDL_RenderDrawLine
1303 * \sa SDL_RenderDrawLines
1304 * \sa SDL_RenderDrawPoint
1305 * \sa SDL_RenderDrawPoints
1306 * \sa SDL_RenderDrawRect
1307 * \sa SDL_RenderFillRect
1308 * \sa SDL_RenderFillRects
1309 * \sa SDL_RenderPresent
1310 * \sa SDL_SetRenderDrawBlendMode
1311 * \sa SDL_SetRenderDrawColor
1312 */
1313 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
1314 const SDL_Rect * rects,
1315 int count);
1316
1317 /**
1318 * Fill a rectangle on the current rendering target with the drawing color.
1319 *
1320 * The current drawing color is set by SDL_SetRenderDrawColor(), and the
1321 * color's alpha value is ignored unless blending is enabled with the
1322 * appropriate call to SDL_SetRenderDrawBlendMode().
1323 *
1324 * \param renderer the rendering context
1325 * \param rect the SDL_Rect structure representing the rectangle to fill, or
1326 * NULL for the entire rendering target
1327 * \returns 0 on success or a negative error code on failure; call
1328 * SDL_GetError() for more information.
1329 *
1330 * \since This function is available since SDL 2.0.0.
1331 *
1332 * \sa SDL_RenderDrawLine
1333 * \sa SDL_RenderDrawLines
1334 * \sa SDL_RenderDrawPoint
1335 * \sa SDL_RenderDrawPoints
1336 * \sa SDL_RenderDrawRect
1337 * \sa SDL_RenderDrawRects
1338 * \sa SDL_RenderFillRects
1339 * \sa SDL_RenderPresent
1340 * \sa SDL_SetRenderDrawBlendMode
1341 * \sa SDL_SetRenderDrawColor
1342 */
1343 extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
1344 const SDL_Rect * rect);
1345
1346 /**
1347 * Fill some number of rectangles on the current rendering target with the
1348 * drawing color.
1349 *
1350 * \param renderer the rendering context
1351 * \param rects an array of SDL_Rect structures representing the rectangles to
1352 * be filled
1353 * \param count the number of rectangles
1354 * \returns 0 on success or a negative error code on failure; call
1355 * SDL_GetError() for more information.
1356 *
1357 * \since This function is available since SDL 2.0.0.
1358 *
1359 * \sa SDL_RenderDrawLine
1360 * \sa SDL_RenderDrawLines
1361 * \sa SDL_RenderDrawPoint
1362 * \sa SDL_RenderDrawPoints
1363 * \sa SDL_RenderDrawRect
1364 * \sa SDL_RenderDrawRects
1365 * \sa SDL_RenderFillRect
1366 * \sa SDL_RenderPresent
1367 */
1368 extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
1369 const SDL_Rect * rects,
1370 int count);
1371
1372 /**
1373 * Copy a portion of the texture to the current rendering target.
1374 *
1375 * The texture is blended with the destination based on its blend mode set
1376 * with SDL_SetTextureBlendMode().
1377 *
1378 * The texture color is affected based on its color modulation set by
1379 * SDL_SetTextureColorMod().
1380 *
1381 * The texture alpha is affected based on its alpha modulation set by
1382 * SDL_SetTextureAlphaMod().
1383 *
1384 * \param renderer the rendering context
1385 * \param texture the source texture
1386 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1387 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1388 * rendering target; the texture will be stretched to fill the
1389 * given rectangle
1390 * \returns 0 on success or a negative error code on failure; call
1391 * SDL_GetError() for more information.
1392 *
1393 * \since This function is available since SDL 2.0.0.
1394 *
1395 * \sa SDL_RenderCopyEx
1396 * \sa SDL_SetTextureAlphaMod
1397 * \sa SDL_SetTextureBlendMode
1398 * \sa SDL_SetTextureColorMod
1399 */
1400 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
1401 SDL_Texture * texture,
1402 const SDL_Rect * srcrect,
1403 const SDL_Rect * dstrect);
1404
1405 /**
1406 * Copy a portion of the texture to the current rendering, with optional
1407 * rotation and flipping.
1408 *
1409 * Copy a portion of the texture to the current rendering target, optionally
1410 * rotating it by angle around the given center and also flipping it
1411 * top-bottom and/or left-right.
1412 *
1413 * The texture is blended with the destination based on its blend mode set
1414 * with SDL_SetTextureBlendMode().
1415 *
1416 * The texture color is affected based on its color modulation set by
1417 * SDL_SetTextureColorMod().
1418 *
1419 * The texture alpha is affected based on its alpha modulation set by
1420 * SDL_SetTextureAlphaMod().
1421 *
1422 * \param renderer the rendering context
1423 * \param texture the source texture
1424 * \param srcrect the source SDL_Rect structure or NULL for the entire texture
1425 * \param dstrect the destination SDL_Rect structure or NULL for the entire
1426 * rendering target
1427 * \param angle an angle in degrees that indicates the rotation that will be
1428 * applied to dstrect, rotating it in a clockwise direction
1429 * \param center a pointer to a point indicating the point around which
1430 * dstrect will be rotated (if NULL, rotation will be done
1431 * around `dstrect.w / 2`, `dstrect.h / 2`)
1432 * \param flip a SDL_RendererFlip value stating which flipping actions should
1433 * be performed on the texture
1434 * \returns 0 on success or a negative error code on failure; call
1435 * SDL_GetError() for more information.
1436 *
1437 * \since This function is available since SDL 2.0.0.
1438 *
1439 * \sa SDL_RenderCopy
1440 * \sa SDL_SetTextureAlphaMod
1441 * \sa SDL_SetTextureBlendMode
1442 * \sa SDL_SetTextureColorMod
1443 */
1444 extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
1445 SDL_Texture * texture,
1446 const SDL_Rect * srcrect,
1447 const SDL_Rect * dstrect,
1448 const double angle,
1449 const SDL_Point *center,
1450 const SDL_RendererFlip flip);
1451
1452
1453 /**
1454 * Draw a point on the current rendering target at subpixel precision.
1455 *
1456 * \param renderer The renderer which should draw a point.
1457 * \param x The x coordinate of the point.
1458 * \param y The y coordinate of the point.
1459 * \return 0 on success, or -1 on error
1460 *
1461 * \since This function is available since SDL 2.0.10.
1462 */
1463 extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
1464 float x, float y);
1465
1466 /**
1467 * Draw multiple points on the current rendering target at subpixel precision.
1468 *
1469 * \param renderer The renderer which should draw multiple points.
1470 * \param points The points to draw
1471 * \param count The number of points to draw
1472 * \return 0 on success, or -1 on error
1473 *
1474 * \since This function is available since SDL 2.0.10.
1475 */
1476 extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
1477 const SDL_FPoint * points,
1478 int count);
1479
1480 /**
1481 * Draw a line on the current rendering target at subpixel precision.
1482 *
1483 * \param renderer The renderer which should draw a line.
1484 * \param x1 The x coordinate of the start point.
1485 * \param y1 The y coordinate of the start point.
1486 * \param x2 The x coordinate of the end point.
1487 * \param y2 The y coordinate of the end point.
1488 * \return 0 on success, or -1 on error
1489 *
1490 * \since This function is available since SDL 2.0.10.
1491 */
1492 extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
1493 float x1, float y1, float x2, float y2);
1494
1495 /**
1496 * Draw a series of connected lines on the current rendering target at
1497 * subpixel precision.
1498 *
1499 * \param renderer The renderer which should draw multiple lines.
1500 * \param points The points along the lines
1501 * \param count The number of points, drawing count-1 lines
1502 * \return 0 on success, or -1 on error
1503 *
1504 * \since This function is available since SDL 2.0.10.
1505 */
1506 extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
1507 const SDL_FPoint * points,
1508 int count);
1509
1510 /**
1511 * Draw a rectangle on the current rendering target at subpixel precision.
1512 *
1513 * \param renderer The renderer which should draw a rectangle.
1514 * \param rect A pointer to the destination rectangle, or NULL to outline the
1515 * entire rendering target.
1516 * \return 0 on success, or -1 on error
1517 *
1518 * \since This function is available since SDL 2.0.10.
1519 */
1520 extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
1521 const SDL_FRect * rect);
1522
1523 /**
1524 * Draw some number of rectangles on the current rendering target at subpixel
1525 * precision.
1526 *
1527 * \param renderer The renderer which should draw multiple rectangles.
1528 * \param rects A pointer to an array of destination rectangles.
1529 * \param count The number of rectangles.
1530 * \return 0 on success, or -1 on error
1531 *
1532 * \since This function is available since SDL 2.0.10.
1533 */
1534 extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
1535 const SDL_FRect * rects,
1536 int count);
1537
1538 /**
1539 * Fill a rectangle on the current rendering target with the drawing color at
1540 * subpixel precision.
1541 *
1542 * \param renderer The renderer which should fill a rectangle.
1543 * \param rect A pointer to the destination rectangle, or NULL for the entire
1544 * rendering target.
1545 * \return 0 on success, or -1 on error
1546 *
1547 * \since This function is available since SDL 2.0.10.
1548 */
1549 extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
1550 const SDL_FRect * rect);
1551
1552 /**
1553 * Fill some number of rectangles on the current rendering target with the
1554 * drawing color at subpixel precision.
1555 *
1556 * \param renderer The renderer which should fill multiple rectangles.
1557 * \param rects A pointer to an array of destination rectangles.
1558 * \param count The number of rectangles.
1559 * \return 0 on success, or -1 on error
1560 *
1561 * \since This function is available since SDL 2.0.10.
1562 */
1563 extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
1564 const SDL_FRect * rects,
1565 int count);
1566
1567 /**
1568 * Copy a portion of the texture to the current rendering target at subpixel
1569 * precision.
1570 *
1571 * \param renderer The renderer which should copy parts of a texture.
1572 * \param texture The source texture.
1573 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1574 * texture.
1575 * \param dstrect A pointer to the destination rectangle, or NULL for the
1576 * entire rendering target.
1577 * \return 0 on success, or -1 on error
1578 *
1579 * \since This function is available since SDL 2.0.10.
1580 */
1581 extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
1582 SDL_Texture * texture,
1583 const SDL_Rect * srcrect,
1584 const SDL_FRect * dstrect);
1585
1586 /**
1587 * Copy a portion of the source texture to the current rendering target, with
1588 * rotation and flipping, at subpixel precision.
1589 *
1590 * \param renderer The renderer which should copy parts of a texture.
1591 * \param texture The source texture.
1592 * \param srcrect A pointer to the source rectangle, or NULL for the entire
1593 * texture.
1594 * \param dstrect A pointer to the destination rectangle, or NULL for the
1595 * entire rendering target.
1596 * \param angle An angle in degrees that indicates the rotation that will be
1597 * applied to dstrect, rotating it in a clockwise direction
1598 * \param center A pointer to a point indicating the point around which
1599 * dstrect will be rotated (if NULL, rotation will be done
1600 * around dstrect.w/2, dstrect.h/2).
1601 * \param flip An SDL_RendererFlip value stating which flipping actions should
1602 * be performed on the texture
1603 * \return 0 on success, or -1 on error
1604 *
1605 * \since This function is available since SDL 2.0.10.
1606 */
1607 extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
1608 SDL_Texture * texture,
1609 const SDL_Rect * srcrect,
1610 const SDL_FRect * dstrect,
1611 const double angle,
1612 const SDL_FPoint *center,
1613 const SDL_RendererFlip flip);
1614
1615 /**
1616 * Render a list of triangles, optionally using a texture and indices into the
1617 * vertex array Color and alpha modulation is done per vertex
1618 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1619 *
1620 * \param renderer The rendering context.
1621 * \param texture (optional) The SDL texture to use.
1622 * \param vertices Vertices.
1623 * \param num_vertices Number of vertices.
1624 * \param indices (optional) An array of integer indices into the 'vertices'
1625 * array, if NULL all vertices will be rendered in sequential
1626 * order.
1627 * \param num_indices Number of indices.
1628 * \return 0 on success, or -1 if the operation is not supported
1629 *
1630 * \since This function is available since SDL 2.0.18.
1631 *
1632 * \sa SDL_RenderGeometryRaw
1633 * \sa SDL_Vertex
1634 */
1635 extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
1636 SDL_Texture *texture,
1637 const SDL_Vertex *vertices, int num_vertices,
1638 const int *indices, int num_indices);
1639
1640 /**
1641 * Render a list of triangles, optionally using a texture and indices into the
1642 * vertex arrays Color and alpha modulation is done per vertex
1643 * (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
1644 *
1645 * \param renderer The rendering context.
1646 * \param texture (optional) The SDL texture to use.
1647 * \param xy Vertex positions
1648 * \param xy_stride Byte size to move from one element to the next element
1649 * \param color Vertex colors (as SDL_Color)
1650 * \param color_stride Byte size to move from one element to the next element
1651 * \param uv Vertex normalized texture coordinates
1652 * \param uv_stride Byte size to move from one element to the next element
1653 * \param num_vertices Number of vertices.
1654 * \param indices (optional) An array of indices into the 'vertices' arrays,
1655 * if NULL all vertices will be rendered in sequential order.
1656 * \param num_indices Number of indices.
1657 * \param size_indices Index size: 1 (byte), 2 (short), 4 (int)
1658 * \return 0 on success, or -1 if the operation is not supported
1659 *
1660 * \since This function is available since SDL 2.0.18.
1661 *
1662 * \sa SDL_RenderGeometry
1663 * \sa SDL_Vertex
1664 */
1665 extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
1666 SDL_Texture *texture,
1667 const float *xy, int xy_stride,
1668 const SDL_Color *color, int color_stride,
1669 const float *uv, int uv_stride,
1670 int num_vertices,
1671 const void *indices, int num_indices, int size_indices);
1672
1673 /**
1674 * Read pixels from the current rendering target to an array of pixels.
1675 *
1676 * **WARNING**: This is a very slow operation, and should not be used
1677 * frequently. If you're using this on the main rendering target, it should be
1678 * called after rendering and before SDL_RenderPresent().
1679 *
1680 * `pitch` specifies the number of bytes between rows in the destination
1681 * `pixels` data. This allows you to write to a subrectangle or have padded
1682 * rows in the destination. Generally, `pitch` should equal the number of
1683 * pixels per row in the `pixels` data times the number of bytes per pixel,
1684 * but it might contain additional padding (for example, 24bit RGB Windows
1685 * Bitmap data pads all rows to multiples of 4 bytes).
1686 *
1687 * \param renderer the rendering context
1688 * \param rect an SDL_Rect structure representing the area to read, or NULL
1689 * for the entire render target
1690 * \param format an SDL_PixelFormatEnum value of the desired format of the
1691 * pixel data, or 0 to use the format of the rendering target
1692 * \param pixels a pointer to the pixel data to copy into
1693 * \param pitch the pitch of the `pixels` parameter
1694 * \returns 0 on success or a negative error code on failure; call
1695 * SDL_GetError() for more information.
1696 *
1697 * \since This function is available since SDL 2.0.0.
1698 */
1699 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
1700 const SDL_Rect * rect,
1701 Uint32 format,
1702 void *pixels, int pitch);
1703
1704 /**
1705 * Update the screen with any rendering performed since the previous call.
1706 *
1707 * SDL's rendering functions operate on a backbuffer; that is, calling a
1708 * rendering function such as SDL_RenderDrawLine() does not directly put a
1709 * line on the screen, but rather updates the backbuffer. As such, you compose
1710 * your entire scene and *present* the composed backbuffer to the screen as a
1711 * complete picture.
1712 *
1713 * Therefore, when using SDL's rendering API, one does all drawing intended
1714 * for the frame, and then calls this function once per frame to present the
1715 * final drawing to the user.
1716 *
1717 * The backbuffer should be considered invalidated after each present; do not
1718 * assume that previous contents will exist between frames. You are strongly
1719 * encouraged to call SDL_RenderClear() to initialize the backbuffer before
1720 * starting each new frame's drawing, even if you plan to overwrite every
1721 * pixel.
1722 *
1723 * \param renderer the rendering context
1724 *
1725 * \since This function is available since SDL 2.0.0.
1726 *
1727 * \sa SDL_RenderClear
1728 * \sa SDL_RenderDrawLine
1729 * \sa SDL_RenderDrawLines
1730 * \sa SDL_RenderDrawPoint
1731 * \sa SDL_RenderDrawPoints
1732 * \sa SDL_RenderDrawRect
1733 * \sa SDL_RenderDrawRects
1734 * \sa SDL_RenderFillRect
1735 * \sa SDL_RenderFillRects
1736 * \sa SDL_SetRenderDrawBlendMode
1737 * \sa SDL_SetRenderDrawColor
1738 */
1739 extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
1740
1741 /**
1742 * Destroy the specified texture.
1743 *
1744 * Passing NULL or an otherwise invalid texture will set the SDL error message
1745 * to "Invalid texture".
1746 *
1747 * \param texture the texture to destroy
1748 *
1749 * \since This function is available since SDL 2.0.0.
1750 *
1751 * \sa SDL_CreateTexture
1752 * \sa SDL_CreateTextureFromSurface
1753 */
1754 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
1755
1756 /**
1757 * Destroy the rendering context for a window and free associated textures.
1758 *
1759 * \param renderer the rendering context
1760 *
1761 * \since This function is available since SDL 2.0.0.
1762 *
1763 * \sa SDL_CreateRenderer
1764 */
1765 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
1766
1767 /**
1768 * Force the rendering context to flush any pending commands to the underlying
1769 * rendering API.
1770 *
1771 * You do not need to (and in fact, shouldn't) call this function unless you
1772 * are planning to call into OpenGL/Direct3D/Metal/whatever directly in
1773 * addition to using an SDL_Renderer.
1774 *
1775 * This is for a very-specific case: if you are using SDL's render API, you
1776 * asked for a specific renderer backend (OpenGL, Direct3D, etc), you set
1777 * SDL_HINT_RENDER_BATCHING to "1", and you plan to make OpenGL/D3D/whatever
1778 * calls in addition to SDL render API calls. If all of this applies, you
1779 * should call SDL_RenderFlush() between calls to SDL's render API and the
1780 * low-level API you're using in cooperation.
1781 *
1782 * In all other cases, you can ignore this function. This is only here to get
1783 * maximum performance out of a specific situation. In all other cases, SDL
1784 * will do the right thing, perhaps at a performance loss.
1785 *
1786 * This function is first available in SDL 2.0.10, and is not needed in 2.0.9
1787 * and earlier, as earlier versions did not queue rendering commands at all,
1788 * instead flushing them to the OS immediately.
1789 *
1790 * \param renderer the rendering context
1791 * \returns 0 on success or a negative error code on failure; call
1792 * SDL_GetError() for more information.
1793 *
1794 * \since This function is available since SDL 2.0.10.
1795 */
1796 extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
1797
1798
1799 /**
1800 * Bind an OpenGL/ES/ES2 texture to the current context.
1801 *
1802 * This is for use with OpenGL instructions when rendering OpenGL primitives
1803 * directly.
1804 *
1805 * If not NULL, `texw` and `texh` will be filled with the width and height
1806 * values suitable for the provided texture. In most cases, both will be 1.0,
1807 * however, on systems that support the GL_ARB_texture_rectangle extension,
1808 * these values will actually be the pixel width and height used to create the
1809 * texture, so this factor needs to be taken into account when providing
1810 * texture coordinates to OpenGL.
1811 *
1812 * You need a renderer to create an SDL_Texture, therefore you can only use
1813 * this function with an implicit OpenGL context from SDL_CreateRenderer(),
1814 * not with your own OpenGL context. If you need control over your OpenGL
1815 * context, you need to write your own texture-loading methods.
1816 *
1817 * Also note that SDL may upload RGB textures as BGR (or vice-versa), and
1818 * re-order the color channels in the shaders phase, so the uploaded texture
1819 * may have swapped color channels.
1820 *
1821 * \param texture the texture to bind to the current OpenGL/ES/ES2 context
1822 * \param texw a pointer to a float value which will be filled with the
1823 * texture width or NULL if you don't need that value
1824 * \param texh a pointer to a float value which will be filled with the
1825 * texture height or NULL if you don't need that value
1826 * \returns 0 on success, or -1 if the operation is not supported; call
1827 * SDL_GetError() for more information.
1828 *
1829 * \since This function is available since SDL 2.0.0.
1830 *
1831 * \sa SDL_GL_MakeCurrent
1832 * \sa SDL_GL_UnbindTexture
1833 */
1834 extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
1835
1836 /**
1837 * Unbind an OpenGL/ES/ES2 texture from the current context.
1838 *
1839 * See SDL_GL_BindTexture() for examples on how to use these functions
1840 *
1841 * \param texture the texture to unbind from the current OpenGL/ES/ES2 context
1842 * \returns 0 on success, or -1 if the operation is not supported
1843 *
1844 * \since This function is available since SDL 2.0.0.
1845 *
1846 * \sa SDL_GL_BindTexture
1847 * \sa SDL_GL_MakeCurrent
1848 */
1849 extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
1850
1851 /**
1852 * Get the CAMetalLayer associated with the given Metal renderer.
1853 *
1854 * This function returns `void *`, so SDL doesn't have to include Metal's
1855 * headers, but it can be safely cast to a `CAMetalLayer *`.
1856 *
1857 * \param renderer The renderer to query
1858 * \returns a `CAMetalLayer *` on success, or NULL if the renderer isn't a
1859 * Metal renderer
1860 *
1861 * \since This function is available since SDL 2.0.8.
1862 *
1863 * \sa SDL_RenderGetMetalCommandEncoder
1864 */
1865 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
1866
1867 /**
1868 * Get the Metal command encoder for the current frame
1869 *
1870 * This function returns `void *`, so SDL doesn't have to include Metal's
1871 * headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.
1872 *
1873 * Note that as of SDL 2.0.18, this will return NULL if Metal refuses to give
1874 * SDL a drawable to render to, which might happen if the window is
1875 * hidden/minimized/offscreen. This doesn't apply to command encoders for
1876 * render targets, just the window's backbacker. Check your return values!
1877 *
1878 * \param renderer The renderer to query
1879 * \returns an `id<MTLRenderCommandEncoder>` on success, or NULL if the
1880 * renderer isn't a Metal renderer or there was an error.
1881 *
1882 * \since This function is available since SDL 2.0.8.
1883 *
1884 * \sa SDL_RenderGetMetalLayer
1885 */
1886 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
1887
1888 /**
1889 * Toggle VSync of the given renderer.
1890 *
1891 * \param renderer The renderer to toggle
1892 * \param vsync 1 for on, 0 for off. All other values are reserved
1893 * \returns a 0 int on success, or non-zero on failure
1894 *
1895 * \since This function is available since SDL 2.0.18.
1896 */
1897 extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
1898
1899 /* Ends C function definitions when using C++ */
1900 #ifdef __cplusplus
1901 }
1902 #endif
1903 #include <SDL2/close_code.h>
1904
1905 #endif /* SDL_render_h_ */
1906
1907 /* vi: set ts=4 sw=4 expandtab: */
0 #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@53dea9830964eee8b5c2a7ee0a65d6e268dc78a1"
1 #define SDL_REVISION_NUMBER 0
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_rwops.h
23 *
24 * This file provides a general interface for SDL to read and write
25 * data streams. It can easily be extended to files, memory, etc.
26 */
27
28 #ifndef SDL_rwops_h_
29 #define SDL_rwops_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /* RWops Types */
41 #define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
42 #define SDL_RWOPS_WINFILE 1U /**< Win32 file */
43 #define SDL_RWOPS_STDFILE 2U /**< Stdio file */
44 #define SDL_RWOPS_JNIFILE 3U /**< Android asset */
45 #define SDL_RWOPS_MEMORY 4U /**< Memory stream */
46 #define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
47 #if defined(__VITA__)
48 #define SDL_RWOPS_VITAFILE 6U /**< Vita file */
49 #endif
50
51 /**
52 * This is the read/write operation structure -- very basic.
53 */
54 typedef struct SDL_RWops
55 {
56 /**
57 * Return the size of the file in this rwops, or -1 if unknown
58 */
59 Sint64 (SDLCALL * size) (struct SDL_RWops * context);
60
61 /**
62 * Seek to \c offset relative to \c whence, one of stdio's whence values:
63 * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
64 *
65 * \return the final offset in the data stream, or -1 on error.
66 */
67 Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
68 int whence);
69
70 /**
71 * Read up to \c maxnum objects each of size \c size from the data
72 * stream to the area pointed at by \c ptr.
73 *
74 * \return the number of objects read, or 0 at error or end of file.
75 */
76 size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
77 size_t size, size_t maxnum);
78
79 /**
80 * Write exactly \c num objects each of size \c size from the area
81 * pointed at by \c ptr to data stream.
82 *
83 * \return the number of objects written, or 0 at error or end of file.
84 */
85 size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
86 size_t size, size_t num);
87
88 /**
89 * Close and free an allocated SDL_RWops structure.
90 *
91 * \return 0 if successful or -1 on write error when flushing data.
92 */
93 int (SDLCALL * close) (struct SDL_RWops * context);
94
95 Uint32 type;
96 union
97 {
98 #if defined(__ANDROID__)
99 struct
100 {
101 void *asset;
102 } androidio;
103 #elif defined(__WIN32__)
104 struct
105 {
106 SDL_bool append;
107 void *h;
108 struct
109 {
110 void *data;
111 size_t size;
112 size_t left;
113 } buffer;
114 } windowsio;
115 #elif defined(__VITA__)
116 struct
117 {
118 int h;
119 struct
120 {
121 void *data;
122 size_t size;
123 size_t left;
124 } buffer;
125 } vitaio;
126 #endif
127
128 #ifdef HAVE_STDIO_H
129 struct
130 {
131 SDL_bool autoclose;
132 FILE *fp;
133 } stdio;
134 #endif
135 struct
136 {
137 Uint8 *base;
138 Uint8 *here;
139 Uint8 *stop;
140 } mem;
141 struct
142 {
143 void *data1;
144 void *data2;
145 } unknown;
146 } hidden;
147
148 } SDL_RWops;
149
150
151 /**
152 * \name RWFrom functions
153 *
154 * Functions to create SDL_RWops structures from various data streams.
155 */
156 /* @{ */
157
158 /**
159 * Use this function to create a new SDL_RWops structure for reading from
160 * and/or writing to a named file.
161 *
162 * The `mode` string is treated roughly the same as in a call to the C
163 * library's fopen(), even if SDL doesn't happen to use fopen() behind the
164 * scenes.
165 *
166 * Available `mode` strings:
167 *
168 * - "r": Open a file for reading. The file must exist.
169 * - "w": Create an empty file for writing. If a file with the same name
170 * already exists its content is erased and the file is treated as a new
171 * empty file.
172 * - "a": Append to a file. Writing operations append data at the end of the
173 * file. The file is created if it does not exist.
174 * - "r+": Open a file for update both reading and writing. The file must
175 * exist.
176 * - "w+": Create an empty file for both reading and writing. If a file with
177 * the same name already exists its content is erased and the file is
178 * treated as a new empty file.
179 * - "a+": Open a file for reading and appending. All writing operations are
180 * performed at the end of the file, protecting the previous content to be
181 * overwritten. You can reposition (fseek, rewind) the internal pointer to
182 * anywhere in the file for reading, but writing operations will move it
183 * back to the end of file. The file is created if it does not exist.
184 *
185 * **NOTE**: In order to open a file as a binary file, a "b" character has to
186 * be included in the `mode` string. This additional "b" character can either
187 * be appended at the end of the string (thus making the following compound
188 * modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the
189 * letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+").
190 * Additional characters may follow the sequence, although they should have no
191 * effect. For example, "t" is sometimes appended to make explicit the file is
192 * a text file.
193 *
194 * This function supports Unicode filenames, but they must be encoded in UTF-8
195 * format, regardless of the underlying operating system.
196 *
197 * As a fallback, SDL_RWFromFile() will transparently open a matching filename
198 * in an Android app's `assets`.
199 *
200 * Closing the SDL_RWops will close the file handle SDL is holding internally.
201 *
202 * \param file a UTF-8 string representing the filename to open
203 * \param mode an ASCII string representing the mode to be used for opening
204 * the file.
205 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
206 * failure; call SDL_GetError() for more information.
207 *
208 * \since This function is available since SDL 2.0.0.
209 *
210 * \sa SDL_RWclose
211 * \sa SDL_RWFromConstMem
212 * \sa SDL_RWFromFP
213 * \sa SDL_RWFromMem
214 * \sa SDL_RWread
215 * \sa SDL_RWseek
216 * \sa SDL_RWtell
217 * \sa SDL_RWwrite
218 */
219 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
220 const char *mode);
221
222 #ifdef HAVE_STDIO_H
223
224 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose);
225
226 #else
227
228 /**
229 * Use this function to create an SDL_RWops structure from a standard I/O file
230 * pointer (stdio.h's `FILE*`).
231 *
232 * This function is not available on Windows, since files opened in an
233 * application on that platform cannot be used by a dynamically linked
234 * library.
235 *
236 * On some platforms, the first parameter is a `void*`, on others, it's a
237 * `FILE*`, depending on what system headers are available to SDL. It is
238 * always intended to be the `FILE*` type from the C runtime's stdio.h.
239 *
240 * \param fp the `FILE*` that feeds the SDL_RWops stream
241 * \param autoclose SDL_TRUE to close the `FILE*` when closing the SDL_RWops,
242 * SDL_FALSE to leave the `FILE*` open when the RWops is
243 * closed
244 * \returns a pointer to the SDL_RWops structure that is created, or NULL on
245 * failure; call SDL_GetError() for more information.
246 *
247 * \since This function is available since SDL 2.0.0.
248 *
249 * \sa SDL_RWclose
250 * \sa SDL_RWFromConstMem
251 * \sa SDL_RWFromFile
252 * \sa SDL_RWFromMem
253 * \sa SDL_RWread
254 * \sa SDL_RWseek
255 * \sa SDL_RWtell
256 * \sa SDL_RWwrite
257 */
258 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
259 SDL_bool autoclose);
260 #endif
261
262 /**
263 * Use this function to prepare a read-write memory buffer for use with
264 * SDL_RWops.
265 *
266 * This function sets up an SDL_RWops struct based on a memory area of a
267 * certain size, for both read and write access.
268 *
269 * This memory buffer is not copied by the RWops; the pointer you provide must
270 * remain valid until you close the stream. Closing the stream will not free
271 * the original buffer.
272 *
273 * If you need to make sure the RWops never writes to the memory buffer, you
274 * should use SDL_RWFromConstMem() with a read-only buffer of memory instead.
275 *
276 * \param mem a pointer to a buffer to feed an SDL_RWops stream
277 * \param size the buffer size, in bytes
278 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
279 * SDL_GetError() for more information.
280 *
281 * \since This function is available since SDL 2.0.0.
282 *
283 * \sa SDL_RWclose
284 * \sa SDL_RWFromConstMem
285 * \sa SDL_RWFromFile
286 * \sa SDL_RWFromFP
287 * \sa SDL_RWFromMem
288 * \sa SDL_RWread
289 * \sa SDL_RWseek
290 * \sa SDL_RWtell
291 * \sa SDL_RWwrite
292 */
293 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
294
295 /**
296 * Use this function to prepare a read-only memory buffer for use with RWops.
297 *
298 * This function sets up an SDL_RWops struct based on a memory area of a
299 * certain size. It assumes the memory area is not writable.
300 *
301 * Attempting to write to this RWops stream will report an error without
302 * writing to the memory buffer.
303 *
304 * This memory buffer is not copied by the RWops; the pointer you provide must
305 * remain valid until you close the stream. Closing the stream will not free
306 * the original buffer.
307 *
308 * If you need to write to a memory buffer, you should use SDL_RWFromMem()
309 * with a writable buffer of memory instead.
310 *
311 * \param mem a pointer to a read-only buffer to feed an SDL_RWops stream
312 * \param size the buffer size, in bytes
313 * \returns a pointer to a new SDL_RWops structure, or NULL if it fails; call
314 * SDL_GetError() for more information.
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_RWclose
319 * \sa SDL_RWFromConstMem
320 * \sa SDL_RWFromFile
321 * \sa SDL_RWFromFP
322 * \sa SDL_RWFromMem
323 * \sa SDL_RWread
324 * \sa SDL_RWseek
325 * \sa SDL_RWtell
326 */
327 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
328 int size);
329
330 /* @} *//* RWFrom functions */
331
332
333 /**
334 * Use this function to allocate an empty, unpopulated SDL_RWops structure.
335 *
336 * Applications do not need to use this function unless they are providing
337 * their own SDL_RWops implementation. If you just need a SDL_RWops to
338 * read/write a common data source, you should use the built-in
339 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc.
340 *
341 * You must free the returned pointer with SDL_FreeRW(). Depending on your
342 * operating system and compiler, there may be a difference between the
343 * malloc() and free() your program uses and the versions SDL calls
344 * internally. Trying to mix the two can cause crashing such as segmentation
345 * faults. Since all SDL_RWops must free themselves when their **close**
346 * method is called, all SDL_RWops must be allocated through this function, so
347 * they can all be freed correctly with SDL_FreeRW().
348 *
349 * \returns a pointer to the allocated memory on success, or NULL on failure;
350 * call SDL_GetError() for more information.
351 *
352 * \since This function is available since SDL 2.0.0.
353 *
354 * \sa SDL_FreeRW
355 */
356 extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
357
358 /**
359 * Use this function to free an SDL_RWops structure allocated by
360 * SDL_AllocRW().
361 *
362 * Applications do not need to use this function unless they are providing
363 * their own SDL_RWops implementation. If you just need a SDL_RWops to
364 * read/write a common data source, you should use the built-in
365 * implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and
366 * call the **close** method on those SDL_RWops pointers when you are done
367 * with them.
368 *
369 * Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is
370 * invalid as soon as this function returns. Any extra memory allocated during
371 * creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must
372 * be responsible for managing that memory in their **close** method.
373 *
374 * \param area the SDL_RWops structure to be freed
375 *
376 * \since This function is available since SDL 2.0.0.
377 *
378 * \sa SDL_AllocRW
379 */
380 extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
381
382 #define RW_SEEK_SET 0 /**< Seek from the beginning of data */
383 #define RW_SEEK_CUR 1 /**< Seek relative to current read point */
384 #define RW_SEEK_END 2 /**< Seek relative to the end of data */
385
386 /**
387 * Use this function to get the size of the data stream in an SDL_RWops.
388 *
389 * Prior to SDL 2.0.10, this function was a macro.
390 *
391 * \param context the SDL_RWops to get the size of the data stream from
392 * \returns the size of the data stream in the SDL_RWops on success, -1 if
393 * unknown or a negative error code on failure; call SDL_GetError()
394 * for more information.
395 *
396 * \since This function is available since SDL 2.0.10.
397 */
398 extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
399
400 /**
401 * Seek within an SDL_RWops data stream.
402 *
403 * This function seeks to byte `offset`, relative to `whence`.
404 *
405 * `whence` may be any of the following values:
406 *
407 * - `RW_SEEK_SET`: seek from the beginning of data
408 * - `RW_SEEK_CUR`: seek relative to current read point
409 * - `RW_SEEK_END`: seek relative to the end of data
410 *
411 * If this stream can not seek, it will return -1.
412 *
413 * SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
414 * `seek` method appropriately, to simplify application development.
415 *
416 * Prior to SDL 2.0.10, this function was a macro.
417 *
418 * \param context a pointer to an SDL_RWops structure
419 * \param offset an offset in bytes, relative to **whence** location; can be
420 * negative
421 * \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
422 * \returns the final offset in the data stream after the seek or -1 on error.
423 *
424 * \since This function is available since SDL 2.0.10.
425 *
426 * \sa SDL_RWclose
427 * \sa SDL_RWFromConstMem
428 * \sa SDL_RWFromFile
429 * \sa SDL_RWFromFP
430 * \sa SDL_RWFromMem
431 * \sa SDL_RWread
432 * \sa SDL_RWtell
433 * \sa SDL_RWwrite
434 */
435 extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
436 Sint64 offset, int whence);
437
438 /**
439 * Determine the current read/write offset in an SDL_RWops data stream.
440 *
441 * SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
442 * method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
443 * application development.
444 *
445 * Prior to SDL 2.0.10, this function was a macro.
446 *
447 * \param context a SDL_RWops data stream object from which to get the current
448 * offset
449 * \returns the current offset in the stream, or -1 if the information can not
450 * be determined.
451 *
452 * \since This function is available since SDL 2.0.10.
453 *
454 * \sa SDL_RWclose
455 * \sa SDL_RWFromConstMem
456 * \sa SDL_RWFromFile
457 * \sa SDL_RWFromFP
458 * \sa SDL_RWFromMem
459 * \sa SDL_RWread
460 * \sa SDL_RWseek
461 * \sa SDL_RWwrite
462 */
463 extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
464
465 /**
466 * Read from a data source.
467 *
468 * This function reads up to `maxnum` objects each of size `size` from the
469 * data source to the area pointed at by `ptr`. This function may read less
470 * objects than requested. It will return zero when there has been an error or
471 * the data stream is completely read.
472 *
473 * SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
474 * `read` method appropriately, to simplify application development.
475 *
476 * Prior to SDL 2.0.10, this function was a macro.
477 *
478 * \param context a pointer to an SDL_RWops structure
479 * \param ptr a pointer to a buffer to read data into
480 * \param size the size of each object to read, in bytes
481 * \param maxnum the maximum number of objects to be read
482 * \returns the number of objects read, or 0 at error or end of file; call
483 * SDL_GetError() for more information.
484 *
485 * \since This function is available since SDL 2.0.10.
486 *
487 * \sa SDL_RWclose
488 * \sa SDL_RWFromConstMem
489 * \sa SDL_RWFromFile
490 * \sa SDL_RWFromFP
491 * \sa SDL_RWFromMem
492 * \sa SDL_RWseek
493 * \sa SDL_RWwrite
494 */
495 extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
496 void *ptr, size_t size,
497 size_t maxnum);
498
499 /**
500 * Write to an SDL_RWops data stream.
501 *
502 * This function writes exactly `num` objects each of size `size` from the
503 * area pointed at by `ptr` to the stream. If this fails for any reason, it'll
504 * return less than `num` to demonstrate how far the write progressed. On
505 * success, it returns `num`.
506 *
507 * SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
508 * `write` method appropriately, to simplify application development.
509 *
510 * Prior to SDL 2.0.10, this function was a macro.
511 *
512 * \param context a pointer to an SDL_RWops structure
513 * \param ptr a pointer to a buffer containing data to write
514 * \param size the size of an object to write, in bytes
515 * \param num the number of objects to write
516 * \returns the number of objects written, which will be less than **num** on
517 * error; call SDL_GetError() for more information.
518 *
519 * \since This function is available since SDL 2.0.10.
520 *
521 * \sa SDL_RWclose
522 * \sa SDL_RWFromConstMem
523 * \sa SDL_RWFromFile
524 * \sa SDL_RWFromFP
525 * \sa SDL_RWFromMem
526 * \sa SDL_RWread
527 * \sa SDL_RWseek
528 */
529 extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
530 const void *ptr, size_t size,
531 size_t num);
532
533 /**
534 * Close and free an allocated SDL_RWops structure.
535 *
536 * SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
537 * resources used by the stream and frees the SDL_RWops itself with
538 * SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
539 * flush to its output (e.g. to disk).
540 *
541 * Note that if this fails to flush the stream to disk, this function reports
542 * an error, but the SDL_RWops is still invalid once this function returns.
543 *
544 * Prior to SDL 2.0.10, this function was a macro.
545 *
546 * \param context SDL_RWops structure to close
547 * \returns 0 on success or a negative error code on failure; call
548 * SDL_GetError() for more information.
549 *
550 * \since This function is available since SDL 2.0.10.
551 *
552 * \sa SDL_RWFromConstMem
553 * \sa SDL_RWFromFile
554 * \sa SDL_RWFromFP
555 * \sa SDL_RWFromMem
556 * \sa SDL_RWread
557 * \sa SDL_RWseek
558 * \sa SDL_RWwrite
559 */
560 extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
561
562 /**
563 * Load all the data from an SDL data stream.
564 *
565 * The data is allocated with a zero byte at the end (null terminated) for
566 * convenience. This extra byte is not included in the value reported via
567 * `datasize`.
568 *
569 * The data should be freed with SDL_free().
570 *
571 * \param src the SDL_RWops to read all available data from
572 * \param datasize if not NULL, will store the number of bytes read
573 * \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
574 * \returns the data, or NULL if there was an error.
575 *
576 * \since This function is available since SDL 2.0.6.
577 */
578 extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
579 size_t *datasize,
580 int freesrc);
581
582 /**
583 * Load all the data from a file path.
584 *
585 * The data is allocated with a zero byte at the end (null terminated) for
586 * convenience. This extra byte is not included in the value reported via
587 * `datasize`.
588 *
589 * The data should be freed with SDL_free().
590 *
591 * Prior to SDL 2.0.10, this function was a macro wrapping around
592 * SDL_LoadFile_RW.
593 *
594 * \param file the path to read all available data from
595 * \param datasize if not NULL, will store the number of bytes read
596 * \returns the data, or NULL if there was an error.
597 *
598 * \since This function is available since SDL 2.0.10.
599 */
600 extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
601
602 /**
603 * \name Read endian functions
604 *
605 * Read an item of the specified endianness and return in native format.
606 */
607 /* @{ */
608
609 /**
610 * Use this function to read a byte from an SDL_RWops.
611 *
612 * \param src the SDL_RWops to read from
613 * \returns the read byte on success or 0 on failure; call SDL_GetError() for
614 * more information.
615 *
616 * \since This function is available since SDL 2.0.0.
617 *
618 * \sa SDL_WriteU8
619 */
620 extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
621
622 /**
623 * Use this function to read 16 bits of little-endian data from an SDL_RWops
624 * and return in native format.
625 *
626 * SDL byteswaps the data only if necessary, so the data returned will be in
627 * the native byte order.
628 *
629 * \param src the stream from which to read data
630 * \returns 16 bits of data in the native byte order of the platform.
631 *
632 * \since This function is available since SDL 2.0.0.
633 *
634 * \sa SDL_ReadBE16
635 */
636 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
637
638 /**
639 * Use this function to read 16 bits of big-endian data from an SDL_RWops and
640 * return in native format.
641 *
642 * SDL byteswaps the data only if necessary, so the data returned will be in
643 * the native byte order.
644 *
645 * \param src the stream from which to read data
646 * \returns 16 bits of data in the native byte order of the platform.
647 *
648 * \since This function is available since SDL 2.0.0.
649 *
650 * \sa SDL_ReadLE16
651 */
652 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
653
654 /**
655 * Use this function to read 32 bits of little-endian data from an SDL_RWops
656 * and return in native format.
657 *
658 * SDL byteswaps the data only if necessary, so the data returned will be in
659 * the native byte order.
660 *
661 * \param src the stream from which to read data
662 * \returns 32 bits of data in the native byte order of the platform.
663 *
664 * \since This function is available since SDL 2.0.0.
665 *
666 * \sa SDL_ReadBE32
667 */
668 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
669
670 /**
671 * Use this function to read 32 bits of big-endian data from an SDL_RWops and
672 * return in native format.
673 *
674 * SDL byteswaps the data only if necessary, so the data returned will be in
675 * the native byte order.
676 *
677 * \param src the stream from which to read data
678 * \returns 32 bits of data in the native byte order of the platform.
679 *
680 * \since This function is available since SDL 2.0.0.
681 *
682 * \sa SDL_ReadLE32
683 */
684 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
685
686 /**
687 * Use this function to read 64 bits of little-endian data from an SDL_RWops
688 * and return in native format.
689 *
690 * SDL byteswaps the data only if necessary, so the data returned will be in
691 * the native byte order.
692 *
693 * \param src the stream from which to read data
694 * \returns 64 bits of data in the native byte order of the platform.
695 *
696 * \since This function is available since SDL 2.0.0.
697 *
698 * \sa SDL_ReadBE64
699 */
700 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
701
702 /**
703 * Use this function to read 64 bits of big-endian data from an SDL_RWops and
704 * return in native format.
705 *
706 * SDL byteswaps the data only if necessary, so the data returned will be in
707 * the native byte order.
708 *
709 * \param src the stream from which to read data
710 * \returns 64 bits of data in the native byte order of the platform.
711 *
712 * \since This function is available since SDL 2.0.0.
713 *
714 * \sa SDL_ReadLE64
715 */
716 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
717 /* @} *//* Read endian functions */
718
719 /**
720 * \name Write endian functions
721 *
722 * Write an item of native format to the specified endianness.
723 */
724 /* @{ */
725
726 /**
727 * Use this function to write a byte to an SDL_RWops.
728 *
729 * \param dst the SDL_RWops to write to
730 * \param value the byte value to write
731 * \returns 1 on success or 0 on failure; call SDL_GetError() for more
732 * information.
733 *
734 * \since This function is available since SDL 2.0.0.
735 *
736 * \sa SDL_ReadU8
737 */
738 extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
739
740 /**
741 * Use this function to write 16 bits in native format to a SDL_RWops as
742 * little-endian data.
743 *
744 * SDL byteswaps the data only if necessary, so the application always
745 * specifies native format, and the data written will be in little-endian
746 * format.
747 *
748 * \param dst the stream to which data will be written
749 * \param value the data to be written, in native format
750 * \returns 1 on successful write, 0 on error.
751 *
752 * \since This function is available since SDL 2.0.0.
753 *
754 * \sa SDL_WriteBE16
755 */
756 extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
757
758 /**
759 * Use this function to write 16 bits in native format to a SDL_RWops as
760 * big-endian data.
761 *
762 * SDL byteswaps the data only if necessary, so the application always
763 * specifies native format, and the data written will be in big-endian format.
764 *
765 * \param dst the stream to which data will be written
766 * \param value the data to be written, in native format
767 * \returns 1 on successful write, 0 on error.
768 *
769 * \since This function is available since SDL 2.0.0.
770 *
771 * \sa SDL_WriteLE16
772 */
773 extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
774
775 /**
776 * Use this function to write 32 bits in native format to a SDL_RWops as
777 * little-endian data.
778 *
779 * SDL byteswaps the data only if necessary, so the application always
780 * specifies native format, and the data written will be in little-endian
781 * format.
782 *
783 * \param dst the stream to which data will be written
784 * \param value the data to be written, in native format
785 * \returns 1 on successful write, 0 on error.
786 *
787 * \since This function is available since SDL 2.0.0.
788 *
789 * \sa SDL_WriteBE32
790 */
791 extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
792
793 /**
794 * Use this function to write 32 bits in native format to a SDL_RWops as
795 * big-endian data.
796 *
797 * SDL byteswaps the data only if necessary, so the application always
798 * specifies native format, and the data written will be in big-endian format.
799 *
800 * \param dst the stream to which data will be written
801 * \param value the data to be written, in native format
802 * \returns 1 on successful write, 0 on error.
803 *
804 * \since This function is available since SDL 2.0.0.
805 *
806 * \sa SDL_WriteLE32
807 */
808 extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
809
810 /**
811 * Use this function to write 64 bits in native format to a SDL_RWops as
812 * little-endian data.
813 *
814 * SDL byteswaps the data only if necessary, so the application always
815 * specifies native format, and the data written will be in little-endian
816 * format.
817 *
818 * \param dst the stream to which data will be written
819 * \param value the data to be written, in native format
820 * \returns 1 on successful write, 0 on error.
821 *
822 * \since This function is available since SDL 2.0.0.
823 *
824 * \sa SDL_WriteBE64
825 */
826 extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
827
828 /**
829 * Use this function to write 64 bits in native format to a SDL_RWops as
830 * big-endian data.
831 *
832 * SDL byteswaps the data only if necessary, so the application always
833 * specifies native format, and the data written will be in big-endian format.
834 *
835 * \param dst the stream to which data will be written
836 * \param value the data to be written, in native format
837 * \returns 1 on successful write, 0 on error.
838 *
839 * \since This function is available since SDL 2.0.0.
840 *
841 * \sa SDL_WriteLE64
842 */
843 extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
844 /* @} *//* Write endian functions */
845
846 /* Ends C function definitions when using C++ */
847 #ifdef __cplusplus
848 }
849 #endif
850 #include <SDL2/close_code.h>
851
852 #endif /* SDL_rwops_h_ */
853
854 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_scancode.h
23 *
24 * Defines keyboard scancodes.
25 */
26
27 #ifndef SDL_scancode_h_
28 #define SDL_scancode_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 /**
33 * \brief The SDL keyboard scancode representation.
34 *
35 * Values of this type are used to represent keyboard keys, among other places
36 * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
37 * SDL_Event structure.
38 *
39 * The values in this enumeration are based on the USB usage page standard:
40 * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
41 */
42 typedef enum
43 {
44 SDL_SCANCODE_UNKNOWN = 0,
45
46 /**
47 * \name Usage page 0x07
48 *
49 * These values are from usage page 0x07 (USB keyboard page).
50 */
51 /* @{ */
52
53 SDL_SCANCODE_A = 4,
54 SDL_SCANCODE_B = 5,
55 SDL_SCANCODE_C = 6,
56 SDL_SCANCODE_D = 7,
57 SDL_SCANCODE_E = 8,
58 SDL_SCANCODE_F = 9,
59 SDL_SCANCODE_G = 10,
60 SDL_SCANCODE_H = 11,
61 SDL_SCANCODE_I = 12,
62 SDL_SCANCODE_J = 13,
63 SDL_SCANCODE_K = 14,
64 SDL_SCANCODE_L = 15,
65 SDL_SCANCODE_M = 16,
66 SDL_SCANCODE_N = 17,
67 SDL_SCANCODE_O = 18,
68 SDL_SCANCODE_P = 19,
69 SDL_SCANCODE_Q = 20,
70 SDL_SCANCODE_R = 21,
71 SDL_SCANCODE_S = 22,
72 SDL_SCANCODE_T = 23,
73 SDL_SCANCODE_U = 24,
74 SDL_SCANCODE_V = 25,
75 SDL_SCANCODE_W = 26,
76 SDL_SCANCODE_X = 27,
77 SDL_SCANCODE_Y = 28,
78 SDL_SCANCODE_Z = 29,
79
80 SDL_SCANCODE_1 = 30,
81 SDL_SCANCODE_2 = 31,
82 SDL_SCANCODE_3 = 32,
83 SDL_SCANCODE_4 = 33,
84 SDL_SCANCODE_5 = 34,
85 SDL_SCANCODE_6 = 35,
86 SDL_SCANCODE_7 = 36,
87 SDL_SCANCODE_8 = 37,
88 SDL_SCANCODE_9 = 38,
89 SDL_SCANCODE_0 = 39,
90
91 SDL_SCANCODE_RETURN = 40,
92 SDL_SCANCODE_ESCAPE = 41,
93 SDL_SCANCODE_BACKSPACE = 42,
94 SDL_SCANCODE_TAB = 43,
95 SDL_SCANCODE_SPACE = 44,
96
97 SDL_SCANCODE_MINUS = 45,
98 SDL_SCANCODE_EQUALS = 46,
99 SDL_SCANCODE_LEFTBRACKET = 47,
100 SDL_SCANCODE_RIGHTBRACKET = 48,
101 SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
102 * key on ISO keyboards and at the right end
103 * of the QWERTY row on ANSI keyboards.
104 * Produces REVERSE SOLIDUS (backslash) and
105 * VERTICAL LINE in a US layout, REVERSE
106 * SOLIDUS and VERTICAL LINE in a UK Mac
107 * layout, NUMBER SIGN and TILDE in a UK
108 * Windows layout, DOLLAR SIGN and POUND SIGN
109 * in a Swiss German layout, NUMBER SIGN and
110 * APOSTROPHE in a German layout, GRAVE
111 * ACCENT and POUND SIGN in a French Mac
112 * layout, and ASTERISK and MICRO SIGN in a
113 * French Windows layout.
114 */
115 SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
116 * instead of 49 for the same key, but all
117 * OSes I've seen treat the two codes
118 * identically. So, as an implementor, unless
119 * your keyboard generates both of those
120 * codes and your OS treats them differently,
121 * you should generate SDL_SCANCODE_BACKSLASH
122 * instead of this code. As a user, you
123 * should not rely on this code because SDL
124 * will never generate it with most (all?)
125 * keyboards.
126 */
127 SDL_SCANCODE_SEMICOLON = 51,
128 SDL_SCANCODE_APOSTROPHE = 52,
129 SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
130 * and ISO keyboards). Produces GRAVE ACCENT and
131 * TILDE in a US Windows layout and in US and UK
132 * Mac layouts on ANSI keyboards, GRAVE ACCENT
133 * and NOT SIGN in a UK Windows layout, SECTION
134 * SIGN and PLUS-MINUS SIGN in US and UK Mac
135 * layouts on ISO keyboards, SECTION SIGN and
136 * DEGREE SIGN in a Swiss German layout (Mac:
137 * only on ISO keyboards), CIRCUMFLEX ACCENT and
138 * DEGREE SIGN in a German layout (Mac: only on
139 * ISO keyboards), SUPERSCRIPT TWO and TILDE in a
140 * French Windows layout, COMMERCIAL AT and
141 * NUMBER SIGN in a French Mac layout on ISO
142 * keyboards, and LESS-THAN SIGN and GREATER-THAN
143 * SIGN in a Swiss German, German, or French Mac
144 * layout on ANSI keyboards.
145 */
146 SDL_SCANCODE_COMMA = 54,
147 SDL_SCANCODE_PERIOD = 55,
148 SDL_SCANCODE_SLASH = 56,
149
150 SDL_SCANCODE_CAPSLOCK = 57,
151
152 SDL_SCANCODE_F1 = 58,
153 SDL_SCANCODE_F2 = 59,
154 SDL_SCANCODE_F3 = 60,
155 SDL_SCANCODE_F4 = 61,
156 SDL_SCANCODE_F5 = 62,
157 SDL_SCANCODE_F6 = 63,
158 SDL_SCANCODE_F7 = 64,
159 SDL_SCANCODE_F8 = 65,
160 SDL_SCANCODE_F9 = 66,
161 SDL_SCANCODE_F10 = 67,
162 SDL_SCANCODE_F11 = 68,
163 SDL_SCANCODE_F12 = 69,
164
165 SDL_SCANCODE_PRINTSCREEN = 70,
166 SDL_SCANCODE_SCROLLLOCK = 71,
167 SDL_SCANCODE_PAUSE = 72,
168 SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
169 does send code 73, not 117) */
170 SDL_SCANCODE_HOME = 74,
171 SDL_SCANCODE_PAGEUP = 75,
172 SDL_SCANCODE_DELETE = 76,
173 SDL_SCANCODE_END = 77,
174 SDL_SCANCODE_PAGEDOWN = 78,
175 SDL_SCANCODE_RIGHT = 79,
176 SDL_SCANCODE_LEFT = 80,
177 SDL_SCANCODE_DOWN = 81,
178 SDL_SCANCODE_UP = 82,
179
180 SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
181 */
182 SDL_SCANCODE_KP_DIVIDE = 84,
183 SDL_SCANCODE_KP_MULTIPLY = 85,
184 SDL_SCANCODE_KP_MINUS = 86,
185 SDL_SCANCODE_KP_PLUS = 87,
186 SDL_SCANCODE_KP_ENTER = 88,
187 SDL_SCANCODE_KP_1 = 89,
188 SDL_SCANCODE_KP_2 = 90,
189 SDL_SCANCODE_KP_3 = 91,
190 SDL_SCANCODE_KP_4 = 92,
191 SDL_SCANCODE_KP_5 = 93,
192 SDL_SCANCODE_KP_6 = 94,
193 SDL_SCANCODE_KP_7 = 95,
194 SDL_SCANCODE_KP_8 = 96,
195 SDL_SCANCODE_KP_9 = 97,
196 SDL_SCANCODE_KP_0 = 98,
197 SDL_SCANCODE_KP_PERIOD = 99,
198
199 SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
200 * keyboards have over ANSI ones,
201 * located between left shift and Y.
202 * Produces GRAVE ACCENT and TILDE in a
203 * US or UK Mac layout, REVERSE SOLIDUS
204 * (backslash) and VERTICAL LINE in a
205 * US or UK Windows layout, and
206 * LESS-THAN SIGN and GREATER-THAN SIGN
207 * in a Swiss German, German, or French
208 * layout. */
209 SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
210 SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
211 * not a physical key - but some Mac keyboards
212 * do have a power key. */
213 SDL_SCANCODE_KP_EQUALS = 103,
214 SDL_SCANCODE_F13 = 104,
215 SDL_SCANCODE_F14 = 105,
216 SDL_SCANCODE_F15 = 106,
217 SDL_SCANCODE_F16 = 107,
218 SDL_SCANCODE_F17 = 108,
219 SDL_SCANCODE_F18 = 109,
220 SDL_SCANCODE_F19 = 110,
221 SDL_SCANCODE_F20 = 111,
222 SDL_SCANCODE_F21 = 112,
223 SDL_SCANCODE_F22 = 113,
224 SDL_SCANCODE_F23 = 114,
225 SDL_SCANCODE_F24 = 115,
226 SDL_SCANCODE_EXECUTE = 116,
227 SDL_SCANCODE_HELP = 117,
228 SDL_SCANCODE_MENU = 118,
229 SDL_SCANCODE_SELECT = 119,
230 SDL_SCANCODE_STOP = 120,
231 SDL_SCANCODE_AGAIN = 121, /**< redo */
232 SDL_SCANCODE_UNDO = 122,
233 SDL_SCANCODE_CUT = 123,
234 SDL_SCANCODE_COPY = 124,
235 SDL_SCANCODE_PASTE = 125,
236 SDL_SCANCODE_FIND = 126,
237 SDL_SCANCODE_MUTE = 127,
238 SDL_SCANCODE_VOLUMEUP = 128,
239 SDL_SCANCODE_VOLUMEDOWN = 129,
240 /* not sure whether there's a reason to enable these */
241 /* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
242 /* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
243 /* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
244 SDL_SCANCODE_KP_COMMA = 133,
245 SDL_SCANCODE_KP_EQUALSAS400 = 134,
246
247 SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
248 footnotes in USB doc */
249 SDL_SCANCODE_INTERNATIONAL2 = 136,
250 SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
251 SDL_SCANCODE_INTERNATIONAL4 = 138,
252 SDL_SCANCODE_INTERNATIONAL5 = 139,
253 SDL_SCANCODE_INTERNATIONAL6 = 140,
254 SDL_SCANCODE_INTERNATIONAL7 = 141,
255 SDL_SCANCODE_INTERNATIONAL8 = 142,
256 SDL_SCANCODE_INTERNATIONAL9 = 143,
257 SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
258 SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
259 SDL_SCANCODE_LANG3 = 146, /**< Katakana */
260 SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
261 SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
262 SDL_SCANCODE_LANG6 = 149, /**< reserved */
263 SDL_SCANCODE_LANG7 = 150, /**< reserved */
264 SDL_SCANCODE_LANG8 = 151, /**< reserved */
265 SDL_SCANCODE_LANG9 = 152, /**< reserved */
266
267 SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
268 SDL_SCANCODE_SYSREQ = 154,
269 SDL_SCANCODE_CANCEL = 155,
270 SDL_SCANCODE_CLEAR = 156,
271 SDL_SCANCODE_PRIOR = 157,
272 SDL_SCANCODE_RETURN2 = 158,
273 SDL_SCANCODE_SEPARATOR = 159,
274 SDL_SCANCODE_OUT = 160,
275 SDL_SCANCODE_OPER = 161,
276 SDL_SCANCODE_CLEARAGAIN = 162,
277 SDL_SCANCODE_CRSEL = 163,
278 SDL_SCANCODE_EXSEL = 164,
279
280 SDL_SCANCODE_KP_00 = 176,
281 SDL_SCANCODE_KP_000 = 177,
282 SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
283 SDL_SCANCODE_DECIMALSEPARATOR = 179,
284 SDL_SCANCODE_CURRENCYUNIT = 180,
285 SDL_SCANCODE_CURRENCYSUBUNIT = 181,
286 SDL_SCANCODE_KP_LEFTPAREN = 182,
287 SDL_SCANCODE_KP_RIGHTPAREN = 183,
288 SDL_SCANCODE_KP_LEFTBRACE = 184,
289 SDL_SCANCODE_KP_RIGHTBRACE = 185,
290 SDL_SCANCODE_KP_TAB = 186,
291 SDL_SCANCODE_KP_BACKSPACE = 187,
292 SDL_SCANCODE_KP_A = 188,
293 SDL_SCANCODE_KP_B = 189,
294 SDL_SCANCODE_KP_C = 190,
295 SDL_SCANCODE_KP_D = 191,
296 SDL_SCANCODE_KP_E = 192,
297 SDL_SCANCODE_KP_F = 193,
298 SDL_SCANCODE_KP_XOR = 194,
299 SDL_SCANCODE_KP_POWER = 195,
300 SDL_SCANCODE_KP_PERCENT = 196,
301 SDL_SCANCODE_KP_LESS = 197,
302 SDL_SCANCODE_KP_GREATER = 198,
303 SDL_SCANCODE_KP_AMPERSAND = 199,
304 SDL_SCANCODE_KP_DBLAMPERSAND = 200,
305 SDL_SCANCODE_KP_VERTICALBAR = 201,
306 SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
307 SDL_SCANCODE_KP_COLON = 203,
308 SDL_SCANCODE_KP_HASH = 204,
309 SDL_SCANCODE_KP_SPACE = 205,
310 SDL_SCANCODE_KP_AT = 206,
311 SDL_SCANCODE_KP_EXCLAM = 207,
312 SDL_SCANCODE_KP_MEMSTORE = 208,
313 SDL_SCANCODE_KP_MEMRECALL = 209,
314 SDL_SCANCODE_KP_MEMCLEAR = 210,
315 SDL_SCANCODE_KP_MEMADD = 211,
316 SDL_SCANCODE_KP_MEMSUBTRACT = 212,
317 SDL_SCANCODE_KP_MEMMULTIPLY = 213,
318 SDL_SCANCODE_KP_MEMDIVIDE = 214,
319 SDL_SCANCODE_KP_PLUSMINUS = 215,
320 SDL_SCANCODE_KP_CLEAR = 216,
321 SDL_SCANCODE_KP_CLEARENTRY = 217,
322 SDL_SCANCODE_KP_BINARY = 218,
323 SDL_SCANCODE_KP_OCTAL = 219,
324 SDL_SCANCODE_KP_DECIMAL = 220,
325 SDL_SCANCODE_KP_HEXADECIMAL = 221,
326
327 SDL_SCANCODE_LCTRL = 224,
328 SDL_SCANCODE_LSHIFT = 225,
329 SDL_SCANCODE_LALT = 226, /**< alt, option */
330 SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
331 SDL_SCANCODE_RCTRL = 228,
332 SDL_SCANCODE_RSHIFT = 229,
333 SDL_SCANCODE_RALT = 230, /**< alt gr, option */
334 SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
335
336 SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
337 * by any of the above, but since there's a
338 * special KMOD_MODE for it I'm adding it here
339 */
340
341 /* @} *//* Usage page 0x07 */
342
343 /**
344 * \name Usage page 0x0C
345 *
346 * These values are mapped from usage page 0x0C (USB consumer page).
347 */
348 /* @{ */
349
350 SDL_SCANCODE_AUDIONEXT = 258,
351 SDL_SCANCODE_AUDIOPREV = 259,
352 SDL_SCANCODE_AUDIOSTOP = 260,
353 SDL_SCANCODE_AUDIOPLAY = 261,
354 SDL_SCANCODE_AUDIOMUTE = 262,
355 SDL_SCANCODE_MEDIASELECT = 263,
356 SDL_SCANCODE_WWW = 264,
357 SDL_SCANCODE_MAIL = 265,
358 SDL_SCANCODE_CALCULATOR = 266,
359 SDL_SCANCODE_COMPUTER = 267,
360 SDL_SCANCODE_AC_SEARCH = 268,
361 SDL_SCANCODE_AC_HOME = 269,
362 SDL_SCANCODE_AC_BACK = 270,
363 SDL_SCANCODE_AC_FORWARD = 271,
364 SDL_SCANCODE_AC_STOP = 272,
365 SDL_SCANCODE_AC_REFRESH = 273,
366 SDL_SCANCODE_AC_BOOKMARKS = 274,
367
368 /* @} *//* Usage page 0x0C */
369
370 /**
371 * \name Walther keys
372 *
373 * These are values that Christian Walther added (for mac keyboard?).
374 */
375 /* @{ */
376
377 SDL_SCANCODE_BRIGHTNESSDOWN = 275,
378 SDL_SCANCODE_BRIGHTNESSUP = 276,
379 SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
380 switch, video mode switch */
381 SDL_SCANCODE_KBDILLUMTOGGLE = 278,
382 SDL_SCANCODE_KBDILLUMDOWN = 279,
383 SDL_SCANCODE_KBDILLUMUP = 280,
384 SDL_SCANCODE_EJECT = 281,
385 SDL_SCANCODE_SLEEP = 282,
386
387 SDL_SCANCODE_APP1 = 283,
388 SDL_SCANCODE_APP2 = 284,
389
390 /* @} *//* Walther keys */
391
392 /**
393 * \name Usage page 0x0C (additional media keys)
394 *
395 * These values are mapped from usage page 0x0C (USB consumer page).
396 */
397 /* @{ */
398
399 SDL_SCANCODE_AUDIOREWIND = 285,
400 SDL_SCANCODE_AUDIOFASTFORWARD = 286,
401
402 /* @} *//* Usage page 0x0C (additional media keys) */
403
404 /* Add any other keys here. */
405
406 SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
407 for array bounds */
408 } SDL_Scancode;
409
410 #endif /* SDL_scancode_h_ */
411
412 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_sensor.h
23 *
24 * Include file for SDL sensor event handling
25 *
26 */
27
28 #ifndef SDL_sensor_h_
29 #define SDL_sensor_h_
30
31 #include <SDL2/SDL_stdinc.h>
32 #include <SDL2/SDL_error.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 /* *INDENT-OFF* */
38 extern "C" {
39 /* *INDENT-ON* */
40 #endif
41
42 /**
43 * \brief SDL_sensor.h
44 *
45 * In order to use these functions, SDL_Init() must have been called
46 * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
47 * for sensors, and load appropriate drivers.
48 */
49
50 struct _SDL_Sensor;
51 typedef struct _SDL_Sensor SDL_Sensor;
52
53 /**
54 * This is a unique ID for a sensor for the time it is connected to the system,
55 * and is never reused for the lifetime of the application.
56 *
57 * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
58 */
59 typedef Sint32 SDL_SensorID;
60
61 /* The different sensors defined by SDL
62 *
63 * Additional sensors may be available, using platform dependent semantics.
64 *
65 * Hare are the additional Android sensors:
66 * https://developer.android.com/reference/android/hardware/SensorEvent.html#values
67 */
68 typedef enum
69 {
70 SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
71 SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
72 SDL_SENSOR_ACCEL, /**< Accelerometer */
73 SDL_SENSOR_GYRO /**< Gyroscope */
74 } SDL_SensorType;
75
76 /**
77 * Accelerometer sensor
78 *
79 * The accelerometer returns the current acceleration in SI meters per
80 * second squared. This measurement includes the force of gravity, so
81 * a device at rest will have an value of SDL_STANDARD_GRAVITY away
82 * from the center of the earth.
83 *
84 * values[0]: Acceleration on the x axis
85 * values[1]: Acceleration on the y axis
86 * values[2]: Acceleration on the z axis
87 *
88 * For phones held in portrait mode and game controllers held in front of you,
89 * the axes are defined as follows:
90 * -X ... +X : left ... right
91 * -Y ... +Y : bottom ... top
92 * -Z ... +Z : farther ... closer
93 *
94 * The axis data is not changed when the phone is rotated.
95 *
96 * \sa SDL_GetDisplayOrientation()
97 */
98 #define SDL_STANDARD_GRAVITY 9.80665f
99
100 /**
101 * Gyroscope sensor
102 *
103 * The gyroscope returns the current rate of rotation in radians per second.
104 * The rotation is positive in the counter-clockwise direction. That is,
105 * an observer looking from a positive location on one of the axes would
106 * see positive rotation on that axis when it appeared to be rotating
107 * counter-clockwise.
108 *
109 * values[0]: Angular speed around the x axis (pitch)
110 * values[1]: Angular speed around the y axis (yaw)
111 * values[2]: Angular speed around the z axis (roll)
112 *
113 * For phones held in portrait mode and game controllers held in front of you,
114 * the axes are defined as follows:
115 * -X ... +X : left ... right
116 * -Y ... +Y : bottom ... top
117 * -Z ... +Z : farther ... closer
118 *
119 * The axis data is not changed when the phone or controller is rotated.
120 *
121 * \sa SDL_GetDisplayOrientation()
122 */
123
124 /* Function prototypes */
125
126 /**
127 * Locking for multi-threaded access to the sensor API
128 *
129 * If you are using the sensor API or handling events from multiple threads
130 * you should use these locking functions to protect access to the sensors.
131 *
132 * In particular, you are guaranteed that the sensor list won't change, so the
133 * API functions that take a sensor index will be valid, and sensor events
134 * will not be delivered.
135 *
136 * \since This function is available since SDL 2.0.14.
137 */
138 extern DECLSPEC void SDLCALL SDL_LockSensors(void);
139 extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
140
141 /**
142 * Count the number of sensors attached to the system right now.
143 *
144 * \returns the number of sensors detected.
145 *
146 * \since This function is available since SDL 2.0.9.
147 */
148 extern DECLSPEC int SDLCALL SDL_NumSensors(void);
149
150 /**
151 * Get the implementation dependent name of a sensor.
152 *
153 * \param device_index The sensor to obtain name from
154 * \returns the sensor name, or NULL if `device_index` is out of range.
155 *
156 * \since This function is available since SDL 2.0.9.
157 */
158 extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
159
160 /**
161 * Get the type of a sensor.
162 *
163 * \param device_index The sensor to get the type from
164 * \returns the SDL_SensorType, or `SDL_SENSOR_INVALID` if `device_index` is
165 * out of range.
166 *
167 * \since This function is available since SDL 2.0.9.
168 */
169 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
170
171 /**
172 * Get the platform dependent type of a sensor.
173 *
174 * \param device_index The sensor to check
175 * \returns the sensor platform dependent type, or -1 if `device_index` is out
176 * of range.
177 *
178 * \since This function is available since SDL 2.0.9.
179 */
180 extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
181
182 /**
183 * Get the instance ID of a sensor.
184 *
185 * \param device_index The sensor to get instance id from
186 * \returns the sensor instance ID, or -1 if `device_index` is out of range.
187 *
188 * \since This function is available since SDL 2.0.9.
189 */
190 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
191
192 /**
193 * Open a sensor for use.
194 *
195 * \param device_index The sensor to open
196 * \returns an SDL_Sensor sensor object, or NULL if an error occurred.
197 *
198 * \since This function is available since SDL 2.0.9.
199 */
200 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
201
202 /**
203 * Return the SDL_Sensor associated with an instance id.
204 *
205 * \param instance_id The sensor from instance id
206 * \returns an SDL_Sensor object.
207 *
208 * \since This function is available since SDL 2.0.9.
209 */
210 extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
211
212 /**
213 * Get the implementation dependent name of a sensor
214 *
215 * \param sensor The SDL_Sensor object
216 * \returns the sensor name, or NULL if `sensor` is NULL.
217 *
218 * \since This function is available since SDL 2.0.9.
219 */
220 extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
221
222 /**
223 * Get the type of a sensor.
224 *
225 * \param sensor The SDL_Sensor object to inspect
226 * \returns the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is
227 * NULL.
228 *
229 * \since This function is available since SDL 2.0.9.
230 */
231 extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
232
233 /**
234 * Get the platform dependent type of a sensor.
235 *
236 * \param sensor The SDL_Sensor object to inspect
237 * \returns the sensor platform dependent type, or -1 if `sensor` is NULL.
238 *
239 * \since This function is available since SDL 2.0.9.
240 */
241 extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
242
243 /**
244 * Get the instance ID of a sensor.
245 *
246 * \param sensor The SDL_Sensor object to inspect
247 * \returns the sensor instance ID, or -1 if `sensor` is NULL.
248 *
249 * \since This function is available since SDL 2.0.9.
250 */
251 extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
252
253 /**
254 * Get the current state of an opened sensor.
255 *
256 * The number of values and interpretation of the data is sensor dependent.
257 *
258 * \param sensor The SDL_Sensor object to query
259 * \param data A pointer filled with the current sensor state
260 * \param num_values The number of values to write to data
261 * \returns 0 or -1 if an error occurred.
262 *
263 * \since This function is available since SDL 2.0.9.
264 */
265 extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
266
267 /**
268 * Close a sensor previously opened with SDL_SensorOpen().
269 *
270 * \param sensor The SDL_Sensor object to close
271 *
272 * \since This function is available since SDL 2.0.9.
273 */
274 extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
275
276 /**
277 * Update the current state of the open sensors.
278 *
279 * This is called automatically by the event loop if sensor events are
280 * enabled.
281 *
282 * This needs to be called from the thread that initialized the sensor
283 * subsystem.
284 *
285 * \since This function is available since SDL 2.0.9.
286 */
287 extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
288
289
290 /* Ends C function definitions when using C++ */
291 #ifdef __cplusplus
292 /* *INDENT-OFF* */
293 }
294 /* *INDENT-ON* */
295 #endif
296 #include <SDL2/close_code.h>
297
298 #endif /* SDL_sensor_h_ */
299
300 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_shape_h_
22 #define SDL_shape_h_
23
24 #include <SDL2/SDL_stdinc.h>
25 #include <SDL2/SDL_pixels.h>
26 #include <SDL2/SDL_rect.h>
27 #include <SDL2/SDL_surface.h>
28 #include <SDL2/SDL_video.h>
29
30 #include <SDL2/begin_code.h>
31 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /** \file SDL_shape.h
37 *
38 * Header file for the shaped window API.
39 */
40
41 #define SDL_NONSHAPEABLE_WINDOW -1
42 #define SDL_INVALID_SHAPE_ARGUMENT -2
43 #define SDL_WINDOW_LACKS_SHAPE -3
44
45 /**
46 * Create a window that can be shaped with the specified position, dimensions,
47 * and flags.
48 *
49 * \param title The title of the window, in UTF-8 encoding.
50 * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
51 * ::SDL_WINDOWPOS_UNDEFINED.
52 * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
53 * ::SDL_WINDOWPOS_UNDEFINED.
54 * \param w The width of the window.
55 * \param h The height of the window.
56 * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with
57 * any of the following: ::SDL_WINDOW_OPENGL,
58 * ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
59 * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
60 * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
61 * and ::SDL_WINDOW_FULLSCREEN is always unset.
62 * \return the window created, or NULL if window creation failed.
63 *
64 * \since This function is available since SDL 2.0.0.
65 *
66 * \sa SDL_DestroyWindow
67 */
68 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
69
70 /**
71 * Return whether the given window is a shaped window.
72 *
73 * \param window The window to query for being shaped.
74 * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if
75 * the window is unshaped or NULL.
76 *
77 * \since This function is available since SDL 2.0.0.
78 *
79 * \sa SDL_CreateShapedWindow
80 */
81 extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
82
83 /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
84 typedef enum {
85 /** \brief The default mode, a binarized alpha cutoff of 1. */
86 ShapeModeDefault,
87 /** \brief A binarized alpha cutoff with a given integer value. */
88 ShapeModeBinarizeAlpha,
89 /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
90 ShapeModeReverseBinarizeAlpha,
91 /** \brief A color key is applied. */
92 ShapeModeColorKey
93 } WindowShapeMode;
94
95 #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
96
97 /** \brief A union containing parameters for shaped windows. */
98 typedef union {
99 /** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
100 Uint8 binarizationCutoff;
101 SDL_Color colorKey;
102 } SDL_WindowShapeParams;
103
104 /** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
105 typedef struct SDL_WindowShapeMode {
106 /** \brief The mode of these window-shape parameters. */
107 WindowShapeMode mode;
108 /** \brief Window-shape parameters. */
109 SDL_WindowShapeParams parameters;
110 } SDL_WindowShapeMode;
111
112 /**
113 * Set the shape and parameters of a shaped window.
114 *
115 * \param window The shaped window whose parameters should be set.
116 * \param shape A surface encoding the desired shape for the window.
117 * \param shape_mode The parameters to set for the shaped window.
118 * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape
119 * argument, or SDL_NONSHAPEABLE_WINDOW if the SDL_Window given does
120 * not reference a valid shaped window.
121 *
122 * \since This function is available since SDL 2.0.0.
123 *
124 * \sa SDL_WindowShapeMode
125 * \sa SDL_GetShapedWindowMode
126 */
127 extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
128
129 /**
130 * Get the shape parameters of a shaped window.
131 *
132 * \param window The shaped window whose parameters should be retrieved.
133 * \param shape_mode An empty shape-mode structure to fill, or NULL to check
134 * whether the window has a shape.
135 * \return 0 if the window has a shape and, provided shape_mode was not NULL,
136 * shape_mode has been filled with the mode data,
137 * SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped
138 * window, or SDL_WINDOW_LACKS_SHAPE if the SDL_Window given is a
139 * shapeable window currently lacking a shape.
140 *
141 * \since This function is available since SDL 2.0.0.
142 *
143 * \sa SDL_WindowShapeMode
144 * \sa SDL_SetWindowShape
145 */
146 extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
147
148 /* Ends C function definitions when using C++ */
149 #ifdef __cplusplus
150 }
151 #endif
152 #include <SDL2/close_code.h>
153
154 #endif /* SDL_shape_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_stdinc.h
23 *
24 * This is a general header that includes C language support.
25 */
26
27 #ifndef SDL_stdinc_h_
28 #define SDL_stdinc_h_
29
30 #include <SDL2/SDL_config.h>
31
32 #ifdef __APPLE__
33 #ifndef _DARWIN_C_SOURCE
34 #define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
35 #endif
36 #endif
37
38 #ifdef HAVE_SYS_TYPES_H
39 #include <sys/types.h>
40 #endif
41 #ifdef HAVE_STDIO_H
42 #include <stdio.h>
43 #endif
44 #if defined(STDC_HEADERS)
45 # include <stdlib.h>
46 # include <stddef.h>
47 # include <stdarg.h>
48 #else
49 # if defined(HAVE_STDLIB_H)
50 # include <stdlib.h>
51 # elif defined(HAVE_MALLOC_H)
52 # include <malloc.h>
53 # endif
54 # if defined(HAVE_STDDEF_H)
55 # include <stddef.h>
56 # endif
57 # if defined(HAVE_STDARG_H)
58 # include <stdarg.h>
59 # endif
60 #endif
61 #ifdef HAVE_STRING_H
62 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
63 # include <memory.h>
64 # endif
65 # include <string.h>
66 #endif
67 #ifdef HAVE_STRINGS_H
68 # include <strings.h>
69 #endif
70 #ifdef HAVE_WCHAR_H
71 # include <wchar.h>
72 #endif
73 #if defined(HAVE_INTTYPES_H)
74 # include <inttypes.h>
75 #elif defined(HAVE_STDINT_H)
76 # include <stdint.h>
77 #endif
78 #ifdef HAVE_CTYPE_H
79 # include <ctype.h>
80 #endif
81 #ifdef HAVE_MATH_H
82 # if defined(__WINRT__)
83 /* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
84 WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
85 for more information.
86 */
87 # define _USE_MATH_DEFINES
88 # endif
89 # include <math.h>
90 #endif
91 #ifdef HAVE_FLOAT_H
92 # include <float.h>
93 #endif
94 #if defined(HAVE_ALLOCA) && !defined(alloca)
95 # if defined(HAVE_ALLOCA_H)
96 # include <alloca.h>
97 # elif defined(__GNUC__)
98 # define alloca __builtin_alloca
99 # elif defined(_MSC_VER)
100 # include <malloc.h>
101 # define alloca _alloca
102 # elif defined(__WATCOMC__)
103 # include <malloc.h>
104 # elif defined(__BORLANDC__)
105 # include <malloc.h>
106 # elif defined(__DMC__)
107 # include <stdlib.h>
108 # elif defined(__AIX__)
109 #pragma alloca
110 # elif defined(__MRC__)
111 void *alloca(unsigned);
112 # else
113 char *alloca();
114 # endif
115 #endif
116
117 /**
118 * Check if the compiler supports a given builtin.
119 * Supported by virtually all clang versions and recent gcc. Use this
120 * instead of checking the clang version if possible.
121 */
122 #ifdef __has_builtin
123 #define _SDL_HAS_BUILTIN(x) __has_builtin(x)
124 #else
125 #define _SDL_HAS_BUILTIN(x) 0
126 #endif
127
128 /**
129 * The number of elements in an array.
130 */
131 #define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
132 #define SDL_TABLESIZE(table) SDL_arraysize(table)
133
134 /**
135 * Macro useful for building other macros with strings in them
136 *
137 * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
138 */
139 #define SDL_STRINGIFY_ARG(arg) #arg
140
141 /**
142 * \name Cast operators
143 *
144 * Use proper C++ casts when compiled as C++ to be compatible with the option
145 * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
146 */
147 /* @{ */
148 #ifdef __cplusplus
149 #define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
150 #define SDL_static_cast(type, expression) static_cast<type>(expression)
151 #define SDL_const_cast(type, expression) const_cast<type>(expression)
152 #else
153 #define SDL_reinterpret_cast(type, expression) ((type)(expression))
154 #define SDL_static_cast(type, expression) ((type)(expression))
155 #define SDL_const_cast(type, expression) ((type)(expression))
156 #endif
157 /* @} *//* Cast operators */
158
159 /* Define a four character code as a Uint32 */
160 #define SDL_FOURCC(A, B, C, D) \
161 ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
162 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
163 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
164 (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
165
166 /**
167 * \name Basic data types
168 */
169 /* @{ */
170
171 #ifdef __CC_ARM
172 /* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
173 #define SDL_FALSE 0
174 #define SDL_TRUE 1
175 typedef int SDL_bool;
176 #else
177 typedef enum
178 {
179 SDL_FALSE = 0,
180 SDL_TRUE = 1
181 } SDL_bool;
182 #endif
183
184 /**
185 * \brief A signed 8-bit integer type.
186 */
187 #define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
188 #define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
189 typedef int8_t Sint8;
190 /**
191 * \brief An unsigned 8-bit integer type.
192 */
193 #define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
194 #define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
195 typedef uint8_t Uint8;
196 /**
197 * \brief A signed 16-bit integer type.
198 */
199 #define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
200 #define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
201 typedef int16_t Sint16;
202 /**
203 * \brief An unsigned 16-bit integer type.
204 */
205 #define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
206 #define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
207 typedef uint16_t Uint16;
208 /**
209 * \brief A signed 32-bit integer type.
210 */
211 #define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
212 #define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
213 typedef int32_t Sint32;
214 /**
215 * \brief An unsigned 32-bit integer type.
216 */
217 #define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
218 #define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
219 typedef uint32_t Uint32;
220
221 /**
222 * \brief A signed 64-bit integer type.
223 */
224 #define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */
225 #define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */
226 typedef int64_t Sint64;
227 /**
228 * \brief An unsigned 64-bit integer type.
229 */
230 #define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */
231 #define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */
232 typedef uint64_t Uint64;
233
234 /* @} *//* Basic data types */
235
236 /**
237 * \name Floating-point constants
238 */
239 /* @{ */
240
241 #ifdef FLT_EPSILON
242 #define SDL_FLT_EPSILON FLT_EPSILON
243 #else
244 #define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
245 #endif
246
247 /* @} *//* Floating-point constants */
248
249 /* Make sure we have macros for printing width-based integers.
250 * <stdint.h> should define these but this is not true all platforms.
251 * (for example win32) */
252 #ifndef SDL_PRIs64
253 #ifdef PRIs64
254 #define SDL_PRIs64 PRIs64
255 #elif defined(__WIN32__)
256 #define SDL_PRIs64 "I64d"
257 #elif defined(__LINUX__) && defined(__LP64__)
258 #define SDL_PRIs64 "ld"
259 #else
260 #define SDL_PRIs64 "lld"
261 #endif
262 #endif
263 #ifndef SDL_PRIu64
264 #ifdef PRIu64
265 #define SDL_PRIu64 PRIu64
266 #elif defined(__WIN32__)
267 #define SDL_PRIu64 "I64u"
268 #elif defined(__LINUX__) && defined(__LP64__)
269 #define SDL_PRIu64 "lu"
270 #else
271 #define SDL_PRIu64 "llu"
272 #endif
273 #endif
274 #ifndef SDL_PRIx64
275 #ifdef PRIx64
276 #define SDL_PRIx64 PRIx64
277 #elif defined(__WIN32__)
278 #define SDL_PRIx64 "I64x"
279 #elif defined(__LINUX__) && defined(__LP64__)
280 #define SDL_PRIx64 "lx"
281 #else
282 #define SDL_PRIx64 "llx"
283 #endif
284 #endif
285 #ifndef SDL_PRIX64
286 #ifdef PRIX64
287 #define SDL_PRIX64 PRIX64
288 #elif defined(__WIN32__)
289 #define SDL_PRIX64 "I64X"
290 #elif defined(__LINUX__) && defined(__LP64__)
291 #define SDL_PRIX64 "lX"
292 #else
293 #define SDL_PRIX64 "llX"
294 #endif
295 #endif
296 #ifndef SDL_PRIs32
297 #ifdef PRId32
298 #define SDL_PRIs32 PRId32
299 #else
300 #define SDL_PRIs32 "d"
301 #endif
302 #endif
303 #ifndef SDL_PRIu32
304 #ifdef PRIu32
305 #define SDL_PRIu32 PRIu32
306 #else
307 #define SDL_PRIu32 "u"
308 #endif
309 #endif
310 #ifndef SDL_PRIx32
311 #ifdef PRIx32
312 #define SDL_PRIx32 PRIx32
313 #else
314 #define SDL_PRIx32 "x"
315 #endif
316 #endif
317 #ifndef SDL_PRIX32
318 #ifdef PRIX32
319 #define SDL_PRIX32 PRIX32
320 #else
321 #define SDL_PRIX32 "X"
322 #endif
323 #endif
324
325 /* Annotations to help code analysis tools */
326 #ifdef SDL_DISABLE_ANALYZE_MACROS
327 #define SDL_IN_BYTECAP(x)
328 #define SDL_INOUT_Z_CAP(x)
329 #define SDL_OUT_Z_CAP(x)
330 #define SDL_OUT_CAP(x)
331 #define SDL_OUT_BYTECAP(x)
332 #define SDL_OUT_Z_BYTECAP(x)
333 #define SDL_PRINTF_FORMAT_STRING
334 #define SDL_SCANF_FORMAT_STRING
335 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
336 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
337 #else
338 #if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
339 #include <sal.h>
340
341 #define SDL_IN_BYTECAP(x) _In_bytecount_(x)
342 #define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
343 #define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
344 #define SDL_OUT_CAP(x) _Out_cap_(x)
345 #define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
346 #define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
347
348 #define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
349 #define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
350 #else
351 #define SDL_IN_BYTECAP(x)
352 #define SDL_INOUT_Z_CAP(x)
353 #define SDL_OUT_Z_CAP(x)
354 #define SDL_OUT_CAP(x)
355 #define SDL_OUT_BYTECAP(x)
356 #define SDL_OUT_Z_BYTECAP(x)
357 #define SDL_PRINTF_FORMAT_STRING
358 #define SDL_SCANF_FORMAT_STRING
359 #endif
360 #if defined(__GNUC__)
361 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
362 #define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
363 #else
364 #define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
365 #define SDL_SCANF_VARARG_FUNC( fmtargnumber )
366 #endif
367 #endif /* SDL_DISABLE_ANALYZE_MACROS */
368
369 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
370 #define SDL_COMPILE_TIME_ASSERT(name, x) _Static_assert(x, #x)
371 #elif defined(__cplusplus) && (__cplusplus >= 201103L)
372 #define SDL_COMPILE_TIME_ASSERT(name, x) static_assert(x, #x)
373 #else /* universal, but may trigger -Wunused-local-typedefs */
374 #define SDL_COMPILE_TIME_ASSERT(name, x) \
375 typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
376 #endif
377 /** \cond */
378 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
379 SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
380 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
381 SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
382 SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
383 SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
384 SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
385 SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
386 SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
387 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
388 /** \endcond */
389
390 /* Check to make sure enums are the size of ints, for structure packing.
391 For both Watcom C/C++ and Borland C/C++ the compiler option that makes
392 enums having the size of an int must be enabled.
393 This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
394 */
395
396 /** \cond */
397 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
398 #if !defined(__ANDROID__) && !defined(__VITA__)
399 /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
400 typedef enum
401 {
402 DUMMY_ENUM_VALUE
403 } SDL_DUMMY_ENUM;
404
405 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
406 #endif
407 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
408 /** \endcond */
409
410 #include <SDL2/begin_code.h>
411 /* Set up for C function definitions, even when using C++ */
412 #ifdef __cplusplus
413 extern "C" {
414 #endif
415
416 #ifdef HAVE_ALLOCA
417 #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
418 #define SDL_stack_free(data)
419 #else
420 #define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
421 #define SDL_stack_free(data) SDL_free(data)
422 #endif
423
424 extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
425 extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
426 extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
427 extern DECLSPEC void SDLCALL SDL_free(void *mem);
428
429 typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
430 typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
431 typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
432 typedef void (SDLCALL *SDL_free_func)(void *mem);
433
434 /**
435 * Get the current set of SDL memory functions
436 *
437 * \since This function is available since SDL 2.0.7.
438 */
439 extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
440 SDL_calloc_func *calloc_func,
441 SDL_realloc_func *realloc_func,
442 SDL_free_func *free_func);
443
444 /**
445 * Replace SDL's memory allocation functions with a custom set
446 *
447 * \since This function is available since SDL 2.0.7.
448 */
449 extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
450 SDL_calloc_func calloc_func,
451 SDL_realloc_func realloc_func,
452 SDL_free_func free_func);
453
454 /**
455 * Get the number of outstanding (unfreed) allocations
456 *
457 * \since This function is available since SDL 2.0.7.
458 */
459 extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
460
461 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
462 extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
463
464 extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
465
466 extern DECLSPEC int SDLCALL SDL_abs(int x);
467
468 /* NOTE: these double-evaluate their arguments, so you should never have side effects in the parameters */
469 #define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
470 #define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
471 #define SDL_clamp(x, a, b) (((x) < (a)) ? (a) : (((x) > (b)) ? (b) : (x)))
472
473 extern DECLSPEC int SDLCALL SDL_isalpha(int x);
474 extern DECLSPEC int SDLCALL SDL_isalnum(int x);
475 extern DECLSPEC int SDLCALL SDL_isblank(int x);
476 extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
477 extern DECLSPEC int SDLCALL SDL_isdigit(int x);
478 extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
479 extern DECLSPEC int SDLCALL SDL_ispunct(int x);
480 extern DECLSPEC int SDLCALL SDL_isspace(int x);
481 extern DECLSPEC int SDLCALL SDL_isupper(int x);
482 extern DECLSPEC int SDLCALL SDL_islower(int x);
483 extern DECLSPEC int SDLCALL SDL_isprint(int x);
484 extern DECLSPEC int SDLCALL SDL_isgraph(int x);
485 extern DECLSPEC int SDLCALL SDL_toupper(int x);
486 extern DECLSPEC int SDLCALL SDL_tolower(int x);
487
488 extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
489
490 extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
491
492 #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
493 #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
494 #define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
495
496 /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
497 SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
498 {
499 #ifdef __APPLE__
500 memset_pattern4(dst, &val, dwords * 4);
501 #elif defined(__GNUC__) && defined(__i386__)
502 int u0, u1, u2;
503 __asm__ __volatile__ (
504 "cld \n\t"
505 "rep ; stosl \n\t"
506 : "=&D" (u0), "=&a" (u1), "=&c" (u2)
507 : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
508 : "memory"
509 );
510 #else
511 size_t _n = (dwords + 3) / 4;
512 Uint32 *_p = SDL_static_cast(Uint32 *, dst);
513 Uint32 _val = (val);
514 if (dwords == 0) {
515 return;
516 }
517 switch (dwords % 4) {
518 case 0: do { *_p++ = _val; SDL_FALLTHROUGH;
519 case 3: *_p++ = _val; SDL_FALLTHROUGH;
520 case 2: *_p++ = _val; SDL_FALLTHROUGH;
521 case 1: *_p++ = _val;
522 } while ( --_n );
523 }
524 #endif
525 }
526
527 extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
528
529 extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
530 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
531
532 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
533 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
534 extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
535 extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
536 extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
537
538 extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
539 extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
540 extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
541 extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
542
543 extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
544 extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
545 extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
546 extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
547 extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
548 extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
549 extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
550 extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
551 extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
552 extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
553 extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
554 extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
555 extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
556
557 extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
558 extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
559 extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
560 extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
561 extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
562 extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
563
564 extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
565 extern DECLSPEC double SDLCALL SDL_atof(const char *str);
566 extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
567 extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
568 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
569 extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
570 extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
571
572 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
573 extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
574 extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
575 extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
576
577 extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
578 extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
579 extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
580 extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
581 extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
582 extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
583
584 #ifndef HAVE_M_PI
585 #ifndef M_PI
586 #define M_PI 3.14159265358979323846264338327950288 /**< pi */
587 #endif
588 #endif
589
590 /**
591 * Use this function to compute arc cosine of `x`.
592 *
593 * The definition of `y = acos(x)` is `x = cos(y)`.
594 *
595 * Domain: `-1 <= x <= 1`
596 *
597 * Range: `0 <= y <= Pi`
598 *
599 * \param x floating point value, in radians.
600 * \returns arc cosine of `x`.
601 *
602 * \since This function is available since SDL 2.0.2.
603 */
604 extern DECLSPEC double SDLCALL SDL_acos(double x);
605 extern DECLSPEC float SDLCALL SDL_acosf(float x);
606 extern DECLSPEC double SDLCALL SDL_asin(double x);
607 extern DECLSPEC float SDLCALL SDL_asinf(float x);
608 extern DECLSPEC double SDLCALL SDL_atan(double x);
609 extern DECLSPEC float SDLCALL SDL_atanf(float x);
610 extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
611 extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
612 extern DECLSPEC double SDLCALL SDL_ceil(double x);
613 extern DECLSPEC float SDLCALL SDL_ceilf(float x);
614 extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
615 extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
616 extern DECLSPEC double SDLCALL SDL_cos(double x);
617 extern DECLSPEC float SDLCALL SDL_cosf(float x);
618 extern DECLSPEC double SDLCALL SDL_exp(double x);
619 extern DECLSPEC float SDLCALL SDL_expf(float x);
620 extern DECLSPEC double SDLCALL SDL_fabs(double x);
621 extern DECLSPEC float SDLCALL SDL_fabsf(float x);
622 extern DECLSPEC double SDLCALL SDL_floor(double x);
623 extern DECLSPEC float SDLCALL SDL_floorf(float x);
624 extern DECLSPEC double SDLCALL SDL_trunc(double x);
625 extern DECLSPEC float SDLCALL SDL_truncf(float x);
626 extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
627 extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
628 extern DECLSPEC double SDLCALL SDL_log(double x);
629 extern DECLSPEC float SDLCALL SDL_logf(float x);
630 extern DECLSPEC double SDLCALL SDL_log10(double x);
631 extern DECLSPEC float SDLCALL SDL_log10f(float x);
632 extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
633 extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
634 extern DECLSPEC double SDLCALL SDL_round(double x);
635 extern DECLSPEC float SDLCALL SDL_roundf(float x);
636 extern DECLSPEC long SDLCALL SDL_lround(double x);
637 extern DECLSPEC long SDLCALL SDL_lroundf(float x);
638 extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
639 extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
640 extern DECLSPEC double SDLCALL SDL_sin(double x);
641 extern DECLSPEC float SDLCALL SDL_sinf(float x);
642 extern DECLSPEC double SDLCALL SDL_sqrt(double x);
643 extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
644 extern DECLSPEC double SDLCALL SDL_tan(double x);
645 extern DECLSPEC float SDLCALL SDL_tanf(float x);
646
647 /* The SDL implementation of iconv() returns these error codes */
648 #define SDL_ICONV_ERROR (size_t)-1
649 #define SDL_ICONV_E2BIG (size_t)-2
650 #define SDL_ICONV_EILSEQ (size_t)-3
651 #define SDL_ICONV_EINVAL (size_t)-4
652
653 /* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
654 typedef struct _SDL_iconv_t *SDL_iconv_t;
655 extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
656 const char *fromcode);
657 extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
658 extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
659 size_t * inbytesleft, char **outbuf,
660 size_t * outbytesleft);
661
662 /**
663 * This function converts a string between encodings in one pass, returning a
664 * string that must be freed with SDL_free() or NULL on error.
665 *
666 * \since This function is available since SDL 2.0.0.
667 */
668 extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
669 const char *fromcode,
670 const char *inbuf,
671 size_t inbytesleft);
672 #define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
673 #define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
674 #define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
675 #define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
676
677 /* force builds using Clang's static analysis tools to use literal C runtime
678 here, since there are possibly tests that are ineffective otherwise. */
679 #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
680
681 /* The analyzer knows about strlcpy even when the system doesn't provide it */
682 #ifndef HAVE_STRLCPY
683 size_t strlcpy(char* dst, const char* src, size_t size);
684 #endif
685
686 /* The analyzer knows about strlcat even when the system doesn't provide it */
687 #ifndef HAVE_STRLCAT
688 size_t strlcat(char* dst, const char* src, size_t size);
689 #endif
690
691 #define SDL_malloc malloc
692 #define SDL_calloc calloc
693 #define SDL_realloc realloc
694 #define SDL_free free
695 #define SDL_memset memset
696 #define SDL_memcpy memcpy
697 #define SDL_memmove memmove
698 #define SDL_memcmp memcmp
699 #define SDL_strlcpy strlcpy
700 #define SDL_strlcat strlcat
701 #define SDL_strlen strlen
702 #define SDL_wcslen wcslen
703 #define SDL_wcslcpy wcslcpy
704 #define SDL_wcslcat wcslcat
705 #define SDL_strdup strdup
706 #define SDL_wcsdup wcsdup
707 #define SDL_strchr strchr
708 #define SDL_strrchr strrchr
709 #define SDL_strstr strstr
710 #define SDL_wcsstr wcsstr
711 #define SDL_strtokr strtok_r
712 #define SDL_strcmp strcmp
713 #define SDL_wcscmp wcscmp
714 #define SDL_strncmp strncmp
715 #define SDL_wcsncmp wcsncmp
716 #define SDL_strcasecmp strcasecmp
717 #define SDL_strncasecmp strncasecmp
718 #define SDL_sscanf sscanf
719 #define SDL_vsscanf vsscanf
720 #define SDL_snprintf snprintf
721 #define SDL_vsnprintf vsnprintf
722 #endif
723
724 SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
725 {
726 return SDL_memcpy(dst, src, dwords * 4);
727 }
728
729 /* Ends C function definitions when using C++ */
730 #ifdef __cplusplus
731 }
732 #endif
733 #include <SDL2/close_code.h>
734
735 #endif /* SDL_stdinc_h_ */
736
737 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_surface.h
23 *
24 * Header file for ::SDL_Surface definition and management functions.
25 */
26
27 #ifndef SDL_surface_h_
28 #define SDL_surface_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_blendmode.h>
34 #include <SDL2/SDL_rwops.h>
35
36 #include <SDL2/begin_code.h>
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /**
43 * \name Surface flags
44 *
45 * These are the currently supported flags for the ::SDL_Surface.
46 *
47 * \internal
48 * Used internally (read-only).
49 */
50 /* @{ */
51 #define SDL_SWSURFACE 0 /**< Just here for compatibility */
52 #define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
53 #define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
54 #define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
55 #define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
56 /* @} *//* Surface flags */
57
58 /**
59 * Evaluates to true if the surface needs to be locked before access.
60 */
61 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
62
63 /**
64 * \brief A collection of pixels used in software blitting.
65 *
66 * \note This structure should be treated as read-only, except for \c pixels,
67 * which, if not NULL, contains the raw pixel data for the surface.
68 */
69 typedef struct SDL_Surface
70 {
71 Uint32 flags; /**< Read-only */
72 SDL_PixelFormat *format; /**< Read-only */
73 int w, h; /**< Read-only */
74 int pitch; /**< Read-only */
75 void *pixels; /**< Read-write */
76
77 /** Application data associated with the surface */
78 void *userdata; /**< Read-write */
79
80 /** information needed for surfaces requiring locks */
81 int locked; /**< Read-only */
82
83 /** list of BlitMap that hold a reference to this surface */
84 void *list_blitmap; /**< Private */
85
86 /** clipping information */
87 SDL_Rect clip_rect; /**< Read-only */
88
89 /** info for fast blit mapping to other surfaces */
90 struct SDL_BlitMap *map; /**< Private */
91
92 /** Reference count -- used when freeing surface */
93 int refcount; /**< Read-mostly */
94 } SDL_Surface;
95
96 /**
97 * \brief The type of function used for surface blitting functions.
98 */
99 typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
100 struct SDL_Surface * dst, SDL_Rect * dstrect);
101
102 /**
103 * \brief The formula used for converting between YUV and RGB
104 */
105 typedef enum
106 {
107 SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
108 SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
109 SDL_YUV_CONVERSION_BT709, /**< BT.709 */
110 SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
111 } SDL_YUV_CONVERSION_MODE;
112
113 /**
114 * Allocate a new RGB surface.
115 *
116 * If `depth` is 4 or 8 bits, an empty palette is allocated for the surface.
117 * If `depth` is greater than 8 bits, the pixel format is set using the
118 * [RGBA]mask parameters.
119 *
120 * The [RGBA]mask parameters are the bitmasks used to extract that color from
121 * a pixel. For instance, `Rmask` being 0xFF000000 means the red data is
122 * stored in the most significant byte. Using zeros for the RGB masks sets a
123 * default value, based on the depth. For example:
124 *
125 * ```c++
126 * SDL_CreateRGBSurface(0,w,h,32,0,0,0,0);
127 * ```
128 *
129 * However, using zero for the Amask results in an Amask of 0.
130 *
131 * By default surfaces with an alpha mask are set up for blending as with:
132 *
133 * ```c++
134 * SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)
135 * ```
136 *
137 * You can change this by calling SDL_SetSurfaceBlendMode() and selecting a
138 * different `blendMode`.
139 *
140 * \param flags the flags are unused and should be set to 0
141 * \param width the width of the surface
142 * \param height the height of the surface
143 * \param depth the depth of the surface in bits
144 * \param Rmask the red mask for the pixels
145 * \param Gmask the green mask for the pixels
146 * \param Bmask the blue mask for the pixels
147 * \param Amask the alpha mask for the pixels
148 * \returns the new SDL_Surface structure that is created or NULL if it fails;
149 * call SDL_GetError() for more information.
150 *
151 * \since This function is available since SDL 2.0.0.
152 *
153 * \sa SDL_CreateRGBSurfaceFrom
154 * \sa SDL_CreateRGBSurfaceWithFormat
155 * \sa SDL_FreeSurface
156 */
157 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
158 (Uint32 flags, int width, int height, int depth,
159 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
160
161
162 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
163
164 /**
165 * Allocate a new RGB surface with a specific pixel format.
166 *
167 * This function operates mostly like SDL_CreateRGBSurface(), except instead
168 * of providing pixel color masks, you provide it with a predefined format
169 * from SDL_PixelFormatEnum.
170 *
171 * \param flags the flags are unused and should be set to 0
172 * \param width the width of the surface
173 * \param height the height of the surface
174 * \param depth the depth of the surface in bits
175 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
176 * \returns the new SDL_Surface structure that is created or NULL if it fails;
177 * call SDL_GetError() for more information.
178 *
179 * \since This function is available since SDL 2.0.5.
180 *
181 * \sa SDL_CreateRGBSurface
182 * \sa SDL_CreateRGBSurfaceFrom
183 * \sa SDL_FreeSurface
184 */
185 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
186 (Uint32 flags, int width, int height, int depth, Uint32 format);
187
188 /**
189 * Allocate a new RGB surface with existing pixel data.
190 *
191 * This function operates mostly like SDL_CreateRGBSurface(), except it does
192 * not allocate memory for the pixel data, instead the caller provides an
193 * existing buffer of data for the surface to use.
194 *
195 * No copy is made of the pixel data. Pixel data is not managed automatically;
196 * you must free the surface before you free the pixel data.
197 *
198 * \param pixels a pointer to existing pixel data
199 * \param width the width of the surface
200 * \param height the height of the surface
201 * \param depth the depth of the surface in bits
202 * \param pitch the pitch of the surface in bytes
203 * \param Rmask the red mask for the pixels
204 * \param Gmask the green mask for the pixels
205 * \param Bmask the blue mask for the pixels
206 * \param Amask the alpha mask for the pixels
207 * \returns the new SDL_Surface structure that is created or NULL if it fails;
208 * call SDL_GetError() for more information.
209 *
210 * \since This function is available since SDL 2.0.0.
211 *
212 * \sa SDL_CreateRGBSurface
213 * \sa SDL_CreateRGBSurfaceWithFormat
214 * \sa SDL_FreeSurface
215 */
216 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
217 int width,
218 int height,
219 int depth,
220 int pitch,
221 Uint32 Rmask,
222 Uint32 Gmask,
223 Uint32 Bmask,
224 Uint32 Amask);
225
226 /* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
227
228 /**
229 * Allocate a new RGB surface with with a specific pixel format and existing
230 * pixel data.
231 *
232 * This function operates mostly like SDL_CreateRGBSurfaceFrom(), except
233 * instead of providing pixel color masks, you provide it with a predefined
234 * format from SDL_PixelFormatEnum.
235 *
236 * No copy is made of the pixel data. Pixel data is not managed automatically;
237 * you must free the surface before you free the pixel data.
238 *
239 * \param pixels a pointer to existing pixel data
240 * \param width the width of the surface
241 * \param height the height of the surface
242 * \param depth the depth of the surface in bits
243 * \param pitch the pitch of the surface in bytes
244 * \param format the SDL_PixelFormatEnum for the new surface's pixel format.
245 * \returns the new SDL_Surface structure that is created or NULL if it fails;
246 * call SDL_GetError() for more information.
247 *
248 * \since This function is available since SDL 2.0.5.
249 *
250 * \sa SDL_CreateRGBSurfaceFrom
251 * \sa SDL_CreateRGBSurfaceWithFormat
252 * \sa SDL_FreeSurface
253 */
254 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
255 (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
256
257 /**
258 * Free an RGB surface.
259 *
260 * It is safe to pass NULL to this function.
261 *
262 * \param surface the SDL_Surface to free.
263 *
264 * \since This function is available since SDL 2.0.0.
265 *
266 * \sa SDL_CreateRGBSurface
267 * \sa SDL_CreateRGBSurfaceFrom
268 * \sa SDL_LoadBMP
269 * \sa SDL_LoadBMP_RW
270 */
271 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
272
273 /**
274 * Set the palette used by a surface.
275 *
276 * A single palette can be shared with many surfaces.
277 *
278 * \param surface the SDL_Surface structure to update
279 * \param palette the SDL_Palette structure to use
280 * \returns 0 on success or a negative error code on failure; call
281 * SDL_GetError() for more information.
282 *
283 * \since This function is available since SDL 2.0.0.
284 */
285 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
286 SDL_Palette * palette);
287
288 /**
289 * Set up a surface for directly accessing the pixels.
290 *
291 * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
292 * and read from `surface->pixels`, using the pixel format stored in
293 * `surface->format`. Once you are done accessing the surface, you should use
294 * SDL_UnlockSurface() to release it.
295 *
296 * Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
297 * 0, then you can read and write to the surface at any time, and the pixel
298 * format of the surface will not change.
299 *
300 * \param surface the SDL_Surface structure to be locked
301 * \returns 0 on success or a negative error code on failure; call
302 * SDL_GetError() for more information.
303 *
304 * \since This function is available since SDL 2.0.0.
305 *
306 * \sa SDL_MUSTLOCK
307 * \sa SDL_UnlockSurface
308 */
309 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
310
311 /**
312 * Release a surface after directly accessing the pixels.
313 *
314 * \param surface the SDL_Surface structure to be unlocked
315 *
316 * \since This function is available since SDL 2.0.0.
317 *
318 * \sa SDL_LockSurface
319 */
320 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
321
322 /**
323 * Load a BMP image from a seekable SDL data stream.
324 *
325 * The new surface should be freed with SDL_FreeSurface(). Not doing so will
326 * result in a memory leak.
327 *
328 * src is an open SDL_RWops buffer, typically loaded with SDL_RWFromFile.
329 * Alternitavely, you might also use the macro SDL_LoadBMP to load a bitmap
330 * from a file, convert it to an SDL_Surface and then close the file.
331 *
332 * \param src the data stream for the surface
333 * \param freesrc non-zero to close the stream after being read
334 * \returns a pointer to a new SDL_Surface structure or NULL if there was an
335 * error; call SDL_GetError() for more information.
336 *
337 * \since This function is available since SDL 2.0.0.
338 *
339 * \sa SDL_FreeSurface
340 * \sa SDL_RWFromFile
341 * \sa SDL_LoadBMP
342 * \sa SDL_SaveBMP_RW
343 */
344 extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
345 int freesrc);
346
347 /**
348 * Load a surface from a file.
349 *
350 * Convenience macro.
351 */
352 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
353
354 /**
355 * Save a surface to a seekable SDL data stream in BMP format.
356 *
357 * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
358 * BMP directly. Other RGB formats with 8-bit or higher get converted to a
359 * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
360 * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
361 * not supported.
362 *
363 * \param surface the SDL_Surface structure containing the image to be saved
364 * \param dst a data stream to save to
365 * \param freedst non-zero to close the stream after being written
366 * \returns 0 on success or a negative error code on failure; call
367 * SDL_GetError() for more information.
368 *
369 * \since This function is available since SDL 2.0.0.
370 *
371 * \sa SDL_LoadBMP_RW
372 * \sa SDL_SaveBMP
373 */
374 extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
375 (SDL_Surface * surface, SDL_RWops * dst, int freedst);
376
377 /**
378 * Save a surface to a file.
379 *
380 * Convenience macro.
381 */
382 #define SDL_SaveBMP(surface, file) \
383 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
384
385 /**
386 * Set the RLE acceleration hint for a surface.
387 *
388 * If RLE is enabled, color key and alpha blending blits are much faster, but
389 * the surface must be locked before directly accessing the pixels.
390 *
391 * \param surface the SDL_Surface structure to optimize
392 * \param flag 0 to disable, non-zero to enable RLE acceleration
393 * \returns 0 on success or a negative error code on failure; call
394 * SDL_GetError() for more information.
395 *
396 * \since This function is available since SDL 2.0.0.
397 *
398 * \sa SDL_BlitSurface
399 * \sa SDL_LockSurface
400 * \sa SDL_UnlockSurface
401 */
402 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
403 int flag);
404
405 /**
406 * Returns whether the surface is RLE enabled
407 *
408 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
409 *
410 * \param surface the SDL_Surface structure to query
411 * \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise.
412 *
413 * \since This function is available since SDL 2.0.14.
414 *
415 * \sa SDL_SetSurfaceRLE
416 */
417 extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
418
419 /**
420 * Set the color key (transparent pixel) in a surface.
421 *
422 * The color key defines a pixel value that will be treated as transparent in
423 * a blit. For example, one can use this to specify that cyan pixels should be
424 * considered transparent, and therefore not rendered.
425 *
426 * It is a pixel of the format used by the surface, as generated by
427 * SDL_MapRGB().
428 *
429 * RLE acceleration can substantially speed up blitting of images with large
430 * horizontal runs of transparent pixels. See SDL_SetSurfaceRLE() for details.
431 *
432 * \param surface the SDL_Surface structure to update
433 * \param flag SDL_TRUE to enable color key, SDL_FALSE to disable color key
434 * \param key the transparent pixel
435 * \returns 0 on success or a negative error code on failure; call
436 * SDL_GetError() for more information.
437 *
438 * \since This function is available since SDL 2.0.0.
439 *
440 * \sa SDL_BlitSurface
441 * \sa SDL_GetColorKey
442 */
443 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
444 int flag, Uint32 key);
445
446 /**
447 * Returns whether the surface has a color key
448 *
449 * It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
450 *
451 * \param surface the SDL_Surface structure to query
452 * \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.
453 *
454 * \since This function is available since SDL 2.0.9.
455 *
456 * \sa SDL_SetColorKey
457 * \sa SDL_GetColorKey
458 */
459 extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
460
461 /**
462 * Get the color key (transparent pixel) for a surface.
463 *
464 * The color key is a pixel of the format used by the surface, as generated by
465 * SDL_MapRGB().
466 *
467 * If the surface doesn't have color key enabled this function returns -1.
468 *
469 * \param surface the SDL_Surface structure to query
470 * \param key a pointer filled in with the transparent pixel
471 * \returns 0 on success or a negative error code on failure; call
472 * SDL_GetError() for more information.
473 *
474 * \since This function is available since SDL 2.0.0.
475 *
476 * \sa SDL_BlitSurface
477 * \sa SDL_SetColorKey
478 */
479 extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
480 Uint32 * key);
481
482 /**
483 * Set an additional color value multiplied into blit operations.
484 *
485 * When this surface is blitted, during the blit operation each source color
486 * channel is modulated by the appropriate color value according to the
487 * following formula:
488 *
489 * `srcC = srcC * (color / 255)`
490 *
491 * \param surface the SDL_Surface structure to update
492 * \param r the red color value multiplied into blit operations
493 * \param g the green color value multiplied into blit operations
494 * \param b the blue color value multiplied into blit operations
495 * \returns 0 on success or a negative error code on failure; call
496 * SDL_GetError() for more information.
497 *
498 * \since This function is available since SDL 2.0.0.
499 *
500 * \sa SDL_GetSurfaceColorMod
501 * \sa SDL_SetSurfaceAlphaMod
502 */
503 extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
504 Uint8 r, Uint8 g, Uint8 b);
505
506
507 /**
508 * Get the additional color value multiplied into blit operations.
509 *
510 * \param surface the SDL_Surface structure to query
511 * \param r a pointer filled in with the current red color value
512 * \param g a pointer filled in with the current green color value
513 * \param b a pointer filled in with the current blue color value
514 * \returns 0 on success or a negative error code on failure; call
515 * SDL_GetError() for more information.
516 *
517 * \since This function is available since SDL 2.0.0.
518 *
519 * \sa SDL_GetSurfaceAlphaMod
520 * \sa SDL_SetSurfaceColorMod
521 */
522 extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
523 Uint8 * r, Uint8 * g,
524 Uint8 * b);
525
526 /**
527 * Set an additional alpha value used in blit operations.
528 *
529 * When this surface is blitted, during the blit operation the source alpha
530 * value is modulated by this alpha value according to the following formula:
531 *
532 * `srcA = srcA * (alpha / 255)`
533 *
534 * \param surface the SDL_Surface structure to update
535 * \param alpha the alpha value multiplied into blit operations
536 * \returns 0 on success or a negative error code on failure; call
537 * SDL_GetError() for more information.
538 *
539 * \since This function is available since SDL 2.0.0.
540 *
541 * \sa SDL_GetSurfaceAlphaMod
542 * \sa SDL_SetSurfaceColorMod
543 */
544 extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
545 Uint8 alpha);
546
547 /**
548 * Get the additional alpha value used in blit operations.
549 *
550 * \param surface the SDL_Surface structure to query
551 * \param alpha a pointer filled in with the current alpha value
552 * \returns 0 on success or a negative error code on failure; call
553 * SDL_GetError() for more information.
554 *
555 * \since This function is available since SDL 2.0.0.
556 *
557 * \sa SDL_GetSurfaceColorMod
558 * \sa SDL_SetSurfaceAlphaMod
559 */
560 extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
561 Uint8 * alpha);
562
563 /**
564 * Set the blend mode used for blit operations.
565 *
566 * To copy a surface to another surface (or texture) without blending with the
567 * existing data, the blendmode of the SOURCE surface should be set to
568 * `SDL_BLENDMODE_NONE`.
569 *
570 * \param surface the SDL_Surface structure to update
571 * \param blendMode the SDL_BlendMode to use for blit blending
572 * \returns 0 on success or a negative error code on failure; call
573 * SDL_GetError() for more information.
574 *
575 * \since This function is available since SDL 2.0.0.
576 *
577 * \sa SDL_GetSurfaceBlendMode
578 */
579 extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
580 SDL_BlendMode blendMode);
581
582 /**
583 * Get the blend mode used for blit operations.
584 *
585 * \param surface the SDL_Surface structure to query
586 * \param blendMode a pointer filled in with the current SDL_BlendMode
587 * \returns 0 on success or a negative error code on failure; call
588 * SDL_GetError() for more information.
589 *
590 * \since This function is available since SDL 2.0.0.
591 *
592 * \sa SDL_SetSurfaceBlendMode
593 */
594 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
595 SDL_BlendMode *blendMode);
596
597 /**
598 * Set the clipping rectangle for a surface.
599 *
600 * When `surface` is the destination of a blit, only the area within the clip
601 * rectangle is drawn into.
602 *
603 * Note that blits are automatically clipped to the edges of the source and
604 * destination surfaces.
605 *
606 * \param surface the SDL_Surface structure to be clipped
607 * \param rect the SDL_Rect structure representing the clipping rectangle, or
608 * NULL to disable clipping
609 * \returns SDL_TRUE if the rectangle intersects the surface, otherwise
610 * SDL_FALSE and blits will be completely clipped.
611 *
612 * \since This function is available since SDL 2.0.0.
613 *
614 * \sa SDL_BlitSurface
615 * \sa SDL_GetClipRect
616 */
617 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
618 const SDL_Rect * rect);
619
620 /**
621 * Get the clipping rectangle for a surface.
622 *
623 * When `surface` is the destination of a blit, only the area within the clip
624 * rectangle is drawn into.
625 *
626 * \param surface the SDL_Surface structure representing the surface to be
627 * clipped
628 * \param rect an SDL_Rect structure filled in with the clipping rectangle for
629 * the surface
630 *
631 * \since This function is available since SDL 2.0.0.
632 *
633 * \sa SDL_BlitSurface
634 * \sa SDL_SetClipRect
635 */
636 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
637 SDL_Rect * rect);
638
639 /*
640 * Creates a new surface identical to the existing surface.
641 *
642 * The returned surface should be freed with SDL_FreeSurface().
643 *
644 * \param surface the surface to duplicate.
645 * \returns a copy of the surface, or NULL on failure; call SDL_GetError() for
646 * more information.
647 */
648 extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
649
650 /**
651 * Copy an existing surface to a new surface of the specified format.
652 *
653 * This function is used to optimize images for faster *repeat* blitting. This
654 * is accomplished by converting the original and storing the result as a new
655 * surface. The new, optimized surface can then be used as the source for
656 * future blits, making them faster.
657 *
658 * \param src the existing SDL_Surface structure to convert
659 * \param fmt the SDL_PixelFormat structure that the new surface is optimized
660 * for
661 * \param flags the flags are unused and should be set to 0; this is a
662 * leftover from SDL 1.2's API
663 * \returns the new SDL_Surface structure that is created or NULL if it fails;
664 * call SDL_GetError() for more information.
665 *
666 * \since This function is available since SDL 2.0.0.
667 *
668 * \sa SDL_AllocFormat
669 * \sa SDL_ConvertSurfaceFormat
670 * \sa SDL_CreateRGBSurface
671 */
672 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
673 (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
674
675 /**
676 * Copy an existing surface to a new surface of the specified format enum.
677 *
678 * This function operates just like SDL_ConvertSurface(), but accepts an
679 * SDL_PixelFormatEnum value instead of an SDL_PixelFormat structure. As such,
680 * it might be easier to call but it doesn't have access to palette
681 * information for the destination surface, in case that would be important.
682 *
683 * \param src the existing SDL_Surface structure to convert
684 * \param pixel_format the SDL_PixelFormatEnum that the new surface is
685 * optimized for
686 * \param flags the flags are unused and should be set to 0; this is a
687 * leftover from SDL 1.2's API
688 * \returns the new SDL_Surface structure that is created or NULL if it fails;
689 * call SDL_GetError() for more information.
690 *
691 * \since This function is available since SDL 2.0.0.
692 *
693 * \sa SDL_AllocFormat
694 * \sa SDL_ConvertSurface
695 * \sa SDL_CreateRGBSurface
696 */
697 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
698 (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
699
700 /**
701 * Copy a block of pixels of one format to another format.
702 *
703 * \param width the width of the block to copy, in pixels
704 * \param height the height of the block to copy, in pixels
705 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
706 * \param src a pointer to the source pixels
707 * \param src_pitch the pitch of the source pixels, in bytes
708 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
709 * \param dst a pointer to be filled in with new pixel data
710 * \param dst_pitch the pitch of the destination pixels, in bytes
711 * \returns 0 on success or a negative error code on failure; call
712 * SDL_GetError() for more information.
713 *
714 * \since This function is available since SDL 2.0.0.
715 */
716 extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
717 Uint32 src_format,
718 const void * src, int src_pitch,
719 Uint32 dst_format,
720 void * dst, int dst_pitch);
721
722 /**
723 * Premultiply the alpha on a block of pixels.
724 *
725 * This is safe to use with src == dst, but not for other overlapping areas.
726 *
727 * This function is currently only implemented for SDL_PIXELFORMAT_ARGB8888.
728 *
729 * \param width the width of the block to convert, in pixels
730 * \param height the height of the block to convert, in pixels
731 * \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
732 * \param src a pointer to the source pixels
733 * \param src_pitch the pitch of the source pixels, in bytes
734 * \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
735 * \param dst a pointer to be filled in with premultiplied pixel data
736 * \param dst_pitch the pitch of the destination pixels, in bytes
737 * \returns 0 on success or a negative error code on failure; call
738 * SDL_GetError() for more information.
739 *
740 * \since This function is available since SDL 2.0.18.
741 */
742 extern DECLSPEC int SDLCALL SDL_PremultiplyAlpha(int width, int height,
743 Uint32 src_format,
744 const void * src, int src_pitch,
745 Uint32 dst_format,
746 void * dst, int dst_pitch);
747
748 /**
749 * Perform a fast fill of a rectangle with a specific color.
750 *
751 * `color` should be a pixel of the format used by the surface, and can be
752 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
753 * alpha component then the destination is simply filled with that alpha
754 * information, no blending takes place.
755 *
756 * If there is a clip rectangle set on the destination (set via
757 * SDL_SetClipRect()), then this function will fill based on the intersection
758 * of the clip rectangle and `rect`.
759 *
760 * \param dst the SDL_Surface structure that is the drawing target
761 * \param rect the SDL_Rect structure representing the rectangle to fill, or
762 * NULL to fill the entire surface
763 * \param color the color to fill with
764 * \returns 0 on success or a negative error code on failure; call
765 * SDL_GetError() for more information.
766 *
767 * \since This function is available since SDL 2.0.0.
768 *
769 * \sa SDL_FillRects
770 */
771 extern DECLSPEC int SDLCALL SDL_FillRect
772 (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
773
774 /**
775 * Perform a fast fill of a set of rectangles with a specific color.
776 *
777 * `color` should be a pixel of the format used by the surface, and can be
778 * generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
779 * alpha component then the destination is simply filled with that alpha
780 * information, no blending takes place.
781 *
782 * If there is a clip rectangle set on the destination (set via
783 * SDL_SetClipRect()), then this function will fill based on the intersection
784 * of the clip rectangle and `rect`.
785 *
786 * \param dst the SDL_Surface structure that is the drawing target
787 * \param rects an array of SDL_Rects representing the rectangles to fill.
788 * \param count the number of rectangles in the array
789 * \param color the color to fill with
790 * \returns 0 on success or a negative error code on failure; call
791 * SDL_GetError() for more information.
792 *
793 * \since This function is available since SDL 2.0.0.
794 *
795 * \sa SDL_FillRect
796 */
797 extern DECLSPEC int SDLCALL SDL_FillRects
798 (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
799
800 /* !!! FIXME: merge this documentation with the wiki */
801 /**
802 * Performs a fast blit from the source surface to the destination surface.
803 *
804 * This assumes that the source and destination rectangles are
805 * the same size. If either \c srcrect or \c dstrect are NULL, the entire
806 * surface (\c src or \c dst) is copied. The final blit rectangles are saved
807 * in \c srcrect and \c dstrect after all clipping is performed.
808 *
809 * \returns 0 if the blit is successful, otherwise it returns -1.
810 *
811 * The blit function should not be called on a locked surface.
812 *
813 * The blit semantics for surfaces with and without blending and colorkey
814 * are defined as follows:
815 * \verbatim
816 RGBA->RGB:
817 Source surface blend mode set to SDL_BLENDMODE_BLEND:
818 alpha-blend (using the source alpha-channel and per-surface alpha)
819 SDL_SRCCOLORKEY ignored.
820 Source surface blend mode set to SDL_BLENDMODE_NONE:
821 copy RGB.
822 if SDL_SRCCOLORKEY set, only copy the pixels matching the
823 RGB values of the source color key, ignoring alpha in the
824 comparison.
825
826 RGB->RGBA:
827 Source surface blend mode set to SDL_BLENDMODE_BLEND:
828 alpha-blend (using the source per-surface alpha)
829 Source surface blend mode set to SDL_BLENDMODE_NONE:
830 copy RGB, set destination alpha to source per-surface alpha value.
831 both:
832 if SDL_SRCCOLORKEY set, only copy the pixels matching the
833 source color key.
834
835 RGBA->RGBA:
836 Source surface blend mode set to SDL_BLENDMODE_BLEND:
837 alpha-blend (using the source alpha-channel and per-surface alpha)
838 SDL_SRCCOLORKEY ignored.
839 Source surface blend mode set to SDL_BLENDMODE_NONE:
840 copy all of RGBA to the destination.
841 if SDL_SRCCOLORKEY set, only copy the pixels matching the
842 RGB values of the source color key, ignoring alpha in the
843 comparison.
844
845 RGB->RGB:
846 Source surface blend mode set to SDL_BLENDMODE_BLEND:
847 alpha-blend (using the source per-surface alpha)
848 Source surface blend mode set to SDL_BLENDMODE_NONE:
849 copy RGB.
850 both:
851 if SDL_SRCCOLORKEY set, only copy the pixels matching the
852 source color key.
853 \endverbatim
854 *
855 * You should call SDL_BlitSurface() unless you know exactly how SDL
856 * blitting works internally and how to use the other blit functions.
857 */
858 #define SDL_BlitSurface SDL_UpperBlit
859
860 /**
861 * Perform a fast blit from the source surface to the destination surface.
862 *
863 * SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
864 * macro for this function with a less confusing name.
865 *
866 * \since This function is available since SDL 2.0.0.
867 *
868 * \sa SDL_BlitSurface
869 */
870 extern DECLSPEC int SDLCALL SDL_UpperBlit
871 (SDL_Surface * src, const SDL_Rect * srcrect,
872 SDL_Surface * dst, SDL_Rect * dstrect);
873
874 /**
875 * Perform low-level surface blitting only.
876 *
877 * This is a semi-private blit function and it performs low-level surface
878 * blitting, assuming the input rectangles have already been clipped.
879 *
880 * Unless you know what you're doing, you should be using SDL_BlitSurface()
881 * instead.
882 *
883 * \param src the SDL_Surface structure to be copied from
884 * \param srcrect the SDL_Rect structure representing the rectangle to be
885 * copied, or NULL to copy the entire surface
886 * \param dst the SDL_Surface structure that is the blit target
887 * \param dstrect the SDL_Rect structure representing the rectangle that is
888 * copied into
889 * \returns 0 on success or a negative error code on failure; call
890 * SDL_GetError() for more information.
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_BlitSurface
895 */
896 extern DECLSPEC int SDLCALL SDL_LowerBlit
897 (SDL_Surface * src, SDL_Rect * srcrect,
898 SDL_Surface * dst, SDL_Rect * dstrect);
899
900
901 /**
902 * Perform a fast, low quality, stretch blit between two surfaces of the same
903 * format.
904 *
905 * Please use SDL_BlitScaled() instead.
906 *
907 * \since This function is available since SDL 2.0.0.
908 */
909 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
910 const SDL_Rect * srcrect,
911 SDL_Surface * dst,
912 const SDL_Rect * dstrect);
913
914 /**
915 * Perform bilinear scaling between two surfaces of the same format, 32BPP.
916 *
917 * \since This function is available since SDL 2.0.16.
918 */
919 extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
920 const SDL_Rect * srcrect,
921 SDL_Surface * dst,
922 const SDL_Rect * dstrect);
923
924
925 #define SDL_BlitScaled SDL_UpperBlitScaled
926
927 /**
928 * Perform a scaled surface copy to a destination surface.
929 *
930 * SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
931 * merely a macro for this function with a less confusing name.
932 *
933 * \since This function is available since SDL 2.0.0.
934 *
935 * \sa SDL_BlitScaled
936 */
937 extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
938 (SDL_Surface * src, const SDL_Rect * srcrect,
939 SDL_Surface * dst, SDL_Rect * dstrect);
940
941 /**
942 * Perform low-level surface scaled blitting only.
943 *
944 * This is a semi-private function and it performs low-level surface blitting,
945 * assuming the input rectangles have already been clipped.
946 *
947 * \param src the SDL_Surface structure to be copied from
948 * \param srcrect the SDL_Rect structure representing the rectangle to be
949 * copied
950 * \param dst the SDL_Surface structure that is the blit target
951 * \param dstrect the SDL_Rect structure representing the rectangle that is
952 * copied into
953 * \returns 0 on success or a negative error code on failure; call
954 * SDL_GetError() for more information.
955 *
956 * \since This function is available since SDL 2.0.0.
957 *
958 * \sa SDL_BlitScaled
959 */
960 extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
961 (SDL_Surface * src, SDL_Rect * srcrect,
962 SDL_Surface * dst, SDL_Rect * dstrect);
963
964 /**
965 * Set the YUV conversion mode
966 *
967 * \since This function is available since SDL 2.0.8.
968 */
969 extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
970
971 /**
972 * Get the YUV conversion mode
973 *
974 * \since This function is available since SDL 2.0.8.
975 */
976 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
977
978 /**
979 * Get the YUV conversion mode, returning the correct mode for the resolution
980 * when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
981 *
982 * \since This function is available since SDL 2.0.8.
983 */
984 extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
985
986 /* Ends C function definitions when using C++ */
987 #ifdef __cplusplus
988 }
989 #endif
990 #include <SDL2/close_code.h>
991
992 #endif /* SDL_surface_h_ */
993
994 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_system.h
23 *
24 * Include file for platform specific SDL API functions
25 */
26
27 #ifndef SDL_system_h_
28 #define SDL_system_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_keyboard.h>
32 #include <SDL2/SDL_render.h>
33 #include <SDL2/SDL_video.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42 /* Platform specific functions for Windows */
43 #ifdef __WIN32__
44
45 typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
46
47 /**
48 * Set a callback for every Windows message, run before TranslateMessage().
49 *
50 * \param callback The SDL_WindowsMessageHook function to call.
51 * \param userdata a pointer to pass to every iteration of `callback`
52 *
53 * \since This function is available since SDL 2.0.4.
54 */
55 extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
56
57 /**
58 * Get the D3D9 adapter index that matches the specified display index.
59 *
60 * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
61 * controls on which monitor a full screen application will appear.
62 *
63 * \param displayIndex the display index for which to get the D3D9 adapter
64 * index
65 * \returns the D3D9 adapter index on success or a negative error code on
66 * failure; call SDL_GetError() for more information.
67 *
68 * \since This function is available since SDL 2.0.1.
69 */
70 extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
71
72 typedef struct IDirect3DDevice9 IDirect3DDevice9;
73
74 /**
75 * Get the D3D9 device associated with a renderer.
76 *
77 * Once you are done using the device, you should release it to avoid a
78 * resource leak.
79 *
80 * \param renderer the renderer from which to get the associated D3D device
81 * \returns the D3D9 device associated with given renderer or NULL if it is
82 * not a D3D9 renderer; call SDL_GetError() for more information.
83 *
84 * \since This function is available since SDL 2.0.1.
85 */
86 extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
87
88 typedef struct ID3D11Device ID3D11Device;
89
90 /**
91 * Get the D3D11 device associated with a renderer.
92 *
93 * Once you are done using the device, you should release it to avoid a
94 * resource leak.
95 *
96 * \param renderer the renderer from which to get the associated D3D11 device
97 * \returns the D3D11 device associated with given renderer or NULL if it is
98 * not a D3D11 renderer; call SDL_GetError() for more information.
99 *
100 * \since This function is available since SDL 2.0.16.
101 */
102 extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
103
104 /**
105 * Get the DXGI Adapter and Output indices for the specified display index.
106 *
107 * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
108 * `EnumOutputs` respectively to get the objects required to create a DX10 or
109 * DX11 device and swap chain.
110 *
111 * Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it
112 * returns an SDL_bool.
113 *
114 * \param displayIndex the display index for which to get both indices
115 * \param adapterIndex a pointer to be filled in with the adapter index
116 * \param outputIndex a pointer to be filled in with the output index
117 * \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
118 * for more information.
119 *
120 * \since This function is available since SDL 2.0.2.
121 */
122 extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
123
124 #endif /* __WIN32__ */
125
126
127 /* Platform specific functions for Linux */
128 #ifdef __LINUX__
129
130 /**
131 * Sets the UNIX nice value for a thread.
132 *
133 * This uses setpriority() if possible, and RealtimeKit if available.
134 *
135 * \param threadID the Unix thread ID to change priority of.
136 * \param priority The new, Unix-specific, priority value.
137 * \returns 0 on success, or -1 on error.
138 *
139 * \since This function is available since SDL 2.0.9.
140 */
141 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
142
143 /**
144 * Sets the priority (not nice level) and scheduling policy for a thread.
145 *
146 * This uses setpriority() if possible, and RealtimeKit if available.
147 *
148 * \param threadID The Unix thread ID to change priority of.
149 * \param sdlPriority The new SDL_ThreadPriority value.
150 * \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR,
151 * SCHED_OTHER, etc...)
152 * \returns 0 on success, or -1 on error.
153 *
154 * \since This function is available since SDL 2.0.18.
155 */
156 extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
157
158 #endif /* __LINUX__ */
159
160 /* Platform specific functions for iOS */
161 #ifdef __IPHONEOS__
162
163 #define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
164
165 /**
166 * Use this function to set the animation callback on Apple iOS.
167 *
168 * The function prototype for `callback` is:
169 *
170 * ```c
171 * void callback(void* callbackParam);
172 * ```
173 *
174 * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
175 * to SDL_iPhoneSetAnimationCallback().
176 *
177 * This function is only available on Apple iOS.
178 *
179 * For more information see:
180 * [README-ios.md](https://hg.libsdl.org/SDL/file/default/docs/README-ios.md)
181 *
182 * This functions is also accessible using the macro
183 * SDL_iOSSetAnimationCallback() since SDL 2.0.4.
184 *
185 * \param window the window for which the animation callback should be set
186 * \param interval the number of frames after which **callback** will be
187 * called
188 * \param callback the function to call for every frame.
189 * \param callbackParam a pointer that is passed to `callback`.
190 * \returns 0 on success or a negative error code on failure; call
191 * SDL_GetError() for more information.
192 *
193 * \since This function is available since SDL 2.0.0.
194 *
195 * \sa SDL_iPhoneSetEventPump
196 */
197 extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
198
199 #define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
200
201 /**
202 * Use this function to enable or disable the SDL event pump on Apple iOS.
203 *
204 * This function is only available on Apple iOS.
205 *
206 * This functions is also accessible using the macro SDL_iOSSetEventPump()
207 * since SDL 2.0.4.
208 *
209 * \param enabled SDL_TRUE to enable the event pump, SDL_FALSE to disable it
210 *
211 * \since This function is available since SDL 2.0.0.
212 *
213 * \sa SDL_iPhoneSetAnimationCallback
214 */
215 extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
216
217 #endif /* __IPHONEOS__ */
218
219
220 /* Platform specific functions for Android */
221 #ifdef __ANDROID__
222
223 /**
224 * Get the Android Java Native Interface Environment of the current thread.
225 *
226 * This is the JNIEnv one needs to access the Java virtual machine from native
227 * code, and is needed for many Android APIs to be usable from C.
228 *
229 * The prototype of the function in SDL's code actually declare a void* return
230 * type, even if the implementation returns a pointer to a JNIEnv. The
231 * rationale being that the SDL headers can avoid including jni.h.
232 *
233 * \returns a pointer to Java native interface object (JNIEnv) to which the
234 * current thread is attached, or 0 on error.
235 *
236 * \since This function is available since SDL 2.0.0.
237 *
238 * \sa SDL_AndroidGetActivity
239 */
240 extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
241
242 /**
243 * Retrieve the Java instance of the Android activity class.
244 *
245 * The prototype of the function in SDL's code actually declares a void*
246 * return type, even if the implementation returns a jobject. The rationale
247 * being that the SDL headers can avoid including jni.h.
248 *
249 * The jobject returned by the function is a local reference and must be
250 * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
251 * DeleteLocalRef() functions of the Java native interface:
252 *
253 * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
254 *
255 * \returns the jobject representing the instance of the Activity class of the
256 * Android application, or NULL on error.
257 *
258 * \since This function is available since SDL 2.0.0.
259 *
260 * \sa SDL_AndroidGetJNIEnv
261 */
262 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
263
264 /**
265 * Query Android API level of the current device.
266 *
267 * - API level 31: Android 12
268 * - API level 30: Android 11
269 * - API level 29: Android 10
270 * - API level 28: Android 9
271 * - API level 27: Android 8.1
272 * - API level 26: Android 8.0
273 * - API level 25: Android 7.1
274 * - API level 24: Android 7.0
275 * - API level 23: Android 6.0
276 * - API level 22: Android 5.1
277 * - API level 21: Android 5.0
278 * - API level 20: Android 4.4W
279 * - API level 19: Android 4.4
280 * - API level 18: Android 4.3
281 * - API level 17: Android 4.2
282 * - API level 16: Android 4.1
283 * - API level 15: Android 4.0.3
284 * - API level 14: Android 4.0
285 * - API level 13: Android 3.2
286 * - API level 12: Android 3.1
287 * - API level 11: Android 3.0
288 * - API level 10: Android 2.3.3
289 *
290 * \returns the Android API level.
291 *
292 * \since This function is available since SDL 2.0.12.
293 */
294 extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
295
296 /**
297 * Query if the application is running on Android TV.
298 *
299 * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
300 *
301 * \since This function is available since SDL 2.0.8.
302 */
303 extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
304
305 /**
306 * Query if the application is running on a Chromebook.
307 *
308 * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
309 *
310 * \since This function is available since SDL 2.0.9.
311 */
312 extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
313
314 /**
315 * Query if the application is running on a Samsung DeX docking station.
316 *
317 * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
318 *
319 * \since This function is available since SDL 2.0.9.
320 */
321 extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
322
323 /**
324 * Trigger the Android system back button behavior.
325 *
326 * \since This function is available since SDL 2.0.9.
327 */
328 extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
329
330 /**
331 See the official Android developer guide for more information:
332 http://developer.android.com/guide/topics/data/data-storage.html
333 */
334 #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
335 #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
336
337 /**
338 * Get the path used for internal storage for this application.
339 *
340 * This path is unique to your application and cannot be written to by other
341 * applications.
342 *
343 * Your internal storage path is typically:
344 * `/data/data/your.app.package/files`.
345 *
346 * \returns the path used for internal storage or NULL on failure; call
347 * SDL_GetError() for more information.
348 *
349 * \since This function is available since SDL 2.0.0.
350 *
351 * \sa SDL_AndroidGetExternalStorageState
352 */
353 extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
354
355 /**
356 * Get the current state of external storage.
357 *
358 * The current state of external storage, a bitmask of these values:
359 * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
360 *
361 * If external storage is currently unavailable, this will return 0.
362 *
363 * \returns the current state of external storage on success or 0 on failure;
364 * call SDL_GetError() for more information.
365 *
366 * \since This function is available since SDL 2.0.0.
367 *
368 * \sa SDL_AndroidGetExternalStoragePath
369 */
370 extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
371
372 /**
373 * Get the path used for external storage for this application.
374 *
375 * This path is unique to your application, but is public and can be written
376 * to by other applications.
377 *
378 * Your external storage path is typically:
379 * `/storage/sdcard0/Android/data/your.app.package/files`.
380 *
381 * \returns the path used for external storage for this application on success
382 * or NULL on failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_AndroidGetExternalStorageState
387 */
388 extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
389
390 /**
391 * Request permissions at runtime.
392 *
393 * This blocks the calling thread until the permission is granted or denied.
394 *
395 * \param permission The permission to request.
396 * \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise.
397 *
398 * \since This function is available since SDL 2.0.14.
399 */
400 extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
401
402 /**
403 * Shows an Android toast notification.
404 *
405 * Toasts are a sort of lightweight notification that are unique to Android.
406 *
407 * https://developer.android.com/guide/topics/ui/notifiers/toasts
408 *
409 * Shows toast in UI thread.
410 *
411 * For the `gravity` parameter, choose a value from here, or -1 if you don't
412 * have a preference:
413 *
414 * https://developer.android.com/reference/android/view/Gravity
415 *
416 * \param message text message to be shown
417 * \param duration 0=short, 1=long
418 * \param gravity where the notification should appear on the screen.
419 * \param xoffset set this parameter only when gravity >=0
420 * \param yoffset set this parameter only when gravity >=0
421 * \returns 0 if success, -1 if any error occurs.
422 *
423 * \since This function is available since SDL 2.0.16.
424 */
425 extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
426
427 /**
428 * Send a user command to SDLActivity.
429 *
430 * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
431 *
432 * \param command user command that must be greater or equal to 0x8000
433 * \param param user parameter
434 *
435 * \since This function is available since SDL 2.0.22.
436 */
437 extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
438
439 #endif /* __ANDROID__ */
440
441 /* Platform specific functions for WinRT */
442 #ifdef __WINRT__
443
444 /**
445 * \brief WinRT / Windows Phone path types
446 */
447 typedef enum
448 {
449 /** \brief The installed app's root directory.
450 Files here are likely to be read-only. */
451 SDL_WINRT_PATH_INSTALLED_LOCATION,
452
453 /** \brief The app's local data store. Files may be written here */
454 SDL_WINRT_PATH_LOCAL_FOLDER,
455
456 /** \brief The app's roaming data store. Unsupported on Windows Phone.
457 Files written here may be copied to other machines via a network
458 connection.
459 */
460 SDL_WINRT_PATH_ROAMING_FOLDER,
461
462 /** \brief The app's temporary data store. Unsupported on Windows Phone.
463 Files written here may be deleted at any time. */
464 SDL_WINRT_PATH_TEMP_FOLDER
465 } SDL_WinRT_Path;
466
467
468 /**
469 * \brief WinRT Device Family
470 */
471 typedef enum
472 {
473 /** \brief Unknown family */
474 SDL_WINRT_DEVICEFAMILY_UNKNOWN,
475
476 /** \brief Desktop family*/
477 SDL_WINRT_DEVICEFAMILY_DESKTOP,
478
479 /** \brief Mobile family (for example smartphone) */
480 SDL_WINRT_DEVICEFAMILY_MOBILE,
481
482 /** \brief XBox family */
483 SDL_WINRT_DEVICEFAMILY_XBOX,
484 } SDL_WinRT_DeviceFamily;
485
486
487 /**
488 * Retrieve a WinRT defined path on the local file system.
489 *
490 * Not all paths are available on all versions of Windows. This is especially
491 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
492 * for more information on which path types are supported where.
493 *
494 * Documentation on most app-specific path types on WinRT can be found on
495 * MSDN, at the URL:
496 *
497 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
498 *
499 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
500 * \returns a UCS-2 string (16-bit, wide-char) containing the path, or NULL if
501 * the path is not available for any reason; call SDL_GetError() for
502 * more information.
503 *
504 * \since This function is available since SDL 2.0.3.
505 *
506 * \sa SDL_WinRTGetFSPathUTF8
507 */
508 extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
509
510 /**
511 * Retrieve a WinRT defined path on the local file system.
512 *
513 * Not all paths are available on all versions of Windows. This is especially
514 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
515 * for more information on which path types are supported where.
516 *
517 * Documentation on most app-specific path types on WinRT can be found on
518 * MSDN, at the URL:
519 *
520 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
521 *
522 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
523 * \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
524 * the path is not available for any reason; call SDL_GetError() for
525 * more information.
526 *
527 * \since This function is available since SDL 2.0.3.
528 *
529 * \sa SDL_WinRTGetFSPathUNICODE
530 */
531 extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
532
533 /**
534 * Detects the device family of WinRT plattform at runtime.
535 *
536 * \returns a value from the SDL_WinRT_DeviceFamily enum.
537 *
538 * \since This function is available since SDL 2.0.8.
539 */
540 extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
541
542 #endif /* __WINRT__ */
543
544 /**
545 * Query if the current device is a tablet.
546 *
547 * If SDL can't determine this, it will return SDL_FALSE.
548 *
549 * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
550 *
551 * \since This function is available since SDL 2.0.9.
552 */
553 extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
554
555 /* Functions used by iOS application delegates to notify SDL about state changes */
556 extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
557 extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
558 extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
559 extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
560 extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
561 extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
562 #ifdef __IPHONEOS__
563 extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
564 #endif
565
566 /* Ends C function definitions when using C++ */
567 #ifdef __cplusplus
568 }
569 #endif
570 #include <SDL2/close_code.h>
571
572 #endif /* SDL_system_h_ */
573
574 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_syswm.h
23 *
24 * Include file for SDL custom system window manager hooks.
25 */
26
27 #ifndef SDL_syswm_h_
28 #define SDL_syswm_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33 #include <SDL2/SDL_version.h>
34
35 /**
36 * \brief SDL_syswm.h
37 *
38 * Your application has access to a special type of event ::SDL_SYSWMEVENT,
39 * which contains window-manager specific information and arrives whenever
40 * an unhandled window event occurs. This event is ignored by default, but
41 * you can enable it with SDL_EventState().
42 */
43 struct SDL_SysWMinfo;
44
45 #if !defined(SDL_PROTOTYPES_ONLY)
46
47 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
48 #ifndef WIN32_LEAN_AND_MEAN
49 #define WIN32_LEAN_AND_MEAN
50 #endif
51 #ifndef NOMINMAX /* don't define min() and max(). */
52 #define NOMINMAX
53 #endif
54 #include <windows.h>
55 #endif
56
57 #if defined(SDL_VIDEO_DRIVER_WINRT)
58 #include <Inspectable.h>
59 #endif
60
61 /* This is the structure for custom window manager events */
62 #if defined(SDL_VIDEO_DRIVER_X11)
63 #if defined(__APPLE__) && defined(__MACH__)
64 /* conflicts with Quickdraw.h */
65 #define Cursor X11Cursor
66 #endif
67
68 #include <X11/Xlib.h>
69 #include <X11/Xatom.h>
70
71 #if defined(__APPLE__) && defined(__MACH__)
72 /* matches the re-define above */
73 #undef Cursor
74 #endif
75
76 #endif /* defined(SDL_VIDEO_DRIVER_X11) */
77
78 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
79 #include <directfb.h>
80 #endif
81
82 #if defined(SDL_VIDEO_DRIVER_COCOA)
83 #ifdef __OBJC__
84 @class NSWindow;
85 #else
86 typedef struct _NSWindow NSWindow;
87 #endif
88 #endif
89
90 #if defined(SDL_VIDEO_DRIVER_UIKIT)
91 #ifdef __OBJC__
92 #include <UIKit/UIKit.h>
93 #else
94 typedef struct _UIWindow UIWindow;
95 typedef struct _UIViewController UIViewController;
96 #endif
97 typedef Uint32 GLuint;
98 #endif
99
100 #if defined(SDL_VIDEO_VULKAN) || defined(SDL_VIDEO_METAL)
101 #define SDL_METALVIEW_TAG 255
102 #endif
103
104 #if defined(SDL_VIDEO_DRIVER_ANDROID)
105 typedef struct ANativeWindow ANativeWindow;
106 typedef void *EGLSurface;
107 #endif
108
109 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
110 #include <SDL2/SDL_egl.h>
111 #endif
112
113 #if defined(SDL_VIDEO_DRIVER_OS2)
114 #define INCL_WIN
115 #include <os2.h>
116 #endif
117 #endif /* SDL_PROTOTYPES_ONLY */
118
119 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
120 struct gbm_device;
121 #endif
122
123
124 #include <SDL2/begin_code.h>
125 /* Set up for C function definitions, even when using C++ */
126 #ifdef __cplusplus
127 extern "C" {
128 #endif
129
130 #if !defined(SDL_PROTOTYPES_ONLY)
131 /**
132 * These are the various supported windowing subsystems
133 */
134 typedef enum
135 {
136 SDL_SYSWM_UNKNOWN,
137 SDL_SYSWM_WINDOWS,
138 SDL_SYSWM_X11,
139 SDL_SYSWM_DIRECTFB,
140 SDL_SYSWM_COCOA,
141 SDL_SYSWM_UIKIT,
142 SDL_SYSWM_WAYLAND,
143 SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
144 SDL_SYSWM_WINRT,
145 SDL_SYSWM_ANDROID,
146 SDL_SYSWM_VIVANTE,
147 SDL_SYSWM_OS2,
148 SDL_SYSWM_HAIKU,
149 SDL_SYSWM_KMSDRM,
150 SDL_SYSWM_RISCOS
151 } SDL_SYSWM_TYPE;
152
153 /**
154 * The custom event structure.
155 */
156 struct SDL_SysWMmsg
157 {
158 SDL_version version;
159 SDL_SYSWM_TYPE subsystem;
160 union
161 {
162 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
163 struct {
164 HWND hwnd; /**< The window for the message */
165 UINT msg; /**< The type of message */
166 WPARAM wParam; /**< WORD message parameter */
167 LPARAM lParam; /**< LONG message parameter */
168 } win;
169 #endif
170 #if defined(SDL_VIDEO_DRIVER_X11)
171 struct {
172 XEvent event;
173 } x11;
174 #endif
175 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
176 struct {
177 DFBEvent event;
178 } dfb;
179 #endif
180 #if defined(SDL_VIDEO_DRIVER_COCOA)
181 struct
182 {
183 /* Latest version of Xcode clang complains about empty structs in C v. C++:
184 error: empty struct has size 0 in C, size 1 in C++
185 */
186 int dummy;
187 /* No Cocoa window events yet */
188 } cocoa;
189 #endif
190 #if defined(SDL_VIDEO_DRIVER_UIKIT)
191 struct
192 {
193 int dummy;
194 /* No UIKit window events yet */
195 } uikit;
196 #endif
197 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
198 struct
199 {
200 int dummy;
201 /* No Vivante window events yet */
202 } vivante;
203 #endif
204 #if defined(SDL_VIDEO_DRIVER_OS2)
205 struct
206 {
207 BOOL fFrame; /**< TRUE if hwnd is a frame window */
208 HWND hwnd; /**< The window receiving the message */
209 ULONG msg; /**< The message identifier */
210 MPARAM mp1; /**< The first first message parameter */
211 MPARAM mp2; /**< The second first message parameter */
212 } os2;
213 #endif
214 /* Can't have an empty union */
215 int dummy;
216 } msg;
217 };
218
219 /**
220 * The custom window manager information structure.
221 *
222 * When this structure is returned, it holds information about which
223 * low level system it is using, and will be one of SDL_SYSWM_TYPE.
224 */
225 struct SDL_SysWMinfo
226 {
227 SDL_version version;
228 SDL_SYSWM_TYPE subsystem;
229 union
230 {
231 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
232 struct
233 {
234 HWND window; /**< The window handle */
235 HDC hdc; /**< The window device context */
236 HINSTANCE hinstance; /**< The instance handle */
237 } win;
238 #endif
239 #if defined(SDL_VIDEO_DRIVER_WINRT)
240 struct
241 {
242 IInspectable * window; /**< The WinRT CoreWindow */
243 } winrt;
244 #endif
245 #if defined(SDL_VIDEO_DRIVER_X11)
246 struct
247 {
248 Display *display; /**< The X11 display */
249 Window window; /**< The X11 window */
250 } x11;
251 #endif
252 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
253 struct
254 {
255 IDirectFB *dfb; /**< The directfb main interface */
256 IDirectFBWindow *window; /**< The directfb window handle */
257 IDirectFBSurface *surface; /**< The directfb client surface */
258 } dfb;
259 #endif
260 #if defined(SDL_VIDEO_DRIVER_COCOA)
261 struct
262 {
263 #if defined(__OBJC__) && defined(__has_feature)
264 #if __has_feature(objc_arc)
265 NSWindow __unsafe_unretained *window; /**< The Cocoa window */
266 #else
267 NSWindow *window; /**< The Cocoa window */
268 #endif
269 #else
270 NSWindow *window; /**< The Cocoa window */
271 #endif
272 } cocoa;
273 #endif
274 #if defined(SDL_VIDEO_DRIVER_UIKIT)
275 struct
276 {
277 #if defined(__OBJC__) && defined(__has_feature)
278 #if __has_feature(objc_arc)
279 UIWindow __unsafe_unretained *window; /**< The UIKit window */
280 #else
281 UIWindow *window; /**< The UIKit window */
282 #endif
283 #else
284 UIWindow *window; /**< The UIKit window */
285 #endif
286 GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
287 GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
288 GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
289 } uikit;
290 #endif
291 #if defined(SDL_VIDEO_DRIVER_WAYLAND)
292 struct
293 {
294 struct wl_display *display; /**< Wayland display */
295 struct wl_surface *surface; /**< Wayland surface */
296 void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */
297 struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
298 struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
299 struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */
300 struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */
301 struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */
302 } wl;
303 #endif
304 #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
305 struct
306 {
307 void *connection; /**< Mir display server connection */
308 void *surface; /**< Mir surface */
309 } mir;
310 #endif
311
312 #if defined(SDL_VIDEO_DRIVER_ANDROID)
313 struct
314 {
315 ANativeWindow *window;
316 EGLSurface surface;
317 } android;
318 #endif
319
320 #if defined(SDL_VIDEO_DRIVER_OS2)
321 struct
322 {
323 HWND hwnd; /**< The window handle */
324 HWND hwndFrame; /**< The frame window handle */
325 } os2;
326 #endif
327
328 #if defined(SDL_VIDEO_DRIVER_VIVANTE)
329 struct
330 {
331 EGLNativeDisplayType display;
332 EGLNativeWindowType window;
333 } vivante;
334 #endif
335
336 #if defined(SDL_VIDEO_DRIVER_KMSDRM)
337 struct
338 {
339 int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */
340 int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */
341 struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */
342 } kmsdrm;
343 #endif
344
345 /* Make sure this union is always 64 bytes (8 64-bit pointers). */
346 /* Be careful not to overflow this if you add a new target! */
347 Uint8 dummy[64];
348 } info;
349 };
350
351 #endif /* SDL_PROTOTYPES_ONLY */
352
353 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
354
355
356 /**
357 * Get driver-specific information about a window.
358 *
359 * You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.
360 *
361 * The caller must initialize the `info` structure's version by using
362 * `SDL_VERSION(&info.version)`, and then this function will fill in the rest
363 * of the structure with information about the given window.
364 *
365 * \param window the window about which information is being requested
366 * \param info an SDL_SysWMinfo structure filled in with window information
367 * \returns SDL_TRUE if the function is implemented and the `version` member
368 * of the `info` struct is valid, or SDL_FALSE if the information
369 * could not be retrieved; call SDL_GetError() for more information.
370 *
371 * \since This function is available since SDL 2.0.0.
372 */
373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
374 SDL_SysWMinfo * info);
375
376
377 /* Ends C function definitions when using C++ */
378 #ifdef __cplusplus
379 }
380 #endif
381 #include <SDL2/close_code.h>
382
383 #endif /* SDL_syswm_h_ */
384
385 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_thread_h_
22 #define SDL_thread_h_
23
24 /**
25 * \file SDL_thread.h
26 *
27 * Header for the SDL thread management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 /* Thread synchronization primitives */
34 #include <SDL2/SDL_atomic.h>
35 #include <SDL2/SDL_mutex.h>
36
37 #if defined(__WIN32__)
38 #include <process.h> /* _beginthreadex() and _endthreadex() */
39 #endif
40 #if defined(__OS2__) /* for _beginthread() and _endthread() */
41 #ifndef __EMX__
42 #include <process.h>
43 #else
44 #include <stdlib.h>
45 #endif
46 #endif
47
48 #include <SDL2/begin_code.h>
49 /* Set up for C function definitions, even when using C++ */
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 /* The SDL thread structure, defined in SDL_thread.c */
55 struct SDL_Thread;
56 typedef struct SDL_Thread SDL_Thread;
57
58 /* The SDL thread ID */
59 typedef unsigned long SDL_threadID;
60
61 /* Thread local storage ID, 0 is the invalid ID */
62 typedef unsigned int SDL_TLSID;
63
64 /**
65 * The SDL thread priority.
66 *
67 * SDL will make system changes as necessary in order to apply the thread priority.
68 * Code which attempts to control thread state related to priority should be aware
69 * that calling SDL_SetThreadPriority may alter such state.
70 * SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
71 *
72 * \note On many systems you require special privileges to set high or time critical priority.
73 */
74 typedef enum {
75 SDL_THREAD_PRIORITY_LOW,
76 SDL_THREAD_PRIORITY_NORMAL,
77 SDL_THREAD_PRIORITY_HIGH,
78 SDL_THREAD_PRIORITY_TIME_CRITICAL
79 } SDL_ThreadPriority;
80
81 /**
82 * The function passed to SDL_CreateThread().
83 *
84 * \param data what was passed as `data` to SDL_CreateThread()
85 * \returns a value that can be reported through SDL_WaitThread().
86 */
87 typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
88
89
90 #if defined(__WIN32__)
91 /**
92 * \file SDL_thread.h
93 *
94 * We compile SDL into a DLL. This means, that it's the DLL which
95 * creates a new thread for the calling process with the SDL_CreateThread()
96 * API. There is a problem with this, that only the RTL of the SDL2.DLL will
97 * be initialized for those threads, and not the RTL of the calling
98 * application!
99 *
100 * To solve this, we make a little hack here.
101 *
102 * We'll always use the caller's _beginthread() and _endthread() APIs to
103 * start a new thread. This way, if it's the SDL2.DLL which uses this API,
104 * then the RTL of SDL2.DLL will be used to create the new thread, and if it's
105 * the application, then the RTL of the application will be used.
106 *
107 * So, in short:
108 * Always use the _beginthread() and _endthread() of the calling runtime
109 * library!
110 */
111 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
112
113 typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
114 (void *, unsigned, unsigned (__stdcall *func)(void *),
115 void * /*arg*/, unsigned, unsigned * /* threadID */);
116 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
117
118 #ifndef SDL_beginthread
119 #define SDL_beginthread _beginthreadex
120 #endif
121 #ifndef SDL_endthread
122 #define SDL_endthread _endthreadex
123 #endif
124
125 extern DECLSPEC SDL_Thread *SDLCALL
126 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
127 pfnSDL_CurrentBeginThread pfnBeginThread,
128 pfnSDL_CurrentEndThread pfnEndThread);
129
130 extern DECLSPEC SDL_Thread *SDLCALL
131 SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
132 const char *name, const size_t stacksize, void *data,
133 pfnSDL_CurrentBeginThread pfnBeginThread,
134 pfnSDL_CurrentEndThread pfnEndThread);
135
136
137 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
138 #undef SDL_CreateThread
139 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
140 #undef SDL_CreateThreadWithStackSize
141 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
142 #else
143 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
144 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
145 #endif
146
147 #elif defined(__OS2__)
148 /*
149 * just like the windows case above: We compile SDL2
150 * into a dll with Watcom's runtime statically linked.
151 */
152 #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
153
154 typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
155 typedef void (*pfnSDL_CurrentEndThread)(void);
156
157 #ifndef SDL_beginthread
158 #define SDL_beginthread _beginthread
159 #endif
160 #ifndef SDL_endthread
161 #define SDL_endthread _endthread
162 #endif
163
164 extern DECLSPEC SDL_Thread *SDLCALL
165 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
166 pfnSDL_CurrentBeginThread pfnBeginThread,
167 pfnSDL_CurrentEndThread pfnEndThread);
168 extern DECLSPEC SDL_Thread *SDLCALL
169 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
170 pfnSDL_CurrentBeginThread pfnBeginThread,
171 pfnSDL_CurrentEndThread pfnEndThread);
172
173 #if defined(SDL_CreateThread) && SDL_DYNAMIC_API
174 #undef SDL_CreateThread
175 #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
176 #undef SDL_CreateThreadWithStackSize
177 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
178 #else
179 #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
180 #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
181 #endif
182
183 #else
184
185 /**
186 * Create a new thread with a default stack size.
187 *
188 * This is equivalent to calling:
189 *
190 * ```c
191 * SDL_CreateThreadWithStackSize(fn, name, 0, data);
192 * ```
193 *
194 * \param fn the SDL_ThreadFunction function to call in the new thread
195 * \param name the name of the thread
196 * \param data a pointer that is passed to `fn`
197 * \returns an opaque pointer to the new thread object on success, NULL if the
198 * new thread could not be created; call SDL_GetError() for more
199 * information.
200 *
201 * \since This function is available since SDL 2.0.0.
202 *
203 * \sa SDL_CreateThreadWithStackSize
204 * \sa SDL_WaitThread
205 */
206 extern DECLSPEC SDL_Thread *SDLCALL
207 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
208
209 /**
210 * Create a new thread with a specific stack size.
211 *
212 * SDL makes an attempt to report `name` to the system, so that debuggers can
213 * display it. Not all platforms support this.
214 *
215 * Thread naming is a little complicated: Most systems have very small limits
216 * for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
217 * C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
218 * see what happens with your system's debugger. The name should be UTF-8 (but
219 * using the naming limits of C identifiers is a better bet). There are no
220 * requirements for thread naming conventions, so long as the string is
221 * null-terminated UTF-8, but these guidelines are helpful in choosing a name:
222 *
223 * https://stackoverflow.com/questions/149932/naming-conventions-for-threads
224 *
225 * If a system imposes requirements, SDL will try to munge the string for it
226 * (truncate, etc), but the original string contents will be available from
227 * SDL_GetThreadName().
228 *
229 * The size (in bytes) of the new stack can be specified. Zero means "use the
230 * system default" which might be wildly different between platforms. x86
231 * Linux generally defaults to eight megabytes, an embedded device might be a
232 * few kilobytes instead. You generally need to specify a stack that is a
233 * multiple of the system's page size (in many cases, this is 4 kilobytes, but
234 * check your system documentation).
235 *
236 * In SDL 2.1, stack size will be folded into the original SDL_CreateThread
237 * function, but for backwards compatibility, this is currently a separate
238 * function.
239 *
240 * \param fn the SDL_ThreadFunction function to call in the new thread
241 * \param name the name of the thread
242 * \param stacksize the size, in bytes, to allocate for the new thread stack.
243 * \param data a pointer that is passed to `fn`
244 * \returns an opaque pointer to the new thread object on success, NULL if the
245 * new thread could not be created; call SDL_GetError() for more
246 * information.
247 *
248 * \since This function is available since SDL 2.0.9.
249 *
250 * \sa SDL_WaitThread
251 */
252 extern DECLSPEC SDL_Thread *SDLCALL
253 SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
254
255 #endif
256
257 /**
258 * Get the thread name as it was specified in SDL_CreateThread().
259 *
260 * This is internal memory, not to be freed by the caller, and remains valid
261 * until the specified thread is cleaned up by SDL_WaitThread().
262 *
263 * \param thread the thread to query
264 * \returns a pointer to a UTF-8 string that names the specified thread, or
265 * NULL if it doesn't have a name.
266 *
267 * \since This function is available since SDL 2.0.0.
268 *
269 * \sa SDL_CreateThread
270 */
271 extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
272
273 /**
274 * Get the thread identifier for the current thread.
275 *
276 * This thread identifier is as reported by the underlying operating system.
277 * If SDL is running on a platform that does not support threads the return
278 * value will always be zero.
279 *
280 * This function also returns a valid thread ID when called from the main
281 * thread.
282 *
283 * \returns the ID of the current thread.
284 *
285 * \since This function is available since SDL 2.0.0.
286 *
287 * \sa SDL_GetThreadID
288 */
289 extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
290
291 /**
292 * Get the thread identifier for the specified thread.
293 *
294 * This thread identifier is as reported by the underlying operating system.
295 * If SDL is running on a platform that does not support threads the return
296 * value will always be zero.
297 *
298 * \param thread the thread to query
299 * \returns the ID of the specified thread, or the ID of the current thread if
300 * `thread` is NULL.
301 *
302 * \since This function is available since SDL 2.0.0.
303 *
304 * \sa SDL_ThreadID
305 */
306 extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
307
308 /**
309 * Set the priority for the current thread.
310 *
311 * Note that some platforms will not let you alter the priority (or at least,
312 * promote the thread to a higher priority) at all, and some require you to be
313 * an administrator account. Be prepared for this to fail.
314 *
315 * \param priority the SDL_ThreadPriority to set
316 * \returns 0 on success or a negative error code on failure; call
317 * SDL_GetError() for more information.
318 *
319 * \since This function is available since SDL 2.0.0.
320 */
321 extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
322
323 /**
324 * Wait for a thread to finish.
325 *
326 * Threads that haven't been detached will remain (as a "zombie") until this
327 * function cleans them up. Not doing so is a resource leak.
328 *
329 * Once a thread has been cleaned up through this function, the SDL_Thread
330 * that references it becomes invalid and should not be referenced again. As
331 * such, only one thread may call SDL_WaitThread() on another.
332 *
333 * The return code for the thread function is placed in the area pointed to by
334 * `status`, if `status` is not NULL.
335 *
336 * You may not wait on a thread that has been used in a call to
337 * SDL_DetachThread(). Use either that function or this one, but not both, or
338 * behavior is undefined.
339 *
340 * It is safe to pass a NULL thread to this function; it is a no-op.
341 *
342 * Note that the thread pointer is freed by this function and is not valid
343 * afterward.
344 *
345 * \param thread the SDL_Thread pointer that was returned from the
346 * SDL_CreateThread() call that started this thread
347 * \param status pointer to an integer that will receive the value returned
348 * from the thread function by its 'return', or NULL to not
349 * receive such value back.
350 *
351 * \since This function is available since SDL 2.0.0.
352 *
353 * \sa SDL_CreateThread
354 * \sa SDL_DetachThread
355 */
356 extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
357
358 /**
359 * Let a thread clean up on exit without intervention.
360 *
361 * A thread may be "detached" to signify that it should not remain until
362 * another thread has called SDL_WaitThread() on it. Detaching a thread is
363 * useful for long-running threads that nothing needs to synchronize with or
364 * further manage. When a detached thread is done, it simply goes away.
365 *
366 * There is no way to recover the return code of a detached thread. If you
367 * need this, don't detach the thread and instead use SDL_WaitThread().
368 *
369 * Once a thread is detached, you should usually assume the SDL_Thread isn't
370 * safe to reference again, as it will become invalid immediately upon the
371 * detached thread's exit, instead of remaining until someone has called
372 * SDL_WaitThread() to finally clean it up. As such, don't detach the same
373 * thread more than once.
374 *
375 * If a thread has already exited when passed to SDL_DetachThread(), it will
376 * stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
377 * not safe to detach a thread that might be used with SDL_WaitThread().
378 *
379 * You may not call SDL_WaitThread() on a thread that has been detached. Use
380 * either that function or this one, but not both, or behavior is undefined.
381 *
382 * It is safe to pass NULL to this function; it is a no-op.
383 *
384 * \param thread the SDL_Thread pointer that was returned from the
385 * SDL_CreateThread() call that started this thread
386 *
387 * \since This function is available since SDL 2.0.2.
388 *
389 * \sa SDL_CreateThread
390 * \sa SDL_WaitThread
391 */
392 extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
393
394 /**
395 * Create a piece of thread-local storage.
396 *
397 * This creates an identifier that is globally visible to all threads but
398 * refers to data that is thread-specific.
399 *
400 * \returns the newly created thread local storage identifier or 0 on error.
401 *
402 * \since This function is available since SDL 2.0.0.
403 *
404 * \sa SDL_TLSGet
405 * \sa SDL_TLSSet
406 */
407 extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
408
409 /**
410 * Get the current thread's value associated with a thread local storage ID.
411 *
412 * \param id the thread local storage ID
413 * \returns the value associated with the ID for the current thread or NULL if
414 * no value has been set; call SDL_GetError() for more information.
415 *
416 * \since This function is available since SDL 2.0.0.
417 *
418 * \sa SDL_TLSCreate
419 * \sa SDL_TLSSet
420 */
421 extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
422
423 /**
424 * Set the current thread's value associated with a thread local storage ID.
425 *
426 * The function prototype for `destructor` is:
427 *
428 * ```c
429 * void destructor(void *value)
430 * ```
431 *
432 * where its parameter `value` is what was passed as `value` to SDL_TLSSet().
433 *
434 * \param id the thread local storage ID
435 * \param value the value to associate with the ID for the current thread
436 * \param destructor a function called when the thread exits, to free the
437 * value
438 * \returns 0 on success or a negative error code on failure; call
439 * SDL_GetError() for more information.
440 *
441 * \since This function is available since SDL 2.0.0.
442 *
443 * \sa SDL_TLSCreate
444 * \sa SDL_TLSGet
445 */
446 extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
447
448 /**
449 * Cleanup all TLS data for this thread.
450 *
451 * \since This function is available since SDL 2.0.16.
452 */
453 extern DECLSPEC void SDLCALL SDL_TLSCleanup(void);
454
455 /* Ends C function definitions when using C++ */
456 #ifdef __cplusplus
457 }
458 #endif
459 #include <SDL2/close_code.h>
460
461 #endif /* SDL_thread_h_ */
462
463 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 #ifndef SDL_timer_h_
22 #define SDL_timer_h_
23
24 /**
25 * \file SDL_timer.h
26 *
27 * Header for the SDL time management routines.
28 */
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32
33 #include <SDL2/begin_code.h>
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40 * Get the number of milliseconds since SDL library initialization.
41 *
42 * This value wraps if the program runs for more than ~49 days.
43 *
44 * This function is not recommended as of SDL 2.0.18; use SDL_GetTicks64()
45 * instead, where the value doesn't wrap every ~49 days. There are places in
46 * SDL where we provide a 32-bit timestamp that can not change without
47 * breaking binary compatibility, though, so this function isn't officially
48 * deprecated.
49 *
50 * \returns an unsigned 32-bit value representing the number of milliseconds
51 * since the SDL library initialized.
52 *
53 * \since This function is available since SDL 2.0.0.
54 *
55 * \sa SDL_TICKS_PASSED
56 */
57 extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
58
59 /**
60 * Get the number of milliseconds since SDL library initialization.
61 *
62 * Note that you should not use the SDL_TICKS_PASSED macro with values
63 * returned by this function, as that macro does clever math to compensate for
64 * the 32-bit overflow every ~49 days that SDL_GetTicks() suffers from. 64-bit
65 * values from this function can be safely compared directly.
66 *
67 * For example, if you want to wait 100 ms, you could do this:
68 *
69 * ```c
70 * const Uint64 timeout = SDL_GetTicks64() + 100;
71 * while (SDL_GetTicks64() < timeout) {
72 * // ... do work until timeout has elapsed
73 * }
74 * ```
75 *
76 * \returns an unsigned 64-bit value representing the number of milliseconds
77 * since the SDL library initialized.
78 *
79 * \since This function is available since SDL 2.0.18.
80 */
81 extern DECLSPEC Uint64 SDLCALL SDL_GetTicks64(void);
82
83 /**
84 * Compare 32-bit SDL ticks values, and return true if `A` has passed `B`.
85 *
86 * This should be used with results from SDL_GetTicks(), as this macro
87 * attempts to deal with the 32-bit counter wrapping back to zero every ~49
88 * days, but should _not_ be used with SDL_GetTicks64(), which does not have
89 * that problem.
90 *
91 * For example, with SDL_GetTicks(), if you want to wait 100 ms, you could
92 * do this:
93 *
94 * ```c
95 * const Uint32 timeout = SDL_GetTicks() + 100;
96 * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
97 * // ... do work until timeout has elapsed
98 * }
99 * ```
100 *
101 * Note that this does not handle tick differences greater
102 * than 2^31 so take care when using the above kind of code
103 * with large timeout delays (tens of days).
104 */
105 #define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0)
106
107 /**
108 * Get the current value of the high resolution counter.
109 *
110 * This function is typically used for profiling.
111 *
112 * The counter values are only meaningful relative to each other. Differences
113 * between values can be converted to times by using
114 * SDL_GetPerformanceFrequency().
115 *
116 * \returns the current counter value.
117 *
118 * \since This function is available since SDL 2.0.0.
119 *
120 * \sa SDL_GetPerformanceFrequency
121 */
122 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
123
124 /**
125 * Get the count per second of the high resolution counter.
126 *
127 * \returns a platform-specific count per second.
128 *
129 * \since This function is available since SDL 2.0.0.
130 *
131 * \sa SDL_GetPerformanceCounter
132 */
133 extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
134
135 /**
136 * Wait a specified number of milliseconds before returning.
137 *
138 * This function waits a specified number of milliseconds before returning. It
139 * waits at least the specified time, but possibly longer due to OS
140 * scheduling.
141 *
142 * \param ms the number of milliseconds to delay
143 *
144 * \since This function is available since SDL 2.0.0.
145 */
146 extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
147
148 /**
149 * Function prototype for the timer callback function.
150 *
151 * The callback function is passed the current timer interval and returns
152 * the next timer interval. If the returned value is the same as the one
153 * passed in, the periodic alarm continues, otherwise a new alarm is
154 * scheduled. If the callback returns 0, the periodic alarm is cancelled.
155 */
156 typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);
157
158 /**
159 * Definition of the timer ID type.
160 */
161 typedef int SDL_TimerID;
162
163 /**
164 * Call a callback function at a future time.
165 *
166 * If you use this function, you must pass `SDL_INIT_TIMER` to SDL_Init().
167 *
168 * The callback function is passed the current timer interval and the user
169 * supplied parameter from the SDL_AddTimer() call and should return the next
170 * timer interval. If the value returned from the callback is 0, the timer is
171 * canceled.
172 *
173 * The callback is run on a separate thread.
174 *
175 * Timers take into account the amount of time it took to execute the
176 * callback. For example, if the callback took 250 ms to execute and returned
177 * 1000 (ms), the timer would only wait another 750 ms before its next
178 * iteration.
179 *
180 * Timing may be inexact due to OS scheduling. Be sure to note the current
181 * time with SDL_GetTicks() or SDL_GetPerformanceCounter() in case your
182 * callback needs to adjust for variances.
183 *
184 * \param interval the timer delay, in milliseconds, passed to `callback`
185 * \param callback the SDL_TimerCallback function to call when the specified
186 * `interval` elapses
187 * \param param a pointer that is passed to `callback`
188 * \returns a timer ID or 0 if an error occurs; call SDL_GetError() for more
189 * information.
190 *
191 * \since This function is available since SDL 2.0.0.
192 *
193 * \sa SDL_RemoveTimer
194 */
195 extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
196 SDL_TimerCallback callback,
197 void *param);
198
199 /**
200 * Remove a timer created with SDL_AddTimer().
201 *
202 * \param id the ID of the timer to remove
203 * \returns SDL_TRUE if the timer is removed or SDL_FALSE if the timer wasn't
204 * found.
205 *
206 * \since This function is available since SDL 2.0.0.
207 *
208 * \sa SDL_AddTimer
209 */
210 extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
211
212
213 /* Ends C function definitions when using C++ */
214 #ifdef __cplusplus
215 }
216 #endif
217 #include <SDL2/close_code.h>
218
219 #endif /* SDL_timer_h_ */
220
221 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_touch.h
23 *
24 * Include file for SDL touch event handling.
25 */
26
27 #ifndef SDL_touch_h_
28 #define SDL_touch_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_error.h>
32 #include <SDL2/SDL_video.h>
33
34 #include <SDL2/begin_code.h>
35 /* Set up for C function definitions, even when using C++ */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef Sint64 SDL_TouchID;
41 typedef Sint64 SDL_FingerID;
42
43 typedef enum
44 {
45 SDL_TOUCH_DEVICE_INVALID = -1,
46 SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
47 SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
48 SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
49 } SDL_TouchDeviceType;
50
51 typedef struct SDL_Finger
52 {
53 SDL_FingerID id;
54 float x;
55 float y;
56 float pressure;
57 } SDL_Finger;
58
59 /* Used as the device ID for mouse events simulated with touch input */
60 #define SDL_TOUCH_MOUSEID ((Uint32)-1)
61
62 /* Used as the SDL_TouchID for touch events simulated with mouse input */
63 #define SDL_MOUSE_TOUCHID ((Sint64)-1)
64
65
66 /**
67 * Get the number of registered touch devices.
68 *
69 * On some platforms SDL first sees the touch device if it was actually used.
70 * Therefore SDL_GetNumTouchDevices() may return 0 although devices are
71 * available. After using all devices at least once the number will be
72 * correct.
73 *
74 * This was fixed for Android in SDL 2.0.1.
75 *
76 * \returns the number of registered touch devices.
77 *
78 * \since This function is available since SDL 2.0.0.
79 *
80 * \sa SDL_GetTouchDevice
81 */
82 extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
83
84 /**
85 * Get the touch ID with the given index.
86 *
87 * \param index the touch device index
88 * \returns the touch ID with the given index on success or 0 if the index is
89 * invalid; call SDL_GetError() for more information.
90 *
91 * \since This function is available since SDL 2.0.0.
92 *
93 * \sa SDL_GetNumTouchDevices
94 */
95 extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
96
97 /**
98 * Get the touch device name as reported from the driver or NULL if the index
99 * is invalid.
100 *
101 * \since This function is available since SDL 2.0.22.
102 */
103 extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index);
104
105 /**
106 * Get the type of the given touch device.
107 *
108 * \since This function is available since SDL 2.0.10.
109 */
110 extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
111
112 /**
113 * Get the number of active fingers for a given touch device.
114 *
115 * \param touchID the ID of a touch device
116 * \returns the number of active fingers for a given touch device on success
117 * or 0 on failure; call SDL_GetError() for more information.
118 *
119 * \since This function is available since SDL 2.0.0.
120 *
121 * \sa SDL_GetTouchFinger
122 */
123 extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
124
125 /**
126 * Get the finger object for specified touch device ID and finger index.
127 *
128 * The returned resource is owned by SDL and should not be deallocated.
129 *
130 * \param touchID the ID of the requested touch device
131 * \param index the index of the requested finger
132 * \returns a pointer to the SDL_Finger object or NULL if no object at the
133 * given ID and index could be found.
134 *
135 * \since This function is available since SDL 2.0.0.
136 *
137 * \sa SDL_RecordGesture
138 */
139 extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
140
141 /* Ends C function definitions when using C++ */
142 #ifdef __cplusplus
143 }
144 #endif
145 #include <SDL2/close_code.h>
146
147 #endif /* SDL_touch_h_ */
148
149 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_types.h
23 *
24 * \deprecated
25 */
26
27 /* DEPRECATED */
28 #include <SDL2/SDL_stdinc.h>
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_version.h
23 *
24 * This header defines the current SDL version.
25 */
26
27 #ifndef SDL_version_h_
28 #define SDL_version_h_
29
30 #include <SDL2/SDL_stdinc.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /**
39 * Information about the version of SDL in use.
40 *
41 * Represents the library's version as three levels: major revision
42 * (increments with massive changes, additions, and enhancements),
43 * minor revision (increments with backwards-compatible changes to the
44 * major revision), and patchlevel (increments with fixes to the minor
45 * revision).
46 *
47 * \sa SDL_VERSION
48 * \sa SDL_GetVersion
49 */
50 typedef struct SDL_version
51 {
52 Uint8 major; /**< major version */
53 Uint8 minor; /**< minor version */
54 Uint8 patch; /**< update version */
55 } SDL_version;
56
57 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
58 */
59 #define SDL_MAJOR_VERSION 2
60 #define SDL_MINOR_VERSION 0
61 #define SDL_PATCHLEVEL 22
62
63 /**
64 * Macro to determine SDL version program was compiled against.
65 *
66 * This macro fills in a SDL_version structure with the version of the
67 * library you compiled against. This is determined by what header the
68 * compiler uses. Note that if you dynamically linked the library, you might
69 * have a slightly newer or older version at runtime. That version can be
70 * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
71 * is not a macro.
72 *
73 * \param x A pointer to a SDL_version struct to initialize.
74 *
75 * \sa SDL_version
76 * \sa SDL_GetVersion
77 */
78 #define SDL_VERSION(x) \
79 { \
80 (x)->major = SDL_MAJOR_VERSION; \
81 (x)->minor = SDL_MINOR_VERSION; \
82 (x)->patch = SDL_PATCHLEVEL; \
83 }
84
85 /**
86 * This macro turns the version numbers into a numeric value:
87 * \verbatim
88 (1,2,3) -> (1203)
89 \endverbatim
90 *
91 * This assumes that there will never be more than 100 patchlevels.
92 */
93 #define SDL_VERSIONNUM(X, Y, Z) \
94 ((X)*1000 + (Y)*100 + (Z))
95
96 /**
97 * This is the version number macro for the current SDL version.
98 */
99 #define SDL_COMPILEDVERSION \
100 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
101
102 /**
103 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
104 */
105 #define SDL_VERSION_ATLEAST(X, Y, Z) \
106 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
107
108 /**
109 * Get the version of SDL that is linked against your program.
110 *
111 * If you are linking to SDL dynamically, then it is possible that the current
112 * version will be different than the version you compiled against. This
113 * function returns the current version, while SDL_VERSION() is a macro that
114 * tells you what version you compiled with.
115 *
116 * This function may be called safely at any time, even before SDL_Init().
117 *
118 * \param ver the SDL_version structure that contains the version information
119 *
120 * \since This function is available since SDL 2.0.0.
121 *
122 * \sa SDL_GetRevision
123 */
124 extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
125
126 /**
127 * Get the code revision of SDL that is linked against your program.
128 *
129 * This value is the revision of the code you are linked with and may be
130 * different from the code you are compiling with, which is found in the
131 * constant SDL_REVISION.
132 *
133 * The revision is arbitrary string (a hash value) uniquely identifying the
134 * exact revision of the SDL library in use, and is only useful in comparing
135 * against other revisions. It is NOT an incrementing number.
136 *
137 * If SDL wasn't built from a git repository with the appropriate tools, this
138 * will return an empty string.
139 *
140 * Prior to SDL 2.0.16, before development moved to GitHub, this returned a
141 * hash for a Mercurial repository.
142 *
143 * You shouldn't use this function for anything but logging it for debugging
144 * purposes. The string is not intended to be reliable in any way.
145 *
146 * \returns an arbitrary string, uniquely identifying the exact revision of
147 * the SDL library in use.
148 *
149 * \since This function is available since SDL 2.0.0.
150 *
151 * \sa SDL_GetVersion
152 */
153 extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
154
155 /**
156 * Obsolete function, do not use.
157 *
158 * When SDL was hosted in a Mercurial repository, and was built carefully,
159 * this would return the revision number that the build was created from. This
160 * number was not reliable for several reasons, but more importantly, SDL is
161 * now hosted in a git repository, which does not offer numbers at all, only
162 * hashes. This function only ever returns zero now. Don't use it.
163 *
164 * Before SDL 2.0.16, this might have returned an unreliable, but non-zero
165 * number.
166 *
167 * \deprecated Use SDL_GetRevision() instead; if SDL was carefully built, it
168 * will return a git hash.
169 *
170 * \returns zero, always, in modern SDL releases.
171 *
172 * \since This function is available since SDL 2.0.0.
173 *
174 * \sa SDL_GetRevision
175 */
176 extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
177
178
179 /* Ends C function definitions when using C++ */
180 #ifdef __cplusplus
181 }
182 #endif
183 #include <SDL2/close_code.h>
184
185 #endif /* SDL_version_h_ */
186
187 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_video.h
23 *
24 * Header file for SDL video functions.
25 */
26
27 #ifndef SDL_video_h_
28 #define SDL_video_h_
29
30 #include <SDL2/SDL_stdinc.h>
31 #include <SDL2/SDL_pixels.h>
32 #include <SDL2/SDL_rect.h>
33 #include <SDL2/SDL_surface.h>
34
35 #include <SDL2/begin_code.h>
36 /* Set up for C function definitions, even when using C++ */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42 * \brief The structure that defines a display mode
43 *
44 * \sa SDL_GetNumDisplayModes()
45 * \sa SDL_GetDisplayMode()
46 * \sa SDL_GetDesktopDisplayMode()
47 * \sa SDL_GetCurrentDisplayMode()
48 * \sa SDL_GetClosestDisplayMode()
49 * \sa SDL_SetWindowDisplayMode()
50 * \sa SDL_GetWindowDisplayMode()
51 */
52 typedef struct
53 {
54 Uint32 format; /**< pixel format */
55 int w; /**< width, in screen coordinates */
56 int h; /**< height, in screen coordinates */
57 int refresh_rate; /**< refresh rate (or zero for unspecified) */
58 void *driverdata; /**< driver-specific data, initialize to 0 */
59 } SDL_DisplayMode;
60
61 /**
62 * \brief The type used to identify a window
63 *
64 * \sa SDL_CreateWindow()
65 * \sa SDL_CreateWindowFrom()
66 * \sa SDL_DestroyWindow()
67 * \sa SDL_FlashWindow()
68 * \sa SDL_GetWindowData()
69 * \sa SDL_GetWindowFlags()
70 * \sa SDL_GetWindowGrab()
71 * \sa SDL_GetWindowKeyboardGrab()
72 * \sa SDL_GetWindowMouseGrab()
73 * \sa SDL_GetWindowPosition()
74 * \sa SDL_GetWindowSize()
75 * \sa SDL_GetWindowTitle()
76 * \sa SDL_HideWindow()
77 * \sa SDL_MaximizeWindow()
78 * \sa SDL_MinimizeWindow()
79 * \sa SDL_RaiseWindow()
80 * \sa SDL_RestoreWindow()
81 * \sa SDL_SetWindowData()
82 * \sa SDL_SetWindowFullscreen()
83 * \sa SDL_SetWindowGrab()
84 * \sa SDL_SetWindowKeyboardGrab()
85 * \sa SDL_SetWindowMouseGrab()
86 * \sa SDL_SetWindowIcon()
87 * \sa SDL_SetWindowPosition()
88 * \sa SDL_SetWindowSize()
89 * \sa SDL_SetWindowBordered()
90 * \sa SDL_SetWindowResizable()
91 * \sa SDL_SetWindowTitle()
92 * \sa SDL_ShowWindow()
93 */
94 typedef struct SDL_Window SDL_Window;
95
96 /**
97 * \brief The flags on a window
98 *
99 * \sa SDL_GetWindowFlags()
100 */
101 typedef enum
102 {
103 SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
104 SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
105 SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
106 SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
107 SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
108 SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
109 SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */
110 SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */
111 SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
112 SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
113 SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
114 SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
115 SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
116 SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported.
117 On macOS NSHighResolutionCapable must be set true in the
118 application's Info.plist for this to have any effect. */
119 SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
120 SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
121 SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
122 SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
123 SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
124 SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
125 SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
126 SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
127 SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
128
129 SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED /**< equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility */
130 } SDL_WindowFlags;
131
132 /**
133 * \brief Used to indicate that you don't care what the window position is.
134 */
135 #define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
136 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
137 #define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
138 #define SDL_WINDOWPOS_ISUNDEFINED(X) \
139 (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
140
141 /**
142 * \brief Used to indicate that the window position should be centered.
143 */
144 #define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
145 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
146 #define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
147 #define SDL_WINDOWPOS_ISCENTERED(X) \
148 (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
149
150 /**
151 * \brief Event subtype for window events
152 */
153 typedef enum
154 {
155 SDL_WINDOWEVENT_NONE, /**< Never used */
156 SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
157 SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
158 SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be
159 redrawn */
160 SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
161 */
162 SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
163 SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
164 a result of an API call or through the
165 system or user changing the window size. */
166 SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
167 SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
168 SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
169 and position */
170 SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */
171 SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
172 SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
173 SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
174 SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
175 SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
176 SDL_WINDOWEVENT_HIT_TEST, /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
177 SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
178 SDL_WINDOWEVENT_DISPLAY_CHANGED /**< Window has been moved to display data1. */
179 } SDL_WindowEventID;
180
181 /**
182 * \brief Event subtype for display events
183 */
184 typedef enum
185 {
186 SDL_DISPLAYEVENT_NONE, /**< Never used */
187 SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
188 SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
189 SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
190 } SDL_DisplayEventID;
191
192 /**
193 * \brief Display orientation
194 */
195 typedef enum
196 {
197 SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
198 SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
199 SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
200 SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
201 SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
202 } SDL_DisplayOrientation;
203
204 /**
205 * \brief Window flash operation
206 */
207 typedef enum
208 {
209 SDL_FLASH_CANCEL, /**< Cancel any window flash state */
210 SDL_FLASH_BRIEFLY, /**< Flash the window briefly to get attention */
211 SDL_FLASH_UNTIL_FOCUSED /**< Flash the window until it gets focus */
212 } SDL_FlashOperation;
213
214 /**
215 * \brief An opaque handle to an OpenGL context.
216 */
217 typedef void *SDL_GLContext;
218
219 /**
220 * \brief OpenGL configuration attributes
221 */
222 typedef enum
223 {
224 SDL_GL_RED_SIZE,
225 SDL_GL_GREEN_SIZE,
226 SDL_GL_BLUE_SIZE,
227 SDL_GL_ALPHA_SIZE,
228 SDL_GL_BUFFER_SIZE,
229 SDL_GL_DOUBLEBUFFER,
230 SDL_GL_DEPTH_SIZE,
231 SDL_GL_STENCIL_SIZE,
232 SDL_GL_ACCUM_RED_SIZE,
233 SDL_GL_ACCUM_GREEN_SIZE,
234 SDL_GL_ACCUM_BLUE_SIZE,
235 SDL_GL_ACCUM_ALPHA_SIZE,
236 SDL_GL_STEREO,
237 SDL_GL_MULTISAMPLEBUFFERS,
238 SDL_GL_MULTISAMPLESAMPLES,
239 SDL_GL_ACCELERATED_VISUAL,
240 SDL_GL_RETAINED_BACKING,
241 SDL_GL_CONTEXT_MAJOR_VERSION,
242 SDL_GL_CONTEXT_MINOR_VERSION,
243 SDL_GL_CONTEXT_EGL,
244 SDL_GL_CONTEXT_FLAGS,
245 SDL_GL_CONTEXT_PROFILE_MASK,
246 SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
247 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
248 SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
249 SDL_GL_CONTEXT_RESET_NOTIFICATION,
250 SDL_GL_CONTEXT_NO_ERROR
251 } SDL_GLattr;
252
253 typedef enum
254 {
255 SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
256 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
257 SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
258 } SDL_GLprofile;
259
260 typedef enum
261 {
262 SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001,
263 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
264 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004,
265 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
266 } SDL_GLcontextFlag;
267
268 typedef enum
269 {
270 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
271 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
272 } SDL_GLcontextReleaseFlag;
273
274 typedef enum
275 {
276 SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
277 SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
278 } SDL_GLContextResetNotification;
279
280 /* Function prototypes */
281
282 /**
283 * Get the number of video drivers compiled into SDL.
284 *
285 * \returns a number >= 1 on success or a negative error code on failure; call
286 * SDL_GetError() for more information.
287 *
288 * \since This function is available since SDL 2.0.0.
289 *
290 * \sa SDL_GetVideoDriver
291 */
292 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
293
294 /**
295 * Get the name of a built in video driver.
296 *
297 * The video drivers are presented in the order in which they are normally
298 * checked during initialization.
299 *
300 * \param index the index of a video driver
301 * \returns the name of the video driver with the given **index**.
302 *
303 * \since This function is available since SDL 2.0.0.
304 *
305 * \sa SDL_GetNumVideoDrivers
306 */
307 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
308
309 /**
310 * Initialize the video subsystem, optionally specifying a video driver.
311 *
312 * This function initializes the video subsystem, setting up a connection to
313 * the window manager, etc, and determines the available display modes and
314 * pixel formats, but does not initialize a window or graphics mode.
315 *
316 * If you use this function and you haven't used the SDL_INIT_VIDEO flag with
317 * either SDL_Init() or SDL_InitSubSystem(), you should call SDL_VideoQuit()
318 * before calling SDL_Quit().
319 *
320 * It is safe to call this function multiple times. SDL_VideoInit() will call
321 * SDL_VideoQuit() itself if the video subsystem has already been initialized.
322 *
323 * You can use SDL_GetNumVideoDrivers() and SDL_GetVideoDriver() to find a
324 * specific `driver_name`.
325 *
326 * \param driver_name the name of a video driver to initialize, or NULL for
327 * the default driver
328 * \returns 0 on success or a negative error code on failure; call
329 * SDL_GetError() for more information.
330 *
331 * \since This function is available since SDL 2.0.0.
332 *
333 * \sa SDL_GetNumVideoDrivers
334 * \sa SDL_GetVideoDriver
335 * \sa SDL_InitSubSystem
336 * \sa SDL_VideoQuit
337 */
338 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
339
340 /**
341 * Shut down the video subsystem, if initialized with SDL_VideoInit().
342 *
343 * This function closes all windows, and restores the original video mode.
344 *
345 * \since This function is available since SDL 2.0.0.
346 *
347 * \sa SDL_VideoInit
348 */
349 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
350
351 /**
352 * Get the name of the currently initialized video driver.
353 *
354 * \returns the name of the current video driver or NULL if no driver has been
355 * initialized.
356 *
357 * \since This function is available since SDL 2.0.0.
358 *
359 * \sa SDL_GetNumVideoDrivers
360 * \sa SDL_GetVideoDriver
361 */
362 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
363
364 /**
365 * Get the number of available video displays.
366 *
367 * \returns a number >= 1 or a negative error code on failure; call
368 * SDL_GetError() for more information.
369 *
370 * \since This function is available since SDL 2.0.0.
371 *
372 * \sa SDL_GetDisplayBounds
373 */
374 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
375
376 /**
377 * Get the name of a display in UTF-8 encoding.
378 *
379 * \param displayIndex the index of display from which the name should be
380 * queried
381 * \returns the name of a display or NULL for an invalid display index or
382 * failure; call SDL_GetError() for more information.
383 *
384 * \since This function is available since SDL 2.0.0.
385 *
386 * \sa SDL_GetNumVideoDisplays
387 */
388 extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
389
390 /**
391 * Get the desktop area represented by a display.
392 *
393 * The primary display (`displayIndex` zero) is always located at 0,0.
394 *
395 * \param displayIndex the index of the display to query
396 * \param rect the SDL_Rect structure filled in with the display bounds
397 * \returns 0 on success or a negative error code on failure; call
398 * SDL_GetError() for more information.
399 *
400 * \since This function is available since SDL 2.0.0.
401 *
402 * \sa SDL_GetNumVideoDisplays
403 */
404 extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
405
406 /**
407 * Get the usable desktop area represented by a display.
408 *
409 * The primary display (`displayIndex` zero) is always located at 0,0.
410 *
411 * This is the same area as SDL_GetDisplayBounds() reports, but with portions
412 * reserved by the system removed. For example, on Apple's macOS, this
413 * subtracts the area occupied by the menu bar and dock.
414 *
415 * Setting a window to be fullscreen generally bypasses these unusable areas,
416 * so these are good guidelines for the maximum space available to a
417 * non-fullscreen window.
418 *
419 * The parameter `rect` is ignored if it is NULL.
420 *
421 * This function also returns -1 if the parameter `displayIndex` is out of
422 * range.
423 *
424 * \param displayIndex the index of the display to query the usable bounds
425 * from
426 * \param rect the SDL_Rect structure filled in with the display bounds
427 * \returns 0 on success or a negative error code on failure; call
428 * SDL_GetError() for more information.
429 *
430 * \since This function is available since SDL 2.0.5.
431 *
432 * \sa SDL_GetDisplayBounds
433 * \sa SDL_GetNumVideoDisplays
434 */
435 extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
436
437 /**
438 * Get the dots/pixels-per-inch for a display.
439 *
440 * Diagonal, horizontal and vertical DPI can all be optionally returned if the
441 * appropriate parameter is non-NULL.
442 *
443 * A failure of this function usually means that either no DPI information is
444 * available or the `displayIndex` is out of range.
445 *
446 * \param displayIndex the index of the display from which DPI information
447 * should be queried
448 * \param ddpi a pointer filled in with the diagonal DPI of the display; may
449 * be NULL
450 * \param hdpi a pointer filled in with the horizontal DPI of the display; may
451 * be NULL
452 * \param vdpi a pointer filled in with the vertical DPI of the display; may
453 * be NULL
454 * \returns 0 on success or a negative error code on failure; call
455 * SDL_GetError() for more information.
456 *
457 * \since This function is available since SDL 2.0.4.
458 *
459 * \sa SDL_GetNumVideoDisplays
460 */
461 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
462
463 /**
464 * Get the orientation of a display.
465 *
466 * \param displayIndex the index of the display to query
467 * \returns The SDL_DisplayOrientation enum value of the display, or
468 * `SDL_ORIENTATION_UNKNOWN` if it isn't available.
469 *
470 * \since This function is available since SDL 2.0.9.
471 *
472 * \sa SDL_GetNumVideoDisplays
473 */
474 extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
475
476 /**
477 * Get the number of available display modes.
478 *
479 * The `displayIndex` needs to be in the range from 0 to
480 * SDL_GetNumVideoDisplays() - 1.
481 *
482 * \param displayIndex the index of the display to query
483 * \returns a number >= 1 on success or a negative error code on failure; call
484 * SDL_GetError() for more information.
485 *
486 * \since This function is available since SDL 2.0.0.
487 *
488 * \sa SDL_GetDisplayMode
489 * \sa SDL_GetNumVideoDisplays
490 */
491 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
492
493 /**
494 * Get information about a specific display mode.
495 *
496 * The display modes are sorted in this priority:
497 *
498 * - width -> largest to smallest
499 * - height -> largest to smallest
500 * - bits per pixel -> more colors to fewer colors
501 * - packed pixel layout -> largest to smallest
502 * - refresh rate -> highest to lowest
503 *
504 * \param displayIndex the index of the display to query
505 * \param modeIndex the index of the display mode to query
506 * \param mode an SDL_DisplayMode structure filled in with the mode at
507 * `modeIndex`
508 * \returns 0 on success or a negative error code on failure; call
509 * SDL_GetError() for more information.
510 *
511 * \since This function is available since SDL 2.0.0.
512 *
513 * \sa SDL_GetNumDisplayModes
514 */
515 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
516 SDL_DisplayMode * mode);
517
518 /**
519 * Get information about the desktop's display mode.
520 *
521 * There's a difference between this function and SDL_GetCurrentDisplayMode()
522 * when SDL runs fullscreen and has changed the resolution. In that case this
523 * function will return the previous native display mode, and not the current
524 * display mode.
525 *
526 * \param displayIndex the index of the display to query
527 * \param mode an SDL_DisplayMode structure filled in with the current display
528 * mode
529 * \returns 0 on success or a negative error code on failure; call
530 * SDL_GetError() for more information.
531 *
532 * \since This function is available since SDL 2.0.0.
533 *
534 * \sa SDL_GetCurrentDisplayMode
535 * \sa SDL_GetDisplayMode
536 * \sa SDL_SetWindowDisplayMode
537 */
538 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
539
540 /**
541 * Get information about the current display mode.
542 *
543 * There's a difference between this function and SDL_GetDesktopDisplayMode()
544 * when SDL runs fullscreen and has changed the resolution. In that case this
545 * function will return the current display mode, and not the previous native
546 * display mode.
547 *
548 * \param displayIndex the index of the display to query
549 * \param mode an SDL_DisplayMode structure filled in with the current display
550 * mode
551 * \returns 0 on success or a negative error code on failure; call
552 * SDL_GetError() for more information.
553 *
554 * \since This function is available since SDL 2.0.0.
555 *
556 * \sa SDL_GetDesktopDisplayMode
557 * \sa SDL_GetDisplayMode
558 * \sa SDL_GetNumVideoDisplays
559 * \sa SDL_SetWindowDisplayMode
560 */
561 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
562
563
564 /**
565 * Get the closest match to the requested display mode.
566 *
567 * The available display modes are scanned and `closest` is filled in with the
568 * closest mode matching the requested mode and returned. The mode format and
569 * refresh rate default to the desktop mode if they are set to 0. The modes
570 * are scanned with size being first priority, format being second priority,
571 * and finally checking the refresh rate. If all the available modes are too
572 * small, then NULL is returned.
573 *
574 * \param displayIndex the index of the display to query
575 * \param mode an SDL_DisplayMode structure containing the desired display
576 * mode
577 * \param closest an SDL_DisplayMode structure filled in with the closest
578 * match of the available display modes
579 * \returns the passed in value `closest` or NULL if no matching video mode
580 * was available; call SDL_GetError() for more information.
581 *
582 * \since This function is available since SDL 2.0.0.
583 *
584 * \sa SDL_GetDisplayMode
585 * \sa SDL_GetNumDisplayModes
586 */
587 extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
588
589 /**
590 * Get the index of the display associated with a window.
591 *
592 * \param window the window to query
593 * \returns the index of the display containing the center of the window on
594 * success or a negative error code on failure; call SDL_GetError()
595 * for more information.
596 *
597 * \since This function is available since SDL 2.0.0.
598 *
599 * \sa SDL_GetDisplayBounds
600 * \sa SDL_GetNumVideoDisplays
601 */
602 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
603
604 /**
605 * Set the display mode to use when a window is visible at fullscreen.
606 *
607 * This only affects the display mode used when the window is fullscreen. To
608 * change the window size when the window is not fullscreen, use
609 * SDL_SetWindowSize().
610 *
611 * \param window the window to affect
612 * \param mode the SDL_DisplayMode structure representing the mode to use, or
613 * NULL to use the window's dimensions and the desktop's format
614 * and refresh rate
615 * \returns 0 on success or a negative error code on failure; call
616 * SDL_GetError() for more information.
617 *
618 * \since This function is available since SDL 2.0.0.
619 *
620 * \sa SDL_GetWindowDisplayMode
621 * \sa SDL_SetWindowFullscreen
622 */
623 extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
624 const SDL_DisplayMode * mode);
625
626 /**
627 * Query the display mode to use when a window is visible at fullscreen.
628 *
629 * \param window the window to query
630 * \param mode an SDL_DisplayMode structure filled in with the fullscreen
631 * display mode
632 * \returns 0 on success or a negative error code on failure; call
633 * SDL_GetError() for more information.
634 *
635 * \since This function is available since SDL 2.0.0.
636 *
637 * \sa SDL_SetWindowDisplayMode
638 * \sa SDL_SetWindowFullscreen
639 */
640 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
641 SDL_DisplayMode * mode);
642
643 /**
644 * Get the raw ICC profile data for the screen the window is currently on.
645 *
646 * Data returned should be freed with SDL_free.
647 *
648 * \param window the window to query
649 * \param size the size of the ICC profile
650 * \returns the raw ICC profile data on success or NULL on failure; call
651 * SDL_GetError() for more information.
652 *
653 * \since This function is available since SDL 2.0.18.
654 */
655 extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
656
657 /**
658 * Get the pixel format associated with the window.
659 *
660 * \param window the window to query
661 * \returns the pixel format of the window on success or
662 * SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
663 * information.
664 *
665 * \since This function is available since SDL 2.0.0.
666 */
667 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
668
669 /**
670 * Create a window with the specified position, dimensions, and flags.
671 *
672 * `flags` may be any of the following OR'd together:
673 *
674 * - `SDL_WINDOW_FULLSCREEN`: fullscreen window
675 * - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
676 * - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
677 * - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
678 * - `SDL_WINDOW_METAL`: window usable with a Metal instance
679 * - `SDL_WINDOW_HIDDEN`: window is not visible
680 * - `SDL_WINDOW_BORDERLESS`: no window decoration
681 * - `SDL_WINDOW_RESIZABLE`: window can be resized
682 * - `SDL_WINDOW_MINIMIZED`: window is minimized
683 * - `SDL_WINDOW_MAXIMIZED`: window is maximized
684 * - `SDL_WINDOW_INPUT_GRABBED`: window has grabbed input focus
685 * - `SDL_WINDOW_ALLOW_HIGHDPI`: window should be created in high-DPI mode if
686 * supported (>= SDL 2.0.1)
687 *
688 * `SDL_WINDOW_SHOWN` is ignored by SDL_CreateWindow(). The SDL_Window is
689 * implicitly shown if SDL_WINDOW_HIDDEN is not set. `SDL_WINDOW_SHOWN` may be
690 * queried later using SDL_GetWindowFlags().
691 *
692 * On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
693 * property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
694 *
695 * If the window is created with the `SDL_WINDOW_ALLOW_HIGHDPI` flag, its size
696 * in pixels may differ from its size in screen coordinates on platforms with
697 * high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
698 * client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
699 * SDL_GetRendererOutputSize() to query the drawable size in pixels.
700 *
701 * If the window is set fullscreen, the width and height parameters `w` and
702 * `h` will not be used. However, invalid size parameters (e.g. too large) may
703 * still fail. Window size is actually limited to 16384 x 16384 for all
704 * platforms at window creation.
705 *
706 * If the window is created with any of the SDL_WINDOW_OPENGL or
707 * SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
708 * (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
709 * corresponding UnloadLibrary function is called by SDL_DestroyWindow().
710 *
711 * If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
712 * SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
713 *
714 * If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
715 * SDL_CreateWindow() will fail.
716 *
717 * On non-Apple devices, SDL requires you to either not link to the Vulkan
718 * loader or link to a dynamic library version. This limitation may be removed
719 * in a future version of SDL.
720 *
721 * \param title the title of the window, in UTF-8 encoding
722 * \param x the x position of the window, `SDL_WINDOWPOS_CENTERED`, or
723 * `SDL_WINDOWPOS_UNDEFINED`
724 * \param y the y position of the window, `SDL_WINDOWPOS_CENTERED`, or
725 * `SDL_WINDOWPOS_UNDEFINED`
726 * \param w the width of the window, in screen coordinates
727 * \param h the height of the window, in screen coordinates
728 * \param flags 0, or one or more SDL_WindowFlags OR'd together
729 * \returns the window that was created or NULL on failure; call
730 * SDL_GetError() for more information.
731 *
732 * \since This function is available since SDL 2.0.0.
733 *
734 * \sa SDL_CreateWindowFrom
735 * \sa SDL_DestroyWindow
736 */
737 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
738 int x, int y, int w,
739 int h, Uint32 flags);
740
741 /**
742 * Create an SDL window from an existing native window.
743 *
744 * In some cases (e.g. OpenGL) and on some platforms (e.g. Microsoft Windows)
745 * the hint `SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT` needs to be configured
746 * before using SDL_CreateWindowFrom().
747 *
748 * \param data a pointer to driver-dependent window creation data, typically
749 * your native window cast to a void*
750 * \returns the window that was created or NULL on failure; call
751 * SDL_GetError() for more information.
752 *
753 * \since This function is available since SDL 2.0.0.
754 *
755 * \sa SDL_CreateWindow
756 * \sa SDL_DestroyWindow
757 */
758 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
759
760 /**
761 * Get the numeric ID of a window.
762 *
763 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
764 * these events to specific SDL_Window objects.
765 *
766 * \param window the window to query
767 * \returns the ID of the window on success or 0 on failure; call
768 * SDL_GetError() for more information.
769 *
770 * \since This function is available since SDL 2.0.0.
771 *
772 * \sa SDL_GetWindowFromID
773 */
774 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
775
776 /**
777 * Get a window from a stored ID.
778 *
779 * The numeric ID is what SDL_WindowEvent references, and is necessary to map
780 * these events to specific SDL_Window objects.
781 *
782 * \param id the ID of the window
783 * \returns the window associated with `id` or NULL if it doesn't exist; call
784 * SDL_GetError() for more information.
785 *
786 * \since This function is available since SDL 2.0.0.
787 *
788 * \sa SDL_GetWindowID
789 */
790 extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
791
792 /**
793 * Get the window flags.
794 *
795 * \param window the window to query
796 * \returns a mask of the SDL_WindowFlags associated with `window`
797 *
798 * \since This function is available since SDL 2.0.0.
799 *
800 * \sa SDL_CreateWindow
801 * \sa SDL_HideWindow
802 * \sa SDL_MaximizeWindow
803 * \sa SDL_MinimizeWindow
804 * \sa SDL_SetWindowFullscreen
805 * \sa SDL_SetWindowGrab
806 * \sa SDL_ShowWindow
807 */
808 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
809
810 /**
811 * Set the title of a window.
812 *
813 * This string is expected to be in UTF-8 encoding.
814 *
815 * \param window the window to change
816 * \param title the desired window title in UTF-8 format
817 *
818 * \since This function is available since SDL 2.0.0.
819 *
820 * \sa SDL_GetWindowTitle
821 */
822 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
823 const char *title);
824
825 /**
826 * Get the title of a window.
827 *
828 * \param window the window to query
829 * \returns the title of the window in UTF-8 format or "" if there is no
830 * title.
831 *
832 * \since This function is available since SDL 2.0.0.
833 *
834 * \sa SDL_SetWindowTitle
835 */
836 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
837
838 /**
839 * Set the icon for a window.
840 *
841 * \param window the window to change
842 * \param icon an SDL_Surface structure containing the icon for the window
843 *
844 * \since This function is available since SDL 2.0.0.
845 */
846 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
847 SDL_Surface * icon);
848
849 /**
850 * Associate an arbitrary named pointer with a window.
851 *
852 * `name` is case-sensitive.
853 *
854 * \param window the window to associate with the pointer
855 * \param name the name of the pointer
856 * \param userdata the associated pointer
857 * \returns the previous value associated with `name`.
858 *
859 * \since This function is available since SDL 2.0.0.
860 *
861 * \sa SDL_GetWindowData
862 */
863 extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
864 const char *name,
865 void *userdata);
866
867 /**
868 * Retrieve the data pointer associated with a window.
869 *
870 * \param window the window to query
871 * \param name the name of the pointer
872 * \returns the value associated with `name`.
873 *
874 * \since This function is available since SDL 2.0.0.
875 *
876 * \sa SDL_SetWindowData
877 */
878 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
879 const char *name);
880
881 /**
882 * Set the position of a window.
883 *
884 * The window coordinate origin is the upper left of the display.
885 *
886 * \param window the window to reposition
887 * \param x the x coordinate of the window in screen coordinates, or
888 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
889 * \param y the y coordinate of the window in screen coordinates, or
890 * `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
891 *
892 * \since This function is available since SDL 2.0.0.
893 *
894 * \sa SDL_GetWindowPosition
895 */
896 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
897 int x, int y);
898
899 /**
900 * Get the position of a window.
901 *
902 * If you do not need the value for one of the positions a NULL may be passed
903 * in the `x` or `y` parameter.
904 *
905 * \param window the window to query
906 * \param x a pointer filled in with the x position of the window, in screen
907 * coordinates, may be NULL
908 * \param y a pointer filled in with the y position of the window, in screen
909 * coordinates, may be NULL
910 *
911 * \since This function is available since SDL 2.0.0.
912 *
913 * \sa SDL_SetWindowPosition
914 */
915 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
916 int *x, int *y);
917
918 /**
919 * Set the size of a window's client area.
920 *
921 * The window size in screen coordinates may differ from the size in pixels,
922 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
923 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize() or
924 * SDL_GetRendererOutputSize() to get the real client area size in pixels.
925 *
926 * Fullscreen windows automatically match the size of the display mode, and
927 * you should use SDL_SetWindowDisplayMode() to change their size.
928 *
929 * \param window the window to change
930 * \param w the width of the window in pixels, in screen coordinates, must be
931 * > 0
932 * \param h the height of the window in pixels, in screen coordinates, must be
933 * > 0
934 *
935 * \since This function is available since SDL 2.0.0.
936 *
937 * \sa SDL_GetWindowSize
938 * \sa SDL_SetWindowDisplayMode
939 */
940 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
941 int h);
942
943 /**
944 * Get the size of a window's client area.
945 *
946 * NULL can safely be passed as the `w` or `h` parameter if the width or
947 * height value is not desired.
948 *
949 * The window size in screen coordinates may differ from the size in pixels,
950 * if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
951 * with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize(),
952 * SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to get the
953 * real client area size in pixels.
954 *
955 * \param window the window to query the width and height from
956 * \param w a pointer filled in with the width of the window, in screen
957 * coordinates, may be NULL
958 * \param h a pointer filled in with the height of the window, in screen
959 * coordinates, may be NULL
960 *
961 * \since This function is available since SDL 2.0.0.
962 *
963 * \sa SDL_GL_GetDrawableSize
964 * \sa SDL_Vulkan_GetDrawableSize
965 * \sa SDL_SetWindowSize
966 */
967 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
968 int *h);
969
970 /**
971 * Get the size of a window's borders (decorations) around the client area.
972 *
973 * Note: If this function fails (returns -1), the size values will be
974 * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
975 * window in question was borderless.
976 *
977 * Note: This function may fail on systems where the window has not yet been
978 * decorated by the display server (for example, immediately after calling
979 * SDL_CreateWindow). It is recommended that you wait at least until the
980 * window has been presented and composited, so that the window system has a
981 * chance to decorate the window and provide the border dimensions to SDL.
982 *
983 * This function also returns -1 if getting the information is not supported.
984 *
985 * \param window the window to query the size values of the border
986 * (decorations) from
987 * \param top pointer to variable for storing the size of the top border; NULL
988 * is permitted
989 * \param left pointer to variable for storing the size of the left border;
990 * NULL is permitted
991 * \param bottom pointer to variable for storing the size of the bottom
992 * border; NULL is permitted
993 * \param right pointer to variable for storing the size of the right border;
994 * NULL is permitted
995 * \returns 0 on success or a negative error code on failure; call
996 * SDL_GetError() for more information.
997 *
998 * \since This function is available since SDL 2.0.5.
999 *
1000 * \sa SDL_GetWindowSize
1001 */
1002 extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
1003 int *top, int *left,
1004 int *bottom, int *right);
1005
1006 /**
1007 * Set the minimum size of a window's client area.
1008 *
1009 * \param window the window to change
1010 * \param min_w the minimum width of the window in pixels
1011 * \param min_h the minimum height of the window in pixels
1012 *
1013 * \since This function is available since SDL 2.0.0.
1014 *
1015 * \sa SDL_GetWindowMinimumSize
1016 * \sa SDL_SetWindowMaximumSize
1017 */
1018 extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
1019 int min_w, int min_h);
1020
1021 /**
1022 * Get the minimum size of a window's client area.
1023 *
1024 * \param window the window to query
1025 * \param w a pointer filled in with the minimum width of the window, may be
1026 * NULL
1027 * \param h a pointer filled in with the minimum height of the window, may be
1028 * NULL
1029 *
1030 * \since This function is available since SDL 2.0.0.
1031 *
1032 * \sa SDL_GetWindowMaximumSize
1033 * \sa SDL_SetWindowMinimumSize
1034 */
1035 extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
1036 int *w, int *h);
1037
1038 /**
1039 * Set the maximum size of a window's client area.
1040 *
1041 * \param window the window to change
1042 * \param max_w the maximum width of the window in pixels
1043 * \param max_h the maximum height of the window in pixels
1044 *
1045 * \since This function is available since SDL 2.0.0.
1046 *
1047 * \sa SDL_GetWindowMaximumSize
1048 * \sa SDL_SetWindowMinimumSize
1049 */
1050 extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
1051 int max_w, int max_h);
1052
1053 /**
1054 * Get the maximum size of a window's client area.
1055 *
1056 * \param window the window to query
1057 * \param w a pointer filled in with the maximum width of the window, may be
1058 * NULL
1059 * \param h a pointer filled in with the maximum height of the window, may be
1060 * NULL
1061 *
1062 * \since This function is available since SDL 2.0.0.
1063 *
1064 * \sa SDL_GetWindowMinimumSize
1065 * \sa SDL_SetWindowMaximumSize
1066 */
1067 extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
1068 int *w, int *h);
1069
1070 /**
1071 * Set the border state of a window.
1072 *
1073 * This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add
1074 * or remove the border from the actual window. This is a no-op if the
1075 * window's border already matches the requested state.
1076 *
1077 * You can't change the border state of a fullscreen window.
1078 *
1079 * \param window the window of which to change the border state
1080 * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border
1081 *
1082 * \since This function is available since SDL 2.0.0.
1083 *
1084 * \sa SDL_GetWindowFlags
1085 */
1086 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
1087 SDL_bool bordered);
1088
1089 /**
1090 * Set the user-resizable state of a window.
1091 *
1092 * This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and
1093 * allow/disallow user resizing of the window. This is a no-op if the window's
1094 * resizable state already matches the requested state.
1095 *
1096 * You can't change the resizable state of a fullscreen window.
1097 *
1098 * \param window the window of which to change the resizable state
1099 * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow
1100 *
1101 * \since This function is available since SDL 2.0.5.
1102 *
1103 * \sa SDL_GetWindowFlags
1104 */
1105 extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
1106 SDL_bool resizable);
1107
1108 /**
1109 * Set the window to always be above the others.
1110 *
1111 * This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This
1112 * will bring the window to the front and keep the window above the rest.
1113 *
1114 * \param window The window of which to change the always on top state
1115 * \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to
1116 * disable
1117 *
1118 * \since This function is available since SDL 2.0.16.
1119 *
1120 * \sa SDL_GetWindowFlags
1121 */
1122 extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
1123 SDL_bool on_top);
1124
1125 /**
1126 * Show a window.
1127 *
1128 * \param window the window to show
1129 *
1130 * \since This function is available since SDL 2.0.0.
1131 *
1132 * \sa SDL_HideWindow
1133 * \sa SDL_RaiseWindow
1134 */
1135 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
1136
1137 /**
1138 * Hide a window.
1139 *
1140 * \param window the window to hide
1141 *
1142 * \since This function is available since SDL 2.0.0.
1143 *
1144 * \sa SDL_ShowWindow
1145 */
1146 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
1147
1148 /**
1149 * Raise a window above other windows and set the input focus.
1150 *
1151 * \param window the window to raise
1152 *
1153 * \since This function is available since SDL 2.0.0.
1154 */
1155 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
1156
1157 /**
1158 * Make a window as large as possible.
1159 *
1160 * \param window the window to maximize
1161 *
1162 * \since This function is available since SDL 2.0.0.
1163 *
1164 * \sa SDL_MinimizeWindow
1165 * \sa SDL_RestoreWindow
1166 */
1167 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
1168
1169 /**
1170 * Minimize a window to an iconic representation.
1171 *
1172 * \param window the window to minimize
1173 *
1174 * \since This function is available since SDL 2.0.0.
1175 *
1176 * \sa SDL_MaximizeWindow
1177 * \sa SDL_RestoreWindow
1178 */
1179 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
1180
1181 /**
1182 * Restore the size and position of a minimized or maximized window.
1183 *
1184 * \param window the window to restore
1185 *
1186 * \since This function is available since SDL 2.0.0.
1187 *
1188 * \sa SDL_MaximizeWindow
1189 * \sa SDL_MinimizeWindow
1190 */
1191 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
1192
1193 /**
1194 * Set a window's fullscreen state.
1195 *
1196 * `flags` may be `SDL_WINDOW_FULLSCREEN`, for "real" fullscreen with a
1197 * videomode change; `SDL_WINDOW_FULLSCREEN_DESKTOP` for "fake" fullscreen
1198 * that takes the size of the desktop; and 0 for windowed mode.
1199 *
1200 * \param window the window to change
1201 * \param flags `SDL_WINDOW_FULLSCREEN`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
1202 * \returns 0 on success or a negative error code on failure; call
1203 * SDL_GetError() for more information.
1204 *
1205 * \since This function is available since SDL 2.0.0.
1206 *
1207 * \sa SDL_GetWindowDisplayMode
1208 * \sa SDL_SetWindowDisplayMode
1209 */
1210 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
1211 Uint32 flags);
1212
1213 /**
1214 * Get the SDL surface associated with the window.
1215 *
1216 * A new surface will be created with the optimal format for the window, if
1217 * necessary. This surface will be freed when the window is destroyed. Do not
1218 * free this surface.
1219 *
1220 * This surface will be invalidated if the window is resized. After resizing a
1221 * window this function must be called again to return a valid surface.
1222 *
1223 * You may not combine this with 3D or the rendering API on this window.
1224 *
1225 * This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.
1226 *
1227 * \param window the window to query
1228 * \returns the surface associated with the window, or NULL on failure; call
1229 * SDL_GetError() for more information.
1230 *
1231 * \since This function is available since SDL 2.0.0.
1232 *
1233 * \sa SDL_UpdateWindowSurface
1234 * \sa SDL_UpdateWindowSurfaceRects
1235 */
1236 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
1237
1238 /**
1239 * Copy the window surface to the screen.
1240 *
1241 * This is the function you use to reflect any changes to the surface on the
1242 * screen.
1243 *
1244 * This function is equivalent to the SDL 1.2 API SDL_Flip().
1245 *
1246 * \param window the window to update
1247 * \returns 0 on success or a negative error code on failure; call
1248 * SDL_GetError() for more information.
1249 *
1250 * \since This function is available since SDL 2.0.0.
1251 *
1252 * \sa SDL_GetWindowSurface
1253 * \sa SDL_UpdateWindowSurfaceRects
1254 */
1255 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
1256
1257 /**
1258 * Copy areas of the window surface to the screen.
1259 *
1260 * This is the function you use to reflect changes to portions of the surface
1261 * on the screen.
1262 *
1263 * This function is equivalent to the SDL 1.2 API SDL_UpdateRects().
1264 *
1265 * \param window the window to update
1266 * \param rects an array of SDL_Rect structures representing areas of the
1267 * surface to copy
1268 * \param numrects the number of rectangles
1269 * \returns 0 on success or a negative error code on failure; call
1270 * SDL_GetError() for more information.
1271 *
1272 * \since This function is available since SDL 2.0.0.
1273 *
1274 * \sa SDL_GetWindowSurface
1275 * \sa SDL_UpdateWindowSurface
1276 */
1277 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
1278 const SDL_Rect * rects,
1279 int numrects);
1280
1281 /**
1282 * Set a window's input grab mode.
1283 *
1284 * When input is grabbed, the mouse is confined to the window. This function
1285 * will also grab the keyboard if `SDL_HINT_GRAB_KEYBOARD` is set. To grab the
1286 * keyboard without also grabbing the mouse, use SDL_SetWindowKeyboardGrab().
1287 *
1288 * If the caller enables a grab while another window is currently grabbed, the
1289 * other window loses its grab in favor of the caller's window.
1290 *
1291 * \param window the window for which the input grab mode should be set
1292 * \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input
1293 *
1294 * \since This function is available since SDL 2.0.0.
1295 *
1296 * \sa SDL_GetGrabbedWindow
1297 * \sa SDL_GetWindowGrab
1298 */
1299 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
1300 SDL_bool grabbed);
1301
1302 /**
1303 * Set a window's keyboard grab mode.
1304 *
1305 * Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or
1306 * the Meta/Super key. Note that not all system keyboard shortcuts can be
1307 * captured by applications (one example is Ctrl+Alt+Del on Windows).
1308 *
1309 * This is primarily intended for specialized applications such as VNC clients
1310 * or VM frontends. Normal games should not use keyboard grab.
1311 *
1312 * When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the
1313 * window is full-screen to ensure the user is not trapped in your
1314 * application. If you have a custom keyboard shortcut to exit fullscreen
1315 * mode, you may suppress this behavior with
1316 * `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.
1317 *
1318 * If the caller enables a grab while another window is currently grabbed, the
1319 * other window loses its grab in favor of the caller's window.
1320 *
1321 * \param window The window for which the keyboard grab mode should be set.
1322 * \param grabbed This is SDL_TRUE to grab keyboard, and SDL_FALSE to release.
1323 *
1324 * \since This function is available since SDL 2.0.16.
1325 *
1326 * \sa SDL_GetWindowKeyboardGrab
1327 * \sa SDL_SetWindowMouseGrab
1328 * \sa SDL_SetWindowGrab
1329 */
1330 extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
1331 SDL_bool grabbed);
1332
1333 /**
1334 * Set a window's mouse grab mode.
1335 *
1336 * Mouse grab confines the mouse cursor to the window.
1337 *
1338 * \param window The window for which the mouse grab mode should be set.
1339 * \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
1340 *
1341 * \since This function is available since SDL 2.0.16.
1342 *
1343 * \sa SDL_GetWindowMouseGrab
1344 * \sa SDL_SetWindowKeyboardGrab
1345 * \sa SDL_SetWindowGrab
1346 */
1347 extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
1348 SDL_bool grabbed);
1349
1350 /**
1351 * Get a window's input grab mode.
1352 *
1353 * \param window the window to query
1354 * \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise.
1355 *
1356 * \since This function is available since SDL 2.0.0.
1357 *
1358 * \sa SDL_SetWindowGrab
1359 */
1360 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
1361
1362 /**
1363 * Get a window's keyboard grab mode.
1364 *
1365 * \param window the window to query
1366 * \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise.
1367 *
1368 * \since This function is available since SDL 2.0.16.
1369 *
1370 * \sa SDL_SetWindowKeyboardGrab
1371 * \sa SDL_GetWindowGrab
1372 */
1373 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
1374
1375 /**
1376 * Get a window's mouse grab mode.
1377 *
1378 * \param window the window to query
1379 * \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.
1380 *
1381 * \since This function is available since SDL 2.0.16.
1382 *
1383 * \sa SDL_SetWindowKeyboardGrab
1384 * \sa SDL_GetWindowGrab
1385 */
1386 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window);
1387
1388 /**
1389 * Get the window that currently has an input grab enabled.
1390 *
1391 * \returns the window if input is grabbed or NULL otherwise.
1392 *
1393 * \since This function is available since SDL 2.0.4.
1394 *
1395 * \sa SDL_GetWindowGrab
1396 * \sa SDL_SetWindowGrab
1397 */
1398 extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
1399
1400 /**
1401 * Confines the cursor to the specified area of a window.
1402 *
1403 * Note that this does NOT grab the cursor, it only defines the area a cursor
1404 * is restricted to when the window has mouse focus.
1405 *
1406 * \param window The window that will be associated with the barrier.
1407 * \param rect A rectangle area in window-relative coordinates. If NULL the
1408 * barrier for the specified window will be destroyed.
1409 * \returns 0 on success or a negative error code on failure; call
1410 * SDL_GetError() for more information.
1411 *
1412 * \since This function is available since SDL 2.0.18.
1413 *
1414 * \sa SDL_GetWindowMouseRect
1415 * \sa SDL_SetWindowMouseGrab
1416 */
1417 extern DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect);
1418
1419 /**
1420 * Get the mouse confinement rectangle of a window.
1421 *
1422 * \param window The window to query
1423 * \returns A pointer to the mouse confinement rectangle of a window, or NULL
1424 * if there isn't one.
1425 *
1426 * \since This function is available since SDL 2.0.18.
1427 *
1428 * \sa SDL_SetWindowMouseRect
1429 */
1430 extern DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * window);
1431
1432 /**
1433 * Set the brightness (gamma multiplier) for a given window's display.
1434 *
1435 * Despite the name and signature, this method sets the brightness of the
1436 * entire display, not an individual window. A window is considered to be
1437 * owned by the display that contains the window's center pixel. (The index of
1438 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The
1439 * brightness set will not follow the window if it is moved to another
1440 * display.
1441 *
1442 * Many platforms will refuse to set the display brightness in modern times.
1443 * You are better off using a shader to adjust gamma during rendering, or
1444 * something similar.
1445 *
1446 * \param window the window used to select the display whose brightness will
1447 * be changed
1448 * \param brightness the brightness (gamma multiplier) value to set where 0.0
1449 * is completely dark and 1.0 is normal brightness
1450 * \returns 0 on success or a negative error code on failure; call
1451 * SDL_GetError() for more information.
1452 *
1453 * \since This function is available since SDL 2.0.0.
1454 *
1455 * \sa SDL_GetWindowBrightness
1456 * \sa SDL_SetWindowGammaRamp
1457 */
1458 extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
1459
1460 /**
1461 * Get the brightness (gamma multiplier) for a given window's display.
1462 *
1463 * Despite the name and signature, this method retrieves the brightness of the
1464 * entire display, not an individual window. A window is considered to be
1465 * owned by the display that contains the window's center pixel. (The index of
1466 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1467 *
1468 * \param window the window used to select the display whose brightness will
1469 * be queried
1470 * \returns the brightness for the display where 0.0 is completely dark and
1471 * 1.0 is normal brightness.
1472 *
1473 * \since This function is available since SDL 2.0.0.
1474 *
1475 * \sa SDL_SetWindowBrightness
1476 */
1477 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
1478
1479 /**
1480 * Set the opacity for a window.
1481 *
1482 * The parameter `opacity` will be clamped internally between 0.0f
1483 * (transparent) and 1.0f (opaque).
1484 *
1485 * This function also returns -1 if setting the opacity isn't supported.
1486 *
1487 * \param window the window which will be made transparent or opaque
1488 * \param opacity the opacity value (0.0f - transparent, 1.0f - opaque)
1489 * \returns 0 on success or a negative error code on failure; call
1490 * SDL_GetError() for more information.
1491 *
1492 * \since This function is available since SDL 2.0.5.
1493 *
1494 * \sa SDL_GetWindowOpacity
1495 */
1496 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
1497
1498 /**
1499 * Get the opacity of a window.
1500 *
1501 * If transparency isn't supported on this platform, opacity will be reported
1502 * as 1.0f without error.
1503 *
1504 * The parameter `opacity` is ignored if it is NULL.
1505 *
1506 * This function also returns -1 if an invalid window was provided.
1507 *
1508 * \param window the window to get the current opacity value from
1509 * \param out_opacity the float filled in (0.0f - transparent, 1.0f - opaque)
1510 * \returns 0 on success or a negative error code on failure; call
1511 * SDL_GetError() for more information.
1512 *
1513 * \since This function is available since SDL 2.0.5.
1514 *
1515 * \sa SDL_SetWindowOpacity
1516 */
1517 extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
1518
1519 /**
1520 * Set the window as a modal for another window.
1521 *
1522 * \param modal_window the window that should be set modal
1523 * \param parent_window the parent window for the modal window
1524 * \returns 0 on success or a negative error code on failure; call
1525 * SDL_GetError() for more information.
1526 *
1527 * \since This function is available since SDL 2.0.5.
1528 */
1529 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
1530
1531 /**
1532 * Explicitly set input focus to the window.
1533 *
1534 * You almost certainly want SDL_RaiseWindow() instead of this function. Use
1535 * this with caution, as you might give focus to a window that is completely
1536 * obscured by other windows.
1537 *
1538 * \param window the window that should get the input focus
1539 * \returns 0 on success or a negative error code on failure; call
1540 * SDL_GetError() for more information.
1541 *
1542 * \since This function is available since SDL 2.0.5.
1543 *
1544 * \sa SDL_RaiseWindow
1545 */
1546 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
1547
1548 /**
1549 * Set the gamma ramp for the display that owns a given window.
1550 *
1551 * Set the gamma translation table for the red, green, and blue channels of
1552 * the video hardware. Each table is an array of 256 16-bit quantities,
1553 * representing a mapping between the input and output for that channel. The
1554 * input is the index into the array, and the output is the 16-bit gamma value
1555 * at that index, scaled to the output color precision.
1556 *
1557 * Despite the name and signature, this method sets the gamma ramp of the
1558 * entire display, not an individual window. A window is considered to be
1559 * owned by the display that contains the window's center pixel. (The index of
1560 * this display can be retrieved using SDL_GetWindowDisplayIndex().) The gamma
1561 * ramp set will not follow the window if it is moved to another display.
1562 *
1563 * \param window the window used to select the display whose gamma ramp will
1564 * be changed
1565 * \param red a 256 element array of 16-bit quantities representing the
1566 * translation table for the red channel, or NULL
1567 * \param green a 256 element array of 16-bit quantities representing the
1568 * translation table for the green channel, or NULL
1569 * \param blue a 256 element array of 16-bit quantities representing the
1570 * translation table for the blue channel, or NULL
1571 * \returns 0 on success or a negative error code on failure; call
1572 * SDL_GetError() for more information.
1573 *
1574 * \since This function is available since SDL 2.0.0.
1575 *
1576 * \sa SDL_GetWindowGammaRamp
1577 */
1578 extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
1579 const Uint16 * red,
1580 const Uint16 * green,
1581 const Uint16 * blue);
1582
1583 /**
1584 * Get the gamma ramp for a given window's display.
1585 *
1586 * Despite the name and signature, this method retrieves the gamma ramp of the
1587 * entire display, not an individual window. A window is considered to be
1588 * owned by the display that contains the window's center pixel. (The index of
1589 * this display can be retrieved using SDL_GetWindowDisplayIndex().)
1590 *
1591 * \param window the window used to select the display whose gamma ramp will
1592 * be queried
1593 * \param red a 256 element array of 16-bit quantities filled in with the
1594 * translation table for the red channel, or NULL
1595 * \param green a 256 element array of 16-bit quantities filled in with the
1596 * translation table for the green channel, or NULL
1597 * \param blue a 256 element array of 16-bit quantities filled in with the
1598 * translation table for the blue channel, or NULL
1599 * \returns 0 on success or a negative error code on failure; call
1600 * SDL_GetError() for more information.
1601 *
1602 * \since This function is available since SDL 2.0.0.
1603 *
1604 * \sa SDL_SetWindowGammaRamp
1605 */
1606 extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
1607 Uint16 * red,
1608 Uint16 * green,
1609 Uint16 * blue);
1610
1611 /**
1612 * Possible return values from the SDL_HitTest callback.
1613 *
1614 * \sa SDL_HitTest
1615 */
1616 typedef enum
1617 {
1618 SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
1619 SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
1620 SDL_HITTEST_RESIZE_TOPLEFT,
1621 SDL_HITTEST_RESIZE_TOP,
1622 SDL_HITTEST_RESIZE_TOPRIGHT,
1623 SDL_HITTEST_RESIZE_RIGHT,
1624 SDL_HITTEST_RESIZE_BOTTOMRIGHT,
1625 SDL_HITTEST_RESIZE_BOTTOM,
1626 SDL_HITTEST_RESIZE_BOTTOMLEFT,
1627 SDL_HITTEST_RESIZE_LEFT
1628 } SDL_HitTestResult;
1629
1630 /**
1631 * Callback used for hit-testing.
1632 *
1633 * \param win the SDL_Window where hit-testing was set on
1634 * \param area an SDL_Point which should be hit-tested
1635 * \param data what was passed as `callback_data` to SDL_SetWindowHitTest()
1636 * \return an SDL_HitTestResult value.
1637 *
1638 * \sa SDL_SetWindowHitTest
1639 */
1640 typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
1641 const SDL_Point *area,
1642 void *data);
1643
1644 /**
1645 * Provide a callback that decides if a window region has special properties.
1646 *
1647 * Normally windows are dragged and resized by decorations provided by the
1648 * system window manager (a title bar, borders, etc), but for some apps, it
1649 * makes sense to drag them from somewhere else inside the window itself; for
1650 * example, one might have a borderless window that wants to be draggable from
1651 * any part, or simulate its own title bar, etc.
1652 *
1653 * This function lets the app provide a callback that designates pieces of a
1654 * given window as special. This callback is run during event processing if we
1655 * need to tell the OS to treat a region of the window specially; the use of
1656 * this callback is known as "hit testing."
1657 *
1658 * Mouse input may not be delivered to your application if it is within a
1659 * special area; the OS will often apply that input to moving the window or
1660 * resizing the window and not deliver it to the application.
1661 *
1662 * Specifying NULL for a callback disables hit-testing. Hit-testing is
1663 * disabled by default.
1664 *
1665 * Platforms that don't support this functionality will return -1
1666 * unconditionally, even if you're attempting to disable hit-testing.
1667 *
1668 * Your callback may fire at any time, and its firing does not indicate any
1669 * specific behavior (for example, on Windows, this certainly might fire when
1670 * the OS is deciding whether to drag your window, but it fires for lots of
1671 * other reasons, too, some unrelated to anything you probably care about _and
1672 * when the mouse isn't actually at the location it is testing_). Since this
1673 * can fire at any time, you should try to keep your callback efficient,
1674 * devoid of allocations, etc.
1675 *
1676 * \param window the window to set hit-testing on
1677 * \param callback the function to call when doing a hit-test
1678 * \param callback_data an app-defined void pointer passed to **callback**
1679 * \returns 0 on success or -1 on error (including unsupported); call
1680 * SDL_GetError() for more information.
1681 *
1682 * \since This function is available since SDL 2.0.4.
1683 */
1684 extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
1685 SDL_HitTest callback,
1686 void *callback_data);
1687
1688 /**
1689 * Request a window to demand attention from the user.
1690 *
1691 * \param window the window to be flashed
1692 * \param operation the flash operation
1693 * \returns 0 on success or a negative error code on failure; call
1694 * SDL_GetError() for more information.
1695 *
1696 * \since This function is available since SDL 2.0.16.
1697 */
1698 extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
1699
1700 /**
1701 * Destroy a window.
1702 *
1703 * If `window` is NULL, this function will return immediately after setting
1704 * the SDL error message to "Invalid window". See SDL_GetError().
1705 *
1706 * \param window the window to destroy
1707 *
1708 * \since This function is available since SDL 2.0.0.
1709 *
1710 * \sa SDL_CreateWindow
1711 * \sa SDL_CreateWindowFrom
1712 */
1713 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1714
1715
1716 /**
1717 * Check whether the screensaver is currently enabled.
1718 *
1719 * The screensaver is disabled by default since SDL 2.0.2. Before SDL 2.0.2
1720 * the screensaver was enabled by default.
1721 *
1722 * The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.
1723 *
1724 * \returns SDL_TRUE if the screensaver is enabled, SDL_FALSE if it is
1725 * disabled.
1726 *
1727 * \since This function is available since SDL 2.0.0.
1728 *
1729 * \sa SDL_DisableScreenSaver
1730 * \sa SDL_EnableScreenSaver
1731 */
1732 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
1733
1734 /**
1735 * Allow the screen to be blanked by a screen saver.
1736 *
1737 * \since This function is available since SDL 2.0.0.
1738 *
1739 * \sa SDL_DisableScreenSaver
1740 * \sa SDL_IsScreenSaverEnabled
1741 */
1742 extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
1743
1744 /**
1745 * Prevent the screen from being blanked by a screen saver.
1746 *
1747 * If you disable the screensaver, it is automatically re-enabled when SDL
1748 * quits.
1749 *
1750 * \since This function is available since SDL 2.0.0.
1751 *
1752 * \sa SDL_EnableScreenSaver
1753 * \sa SDL_IsScreenSaverEnabled
1754 */
1755 extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
1756
1757
1758 /**
1759 * \name OpenGL support functions
1760 */
1761 /* @{ */
1762
1763 /**
1764 * Dynamically load an OpenGL library.
1765 *
1766 * This should be done after initializing the video driver, but before
1767 * creating any OpenGL windows. If no OpenGL library is loaded, the default
1768 * library will be loaded upon creation of the first OpenGL window.
1769 *
1770 * If you do this, you need to retrieve all of the GL functions used in your
1771 * program from the dynamic library using SDL_GL_GetProcAddress().
1772 *
1773 * \param path the platform dependent OpenGL library name, or NULL to open the
1774 * default OpenGL library
1775 * \returns 0 on success or a negative error code on failure; call
1776 * SDL_GetError() for more information.
1777 *
1778 * \since This function is available since SDL 2.0.0.
1779 *
1780 * \sa SDL_GL_GetProcAddress
1781 * \sa SDL_GL_UnloadLibrary
1782 */
1783 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
1784
1785 /**
1786 * Get an OpenGL function by name.
1787 *
1788 * If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all
1789 * GL functions must be retrieved this way. Usually this is used to retrieve
1790 * function pointers to OpenGL extensions.
1791 *
1792 * There are some quirks to looking up OpenGL functions that require some
1793 * extra care from the application. If you code carefully, you can handle
1794 * these quirks without any platform-specific code, though:
1795 *
1796 * - On Windows, function pointers are specific to the current GL context;
1797 * this means you need to have created a GL context and made it current
1798 * before calling SDL_GL_GetProcAddress(). If you recreate your context or
1799 * create a second context, you should assume that any existing function
1800 * pointers aren't valid to use with it. This is (currently) a
1801 * Windows-specific limitation, and in practice lots of drivers don't suffer
1802 * this limitation, but it is still the way the wgl API is documented to
1803 * work and you should expect crashes if you don't respect it. Store a copy
1804 * of the function pointers that comes and goes with context lifespan.
1805 * - On X11, function pointers returned by this function are valid for any
1806 * context, and can even be looked up before a context is created at all.
1807 * This means that, for at least some common OpenGL implementations, if you
1808 * look up a function that doesn't exist, you'll get a non-NULL result that
1809 * is _NOT_ safe to call. You must always make sure the function is actually
1810 * available for a given GL context before calling it, by checking for the
1811 * existence of the appropriate extension with SDL_GL_ExtensionSupported(),
1812 * or verifying that the version of OpenGL you're using offers the function
1813 * as core functionality.
1814 * - Some OpenGL drivers, on all platforms, *will* return NULL if a function
1815 * isn't supported, but you can't count on this behavior. Check for
1816 * extensions you use, and if you get a NULL anyway, act as if that
1817 * extension wasn't available. This is probably a bug in the driver, but you
1818 * can code defensively for this scenario anyhow.
1819 * - Just because you're on Linux/Unix, don't assume you'll be using X11.
1820 * Next-gen display servers are waiting to replace it, and may or may not
1821 * make the same promises about function pointers.
1822 * - OpenGL function pointers must be declared `APIENTRY` as in the example
1823 * code. This will ensure the proper calling convention is followed on
1824 * platforms where this matters (Win32) thereby avoiding stack corruption.
1825 *
1826 * \param proc the name of an OpenGL function
1827 * \returns a pointer to the named OpenGL function. The returned pointer
1828 * should be cast to the appropriate function signature.
1829 *
1830 * \since This function is available since SDL 2.0.0.
1831 *
1832 * \sa SDL_GL_ExtensionSupported
1833 * \sa SDL_GL_LoadLibrary
1834 * \sa SDL_GL_UnloadLibrary
1835 */
1836 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
1837
1838 /**
1839 * Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
1840 *
1841 * \since This function is available since SDL 2.0.0.
1842 *
1843 * \sa SDL_GL_LoadLibrary
1844 */
1845 extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
1846
1847 /**
1848 * Check if an OpenGL extension is supported for the current context.
1849 *
1850 * This function operates on the current GL context; you must have created a
1851 * context and it must be current before calling this function. Do not assume
1852 * that all contexts you create will have the same set of extensions
1853 * available, or that recreating an existing context will offer the same
1854 * extensions again.
1855 *
1856 * While it's probably not a massive overhead, this function is not an O(1)
1857 * operation. Check the extensions you care about after creating the GL
1858 * context and save that information somewhere instead of calling the function
1859 * every time you need to know.
1860 *
1861 * \param extension the name of the extension to check
1862 * \returns SDL_TRUE if the extension is supported, SDL_FALSE otherwise.
1863 *
1864 * \since This function is available since SDL 2.0.0.
1865 */
1866 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
1867 *extension);
1868
1869 /**
1870 * Reset all previously set OpenGL context attributes to their default values.
1871 *
1872 * \since This function is available since SDL 2.0.2.
1873 *
1874 * \sa SDL_GL_GetAttribute
1875 * \sa SDL_GL_SetAttribute
1876 */
1877 extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
1878
1879 /**
1880 * Set an OpenGL window attribute before window creation.
1881 *
1882 * This function sets the OpenGL attribute `attr` to `value`. The requested
1883 * attributes should be set before creating an OpenGL window. You should use
1884 * SDL_GL_GetAttribute() to check the values after creating the OpenGL
1885 * context, since the values obtained can differ from the requested ones.
1886 *
1887 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to set
1888 * \param value the desired value for the attribute
1889 * \returns 0 on success or a negative error code on failure; call
1890 * SDL_GetError() for more information.
1891 *
1892 * \since This function is available since SDL 2.0.0.
1893 *
1894 * \sa SDL_GL_GetAttribute
1895 * \sa SDL_GL_ResetAttributes
1896 */
1897 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
1898
1899 /**
1900 * Get the actual value for an attribute from the current context.
1901 *
1902 * \param attr an SDL_GLattr enum value specifying the OpenGL attribute to get
1903 * \param value a pointer filled in with the current value of `attr`
1904 * \returns 0 on success or a negative error code on failure; call
1905 * SDL_GetError() for more information.
1906 *
1907 * \since This function is available since SDL 2.0.0.
1908 *
1909 * \sa SDL_GL_ResetAttributes
1910 * \sa SDL_GL_SetAttribute
1911 */
1912 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1913
1914 /**
1915 * Create an OpenGL context for an OpenGL window, and make it current.
1916 *
1917 * Windows users new to OpenGL should note that, for historical reasons, GL
1918 * functions added after OpenGL version 1.1 are not available by default.
1919 * Those functions must be loaded at run-time, either with an OpenGL
1920 * extension-handling library or with SDL_GL_GetProcAddress() and its related
1921 * functions.
1922 *
1923 * SDL_GLContext is an alias for `void *`. It's opaque to the application.
1924 *
1925 * \param window the window to associate with the context
1926 * \returns the OpenGL context associated with `window` or NULL on error; call
1927 * SDL_GetError() for more details.
1928 *
1929 * \since This function is available since SDL 2.0.0.
1930 *
1931 * \sa SDL_GL_DeleteContext
1932 * \sa SDL_GL_MakeCurrent
1933 */
1934 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
1935 window);
1936
1937 /**
1938 * Set up an OpenGL context for rendering into an OpenGL window.
1939 *
1940 * The context must have been created with a compatible window.
1941 *
1942 * \param window the window to associate with the context
1943 * \param context the OpenGL context to associate with the window
1944 * \returns 0 on success or a negative error code on failure; call
1945 * SDL_GetError() for more information.
1946 *
1947 * \since This function is available since SDL 2.0.0.
1948 *
1949 * \sa SDL_GL_CreateContext
1950 */
1951 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
1952 SDL_GLContext context);
1953
1954 /**
1955 * Get the currently active OpenGL window.
1956 *
1957 * \returns the currently active OpenGL window on success or NULL on failure;
1958 * call SDL_GetError() for more information.
1959 *
1960 * \since This function is available since SDL 2.0.0.
1961 */
1962 extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
1963
1964 /**
1965 * Get the currently active OpenGL context.
1966 *
1967 * \returns the currently active OpenGL context or NULL on failure; call
1968 * SDL_GetError() for more information.
1969 *
1970 * \since This function is available since SDL 2.0.0.
1971 *
1972 * \sa SDL_GL_MakeCurrent
1973 */
1974 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
1975
1976 /**
1977 * Get the size of a window's underlying drawable in pixels.
1978 *
1979 * This returns info useful for calling glViewport().
1980 *
1981 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
1982 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
1983 * platform with high-DPI support (Apple calls this "Retina"), and not
1984 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
1985 *
1986 * \param window the window from which the drawable size should be queried
1987 * \param w a pointer to variable for storing the width in pixels, may be NULL
1988 * \param h a pointer to variable for storing the height in pixels, may be
1989 * NULL
1990 *
1991 * \since This function is available since SDL 2.0.1.
1992 *
1993 * \sa SDL_CreateWindow
1994 * \sa SDL_GetWindowSize
1995 */
1996 extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
1997 int *h);
1998
1999 /**
2000 * Set the swap interval for the current OpenGL context.
2001 *
2002 * Some systems allow specifying -1 for the interval, to enable adaptive
2003 * vsync. Adaptive vsync works the same as vsync, but if you've already missed
2004 * the vertical retrace for a given frame, it swaps buffers immediately, which
2005 * might be less jarring for the user during occasional framerate drops. If an
2006 * application requests adaptive vsync and the system does not support it,
2007 * this function will fail and return -1. In such a case, you should probably
2008 * retry the call with 1 for the interval.
2009 *
2010 * Adaptive vsync is implemented for some glX drivers with
2011 * GLX_EXT_swap_control_tear:
2012 *
2013 * https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt
2014 *
2015 * and for some Windows drivers with WGL_EXT_swap_control_tear:
2016 *
2017 * https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt
2018 *
2019 * Read more on the Khronos wiki:
2020 * https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
2021 *
2022 * \param interval 0 for immediate updates, 1 for updates synchronized with
2023 * the vertical retrace, -1 for adaptive vsync
2024 * \returns 0 on success or -1 if setting the swap interval is not supported;
2025 * call SDL_GetError() for more information.
2026 *
2027 * \since This function is available since SDL 2.0.0.
2028 *
2029 * \sa SDL_GL_GetSwapInterval
2030 */
2031 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
2032
2033 /**
2034 * Get the swap interval for the current OpenGL context.
2035 *
2036 * If the system can't determine the swap interval, or there isn't a valid
2037 * current context, this function will return 0 as a safe default.
2038 *
2039 * \returns 0 if there is no vertical retrace synchronization, 1 if the buffer
2040 * swap is synchronized with the vertical retrace, and -1 if late
2041 * swaps happen immediately instead of waiting for the next retrace;
2042 * call SDL_GetError() for more information.
2043 *
2044 * \since This function is available since SDL 2.0.0.
2045 *
2046 * \sa SDL_GL_SetSwapInterval
2047 */
2048 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
2049
2050 /**
2051 * Update a window with OpenGL rendering.
2052 *
2053 * This is used with double-buffered OpenGL contexts, which are the default.
2054 *
2055 * On macOS, make sure you bind 0 to the draw framebuffer before swapping the
2056 * window, otherwise nothing will happen. If you aren't using
2057 * glBindFramebuffer(), this is the default and you won't have to do anything
2058 * extra.
2059 *
2060 * \param window the window to change
2061 *
2062 * \since This function is available since SDL 2.0.0.
2063 */
2064 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
2065
2066 /**
2067 * Delete an OpenGL context.
2068 *
2069 * \param context the OpenGL context to be deleted
2070 *
2071 * \since This function is available since SDL 2.0.0.
2072 *
2073 * \sa SDL_GL_CreateContext
2074 */
2075 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
2076
2077 /* @} *//* OpenGL support functions */
2078
2079
2080 /* Ends C function definitions when using C++ */
2081 #ifdef __cplusplus
2082 }
2083 #endif
2084 #include <SDL2/close_code.h>
2085
2086 #endif /* SDL_video_h_ */
2087
2088 /* vi: set ts=4 sw=4 expandtab: */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 2017, Mark Callow
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file SDL_vulkan.h
23 *
24 * Header file for functions to creating Vulkan surfaces on SDL windows.
25 */
26
27 #ifndef SDL_vulkan_h_
28 #define SDL_vulkan_h_
29
30 #include <SDL2/SDL_video.h>
31
32 #include <SDL2/begin_code.h>
33 /* Set up for C function definitions, even when using C++ */
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Avoid including vulkan.h, don't define VkInstance if it's already included */
39 #ifdef VULKAN_H_
40 #define NO_SDL_VULKAN_TYPEDEFS
41 #endif
42 #ifndef NO_SDL_VULKAN_TYPEDEFS
43 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
44
45 #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
46 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
47 #else
48 #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
49 #endif
50
51 VK_DEFINE_HANDLE(VkInstance)
52 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
53
54 #endif /* !NO_SDL_VULKAN_TYPEDEFS */
55
56 typedef VkInstance SDL_vulkanInstance;
57 typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
58
59 /**
60 * \name Vulkan support functions
61 *
62 * \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API
63 * is compatable with Tizen's implementation of Vulkan in SDL.
64 */
65 /* @{ */
66
67 /**
68 * Dynamically load the Vulkan loader library.
69 *
70 * This should be called after initializing the video driver, but before
71 * creating any Vulkan windows. If no Vulkan loader library is loaded, the
72 * default library will be loaded upon creation of the first Vulkan window.
73 *
74 * It is fairly common for Vulkan applications to link with libvulkan instead
75 * of explicitly loading it at run time. This will work with SDL provided the
76 * application links to a dynamic library and both it and SDL use the same
77 * search path.
78 *
79 * If you specify a non-NULL `path`, an application should retrieve all of the
80 * Vulkan functions it uses from the dynamic library using
81 * SDL_Vulkan_GetVkGetInstanceProcAddr unless you can guarantee `path` points
82 * to the same vulkan loader library the application linked to.
83 *
84 * On Apple devices, if `path` is NULL, SDL will attempt to find the
85 * `vkGetInstanceProcAddr` address within all the Mach-O images of the current
86 * process. This is because it is fairly common for Vulkan applications to
87 * link with libvulkan (and historically MoltenVK was provided as a static
88 * library). If it is not found, on macOS, SDL will attempt to load
89 * `vulkan.framework/vulkan`, `libvulkan.1.dylib`,
90 * `MoltenVK.framework/MoltenVK`, and `libMoltenVK.dylib`, in that order. On
91 * iOS, SDL will attempt to load `libMoltenVK.dylib`. Applications using a
92 * dynamic framework or .dylib must ensure it is included in its application
93 * bundle.
94 *
95 * On non-Apple devices, application linking with a static libvulkan is not
96 * supported. Either do not link to the Vulkan loader or link to a dynamic
97 * library version.
98 *
99 * \param path The platform dependent Vulkan loader library name or NULL
100 * \returns 0 on success or -1 if the library couldn't be loaded; call
101 * SDL_GetError() for more information.
102 *
103 * \since This function is available since SDL 2.0.6.
104 *
105 * \sa SDL_Vulkan_GetVkInstanceProcAddr
106 * \sa SDL_Vulkan_UnloadLibrary
107 */
108 extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
109
110 /**
111 * Get the address of the `vkGetInstanceProcAddr` function.
112 *
113 * This should be called after either calling SDL_Vulkan_LoadLibrary() or
114 * creating an SDL_Window with the `SDL_WINDOW_VULKAN` flag.
115 *
116 * \returns the function pointer for `vkGetInstanceProcAddr` or NULL on error.
117 *
118 * \since This function is available since SDL 2.0.6.
119 */
120 extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
121
122 /**
123 * Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
124 *
125 * \since This function is available since SDL 2.0.6.
126 *
127 * \sa SDL_Vulkan_LoadLibrary
128 */
129 extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
130
131 /**
132 * Get the names of the Vulkan instance extensions needed to create a surface
133 * with SDL_Vulkan_CreateSurface.
134 *
135 * If `pNames` is NULL, then the number of required Vulkan instance extensions
136 * is returned in `pCount`. Otherwise, `pCount` must point to a variable set
137 * to the number of elements in the `pNames` array, and on return the variable
138 * is overwritten with the number of names actually written to `pNames`. If
139 * `pCount` is less than the number of required extensions, at most `pCount`
140 * structures will be written. If `pCount` is smaller than the number of
141 * required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
142 * indicate that not all the required extensions were returned.
143 *
144 * The `window` parameter is currently needed to be valid as of SDL 2.0.8,
145 * however, this parameter will likely be removed in future releases
146 *
147 * \param window A window for which the required Vulkan instance extensions
148 * should be retrieved (will be deprecated in a future release)
149 * \param pCount A pointer to an unsigned int corresponding to the number of
150 * extensions to be returned
151 * \param pNames NULL or a pointer to an array to be filled with required
152 * Vulkan instance extensions
153 * \returns SDL_TRUE on success, SDL_FALSE on error.
154 *
155 * \since This function is available since SDL 2.0.6.
156 *
157 * \sa SDL_Vulkan_CreateSurface
158 */
159 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
160 unsigned int *pCount,
161 const char **pNames);
162
163 /**
164 * Create a Vulkan rendering surface for a window.
165 *
166 * The `window` must have been created with the `SDL_WINDOW_VULKAN` flag and
167 * `instance` must have been created with extensions returned by
168 * SDL_Vulkan_GetInstanceExtensions() enabled.
169 *
170 * \param window The window to which to attach the Vulkan surface
171 * \param instance The Vulkan instance handle
172 * \param surface A pointer to a VkSurfaceKHR handle to output the newly
173 * created surface
174 * \returns SDL_TRUE on success, SDL_FALSE on error.
175 *
176 * \since This function is available since SDL 2.0.6.
177 *
178 * \sa SDL_Vulkan_GetInstanceExtensions
179 * \sa SDL_Vulkan_GetDrawableSize
180 */
181 extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
182 VkInstance instance,
183 VkSurfaceKHR* surface);
184
185 /**
186 * Get the size of the window's underlying drawable dimensions in pixels.
187 *
188 * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
189 * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
190 * platform with high-DPI support (Apple calls this "Retina"), and not
191 * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
192 *
193 * \param window an SDL_Window for which the size is to be queried
194 * \param w Pointer to the variable to write the width to or NULL
195 * \param h Pointer to the variable to write the height to or NULL
196 *
197 * \since This function is available since SDL 2.0.6.
198 *
199 * \sa SDL_GetWindowSize
200 * \sa SDL_CreateWindow
201 * \sa SDL_Vulkan_CreateSurface
202 */
203 extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
204 int *w, int *h);
205
206 /* @} *//* Vulkan support functions */
207
208 /* Ends C function definitions when using C++ */
209 #ifdef __cplusplus
210 }
211 #endif
212 #include <SDL2/close_code.h>
213
214 #endif /* SDL_vulkan_h_ */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file begin_code.h
23 *
24 * This file sets things up for C dynamic library function definitions,
25 * static inlined functions, and structures aligned at 4-byte alignment.
26 * If you don't like ugly C preprocessor code, don't look at this file. :)
27 */
28
29 /* This shouldn't be nested -- included it around code only. */
30 #ifdef _begin_code_h
31 #error Nested inclusion of begin_code.h
32 #endif
33 #define _begin_code_h
34
35 #ifndef SDL_DEPRECATED
36 # if (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
37 # define SDL_DEPRECATED __attribute__((deprecated))
38 # else
39 # define SDL_DEPRECATED
40 # endif
41 #endif
42
43 #ifndef SDL_UNUSED
44 # ifdef __GNUC__
45 # define SDL_UNUSED __attribute__((unused))
46 # else
47 # define SDL_UNUSED
48 # endif
49 #endif
50
51 /* Some compilers use a special export keyword */
52 #ifndef DECLSPEC
53 # if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
54 # ifdef DLL_EXPORT
55 # define DECLSPEC __declspec(dllexport)
56 # else
57 # define DECLSPEC
58 # endif
59 # elif defined(__OS2__)
60 # ifdef BUILD_SDL
61 # define DECLSPEC __declspec(dllexport)
62 # else
63 # define DECLSPEC
64 # endif
65 # else
66 # if defined(__GNUC__) && __GNUC__ >= 4
67 # define DECLSPEC __attribute__ ((visibility("default")))
68 # else
69 # define DECLSPEC
70 # endif
71 # endif
72 #endif
73
74 /* By default SDL uses the C calling convention */
75 #ifndef SDLCALL
76 #if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
77 #define SDLCALL __cdecl
78 #elif defined(__OS2__) || defined(__EMX__)
79 #define SDLCALL _System
80 # if defined (__GNUC__) && !defined(_System)
81 # define _System /* for old EMX/GCC compat. */
82 # endif
83 #else
84 #define SDLCALL
85 #endif
86 #endif /* SDLCALL */
87
88 /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
89 #ifdef __SYMBIAN32__
90 #undef DECLSPEC
91 #define DECLSPEC
92 #endif /* __SYMBIAN32__ */
93
94 /* Force structure packing at 4 byte alignment.
95 This is necessary if the header is included in code which has structure
96 packing set to an alternate value, say for loading structures from disk.
97 The packing is reset to the previous value in close_code.h
98 */
99 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
100 #ifdef _MSC_VER
101 #pragma warning(disable: 4103)
102 #endif
103 #ifdef __clang__
104 #pragma clang diagnostic ignored "-Wpragma-pack"
105 #endif
106 #ifdef __BORLANDC__
107 #pragma nopackwarning
108 #endif
109 #ifdef _WIN64
110 /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
111 #pragma pack(push,8)
112 #else
113 #pragma pack(push,4)
114 #endif
115 #endif /* Compiler needs structure packing set */
116
117 #ifndef SDL_INLINE
118 #if defined(__GNUC__)
119 #define SDL_INLINE __inline__
120 #elif defined(_MSC_VER) || defined(__BORLANDC__) || \
121 defined(__DMC__) || defined(__SC__) || \
122 defined(__WATCOMC__) || defined(__LCC__) || \
123 defined(__DECC) || defined(__CC_ARM)
124 #define SDL_INLINE __inline
125 #ifndef __inline__
126 #define __inline__ __inline
127 #endif
128 #else
129 #define SDL_INLINE inline
130 #ifndef __inline__
131 #define __inline__ inline
132 #endif
133 #endif
134 #endif /* SDL_INLINE not defined */
135
136 #ifndef SDL_FORCE_INLINE
137 #if defined(_MSC_VER)
138 #define SDL_FORCE_INLINE __forceinline
139 #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
140 #define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
141 #else
142 #define SDL_FORCE_INLINE static SDL_INLINE
143 #endif
144 #endif /* SDL_FORCE_INLINE not defined */
145
146 #ifndef SDL_NORETURN
147 #if defined(__GNUC__)
148 #define SDL_NORETURN __attribute__((noreturn))
149 #elif defined(_MSC_VER)
150 #define SDL_NORETURN __declspec(noreturn)
151 #else
152 #define SDL_NORETURN
153 #endif
154 #endif /* SDL_NORETURN not defined */
155
156 /* Apparently this is needed by several Windows compilers */
157 #if !defined(__MACH__)
158 #ifndef NULL
159 #ifdef __cplusplus
160 #define NULL 0
161 #else
162 #define NULL ((void *)0)
163 #endif
164 #endif /* NULL */
165 #endif /* ! Mac OS X - breaks precompiled headers */
166
167 #ifndef SDL_FALLTHROUGH
168 #if (defined(__cplusplus) && __cplusplus >= 201703L) || \
169 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
170 #define SDL_FALLTHROUGH [[fallthrough]]
171 #else
172 #if defined(__has_attribute)
173 #define _HAS_FALLTHROUGH __has_attribute(__fallthrough__)
174 #else
175 #define _HAS_FALLTHROUGH 0
176 #endif /* __has_attribute */
177 #if _HAS_FALLTHROUGH && \
178 ((defined(__GNUC__) && __GNUC__ >= 7) || \
179 (defined(__clang_major__) && __clang_major__ >= 10))
180 #define SDL_FALLTHROUGH __attribute__((__fallthrough__))
181 #else
182 #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */
183 #endif /* _HAS_FALLTHROUGH */
184 #undef _HAS_FALLTHROUGH
185 #endif /* C++17 or C2x */
186 #endif /* SDL_FALLTHROUGH not defined */
0 /*
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19 */
20
21 /**
22 * \file close_code.h
23 *
24 * This file reverses the effects of begin_code.h and should be included
25 * after you finish any function and structure declarations in your headers
26 */
27
28 #ifndef _begin_code_h
29 #error close_code.h included without matching begin_code.h
30 #endif
31 #undef _begin_code_h
32
33 /* Reset structure packing at previous byte alignment */
34 #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
35 #ifdef __BORLANDC__
36 #pragma nopackwarning
37 #endif
38 #pragma pack(pop)
39 #endif /* Compiler needs structure packing set */
0
1 Simple DirectMedia Layer
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
0 The Simple DirectMedia Layer (SDL for short) is a cross-platform
1 library designed to make it easy to write multi-media software,
2 such as games and emulators.
3
4 The Simple DirectMedia Layer library source code is available from:
5 http://www.libsdl.org/
6
7 This library is distributed under the terms of the zlib license:
8 http://zlib.net/zlib_license.html
9
10
11 This packages contains the SDL framework for OS X.
12 Conforming with Apple guidelines, this framework
13 contains both the SDL runtime component and development header files.
14
15
16 To Install:
17 Copy the SDL2.framework to /Library/Frameworks
18
19 You may alternatively install it in <Your home directory>/Library/Frameworks
20 if your access privileges are not high enough.
21
22
23 Additional References:
24
25 - Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are
26 available at:
27 http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
28 Though these are OpenSceneGraph centric, the same exact concepts apply to
29 SDL, thus the videos are recommended for everybody getting started with
30 developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
31 doesn't have any PlugIns to worry about.)
00 /*
11 CHAT: A chat client using the SDL example network and GUI libraries
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
00 /*
11 CHAT: A chat client/server using the SDL example network library
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
00 /*
11 CHATD: A chat server using the SDL example network library
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
194194 IPaddress serverIP;
195195 int i;
196196
197 (void) argc;
198 (void) argv;
199
197200 /* Initialize SDL */
198201 if ( SDL_Init(0) < 0 ) {
199202 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
3838 # which are normally 0-based.
3939 math(EXPR DYLIB_CURRENT_VERSION_MAJOR "${LT_MAJOR} + ${LT_AGE} + 1")
4040 math(EXPR DYLIB_CURRENT_VERSION_MINOR "${LT_REVISION}")
41 math(EXPR DYLIB_COMPAT_VERSION_MAJOR "${LT_MAJOR} + 1")
4241 set(DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.${DYLIB_CURRENT_VERSION_MINOR}.0")
42 set(DYLIB_COMPATIBILITY_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.0.0")
4343 endmacro()
4444
4545 macro(sdl_find_sdl2 TARGET VERSION)
134134 endif()
135135 endfunction()
136136
137 function(get_actual_target)
138 set(dst "${ARGV0}")
139 set(target "${${dst}}")
140 get_target_property(alias "${target}" ALIASED_TARGET)
141 while(alias)
142 set(target "${alias}")
143 get_target_property(alias "${target}" ALIASED_TARGET)
144 endwhile()
145 set("${dst}" "${target}" PARENT_SCOPE)
146 endfunction()
147
137148 function(target_get_dynamic_library DEST TARGET)
138149 set(result)
139 get_target_property(alias "${TARGET}" ALIASED_TARGET)
140 while (alias)
141 set(TARGET "${alias}")
142 get_target_property(alias "${TARGET}" ALIASED_TARGET)
143 endwhile()
150 get_actual_target(TARGET)
144151 if (WIN32)
145152 # Use the target dll of the import library
146153 set(props_to_check IMPORTED_IMPLIB)
205212 endif()
206213 endforeach()
207214 endif()
208 if (NOT result)
215 if(result)
216 string(TOLOWER "${result}" result_lower)
217 if(WIN32 OR OS2)
218 if(NOT result_lower MATCHES ".*dll")
219 message(FATAL_ERROR "\"${result}\" is not a .dll library")
220 endif()
221 elseif(APPLE)
222 if(NOT result_lower MATCHES ".*dylib.*")
223 message(FATAL_ERROR "\"${result}\" is not a .dylib shared library")
224 endif()
225 else()
226 if(NOT result_lower MATCHES ".*so.*")
227 message(FATAL_ERROR "\"${result}\" is not a .so shared library")
228 endif()
229 endif()
230 else()
231 get_target_property(target_type ${TARGET} TYPE)
232 if(target_type MATCHES "SHARED_LIBRARY|MODULE_LIBRARY")
233 # OK
234 elseif(target_type MATCHES "STATIC_LIBRARY|OBJECT_LIBRARY|INTERFACE_LIBRARY|EXECUTABLE")
235 message(SEND_ERROR "${TARGET} is not a shared library, but has type=${target_type}")
236 else()
237 message(WARNING "Unable to extract dynamic library from target=${TARGET}, type=${target_type}.")
238 endif()
209239 set (result "$<TARGET_FILE_NAME:${TARGET}>")
210240 endif()
211241 set(${DEST} ${result} PARENT_SCOPE)
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.71 for SDL2_net 2.2.0.
2 # Generated by GNU Autoconf 2.71 for SDL2_net 2.3.0.
33 #
44 # Report bugs to <https://github.com/libsdl-org/SDL_net/issues>.
55 #
759759 # Identity of this package.
760760 PACKAGE_NAME='SDL2_net'
761761 PACKAGE_TARNAME='SDL2_net'
762 PACKAGE_VERSION='2.2.0'
763 PACKAGE_STRING='SDL2_net 2.2.0'
762 PACKAGE_VERSION='2.3.0'
763 PACKAGE_STRING='SDL2_net 2.3.0'
764764 PACKAGE_BUGREPORT='https://github.com/libsdl-org/SDL_net/issues'
765765 PACKAGE_URL=''
766766
15211521 # Omit some internal or obsolete options to make the list less imposing.
15221522 # This message is too long to be a string in the A/UX 3.1 sh.
15231523 cat <<_ACEOF
1524 \`configure' configures SDL2_net 2.2.0 to adapt to many kinds of systems.
1524 \`configure' configures SDL2_net 2.3.0 to adapt to many kinds of systems.
15251525
15261526 Usage: $0 [OPTION]... [VAR=VALUE]...
15271527
15921592
15931593 if test -n "$ac_init_help"; then
15941594 case $ac_init_help in
1595 short | recursive ) echo "Configuration of SDL2_net 2.2.0:";;
1595 short | recursive ) echo "Configuration of SDL2_net 2.3.0:";;
15961596 esac
15971597 cat <<\_ACEOF
15981598
17061706 test -n "$ac_init_help" && exit $ac_status
17071707 if $ac_init_version; then
17081708 cat <<\_ACEOF
1709 SDL2_net configure 2.2.0
1709 SDL2_net configure 2.3.0
17101710 generated by GNU Autoconf 2.71
17111711
17121712 Copyright (C) 2021 Free Software Foundation, Inc.
19671967 This file contains any messages produced by compilers while
19681968 running configure, to aid debugging if configure makes a mistake.
19691969
1970 It was created by SDL2_net $as_me 2.2.0, which was
1970 It was created by SDL2_net $as_me 2.3.0, which was
19711971 generated by GNU Autoconf 2.71. Invocation command line was
19721972
19731973 $ $0$ac_configure_args_raw
27272727
27282728 MAJOR_VERSION=2
27292729
2730 MINOR_VERSION=2
2730 MINOR_VERSION=3
27312731
27322732 MICRO_VERSION=0
27332733
1136011360
1136111361 # Define the identity of the package.
1136211362 PACKAGE='SDL2_net'
11363 VERSION='2.2.0'
11363 VERSION='2.3.0'
1136411364
1136511365
1136611366 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
1395713957 # report actual input values of CONFIG_FILES etc. instead of their
1395813958 # values after options handling.
1395913959 ac_log="
13960 This file was extended by SDL2_net $as_me 2.2.0, which was
13960 This file was extended by SDL2_net $as_me 2.3.0, which was
1396113961 generated by GNU Autoconf 2.71. Invocation command line was
1396213962
1396313963 CONFIG_FILES = $CONFIG_FILES
1401614016 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1401714017 ac_cs_config='$ac_cs_config_escaped'
1401814018 ac_cs_version="\\
14019 SDL2_net config.status 2.2.0
14019 SDL2_net config.status 2.3.0
1402014020 configured by $0, generated by GNU Autoconf 2.71,
1402114021 with options \\"\$ac_cs_config\\"
1402214022
22 dnl Set various version strings - taken gratefully from the GTk sources
33 # See release_checklist.md
44 m4_define([MAJOR_VERSION_MACRO], [2])
5 m4_define([MINOR_VERSION_MACRO], [2])
5 m4_define([MINOR_VERSION_MACRO], [3])
66 m4_define([MICRO_VERSION_MACRO], [0])
77
88 AC_INIT([SDL2_net],
0 libsdl2-net (2.2.0+git20230109.1.d4fb369+dfsg-1) UNRELEASED; urgency=low
1
2 * New upstream snapshot.
3
4 -- Debian Janitor <janitor@jelmer.uk> Fri, 20 Jan 2023 10:13:55 -0000
5
06 libsdl2-net (2.2.0+dfsg-2) unstable; urgency=medium
17
28 * d/watch: Update for Github website changes
0 # Release checklist
1
2 ## New feature release
3
4 * Update `CHANGES.txt`
5
6 * Bump version number to 2.EVEN.0 in all these locations:
7
8 * `SDL_net.h`:
9 `SDL_NET_MAJOR_VERSION`, `SDL_NET_MINOR_VERSION`, `SDL_NET_PATCHLEVEL`
10 * `configure.ac`:
11 `MAJOR_VERSION`, `MINOR_VERSION`, `MICRO_VERSION`
12 * `CMakeLists.txt`:
13 `MAJOR_VERSION`, `MINOR_VERSION`, `MICRO_VERSION`
14 * `Makefile.os2`:
15 `MAJOR_VERSION`, `MINOR_VERSION`, `MICRO_VERSION`
16 * `version.rc`:
17 `FILEVERSION`, `PRODUCTVERSION`, `FileVersion`, `ProductVersion`
18 * `VisualC/Version.rc`:
19 `FILEVERSION`, `PRODUCTVERSION`, `FileVersion`, `ProductVersion`
20 * `Xcode/Info-Framework.plist`:
21 `CFBundleShortVersionString`, `CFBundleVersion`
22
23 * Bump ABI version information
24
25 * `Xcode/SDL_net.xcodeproj/project.pbxproj`:
26 `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
27 * set first number in `DYLIB_CURRENT_VERSION` to
28 (100 * *minor*) + 1
29 * set second number in `DYLIB_CURRENT_VERSION` to 0
30 * set `DYLIB_COMPATIBILITY_VERSION` to the same value
31
32 * Regenerate `configure`
33
34 * Run `./test-versioning.sh` to verify that everything is consistent
35
36 * Do the release
37
38 ## New bugfix release
39
40 * Check that no new API/ABI was added
41
42 * If it was, do a new feature release (see above) instead
43
44 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
45
46 * Same places as listed above
47
48 * Bump ABI version information
49
50 * `Xcode/SDL_net.xcodeproj/project.pbxproj`:
51 `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
52 * set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
53 * Leave `DYLIB_COMPATIBILITY_VERSION` unchanged
54
55 * Regenerate `configure`
56
57 * Run test/versioning.sh to verify that everything is consistent
58
59 * Do the release
60
61 ## After a feature release
62
63 * Create a branch like `release-2.6.x`
64
65 * Bump version number to 2.ODD.0 for next development branch
66
67 * Same places as listed above
68
69 * Bump ABI version information
70
71 * Same places as listed above
72 * Assume that the next feature release will contain new API/ABI
73
74 * Run test/versioning.sh to verify that everything is consistent
75
76 * Add a new milestone for issues
77
78 ## New development prerelease
79
80 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
81
82 * Same places as listed above
83
84 * Bump ABI version information
85
86 * `Xcode/SDL_net.xcodeproj/project.pbxproj`:
87 `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
88 * set first number in `DYLIB_CURRENT_VERSION` to
89 (100 * *minor*) + *patchlevel* + 1
90 * set second number in `DYLIB_CURRENT_VERSION` to 0
91 * set `DYLIB_COMPATIBILITY_VERSION` to the same value
92
93 * Regenerate `configure`
94
95 * Run test/versioning.sh to verify that everything is consistent
96
97 * Do the release
00 /*
11 showinterfaces: a simple test program to show the network interfaces
2 Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
2 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
33
44 This software is provided 'as-is', without any express or implied
55 warranty. In no event will the authors be held liable for any damages
2626 IPaddress addresses[MAX_ADDRESSES];
2727 int i, count;
2828
29 (void) argc;
30 (void) argv;
31
32 if (SDLNet_Init() < 0) {
33 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
34 "Couldn't initialize net: %s\n",
35 SDLNet_GetError());
36 return 1;
37 }
38
2939 count = SDLNet_GetLocalAddresses(addresses, MAX_ADDRESSES);
3040 SDL_Log("Found %d local addresses", count);
31 for ( i = 0; i < count; ++i ) {
41 for (i = 0; i < count; ++i) {
3242 SDL_Log("%d: %d.%d.%d.%d - %s", i+1,
3343 (addresses[i].host >> 0) & 0xFF,
3444 (addresses[i].host >> 8) & 0xFF,
3646 (addresses[i].host >> 24) & 0xFF,
3747 SDLNet_ResolveIP(&addresses[i]));
3848 }
49
50 SDLNet_Quit();
51
3952 return 0;
4053 }
0 #!/bin/sh
1 # Copyright 2022 Collabora Ltd.
2 # SPDX-License-Identifier: Zlib
3
4 set -eu
5
6 # Needed so sed doesn't report illegal byte sequences on macOS
7 export LC_CTYPE=C
8
9 ref_major=$(sed -ne 's/^#define SDL_NET_MAJOR_VERSION *//p' SDL_net.h)
10 ref_minor=$(sed -ne 's/^#define SDL_NET_MINOR_VERSION *//p' SDL_net.h)
11 ref_micro=$(sed -ne 's/^#define SDL_NET_PATCHLEVEL *//p' SDL_net.h)
12 ref_version="${ref_major}.${ref_minor}.${ref_micro}"
13 ref_sdl_req=$(sed -ne 's/^SDL_VERSION=//p' configure.ac)
14
15 tests=0
16 failed=0
17
18 ok () {
19 tests=$(( tests + 1 ))
20 echo "ok - $*"
21 }
22
23 not_ok () {
24 tests=$(( tests + 1 ))
25 echo "not ok - $*"
26 failed=1
27 }
28
29 major=$(sed -Ene 's/^m4_define\(\[MAJOR_VERSION_MACRO\], \[([0-9]*)\]\)$/\1/p' configure.ac)
30 minor=$(sed -Ene 's/^m4_define\(\[MINOR_VERSION_MACRO\], \[([0-9]*)\]\)$/\1/p' configure.ac)
31 micro=$(sed -Ene 's/^m4_define\(\[MICRO_VERSION_MACRO\], \[([0-9]*)\]\)$/\1/p' configure.ac)
32 version="${major}.${minor}.${micro}"
33
34 if [ "$ref_version" = "$version" ]; then
35 ok "configure.ac $version"
36 else
37 not_ok "configure.ac $version disagrees with SDL_net.h $ref_version"
38 fi
39
40 major=$(sed -ne 's/^MAJOR_VERSION=//p' configure)
41 minor=$(sed -ne 's/^MINOR_VERSION=//p' configure)
42 micro=$(sed -ne 's/^MICRO_VERSION=//p' configure)
43 version="${major}.${minor}.${micro}"
44
45 if [ "$ref_version" = "$version" ]; then
46 ok "configure $version"
47 else
48 not_ok "configure $version disagrees with SDL_net.h $ref_version"
49 fi
50
51 major=$(sed -ne 's/^set(MAJOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
52 minor=$(sed -ne 's/^set(MINOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
53 micro=$(sed -ne 's/^set(MICRO_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
54 sdl_req=$(sed -ne 's/^set(SDL_REQUIRED_VERSION \([0-9.]*\))$/\1/p' CMakeLists.txt)
55 version="${major}.${minor}.${micro}"
56
57 if [ "$ref_version" = "$version" ]; then
58 ok "CMakeLists.txt $version"
59 else
60 not_ok "CMakeLists.txt $version disagrees with SDL_net.h $ref_version"
61 fi
62
63 if [ "$ref_sdl_req" = "$sdl_req" ]; then
64 ok "CMakeLists.txt SDL_REQUIRED_VERSION is consistent"
65 else
66 not_ok "CMakeLists.txt SDL_REQUIRED_VERSION=$sdl_req disagrees with configure.ac SDL_VERSION=$ref_sdl_req"
67 fi
68
69 major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
70 minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
71 micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
72 version="${major}.${minor}.${micro}"
73
74 if [ "$ref_version" = "$version" ]; then
75 ok "Makefile.os2 $version"
76 else
77 not_ok "Makefile.os2 $version disagrees with SDL_net.h $ref_version"
78 fi
79
80 for rcfile in version.rc VisualC/Version.rc; do
81 tuple=$(sed -ne 's/^ *FILEVERSION *//p' "$rcfile" | tr -d '\r')
82 ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
83
84 if [ "$ref_tuple" = "$tuple" ]; then
85 ok "$rcfile FILEVERSION $tuple"
86 else
87 not_ok "$rcfile FILEVERSION $tuple disagrees with SDL_net.h $ref_tuple"
88 fi
89
90 tuple=$(sed -ne 's/^ *PRODUCTVERSION *//p' "$rcfile" | tr -d '\r')
91
92 if [ "$ref_tuple" = "$tuple" ]; then
93 ok "$rcfile PRODUCTVERSION $tuple"
94 else
95 not_ok "$rcfile PRODUCTVERSION $tuple disagrees with SDL_net.h $ref_tuple"
96 fi
97
98 tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]+)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
99 ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
100
101 if [ "$ref_tuple" = "$tuple" ]; then
102 ok "$rcfile FileVersion $tuple"
103 else
104 not_ok "$rcfile FileVersion $tuple disagrees with SDL_net.h $ref_tuple"
105 fi
106
107 tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]+)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
108
109 if [ "$ref_tuple" = "$tuple" ]; then
110 ok "$rcfile ProductVersion $tuple"
111 else
112 not_ok "$rcfile ProductVersion $tuple disagrees with SDL_net.h $ref_tuple"
113 fi
114 done
115
116 version=$(sed -Ene '/CFBundleShortVersionString/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/Info-Framework.plist)
117
118 if [ "$ref_version" = "$version" ]; then
119 ok "Info-Framework.plist CFBundleShortVersionString $version"
120 else
121 not_ok "Info-Framework.plist CFBundleShortVersionString $version disagrees with SDL_net.h $ref_version"
122 fi
123
124 version=$(sed -Ene '/CFBundleVersion/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/Info-Framework.plist)
125
126 if [ "$ref_version" = "$version" ]; then
127 ok "Info-Framework.plist CFBundleVersion $version"
128 else
129 not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_net.h $ref_version"
130 fi
131
132 # For simplicity this assumes we'll never break ABI before SDL 3.
133 dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL_net.xcodeproj/project.pbxproj)
134
135 case "$ref_minor" in
136 (*[02468])
137 major="$(( ref_minor * 100 + 1 ))"
138 minor="0"
139 ;;
140 (*)
141 major="$(( ref_minor * 100 + ref_micro + 1 ))"
142 minor="0"
143 ;;
144 esac
145
146 ref="${major}.${minor}.0
147 ${major}.${minor}.0"
148
149 if [ "$ref" = "$dylib_compat" ]; then
150 ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is consistent"
151 else
152 not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent, expected $ref, got $dylib_compat"
153 fi
154
155 dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL_net.xcodeproj/project.pbxproj)
156
157 case "$ref_minor" in
158 (*[02468])
159 major="$(( ref_minor * 100 + 1 ))"
160 minor="$ref_micro"
161 ;;
162 (*)
163 major="$(( ref_minor * 100 + ref_micro + 1 ))"
164 minor="0"
165 ;;
166 esac
167
168 ref="${major}.${minor}.0
169 ${major}.${minor}.0"
170
171 if [ "$ref" = "$dylib_cur" ]; then
172 ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
173 else
174 not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent, expected $ref, got $dylib_cur"
175 fi
176
177 sdl_req=$(sed -ne 's/\$sdl2_version = "\([0-9.]*\)"$/\1/p' .github/fetch_sdl_vc.ps1)
178
179 if [ "$ref_sdl_req" = "$sdl_req" ]; then
180 ok ".github/fetch_sdl_vc.ps1 $sdl_req"
181 else
182 not_ok ".github/fetch_sdl_vc.ps1 sdl2_version=$sdl_req disagrees with configure.ac SDL_VERSION=$ref_sdl_req"
183 fi
184
185 echo "1..$tests"
186 exit "$failed"
0 #!/bin/sh
1
2 # Run this script from the root of $srcdir to touch the
3 # autotools generated files, so that the build procedure
4 # doesn't attempt to regenerate them.
5
6 touch aclocal.m4 configure Makefile.in
88 //
99
1010 VS_VERSION_INFO VERSIONINFO
11 FILEVERSION 2,2,0,0
12 PRODUCTVERSION 2,2,0,0
11 FILEVERSION 2,3,0,0
12 PRODUCTVERSION 2,3,0,0
1313 FILEFLAGSMASK 0x3fL
1414 FILEFLAGS 0x0L
1515 FILEOS 0x40004L
2222 BEGIN
2323 VALUE "CompanyName", "\0"
2424 VALUE "FileDescription", "SDL_net\0"
25 VALUE "FileVersion", "2, 2, 0, 0\0"
25 VALUE "FileVersion", "2, 3, 0, 0\0"
2626 VALUE "InternalName", "SDL_net\0"
27 VALUE "LegalCopyright", "Copyright © 2022 Sam Lantinga\0"
27 VALUE "LegalCopyright", "Copyright © 2023 Sam Lantinga\0"
2828 VALUE "OriginalFilename", "SDL_net.dll\0"
2929 VALUE "ProductName", "Simple DirectMedia Layer\0"
30 VALUE "ProductVersion", "2, 2, 0, 0\0"
30 VALUE "ProductVersion", "2, 3, 0, 0\0"
3131 END
3232 END
3333 BLOCK "VarFileInfo"